openembedded-core.lists.openembedded.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2 v2] kernel: Add KERNEL_DEBUG_TIMESTAMPS variable
@ 2021-10-14 13:40 Richard Purdie
  2021-10-14 13:40 ` [PATCH 2/2 v2] reproducible: Drop BUILD_REPRODUCIBLE_BINARIES variable Richard Purdie
  2021-10-14 13:46 ` [OE-core] [PATCH 1/2 v2] kernel: Add KERNEL_DEBUG_TIMESTAMPS variable Bruce Ashfield
  0 siblings, 2 replies; 3+ messages in thread
From: Richard Purdie @ 2021-10-14 13:40 UTC (permalink / raw)
  To: openembedded-core

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 | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 4acec1877e0..c1cea177b62 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}" != "0" ]; 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
-- 
2.32.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-14 13:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-14 13:40 [PATCH 1/2 v2] kernel: Add KERNEL_DEBUG_TIMESTAMPS variable Richard Purdie
2021-10-14 13:40 ` [PATCH 2/2 v2] reproducible: Drop BUILD_REPRODUCIBLE_BINARIES variable Richard Purdie
2021-10-14 13:46 ` [OE-core] [PATCH 1/2 v2] kernel: Add KERNEL_DEBUG_TIMESTAMPS variable Bruce Ashfield

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).