aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2022-05-04 15:56:06 -0400
committerScott Murray <scott.murray@konsulko.com>2022-05-04 15:56:06 -0400
commitcab8ffa1594bd44df835500dd5498e45052f81ff (patch)
treebb50b930d21118de79a618c3da15768ef15921a3
parent6bbbc945c695393a1c1602e1b92f03debf8f49a9 (diff)
meta-agl-basesystem: fix kernel-module-evklib build
Add a patch to fix building kernel-module-evklib against 5.10.0 or newer kernels, which is required to fix building the test image for qemux86-64 (which now has 5.15). Bug-AGL: SPEC-4343 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: I9ad382d2f0136ed27e100884c8ed82c0ee1c785c
-rw-r--r--meta-oem-production-readiness/meta-agl-basesystem/recipes-kernel/kernel-module-evklib/kernel-module-evklib/0001-Handle-switch-to-proc_ops.patch60
-rw-r--r--meta-oem-production-readiness/meta-agl-basesystem/recipes-kernel/kernel-module-evklib/kernel-module-evklib_1.0.0.bb4
2 files changed, 63 insertions, 1 deletions
diff --git a/meta-oem-production-readiness/meta-agl-basesystem/recipes-kernel/kernel-module-evklib/kernel-module-evklib/0001-Handle-switch-to-proc_ops.patch b/meta-oem-production-readiness/meta-agl-basesystem/recipes-kernel/kernel-module-evklib/kernel-module-evklib/0001-Handle-switch-to-proc_ops.patch
new file mode 100644
index 00000000..8d25a0da
--- /dev/null
+++ b/meta-oem-production-readiness/meta-agl-basesystem/recipes-kernel/kernel-module-evklib/kernel-module-evklib/0001-Handle-switch-to-proc_ops.patch
@@ -0,0 +1,60 @@
+From 8755cc145f867d9c82831c6ba7688e3614e394b1 Mon Sep 17 00:00:00 2001
+From: Scott Murray <scott.murray@konsulko.com>
+Date: Wed, 4 May 2022 15:48:10 -0400
+Subject: [PATCH] Handle switch to proc_ops
+
+The proc API switched to using proc_ops instead of file_operations
+in 5.10, add conditional definitions to get the driver compiling
+for both pre/post 5.10.0 for now.
+
+Bug-AGL: SPEC-4343
+
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
+---
+ module/kernel-module-evklib/evk_lib.c | 23 +++++++++++++++++++++++
+ 1 file changed, 23 insertions(+)
+
+diff --git a/module/kernel-module-evklib/evk_lib.c b/module/kernel-module-evklib/evk_lib.c
+index e6dd238..ff8a749 100755
+--- a/module/kernel-module-evklib/evk_lib.c
++++ b/module/kernel-module-evklib/evk_lib.c
+@@ -1839,6 +1839,7 @@ evk_procFS_queue_open(struct inode *inode, struct file *file)
+ return single_open(file, evk_procFS_queue_show, NULL);
+ }
+
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
+ static struct file_operations evk_proc_flag_fops = {
+ .owner = THIS_MODULE,
+ .open = evk_procFS_flag_open,
+@@ -1862,6 +1863,28 @@ static struct file_operations evk_proc_queue_fops = {
+ .llseek = seq_lseek,
+ .release = single_release,
+ };
++#else
++static struct proc_ops evk_proc_flag_fops = {
++ .proc_open = evk_procFS_flag_open,
++ .proc_read = seq_read,
++ .proc_lseek = seq_lseek,
++ .proc_release = single_release,
++};
++
++static struct proc_ops evk_proc_flag64_fops = {
++ .proc_open = evk_procFS_flag64_open,
++ .proc_read = seq_read,
++ .proc_lseek = seq_lseek,
++ .proc_release = single_release,
++};
++
++static struct proc_ops evk_proc_queue_fops = {
++ .proc_open = evk_procFS_queue_open,
++ .proc_read = seq_read,
++ .proc_lseek = seq_lseek,
++ .proc_release = single_release,
++};
++#endif
+ #endif /*ENABLE_PROC_FS*/
+
+ __init int
+--
+2.35.1
+
diff --git a/meta-oem-production-readiness/meta-agl-basesystem/recipes-kernel/kernel-module-evklib/kernel-module-evklib_1.0.0.bb b/meta-oem-production-readiness/meta-agl-basesystem/recipes-kernel/kernel-module-evklib/kernel-module-evklib_1.0.0.bb
index c40b2704..9f57e532 100644
--- a/meta-oem-production-readiness/meta-agl-basesystem/recipes-kernel/kernel-module-evklib/kernel-module-evklib_1.0.0.bb
+++ b/meta-oem-production-readiness/meta-agl-basesystem/recipes-kernel/kernel-module-evklib/kernel-module-evklib_1.0.0.bb
@@ -7,7 +7,9 @@ LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://LICENSE.GPL-2.0-only;md5=4ee23c52855c222cba72583d301d2338"
PV = "1.0.0+gitr${SRCPV}"
-SRC_URI = "git://gerrit.automotivelinux.org/gerrit/staging/basesystem.git;protocol=https;branch=${AGL_BRANCH}"
+SRC_URI = "git://gerrit.automotivelinux.org/gerrit/staging/basesystem.git;protocol=https;branch=${AGL_BRANCH} \
+ file://0001-Handle-switch-to-proc_ops.patch;striplevel=3 \
+"
SRCREV := "${BASESYSTEM_REVISION}"
S = "${WORKDIR}/git/module/kernel-module-evklib"