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

Thomas Petazzoni thomas.petazzoni at bootlin.com
Sun Sep 25 10:13:02 UTC 2022


Hello,

On Sun, 25 Sep 2022 12:03:55 +0200
"Yann E. MORIN" <yann.morin.1998 at free.fr> 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.

I guess I'm on for a v3!

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