diff options
author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2023-07-05 14:44:39 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-07-12 16:50:45 +0100 |
commit | bb0f9e87700aa40ec8db880ede3c018c1d055786 (patch) | |
tree | 56e78884db517cc5c4605c81bb806586da4fe692 /meta/classes-recipe/kernel-arch.bbclass | |
parent | 9cc1290cd6dd87f8b5adcf804ae29ef63d9aca95 (diff) | |
download | poky-bb0f9e87700aa40ec8db880ede3c018c1d055786.tar.gz |
kernel: fix localversion in v6.3+
During testing of the v6.4 reference kernel, it was noticed that
on-target modules no longer matched the magic value of the running
kernel.
This was due to a different localversion in the cross built kernel
and the scripts / resources created on target.
This was due to changes in the setlocalversion script introduced
in the v6.3 series.
The .scmversion file is no longer used (or packaged) to inhibit
the addition of a "+" (through querying of the git status of the
kernel) or the setting of a local version.
We recently introduced the KERNEL_LOCALVERSION variable to allow
recipes to place a value in .scmversion, so we extend the use of
that variable to kernel-arch.bbclass and use it to set the
exported variable LOCALVERSION.
We must do it at the kernel-arch level, as the variable must be
exported in any kernel build to ensure that setlocalversion always
correctly sets the localversion.
(From OE-Core rev: 765b13b7305c8d2f222cfc66d77c02e6a088c691)
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-recipe/kernel-arch.bbclass')
-rw-r--r-- | meta/classes-recipe/kernel-arch.bbclass | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/classes-recipe/kernel-arch.bbclass b/meta/classes-recipe/kernel-arch.bbclass index 6e19dbbba8..df4884b6c4 100644 --- a/meta/classes-recipe/kernel-arch.bbclass +++ b/meta/classes-recipe/kernel-arch.bbclass | |||
@@ -80,3 +80,10 @@ KERNEL_OBJCOPY = "${CCACHE}${HOST_PREFIX}objcopy ${HOST_OBJCOPY_KERNEL_ARCH}" | |||
80 | KERNEL_STRIP = "${CCACHE}${HOST_PREFIX}strip ${HOST_STRIP_KERNEL_ARCH}" | 80 | KERNEL_STRIP = "${CCACHE}${HOST_PREFIX}strip ${HOST_STRIP_KERNEL_ARCH}" |
81 | TOOLCHAIN ?= "gcc" | 81 | TOOLCHAIN ?= "gcc" |
82 | 82 | ||
83 | # 6.3+ requires the variable LOCALVERSION to be set to not get a "+" in | ||
84 | # the local version. Having it empty means nothing will be added, and any | ||
85 | # value will be appended to the local kernel version. This replaces the | ||
86 | # use of .scmversion file for setting a localversion without using | ||
87 | # the CONFIG_LOCALVERSION option. | ||
88 | KERNEL_LOCALVERSION ??= "" | ||
89 | export LOCALVERSION ?= "${KERNEL_LOCALVERSION}" | ||