diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-10-14 13:59:19 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-10-16 17:41:59 +0100 |
commit | 0dc5920862dd692905347104927f7cf0b7d61376 (patch) | |
tree | e0ad87ce794a51222c9e70cd9284aca338b698df /meta | |
parent | 4b424bdfdbbe16b6e41f6cd1de75a51e3799cf94 (diff) | |
download | poky-0dc5920862dd692905347104927f7cf0b7d61376.tar.gz |
kernel: Add KERNEL_DEBUG_TIMESTAMPS variable
Change the "binary reproducibility" configuration within the kernel to
work off a separate variable, defaulting to reproducible builds.
This allows kernel developers wanting timestamps in their images to enable
it easily and clearly without changing the rest of the reproduciblity
code which they likely don't need to change anyway.
(From OE-Core rev: 0725ca18af7a2835aeb9616592a45ead2ee87987)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/kernel.bbclass | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index 4acec1877e..5faa302a16 100644 --- a/meta/classes/kernel.bbclass +++ b/meta/classes/kernel.bbclass | |||
@@ -322,9 +322,11 @@ python do_devshell:prepend () { | |||
322 | 322 | ||
323 | addtask bundle_initramfs after do_install before do_deploy | 323 | addtask bundle_initramfs after do_install before do_deploy |
324 | 324 | ||
325 | KERNEL_DEBUG_TIMESTAMPS ??= "0" | ||
326 | |||
325 | kernel_do_compile() { | 327 | kernel_do_compile() { |
326 | unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE | 328 | unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE |
327 | if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then | 329 | if [ "${KERNEL_DEBUG_TIMESTAMPS}" != "1" ]; then |
328 | # kernel sources do not use do_unpack, so SOURCE_DATE_EPOCH may not | 330 | # kernel sources do not use do_unpack, so SOURCE_DATE_EPOCH may not |
329 | # be set.... | 331 | # be set.... |
330 | if [ "${SOURCE_DATE_EPOCH}" = "" -o "${SOURCE_DATE_EPOCH}" = "0" ]; then | 332 | if [ "${SOURCE_DATE_EPOCH}" = "" -o "${SOURCE_DATE_EPOCH}" = "0" ]; then |
@@ -364,7 +366,7 @@ kernel_do_compile() { | |||
364 | 366 | ||
365 | do_compile_kernelmodules() { | 367 | do_compile_kernelmodules() { |
366 | unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE | 368 | unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE |
367 | if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then | 369 | if [ "${KERNEL_DEBUG_TIMESTAMPS}" != "1" ]; then |
368 | # kernel sources do not use do_unpack, so SOURCE_DATE_EPOCH may not | 370 | # kernel sources do not use do_unpack, so SOURCE_DATE_EPOCH may not |
369 | # be set.... | 371 | # be set.... |
370 | if [ "${SOURCE_DATE_EPOCH}" = "" -o "${SOURCE_DATE_EPOCH}" = "0" ]; then | 372 | if [ "${SOURCE_DATE_EPOCH}" = "" -o "${SOURCE_DATE_EPOCH}" = "0" ]; then |