summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2023-08-22 17:06:48 +0200
committerMax Krummenacher <max.krummenacher@toradex.com>2024-04-04 20:52:10 +0200
commit8d1f2f55a0aacba66f768ad8162d64c04e859e28 (patch)
treebf02d12b87e1abb36c609de0f243cf100445bcb6
parentb6beabe8931200575a1aac16bf972d87c65b5e5c (diff)
toradex-kernel-localversion: follow oe changes
The setting of localversion has been changed in openembedded-core to accomodate changes in the kernel sources around v6.3. This changed that the kernel and external kernel modules with our way of setting localversion didn't use the same module magic. One used what we want for LOCALVERSION twice while the other uses it only once. Compare with OE-Commits: commit b378eec156 ("kernel: make LOCALVERSION consistent between recipes") commit 765b13b730 ("kernel: fix localversion in v6.3+") Related-to: ELB-5330 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 0ffa2b2b3aec8b4456acebec33a09b9dd88f7f49) Backport to kirkstone after the above OE-Commits were backported to kirkstone. Change the class to keep using CONFIG_LOCALVERSION in the kernel configuration as the Torizon TCB tool relies on the information from this config variable. If a kernel based on version 6.3+ would be built the git version will no longer be included in the reported kernel version. Related-to: ELB-5704 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
-rw-r--r--classes/toradex-kernel-localversion.bbclass14
1 files changed, 9 insertions, 5 deletions
diff --git a/classes/toradex-kernel-localversion.bbclass b/classes/toradex-kernel-localversion.bbclass
index a60b3a6..4dfc105 100644
--- a/classes/toradex-kernel-localversion.bbclass
+++ b/classes/toradex-kernel-localversion.bbclass
@@ -4,8 +4,8 @@
#
# The following options are supported:
#
-# SCMVERSION Puts the Git hash in kernel local version
-# LOCALVERSION Value used in LOCALVERSION
+# SCMVERSION Puts the Git hash in kernel local version
+# KERNEL_LOCALVERSION Value used in LOCALVERSION by the oe kernel classes
#
# Copyright 2014, 2015 (C) O.S. Systems Software LTDA.
# Copyright 2019 (C) Toradex AG
@@ -14,11 +14,15 @@ inherit toradex-kernel-config
TDX_VERSION ??= "0"
SCMVERSION ??= "y"
-LOCALVERSION ?= "-${TDX_VERSION}"
+# mute the meta-freescale/classes/fsl-kernel-localversion settings, otherwise
+# with latest master we get -${TDX_VERSION} twice in the resulting version.
+LINUX_VERSION_EXTENSION = ""
+do_kernel_localversion() {
+ :
+}
kernel_do_configure:append() {
- kernel_configure_variable LOCALVERSION "\"${LOCALVERSION}\""
-
+ kernel_configure_variable LOCALVERSION "\"-${TDX_VERSION}\""
if [ "${SCMVERSION}" = "y" ]; then
# Add GIT revision to the local version
# SRCREV_machine is used in kernel recipes using kernel-yocto.bbclass,