summaryrefslogtreecommitdiffstats
path: root/meta-ti-extras
diff options
context:
space:
mode:
authorAndrew Davis <afd@ti.com>2023-04-18 11:59:38 -0500
committerRyan Eatmon <reatmon@ti.com>2023-04-18 15:01:45 -0500
commit76bd751f74b6dbe6bd93335593fe263fd1b9bade (patch)
tree27f631a9814444490d0504e6c872338d39aea5bb /meta-ti-extras
parentbc894bf52eaa4359eaa64a64e950accd099a81cb (diff)
downloadmeta-ti-76bd751f74b6dbe6bd93335593fe263fd1b9bade.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>
Diffstat (limited to 'meta-ti-extras')
-rw-r--r--meta-ti-extras/recipes-devtools/gdbc6x/gdbserverproxy-module-drv/0001-Support-Linux-kernels-v5.15.patch40
-rw-r--r--meta-ti-extras/recipes-devtools/gdbc6x/gdbserverproxy-module-drv_git.bb2
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 @@
1From 7e6e1312629f9bc7a24871f7f395f2d288a1758f Mon Sep 17 00:00:00 2001
2From: Andrew Davis <afd@ti.com>
3Date: Tue, 18 Apr 2023 11:38:54 -0500
4Subject: [PATCH] Support Linux kernels v5.15+
5
6put_tty_driver was removed and write_room return type has changed.
7
8Function tty_driver_kref_put has been around a while, so no need
9to do a kernel version check.
10
11Upstream-Status: Pending
12Signed-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
17diff --git a/kernel_module/gdbproxy-mod/gdbserverproxy.c b/kernel_module/gdbproxy-mod/gdbserverproxy.c
18index 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"
7PR = "${MACHINE_KERNEL_PR}" 7PR = "${MACHINE_KERNEL_PR}"
8PV:append = "+git${SRCPV}" 8PV:append = "+git${SRCPV}"
9 9
10SRC_URI:append = " file://0001-Support-Linux-kernels-v5.15.patch;patchdir=../.."
11
10S = "${WORKDIR}/git/kernel_module/gdbproxy-mod" 12S = "${WORKDIR}/git/kernel_module/gdbproxy-mod"
11 13
12inherit module 14inherit module