diff options
author | Andrew Davis <afd@ti.com> | 2023-04-18 11:59:38 -0500 |
---|---|---|
committer | Ryan Eatmon <reatmon@ti.com> | 2023-04-18 14:26:18 -0500 |
commit | 71439a82f08c1a94b964a1929a31611f9eb214ba (patch) | |
tree | 068c957315af2c611e8597c7ad6bd99dd6d3915f | |
parent | f59ad3d3680bacb563ed4790acf3cbcc229e24dd (diff) | |
download | meta-ti-71439a82f08c1a94b964a1929a31611f9eb214ba.tar.gz |
gdbc6x: Fix kernel module to work on v5.15+
Small changes, the "upstream" doesn't look to be maintained anymore,
so if we get any more breaks it might be time to remove this recipe.
Signed-off-by: Andrew Davis <afd@ti.com>
Signed-off-by: Ryan Eatmon <reatmon@ti.com>
-rw-r--r-- | meta-ti-extras/recipes-devtools/gdbc6x/gdbserverproxy-module-drv/0001-Support-Linux-kernels-v5.15.patch | 40 | ||||
-rw-r--r-- | meta-ti-extras/recipes-devtools/gdbc6x/gdbserverproxy-module-drv_git.bb | 2 |
2 files changed, 42 insertions, 0 deletions
diff --git a/meta-ti-extras/recipes-devtools/gdbc6x/gdbserverproxy-module-drv/0001-Support-Linux-kernels-v5.15.patch b/meta-ti-extras/recipes-devtools/gdbc6x/gdbserverproxy-module-drv/0001-Support-Linux-kernels-v5.15.patch new file mode 100644 index 00000000..473d075d --- /dev/null +++ b/meta-ti-extras/recipes-devtools/gdbc6x/gdbserverproxy-module-drv/0001-Support-Linux-kernels-v5.15.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | From 7e6e1312629f9bc7a24871f7f395f2d288a1758f Mon Sep 17 00:00:00 2001 | ||
2 | From: Andrew Davis <afd@ti.com> | ||
3 | Date: Tue, 18 Apr 2023 11:38:54 -0500 | ||
4 | Subject: [PATCH] Support Linux kernels v5.15+ | ||
5 | |||
6 | put_tty_driver was removed and write_room return type has changed. | ||
7 | |||
8 | Function tty_driver_kref_put has been around a while, so no need | ||
9 | to do a kernel version check. | ||
10 | |||
11 | Upstream-Status: Pending | ||
12 | Signed-off-by: Andrew Davis <afd@ti.com> | ||
13 | --- | ||
14 | kernel_module/gdbproxy-mod/gdbserverproxy.c | 6 +++++- | ||
15 | 1 file changed, 5 insertions(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/kernel_module/gdbproxy-mod/gdbserverproxy.c b/kernel_module/gdbproxy-mod/gdbserverproxy.c | ||
18 | index 418b6db..4b1c676 100644 | ||
19 | --- a/kernel_module/gdbproxy-mod/gdbserverproxy.c | ||
20 | +++ b/kernel_module/gdbproxy-mod/gdbserverproxy.c | ||
21 | @@ -540,7 +540,11 @@ static int gdb_write(struct tty_struct *tty, | ||
22 | * | ||
23 | * | ||
24 | */ | ||
25 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,15,0)) | ||
26 | +static unsigned int gdb_write_room(struct tty_struct *tty) | ||
27 | +#else | ||
28 | static int gdb_write_room(struct tty_struct *tty) | ||
29 | +#endif | ||
30 | { | ||
31 | return GDB_STR_SIZE; | ||
32 | } | ||
33 | @@ -914,7 +918,7 @@ static int __init gdb_dev_init(void) | ||
34 | if (ret < 0) { | ||
35 | |||
36 | printk(KERN_ERR "Couldn't register gdbtty driver.\n"); | ||
37 | - put_tty_driver(tty_gdb_driver); | ||
38 | + tty_driver_kref_put(tty_gdb_driver); | ||
39 | return ret; | ||
40 | } | ||
diff --git a/meta-ti-extras/recipes-devtools/gdbc6x/gdbserverproxy-module-drv_git.bb b/meta-ti-extras/recipes-devtools/gdbc6x/gdbserverproxy-module-drv_git.bb index cb9e4c24..60492f81 100644 --- a/meta-ti-extras/recipes-devtools/gdbc6x/gdbserverproxy-module-drv_git.bb +++ b/meta-ti-extras/recipes-devtools/gdbc6x/gdbserverproxy-module-drv_git.bb | |||
@@ -7,6 +7,8 @@ MACHINE_KERNEL_PR:append = "b" | |||
7 | PR = "${MACHINE_KERNEL_PR}" | 7 | PR = "${MACHINE_KERNEL_PR}" |
8 | PV:append = "+git${SRCPV}" | 8 | PV:append = "+git${SRCPV}" |
9 | 9 | ||
10 | SRC_URI:append = " file://0001-Support-Linux-kernels-v5.15.patch;patchdir=../.." | ||
11 | |||
10 | S = "${WORKDIR}/git/kernel_module/gdbproxy-mod" | 12 | S = "${WORKDIR}/git/kernel_module/gdbproxy-mod" |
11 | 13 | ||
12 | inherit module | 14 | inherit module |