diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-01-26 17:57:51 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-01-26 22:20:32 +0000 |
commit | 23737c8ac75191b3a463cfd64cb7266e0cbac273 (patch) | |
tree | b37e601411a832b42b4175ebcf44ad541cb53057 | |
parent | 7323bb0ee1f0ddcaf4c8c764abe4729dbe7bfcb8 (diff) | |
download | poky-23737c8ac75191b3a463cfd64cb7266e0cbac273.tar.gz |
kernel/linux-kernel-base: Fix kernel build artefact determinism issues
With the 6.1 kernel we've seen reproducibility/determinism issues where the kernel
seems to rebuild headers referencing the hostname or local user. kernel-devsrc
building after the kernel seemed to trigger it in some cases.
Moving the definitions to the bbclass used by all the kernel recipe code including
kernel-devsrc seems to be the best way to ensure this doesn't happen.
(From OE-Core rev: 60681baa97daf4f3856453c34d6be08b6771a81b)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes-recipe/kernel.bbclass | 3 | ||||
-rw-r--r-- | meta/classes-recipe/linux-kernel-base.bbclass | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/meta/classes-recipe/kernel.bbclass b/meta/classes-recipe/kernel.bbclass index bd3b6471c6..4fbe84c4e4 100644 --- a/meta/classes-recipe/kernel.bbclass +++ b/meta/classes-recipe/kernel.bbclass | |||
@@ -210,9 +210,6 @@ PACKAGES_DYNAMIC += "^${KERNEL_PACKAGE_NAME}-firmware-.*" | |||
210 | 210 | ||
211 | export OS = "${TARGET_OS}" | 211 | export OS = "${TARGET_OS}" |
212 | export CROSS_COMPILE = "${TARGET_PREFIX}" | 212 | export CROSS_COMPILE = "${TARGET_PREFIX}" |
213 | export KBUILD_BUILD_VERSION = "1" | ||
214 | export KBUILD_BUILD_USER ?= "oe-user" | ||
215 | export KBUILD_BUILD_HOST ?= "oe-host" | ||
216 | 213 | ||
217 | KERNEL_RELEASE ?= "${KERNEL_VERSION}" | 214 | KERNEL_RELEASE ?= "${KERNEL_VERSION}" |
218 | 215 | ||
diff --git a/meta/classes-recipe/linux-kernel-base.bbclass b/meta/classes-recipe/linux-kernel-base.bbclass index cb2212c948..65cc48f304 100644 --- a/meta/classes-recipe/linux-kernel-base.bbclass +++ b/meta/classes-recipe/linux-kernel-base.bbclass | |||
@@ -43,5 +43,9 @@ def linux_module_packages(s, d): | |||
43 | suffix = "" | 43 | suffix = "" |
44 | return " ".join(map(lambda s: "kernel-module-%s%s" % (s.lower().replace('_', '-').replace('@', '+'), suffix), s.split())) | 44 | return " ".join(map(lambda s: "kernel-module-%s%s" % (s.lower().replace('_', '-').replace('@', '+'), suffix), s.split())) |
45 | 45 | ||
46 | export KBUILD_BUILD_VERSION = "1" | ||
47 | export KBUILD_BUILD_USER ?= "oe-user" | ||
48 | export KBUILD_BUILD_HOST ?= "oe-host" | ||
49 | |||
46 | # that's all | 50 | # that's all |
47 | 51 | ||