All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] Linux: Clear CONFIG_INITRAMFS_SOURCE if BR2_TARGET_ROOTFS_INITRAMFS is not set
@ 2017-11-13  4:34 Evgeniy Didin
  2017-11-13 14:03 ` Peter Korsgaard
  0 siblings, 1 reply; 4+ messages in thread
From: Evgeniy Didin @ 2017-11-13  4:34 UTC (permalink / raw)
  To: buildroot

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/'"

Signed-off-by: Evgeniy Didin <didin@synopsys.com> 
CC: Alexey Brodkin <abrodkin@synopsys.com>
Cc: arc-buildroot at synopsys.com
Cc: Thomas Petazzoni <thomas.petazzoni@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

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

* [Buildroot] [PATCH] Linux: Clear CONFIG_INITRAMFS_SOURCE if BR2_TARGET_ROOTFS_INITRAMFS is not set
  2017-11-13  4:34 [Buildroot] [PATCH] Linux: Clear CONFIG_INITRAMFS_SOURCE if BR2_TARGET_ROOTFS_INITRAMFS is not set Evgeniy Didin
@ 2017-11-13 14:03 ` Peter Korsgaard
  2017-11-13 17:07   ` Alexey Brodkin
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Korsgaard @ 2017-11-13 14:03 UTC (permalink / raw)
  To: buildroot

>>>>> "Evgeniy" == Evgeniy Didin <Evgeniy.Didin@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@synopsys.com> 
 > CC: Alexey Brodkin <abrodkin@synopsys.com>
 > Cc: arc-buildroot at synopsys.com
 > Cc: Thomas Petazzoni <thomas.petazzoni@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

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

* [Buildroot] [PATCH] Linux: Clear CONFIG_INITRAMFS_SOURCE if BR2_TARGET_ROOTFS_INITRAMFS is not set
  2017-11-13 14:03 ` Peter Korsgaard
@ 2017-11-13 17:07   ` Alexey Brodkin
  2017-11-13 21:03     ` Peter Korsgaard
  0 siblings, 1 reply; 4+ messages in thread
From: Alexey Brodkin @ 2017-11-13 17:07 UTC (permalink / raw)
  To: buildroot

Hi Peter,

On Mon, 2017-11-13 at 15:03 +0100, Peter Korsgaard wrote:
> > 
> > > 
> > > > 
> > > > > 
> > > > > > 
> > > > > > "Evgeniy" == Evgeniy Didin <Evgeniy.Didin@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.

Well a couple of things I was thinking about:
1. This would be [in my view] just a complimentary option to setting BR's rootfs.
2. Usage of prebuilt initramf with BR might be quite a tricky thing because
? ?different toolchain could be used with different ABI, libc etc so chances
? ?are quite high that user-space stuff built with BR will be incompatible with
? ?contents of prebuilt rootfs. But I guess we cannot stop people from doing that.

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

So maybe this is indeed a bit better solution even though we know nobody
who'd do such a trick with pre-built initramfs.

-Alexey

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

* [Buildroot] [PATCH] Linux: Clear CONFIG_INITRAMFS_SOURCE if BR2_TARGET_ROOTFS_INITRAMFS is not set
  2017-11-13 17:07   ` Alexey Brodkin
@ 2017-11-13 21:03     ` Peter Korsgaard
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2017-11-13 21:03 UTC (permalink / raw)
  To: buildroot

>>>>> "Alexey" == Alexey Brodkin <Alexey.Brodkin@synopsys.com> writes:

Hi,

 > Well a couple of things I was thinking about:
 > 1. This would be [in my view] just a complimentary option to setting BR's rootfs.
 > 2. Usage of prebuilt initramf with BR might be quite a tricky thing because
 > ? ?different toolchain could be used with different ABI, libc etc so chances
 > ? ?are quite high that user-space stuff built with BR will be incompatible with
 > ? ?contents of prebuilt rootfs. But I guess we cannot stop people from doing that.

Correct, but that is in reality not so difficult to do as the kernel ABI
is stable, and most architectures have stable ABIs. Libc doesn't enter
the question as the initramfs typically will not use files from the
rootfs or the other way around.


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

 > So maybe this is indeed a bit better solution even though we know nobody
 > who'd do such a trick with pre-built initramfs.

I do ;) I am using an external initramfs instead of built into the
kernel though, but that is just a minor detail.

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2017-11-13 21:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-13  4:34 [Buildroot] [PATCH] Linux: Clear CONFIG_INITRAMFS_SOURCE if BR2_TARGET_ROOTFS_INITRAMFS is not set Evgeniy Didin
2017-11-13 14:03 ` Peter Korsgaard
2017-11-13 17:07   ` Alexey Brodkin
2017-11-13 21:03     ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.