[Buildroot] [PATCH] Linux: Clear CONFIG_INITRAMFS_SOURCE if BR2_TARGET_ROOTFS_INITRAMFS is not set

Peter Korsgaard peter at korsgaard.com
Mon Nov 13 14:03:57 UTC 2017


>>>>> "Evgeniy" == Evgeniy Didin <Evgeniy.Didin at synopsys.com> writes:

 > This patch makes sure CONFIG_INITRAMFS_SOURCE option gets reset
 > when BR2_TARGET_ROOTFS_INITRAMFS is not set. Some kernel defconfigs, 
 > for example for ARC processors, set CONFIG_INITRAMFS_SOURCE value, which cause such error:
 > "./scripts/gen_initramfs_list.sh: Cannot open '../../arc_initramfs_hs/'"

I'm not sure. I really would like to keep our "magic" .config fixups to
a minimum as they are kind of hidden and force specific use cases
without any options of disabling it (E.G. perhaps somebody has a
prebuilt initramfs they would like to include even though buildroot
builds the real rootfs (so BR2_TARGET_ROOTFS_INITRAMFS is not set). With
this change, this is no longer possible.

Couldn't you fix these arc specific defconfig issues with a small
kconfig fragment instead?

 > Signed-off-by: Evgeniy Didin <didin at synopsys.com> 
 > CC: Alexey Brodkin <abrodkin at synopsys.com>
 > Cc: arc-buildroot at synopsys.com
 > Cc: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>

 > ---
 >  linux/linux.mk | 3 ++-
 >  1 file changed, 2 insertions(+), 1 deletion(-)

 > diff --git a/linux/linux.mk b/linux/linux.mk
 > index 9c2aa77..0eee315 100644
 > --- a/linux/linux.mk
 > +++ b/linux/linux.mk
 > @@ -269,7 +269,8 @@ define LINUX_KCONFIG_FIXUP_CMDS
 >  		touch $(BINARIES_DIR)/rootfs.cpio
 >  		$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_SOURCE,"$${BR_BINARIES_DIR}/rootfs.cpio",$(@D)/.config)
 >  		$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_UID,0,$(@D)/.config)
 > -		$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_GID,0,$(@D)/.config))
 > +		$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_GID,0,$(@D)/.config),
 > +		$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_SOURCE,"",$(@D)/.config))
 >  	$(if $(BR2_ROOTFS_DEVICE_CREATION_STATIC),,
 >  		$(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS,$(@D)/.config)
 >  		$(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS_MOUNT,$(@D)/.config))
 > -- 
 > 2.9.3

 > _______________________________________________
 > buildroot mailing list
 > buildroot at busybox.net
 > http://lists.busybox.net/mailman/listinfo/buildroot

-- 
Bye, Peter Korsgaard


More information about the buildroot mailing list