[Buildroot] [PATCH v2 2/5] Revert "arch/xtensa: custom configuration requires an overlay"

Thomas Petazzoni thomas.petazzoni at bootlin.com
Mon Oct 31 21:05:11 UTC 2022


On Sun, 25 Sep 2022 12:13:02 +0200
Thomas Petazzoni <thomas.petazzoni at bootlin.com> wrote:

> > As 4cbf7336914f explained, an empty overlay is equivalent to using the
> > fsf variant, so in that case, there would be no point in asking for a
> > custom core to begin with, and Max Filipov seemed to agree:
> >     https://lore.kernel.org/buildroot/CAMo8BfKHKuVC86uOwP0z8CzE425q7u0B_q6jdeU0Rw9upaiY=Q@mail.gmail.com/
> > 
> > So, I think we are maybe taking the issue from the wrong side here. We
> > should forbid an empty overlay only when using our internal toolchain
> > for a custom xtensa core. I.e.:
> > 
> >     diff --git a/arch/arch.mk.xtensa b/arch/arch.mk.xtensa
> >     index 7b6c59cecd..1799528a93 100644
> >     --- a/arch/arch.mk.xtensa
> >     +++ b/arch/arch.mk.xtensa
> >     @@ -1,8 +1,10 @@
> >      BR_ARCH_XTENSA_OVERLAY_FILE = $(call qstrip,$(BR2_XTENSA_OVERLAY_FILE))
> >      
> >     -ifeq ($(BR_BUILDING)$(BR2_XTENSA_CUSTOM):$(BR_ARCH_XTENSA_OVERLAY_FILE),yy:)
> >     +ifeq ($(BR_BUILDING)$(BR2_TOOLCHAIN_BUILDROOT),yy)
> >     +ifeq ($(BR_ARCH_XTENSA_OVERLAY_FILE),)
> >      $(error No xtensa overlay file provided. Check your BR2_XTENSA_OVERLAY_FILE setting)
> >      endif
> >     +endif  
> 
> You're right, this seems to be a better approach. In the case of an
> internal toolchain with custom core, it means the user still sees the
> little/big endian choice, but if he hasn't specified an overlay, the
> build will be aborted early on.

Now that I re-read this, I'm no longer sure to understand. If you have
a configuration BR2_TOOLCHAIN_BUILDROOT=y, BR2_xtensa_fsf=y, then
BR2_XTENSA_OVERLAY_FILE will be empty, but it's perfectly normal. But
with your proposed change, such a configuration would no longer build,
as we would now always require an overlay to be specified.

Best regards,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com



More information about the buildroot mailing list