From 26f23535eef1f3314c42cd00cda0c6da7cdaf9af Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Thu, 22 Feb 2024 11:35:45 +0100 Subject: kernel: make LOCALVERSION consistent between recipes The initial fix for localversion setting in 6.3+ broke older recipes and also broke recipes setting localversion in a kernel recipe, as make-mod-scripts (and other locations) can trigger a regeneration of files and don't have access to the variable. Moving the setting of this variable to the global namespace doesn't make sense, so we follow the example of the kernel-abiversion and save a kernel-localversion to the build artifacts. Recipes that may regenerate scripts/dynamic files, must depend on the do_shared_workedir of the kernel and use the helper function to read the file storing the localversion. (From OE-Core rev: cca0971a7d92d823cc0c2b16cf14a7b2ed8ecb61) Signed-off-by: Bruce Ashfield Signed-off-by: Alexandre Belloni cherry-picked from master b378eec156998eea55ba61e59103cb34fab0d07c Signed-off-by: Andreas Helbech Kleist Acked-by: Ryan Eatmon Signed-off-by: Steve Sakoman --- meta/classes/module-base.bbclass | 1 + 1 file changed, 1 insertion(+) (limited to 'meta/classes/module-base.bbclass') diff --git a/meta/classes/module-base.bbclass b/meta/classes/module-base.bbclass index 27bd69ff33..5b2fde8144 100644 --- a/meta/classes/module-base.bbclass +++ b/meta/classes/module-base.bbclass @@ -14,6 +14,7 @@ export CROSS_COMPILE = "${TARGET_PREFIX}" export KBUILD_OUTPUT = "${STAGING_KERNEL_BUILDDIR}" export KERNEL_VERSION = "${@oe.utils.read_file('${STAGING_KERNEL_BUILDDIR}/kernel-abiversion')}" +export LOCALVERSION = "${@oe.utils.read_file('${STAGING_KERNEL_BUILDDIR}/kernel-localversion')}" KERNEL_OBJECT_SUFFIX = ".ko" # kernel modules are generally machine specific -- cgit v1.2.3-54-g00ecf