]> code.ossystems Code Review - openembedded-core.git/commitdiff
kernel: Add KERNEL_DEBUG_TIMESTAMPS variable
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 14 Oct 2021 12:59:19 +0000 (13:59 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 16 Oct 2021 16:35:01 +0000 (17:35 +0100)
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/kernel.bbclass

index 4acec1877e00d626950b1f73156179f8129646a5..5faa302a16528c1013eb8f8580cfade94a6a740e 100644 (file)
@@ -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