From 71094fb98ee1a53b65df9aa5ca7405ac9b901e31 Mon Sep 17 00:00:00 2001 From: fanglinxu Date: Mon, 22 Sep 2025 17:14:03 +0800 Subject: [PATCH] kernel: fix yocto module build with dirty plus * currently, in the 6.6 kernel, kernel modules built by inheriting the module class in Yocto have abnormally encountered the "+" sign issue, while in-tree kernel modules and the kernel itself do not have this problem. At present, we are temporarily using the method of modifying the kernel script to work around this issue. Signed-off-by: fanglinxu --- ...localversion-outtree-ko-error-for-6.6.patch | 18 ++++++++++++++++++ .../recipes-kernel/linux/linux-openeuler.inc | 2 ++ 2 files changed, 20 insertions(+) create mode 100644 meta-openeuler/recipes-kernel/linux/files/patches/0001-fix-yocto-localversion-outtree-ko-error-for-6.6.patch diff --git a/meta-openeuler/recipes-kernel/linux/files/patches/0001-fix-yocto-localversion-outtree-ko-error-for-6.6.patch b/meta-openeuler/recipes-kernel/linux/files/patches/0001-fix-yocto-localversion-outtree-ko-error-for-6.6.patch new file mode 100644 index 00000000000..1bba1f1342b --- /dev/null +++ b/meta-openeuler/recipes-kernel/linux/files/patches/0001-fix-yocto-localversion-outtree-ko-error-for-6.6.patch @@ -0,0 +1,18 @@ +From cdf2d060b3d66ed1a8c86ee22a3d019a8ce6056e Mon Sep 15 00:00:00 2025 +From: oee +Date: Mon, 15 Sep 2025 18:59:45 +0800 +Subject: [PATCH] yocto: fix 6.6 kernel outree module + ieeuer. + +fix 6.6 kernel outree module + ieeuer in yocto build. + +Signed-off-by: oee +--- a/scripts/setlocalversion ++++ b/scripts/setlocalversion +@@ -113,7 +113,6 @@ scm_version() + # If only the short version is requested, don't bother + # running further git commands + if $short; then +- echo "+" + return + fi + diff --git a/meta-openeuler/recipes-kernel/linux/linux-openeuler.inc b/meta-openeuler/recipes-kernel/linux/linux-openeuler.inc index 8749b74ddbb..d77f1305320 100644 --- a/meta-openeuler/recipes-kernel/linux/linux-openeuler.inc +++ b/meta-openeuler/recipes-kernel/linux/linux-openeuler.inc @@ -71,9 +71,11 @@ OPENEULER_LOCAL_NAME = "kernel-${PV}" # download openeuler/kernel-5.10 repo for linux kernel src files OPENEULER_REPO_NAMES = "src-kernel-${PV} kernel-${PV}" +# workaround: avoid issue of '+' vermagic of module out-tree of yocto: 0001-fix-yocto-localversion-outtree-ko-error-for-6.6.patch SRC_URI = "file://kernel-${PV} \ ${OPENEULER_KERNEL_CONFIG} \ file://meta-data;type=kmeta;destsuffix=meta-data \ + ${@bb.utils.contains('DISTRO_FEATURES', 'kernel6', 'file://patches/0001-fix-yocto-localversion-outtree-ko-error-for-6.6.patch', '', d)} \ " # add common patches only for aarch64 -- Gitee