Author: nbd Date: 2016-01-28 23:42:34 +0100 (Thu, 28 Jan 2016) New Revision: 48541
Modified: trunk/config/Config-kernel.in trunk/include/kernel-defaults.mk Log: include/kernel: add custom USER/DOMAIN config options These allow the generated kernel's build metadata to be defined explicitly. This metadata is reported, eg, at boot time and in `uname -a` on running systems. If the variables aren't configured, the current build system username and hostname are used as normal. The motivation for this option is to achive reproducible (bit-for-bit identical) kernel builds of official openwrt releases. Signed-off-by: bryan newbold <[email protected]> Signed-off-by: Felix Fietkau <[email protected]> Modified: trunk/config/Config-kernel.in =================================================================== --- trunk/config/Config-kernel.in 2016-01-28 22:42:29 UTC (rev 48540) +++ trunk/config/Config-kernel.in 2016-01-28 22:42:34 UTC (rev 48541) @@ -4,6 +4,22 @@ # See /LICENSE for more information. # +config KERNEL_BUILD_USER + string "Custom Kernel Build User Name" + default "" + help + Sets the Kernel build user string, which for example will be returned + by 'uname -a' on running systems. + If not set, uses system user at build time. + +config KERNEL_BUILD_DOMAIN + string "Custom Kernel Build Domain Name" + default "" + help + Sets the Kernel build domain string, which for example will be + returned by 'uname -a' on running systems. + If not set, uses system hostname at build time. + config KERNEL_PRINTK bool "Enable support for printk" default y Modified: trunk/include/kernel-defaults.mk =================================================================== --- trunk/include/kernel-defaults.mk 2016-01-28 22:42:29 UTC (rev 48540) +++ trunk/include/kernel-defaults.mk 2016-01-28 22:42:34 UTC (rev 48541) @@ -10,6 +10,8 @@ CROSS_COMPILE="$(KERNEL_CROSS)" \ ARCH="$(LINUX_KARCH)" \ KBUILD_HAVE_NLS=no \ + KBUILD_BUILD_USER="$(call qstrip,$(CONFIG_KERNEL_BUILD_USER))" \ + KBUILD_BUILD_HOST="$(call qstrip,$(CONFIG_KERNEL_BUILD_DOMAIN))" \ CONFIG_SHELL="$(BASH)" \ $(if $(findstring c,$(OPENWRT_VERBOSE)),V=1,V='') \ $(if $(PKG_BUILD_ID),LDFLAGS_MODULE=--build-id=0x$(PKG_BUILD_ID)) _______________________________________________ openwrt-commits mailing list [email protected] https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits
