summaryrefslogtreecommitdiffstats
path: root/meta/classes/kernel.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-14 13:59:19 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-16 17:41:59 +0100
commit0dc5920862dd692905347104927f7cf0b7d61376 (patch)
treee0ad87ce794a51222c9e70cd9284aca338b698df /meta/classes/kernel.bbclass
parent4b424bdfdbbe16b6e41f6cd1de75a51e3799cf94 (diff)
downloadpoky-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/classes/kernel.bbclass')
-rw-r--r--meta/classes/kernel.bbclass6
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
323addtask bundle_initramfs after do_install before do_deploy 323addtask bundle_initramfs after do_install before do_deploy
324 324
325KERNEL_DEBUG_TIMESTAMPS ??= "0"
326
325kernel_do_compile() { 327kernel_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
365do_compile_kernelmodules() { 367do_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