Skip to contentSkip to conversation

kernel: predefine KBUILD_BUILD_USER and KBUILD_BUILD_HOST

PATCH New Joshua Lock 1 participant 1 message May 19, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel: predefine KBUILD_BUILD_USER and KBUILD_BUILD_HOST

By exporting KBUILD_BUILD_USER with a pre-defined value we improve the reproducibility of the kernel and remove the requirement for whoami in the HOSTTOOLS.
KBUILD_BUILD_HOST also helps improve the reproducibility of the kernel.

For more kernel reproducibility options see:
https://lwn.net/Articles/437864/

---
 meta/classes/kernel.bbclass | 2 ++
 1 file changed, 2 insertions(+)
meta/classes/kernel.bbclass +2 -0
index 8954b28..7a134d5 100644
@@ -130,6 +130,8 @@ PACKAGES_DYNAMIC += "^kernel-firmware-.*"
 
 export OS = "${TARGET_OS}"
 export CROSS_COMPILE = "${TARGET_PREFIX}"
+export KBUILD_BUILD_USER = "oe-user"
+export KBUILD_BUILD_HOST = "oe-host"
 
 KERNEL_PRIORITY ?= "${@int(d.getVar('PV').split('-')[0].split('+')[0].split('.')[0]) * 10000 + \
                        int(d.getVar('PV').split('-')[0].split('+')[0].split('.')[1]) * 100 + \
Signature · 1 line
2.9.3