Skip to contentSkip to conversation

kernel.bbclass: improve reproducibility

PATCH In review Jonathan Liu 3 participants 5 messages Apr 3, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel.bbclass: improve reproducibility

Set KBUILD_BUILD_VERSION=1 to avoid build version being incremented on every build. It is visible in the output of "cat /proc/version" after the hash character.

---
 meta/classes/kernel.bbclass | 1 +
 1 file changed, 1 insertion(+)
meta/classes/kernel.bbclass +1 -0
index 4877965af0..78d6c30b07 100644
@@ -151,6 +151,7 @@ PACKAGES_DYNAMIC += "^${KERNEL_PACKAGE_NAME}-firmware-.*"
 
 export OS = "${TARGET_OS}"
 export CROSS_COMPILE = "${TARGET_PREFIX}"
+export KBUILD_BUILD_VERSION = "1"
 export KBUILD_BUILD_USER = "oe-user"
 export KBUILD_BUILD_HOST = "oe-host"
 
Signature · 1 line
2.16.3
#1 lore raw
Quoted 3 lines · Jonathan Liu

Set KBUILD_BUILD_VERSION=1 to avoid build version being incremented on every build. It is visible in the output of "cat /proc/version" after the hash character.

It is possible that someone might actually want this feature, for debug or different build variants.

So this would be better as a variable that can be overridden.

Bruce

Quoted 26 lines
---
 meta/classes/kernel.bbclass | 1 +
 1 file changed, 1 insertion(+)
meta/classes/kernel.bbclass +1 -1
index 4877965af0..78d6c30b07 100644
@@ -151,6 +151,7 @@ PACKAGES_DYNAMIC += "^${KERNEL_PACKAGE_NAME}-firmware-.*"
 
 export OS = "${TARGET_OS}"
 export CROSS_COMPILE = "${TARGET_PREFIX}"
+export KBUILD_BUILD_VERSION = "1"
 export KBUILD_BUILD_USER = "oe-user"
 export KBUILD_BUILD_HOST = "oe-host"
 
--

2.16.3

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"
#2 lore raw
Quoted 8 lines · Bruce Ashfield
Quoted 6 lines · Jonathan Liu

Set KBUILD_BUILD_VERSION=1 to avoid build version being incremented on
every build. It is visible in the output of "cat /proc/version" after
the hash character.

Quoted 5 lines

It is possible that someone might actually want this feature, for debug or
different build variants.

So this would be better as a variable that can be overridden.

Surely users can override it in this form (like the USER/HOST variants already there)?

Cheers,

Richard

#3 lore raw
Quoted 9 lines · Richard Purdie
Quoted 8 lines · Bruce Ashfield
Quoted 6 lines · Jonathan Liu

Set KBUILD_BUILD_VERSION=1 to avoid build version being incremented on
every build. It is visible in the output of "cat /proc/version" after
the hash character.

Quoted 8 lines
Quoted 5 lines

It is possible that someone might actually want this feature, for debug or
different build variants.

So this would be better as a variable that can be overridden.

Surely users can override it in this form (like the USER/HOST variants already there)?

I've never used the user/host variant, so I don't know.

How can you override an exported variable in a shell function in a bbclass ? I've never tried.

I know for a fact, that I wouldn't want this on by default, hence my comment.

Bruce

Quoted 4 lines

Cheers,

Richard

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"
#4 lore raw
Quoted 23 lines · Bruce Ashfield
Quoted 13 lines · Richard Purdie
Quoted 11 lines · Bruce Ashfield
Quoted 8 lines · Jonathan Liu

Set KBUILD_BUILD_VERSION=1 to avoid build version being incremented
on
every build. It is visible in the output of "cat /proc/version" after
the hash character.

Quoted 8 lines
Quoted 5 lines

It is possible that someone might actually want this feature, for debug or
different build variants.

So this would be better as a variable that can be overridden.

Surely users can override it in this form (like the USER/HOST variants
already there)?

Quoted 7 lines

I've never used the user/host variant, so I don't know.

How can you override an exported variable in a shell function in a bbclass ? I've never tried.

I know for a fact, that I wouldn't want this on by default, hence my comment.

KBUILD_BUILD_VERSION[unexport] = "1"

will override the export flag...

Cheers,

Richard