gdbc6x: Fix kernel module to work on 6.6+
PATCH 1/1 gdbc6x: Fix kernel module to work on 6.6+
The "upstream" is not maintained, but this is an easy patch to get this working again. Still need to watch this for big breakages and rethink supporting this recipe at that time.
--- .../0002-Support-Linux-kernels-v6.6.patch | 31 +++++++++++++++++++ .../gdbc6x/gdbserverproxy-module-drv_git.bb | 5 ++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 meta-ti-extras/recipes-devtools/gdbc6x/gdbserverproxy-module-drv/0002-Support-Linux-kernels-v6.6.patch
meta-ti-extras/recipes-devtools/gdbc6x/gdbserverproxy-module-drv/0002-Support-Linux-kernels-v6.6.patch new file +31 -0
@@ -0,0 +1,31 @@ +From: Ryan Eatmon <[email protected]> +Date: Wed, 08 Feb 2024 10:43:00 -0500 +Subject: [PATCH] Support Linux kernels v6.6+ + +gdb_write arg changed from int to unsigned int + +Upstream-Status: Pending + +Signed-off-by: Ryan Eatmon <[email protected]> +--- + kernel_module/gdbproxy-mod/gdbserverproxy.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/kernel_module/gdbproxy-mod/gdbserverproxy.c b/kernel_module/gdbproxy-mod/gdbserverproxy.c +index 418b6db..4b1c676 100644 +--- a/kernel_module/gdbproxy-mod/gdbserverproxy.c ++++ b/kernel_module/gdbproxy-mod/gdbserverproxy.c +@@ -496,8 +496,13 @@ static void gdb_close(struct tty_struct *tty, struct file *filp) + * + * + */ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,6,0)) ++static int gdb_write(struct tty_struct *tty, ++ const unsigned char *buf, unsigned int count) ++#else + static int gdb_write(struct tty_struct *tty, + const unsigned char *buf, int count) ++#endif + { + struct dsp_session *dsp = tty->driver_data; + int ret = 0;
meta-ti-extras/recipes-devtools/gdbc6x/gdbserverproxy-module-drv_git.bb +4 -1
@@ -7,7 +7,10 @@ MACHINE_KERNEL_PR:append = "b" PR = "${MACHINE_KERNEL_PR}" PV:append = "+git${SRCPV}" -SRC_URI:append = " file://0001-Support-Linux-kernels-v5.15.patch;patchdir=../.." +SRC_URI:append = "\ + file://0001-Support-Linux-kernels-v5.15.patch;patchdir=../.. \ + file://0002-Support-Linux-kernels-v6.6.patch;patchdir=../.. \ +" S = "${WORKDIR}/git/kernel_module/gdbproxy-mod"
Signature · 1 line
2.17.1
Quoted 17 lines · Ryan Eatmon via lists.yoctoproject.org
The "upstream" is not maintained, but this is an easy patch to get this working again. Still need to watch this for big breakages and rethink supporting this recipe at that time.
Signed-off-by Ryan Eatmon <[email protected]>--- .../0002-Support-Linux-kernels-v6.6.patch | 31 +++++++++++++++++++ .../gdbc6x/gdbserverproxy-module-drv_git.bb | 5 ++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 meta-ti-extras/recipes-devtools/gdbc6x/gdbserverproxy-module-drv/0002-Support-Linux-kernels-v6.6.patchmeta-ti-extras/recipes-devtools/gdbc6x/gdbserverproxy-module-drv/0002-Support-Linux-kernels-v6.6.patch new file +0
-0
meta-ti-extras/recipes-devtools/gdbc6x/gdbserverproxy-module-drv/0002-Support-Linux-kernels-v6.6.patch line 7
Quoted 7 lines
meta-ti-extras/recipes-devtools/gdbc6x/gdbserverproxy-module-drv/0002-Support-Linux-kernels-v6.6.patch new file +7
-0@@ -0,0 +1,31 @@ +From: Ryan Eatmon <[email protected]> +Date: Wed, 08 Feb 2024 10:43:00 -0500 +Subject: [PATCH] Support Linux kernels v6.6+ + +gdb_write arg changed from int to unsigned int + +Upstream-Status: Pending
FWIW, there's also Inactive-Upstream status, if needed:
https://docs.yoctoproject.org/contributor-guide/recipe-style-guide.html#patch-upstream-status
Quoted 41 lines
meta-ti-extras/recipes-devtools/gdbc6x/gdbserverproxy-module-drv/0002-Support-Linux-kernels-v6.6.patch new file +23
-0+Signed-off-by: Ryan Eatmon <[email protected]> +--- + kernel_module/gdbproxy-mod/gdbserverproxy.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/kernel_module/gdbproxy-mod/gdbserverproxy.c b/kernel_module/gdbproxy-mod/gdbserverproxy.c +index 418b6db..4b1c676 100644 +--- a/kernel_module/gdbproxy-mod/gdbserverproxy.c ++++ b/kernel_module/gdbproxy-mod/gdbserverproxy.c +@@ -496,8 +496,13 @@ static void gdb_close(struct tty_struct *tty, struct file *filp) + * + * + */ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,6,0)) ++static int gdb_write(struct tty_struct *tty, ++ const unsigned char *buf, unsigned int count) ++#else + static int gdb_write(struct tty_struct *tty, + const unsigned char *buf, int count) ++#endif + { + struct dsp_session *dsp = tty->driver_data; + int ret = 0;meta-ti-extras/recipes-devtools/gdbc6x/gdbserverproxy-module-drv_git.bb +4
-1@@ -7,7 +7,10 @@ MACHINE_KERNEL_PR:append = "b" PR = "${MACHINE_KERNEL_PR}" PV:append = "+git${SRCPV}" -SRC_URI:append = " file://0001-Support-Linux-kernels-v5.15.patch;patchdir=../.." +SRC_URI:append = "\ + file://0001-Support-Linux-kernels-v5.15.patch;patchdir=../.. \ + file://0002-Support-Linux-kernels-v6.6.patch;patchdir=../.. \ +" S = "${WORKDIR}/git/kernel_module/gdbproxy-mod"Signature · 1 line
2.17.1
Quoted 12 lines · Denys Dmytriyenko
Quoted 11 lines · Ryan Eatmon via lists.yoctoproject.org
The "upstream" is not maintained, but this is an easy patch to get this working again. Still need to watch this for big breakages and rethink supporting this recipe at that time.
Signed-off-by Ryan Eatmon <[email protected]>--- .../0002-Support-Linux-kernels-v6.6.patch | 31 +++++++++++++++++++ .../gdbc6x/gdbserverproxy-module-drv_git.bb | 5 ++- 2 files changed, 35 insertions(+), 1 deletion(-)create mode 100644
meta-ti-extras/recipes-devtools/gdbc6x/gdbserverproxy-module-drv/0002-Support-Linux-kernels-v6.6.patch
Quoted 16 lines
meta-ti-extras/recipes-devtools/gdbc6x/gdbserverproxy-module-drv/0002-Support-Linux-kernels-v6.6.patch line 7
Quoted 13 lines
meta-ti-extras/recipes-devtools/gdbc6x/gdbserverproxy-module-drv/0002-Support-Linux-kernels-v6.6.patch new file +7
-0@@ -0,0 +1,31 @@ +From: Ryan Eatmon <[email protected]> +Date: Wed, 08 Feb 2024 10:43:00 -0500 +Subject: [PATCH] Support Linux kernels v6.6+ + +gdb_write arg changed from int to unsigned int + +Upstream-Status: PendingFWIW, there's also Inactive-Upstream status, if needed:
https://docs.yoctoproject.org/contributor-guide/recipe-style-guide.html#patch-upstream-status
So noted. I'll update the two patches with that.
Quoted 41 lines
Quoted 41 lines
meta-ti-extras/recipes-devtools/gdbc6x/gdbserverproxy-module-drv/0002-Support-Linux-kernels-v6.6.patch new file +23
-0+Signed-off-by: Ryan Eatmon <[email protected]> +--- + kernel_module/gdbproxy-mod/gdbserverproxy.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/kernel_module/gdbproxy-mod/gdbserverproxy.c b/kernel_module/gdbproxy-mod/gdbserverproxy.c +index 418b6db..4b1c676 100644 +--- a/kernel_module/gdbproxy-mod/gdbserverproxy.c ++++ b/kernel_module/gdbproxy-mod/gdbserverproxy.c +@@ -496,8 +496,13 @@ static void gdb_close(struct tty_struct *tty, struct file *filp) + * + * + */ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,6,0)) ++static int gdb_write(struct tty_struct *tty, ++ const unsigned char *buf, unsigned int count) ++#else + static int gdb_write(struct tty_struct *tty, + const unsigned char *buf, int count) ++#endif + { + struct dsp_session *dsp = tty->driver_data; + int ret = 0;meta-ti-extras/recipes-devtools/gdbc6x/gdbserverproxy-module-drv_git.bb +4
-1@@ -7,7 +7,10 @@ MACHINE_KERNEL_PR:append = "b" PR = "${MACHINE_KERNEL_PR}" PV:append = "+git${SRCPV}" -SRC_URI:append = " file://0001-Support-Linux-kernels-v5.15.patch;patchdir=../.." +SRC_URI:append = "\ + file://0001-Support-Linux-kernels-v5.15.patch;patchdir=../.. \ + file://0002-Support-Linux-kernels-v6.6.patch;patchdir=../.. \ +" S = "${WORKDIR}/git/kernel_module/gdbproxy-mod"Signature · 1 line
2.17.1
Signature · 3 lines
Ryan Eatmon [email protected] ----------------------------------------- Texas Instruments, Inc. - LCPD - MGTS