From 0dc5920862dd692905347104927f7cf0b7d61376 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 14 Oct 2021 13:59:19 +0100 Subject: [PATCH] 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 --- meta/classes/kernel.bbclass | 6 ++++-- 1 file 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 () { addtask bundle_initramfs after do_install before do_deploy +KERNEL_DEBUG_TIMESTAMPS ??= "0" + kernel_do_compile() { unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE - if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then + if [ "${KERNEL_DEBUG_TIMESTAMPS}" != "1" ]; then # kernel sources do not use do_unpack, so SOURCE_DATE_EPOCH may not # be set.... if [ "${SOURCE_DATE_EPOCH}" = "" -o "${SOURCE_DATE_EPOCH}" = "0" ]; then @@ -364,7 +366,7 @@ kernel_do_compile() { do_compile_kernelmodules() { unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE - if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then + if [ "${KERNEL_DEBUG_TIMESTAMPS}" != "1" ]; then # kernel sources do not use do_unpack, so SOURCE_DATE_EPOCH may not # be set.... if [ "${SOURCE_DATE_EPOCH}" = "" -o "${SOURCE_DATE_EPOCH}" = "0" ]; then