All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] arch/arch.mk.xtensa: relax check on overlay file to apply only to internal toolchains
@ 2022-11-11 21:57 Thomas Petazzoni via buildroot
  2022-11-11 21:57 ` [Buildroot] [PATCH 2/2] utils/genrandconfig: disallow configs with BR2_XTENSA_CUSTOM=y Thomas Petazzoni via buildroot
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-11-11 21:57 UTC (permalink / raw)
  To: Buildroot List; +Cc: Romain Naour, Yann E. MORIN, Thomas Petazzoni

Commit 4cbf7336914f25478aea943456ba7dc3c892c21a ("arch/xtensa: custom
configuration requires an overlay") added a check in
arch/arch.mk.xtensa to bail out if a custom Xtensa core is selected
but not overlay file is provided. While this is indeed a perfectly
valid check to make when building an internal toolchain, with an
external toolchain it's entirely possible to build with no overlay
file: the toolchain already exists, and there's no overlay to be
applied in the context of the Buildroot build.

And indeed commit 4cbf7336914f25478aea943456ba7dc3c892c21a broke some
of the runtime test cases that use a custom Xtensa core configuration,
with no overlay, to test the toolchains.bootlin.com Xtensa external
toolchain. By relaxing the check to only apply to internal toolchain
configurations, we fix those test cases.

Fixes:

  https://gitlab.com/buildroot.org/buildroot/-/jobs/3282261966
  https://gitlab.com/buildroot.org/buildroot/-/jobs/3282261963

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 arch/arch.mk.xtensa | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arch.mk.xtensa b/arch/arch.mk.xtensa
index 7b6c59cecd..75145e725f 100644
--- a/arch/arch.mk.xtensa
+++ b/arch/arch.mk.xtensa
@@ -1,6 +1,6 @@
 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_XTENSA_CUSTOM)$(BR2_TOOLCHAIN_BUILDROOT):$(BR_ARCH_XTENSA_OVERLAY_FILE),yyy:)
 $(error No xtensa overlay file provided. Check your BR2_XTENSA_OVERLAY_FILE setting)
 endif
 
-- 
2.38.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 2/2] utils/genrandconfig: disallow configs with BR2_XTENSA_CUSTOM=y
  2022-11-11 21:57 [Buildroot] [PATCH 1/2] arch/arch.mk.xtensa: relax check on overlay file to apply only to internal toolchains Thomas Petazzoni via buildroot
@ 2022-11-11 21:57 ` Thomas Petazzoni via buildroot
  2022-11-13 21:40   ` Yann E. MORIN
  2022-11-15 13:22   ` Peter Korsgaard
  2022-11-13 21:39 ` [Buildroot] [PATCH 1/2] arch/arch.mk.xtensa: relax check on overlay file to apply only to internal toolchains Yann E. MORIN
  2022-11-15 13:22 ` Peter Korsgaard
  2 siblings, 2 replies; 6+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-11-11 21:57 UTC (permalink / raw)
  To: Buildroot List; +Cc: Romain Naour, Yann E. MORIN, Thomas Petazzoni

When BR2_XTENSA_CUSTOM=y is used with the internal toolchain, an
overlay file is mandatory, which genrandconfig can't provide. So we
simply disallow such configurations.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 utils/genrandconfig | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/utils/genrandconfig b/utils/genrandconfig
index f19a405685..9c6c2b359c 100755
--- a/utils/genrandconfig
+++ b/utils/genrandconfig
@@ -304,6 +304,11 @@ def fixup_config(sysinfo, configfile):
     # No C library for internal toolchain
     if 'BR2_TOOLCHAIN_BUILDROOT_NONE=y' in configlines:
         return False
+    # Xtensa custom cores require an overlay file with internal
+    # toolchains
+    if 'BR2_XTENSA_CUSTOM=y' in configlines and \
+       'BR2_TOOLCHAIN_BUILDROOT=y' in configlines:
+        return False
 
     if 'BR2_PACKAGE_AUFS_UTIL=y\n' in configlines and \
        'BR2_PACKAGE_AUFS_UTIL_VERSION=""\n' in configlines:
-- 
2.38.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/2] arch/arch.mk.xtensa: relax check on overlay file to apply only to internal toolchains
  2022-11-11 21:57 [Buildroot] [PATCH 1/2] arch/arch.mk.xtensa: relax check on overlay file to apply only to internal toolchains Thomas Petazzoni via buildroot
  2022-11-11 21:57 ` [Buildroot] [PATCH 2/2] utils/genrandconfig: disallow configs with BR2_XTENSA_CUSTOM=y Thomas Petazzoni via buildroot
@ 2022-11-13 21:39 ` Yann E. MORIN
  2022-11-15 13:22 ` Peter Korsgaard
  2 siblings, 0 replies; 6+ messages in thread
From: Yann E. MORIN @ 2022-11-13 21:39 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: Romain Naour, Buildroot List

Thomas, All,

On 2022-11-11 22:57 +0100, Thomas Petazzoni spake thusly:
> Commit 4cbf7336914f25478aea943456ba7dc3c892c21a ("arch/xtensa: custom
> configuration requires an overlay") added a check in
> arch/arch.mk.xtensa to bail out if a custom Xtensa core is selected
> but not overlay file is provided. While this is indeed a perfectly
> valid check to make when building an internal toolchain, with an
> external toolchain it's entirely possible to build with no overlay
> file: the toolchain already exists, and there's no overlay to be
> applied in the context of the Buildroot build.
> 
> And indeed commit 4cbf7336914f25478aea943456ba7dc3c892c21a broke some
> of the runtime test cases that use a custom Xtensa core configuration,
> with no overlay, to test the toolchains.bootlin.com Xtensa external
> toolchain. By relaxing the check to only apply to internal toolchain
> configurations, we fix those test cases.

I've added a blurb explaining that we can still build gdb with no
overlay in that case, which amounts to building for the fsf variant,
which may cause failures like what 4cbf7336914f was supposed to fix to
begin with. Ditto, I added blurb about building the kernel wihtout an
overlay, but that is less problematic in fact.

> Fixes:
> 
>   https://gitlab.com/buildroot.org/buildroot/-/jobs/3282261966
>   https://gitlab.com/buildroot.org/buildroot/-/jobs/3282261963
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
>  arch/arch.mk.xtensa | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arch.mk.xtensa b/arch/arch.mk.xtensa
> index 7b6c59cecd..75145e725f 100644
> --- a/arch/arch.mk.xtensa
> +++ b/arch/arch.mk.xtensa
> @@ -1,6 +1,6 @@
>  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_XTENSA_CUSTOM)$(BR2_TOOLCHAIN_BUILDROOT):$(BR_ARCH_XTENSA_OVERLAY_FILE),yyy:)
>  $(error No xtensa overlay file provided. Check your BR2_XTENSA_OVERLAY_FILE setting)
>  endif
>  
> -- 
> 2.38.1
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 2/2] utils/genrandconfig: disallow configs with BR2_XTENSA_CUSTOM=y
  2022-11-11 21:57 ` [Buildroot] [PATCH 2/2] utils/genrandconfig: disallow configs with BR2_XTENSA_CUSTOM=y Thomas Petazzoni via buildroot
@ 2022-11-13 21:40   ` Yann E. MORIN
  2022-11-15 13:22   ` Peter Korsgaard
  1 sibling, 0 replies; 6+ messages in thread
From: Yann E. MORIN @ 2022-11-13 21:40 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: Romain Naour, Buildroot List

Thomas, All,

On 2022-11-11 22:57 +0100, Thomas Petazzoni spake thusly:
> When BR2_XTENSA_CUSTOM=y is used with the internal toolchain, an
> overlay file is mandatory, which genrandconfig can't provide. So we
> simply disallow such configurations.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
>  utils/genrandconfig | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/utils/genrandconfig b/utils/genrandconfig
> index f19a405685..9c6c2b359c 100755
> --- a/utils/genrandconfig
> +++ b/utils/genrandconfig
> @@ -304,6 +304,11 @@ def fixup_config(sysinfo, configfile):
>      # No C library for internal toolchain
>      if 'BR2_TOOLCHAIN_BUILDROOT_NONE=y' in configlines:
>          return False
> +    # Xtensa custom cores require an overlay file with internal
> +    # toolchains
> +    if 'BR2_XTENSA_CUSTOM=y' in configlines and \
> +       'BR2_TOOLCHAIN_BUILDROOT=y' in configlines:
> +        return False
>  
>      if 'BR2_PACKAGE_AUFS_UTIL=y\n' in configlines and \
>         'BR2_PACKAGE_AUFS_UTIL_VERSION=""\n' in configlines:
> -- 
> 2.38.1
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/2] arch/arch.mk.xtensa: relax check on overlay file to apply only to internal toolchains
  2022-11-11 21:57 [Buildroot] [PATCH 1/2] arch/arch.mk.xtensa: relax check on overlay file to apply only to internal toolchains Thomas Petazzoni via buildroot
  2022-11-11 21:57 ` [Buildroot] [PATCH 2/2] utils/genrandconfig: disallow configs with BR2_XTENSA_CUSTOM=y Thomas Petazzoni via buildroot
  2022-11-13 21:39 ` [Buildroot] [PATCH 1/2] arch/arch.mk.xtensa: relax check on overlay file to apply only to internal toolchains Yann E. MORIN
@ 2022-11-15 13:22 ` Peter Korsgaard
  2 siblings, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2022-11-15 13:22 UTC (permalink / raw)
  To: Thomas Petazzoni via buildroot
  Cc: Romain Naour, Yann E. MORIN, Thomas Petazzoni

>>>>> "Thomas" == Thomas Petazzoni via buildroot <buildroot@buildroot.org> writes:

 > Commit 4cbf7336914f25478aea943456ba7dc3c892c21a ("arch/xtensa: custom
 > configuration requires an overlay") added a check in
 > arch/arch.mk.xtensa to bail out if a custom Xtensa core is selected
 > but not overlay file is provided. While this is indeed a perfectly
 > valid check to make when building an internal toolchain, with an
 > external toolchain it's entirely possible to build with no overlay
 > file: the toolchain already exists, and there's no overlay to be
 > applied in the context of the Buildroot build.

 > And indeed commit 4cbf7336914f25478aea943456ba7dc3c892c21a broke some
 > of the runtime test cases that use a custom Xtensa core configuration,
 > with no overlay, to test the toolchains.bootlin.com Xtensa external
 > toolchain. By relaxing the check to only apply to internal toolchain
 > configurations, we fix those test cases.

 > Fixes:

 >   https://gitlab.com/buildroot.org/buildroot/-/jobs/3282261966
 >   https://gitlab.com/buildroot.org/buildroot/-/jobs/3282261963

 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Committed to 2022.08.x and 2022.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 2/2] utils/genrandconfig: disallow configs with BR2_XTENSA_CUSTOM=y
  2022-11-11 21:57 ` [Buildroot] [PATCH 2/2] utils/genrandconfig: disallow configs with BR2_XTENSA_CUSTOM=y Thomas Petazzoni via buildroot
  2022-11-13 21:40   ` Yann E. MORIN
@ 2022-11-15 13:22   ` Peter Korsgaard
  1 sibling, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2022-11-15 13:22 UTC (permalink / raw)
  To: Thomas Petazzoni via buildroot
  Cc: Romain Naour, Yann E. MORIN, Thomas Petazzoni

>>>>> "Thomas" == Thomas Petazzoni via buildroot <buildroot@buildroot.org> writes:

 > When BR2_XTENSA_CUSTOM=y is used with the internal toolchain, an
 > overlay file is mandatory, which genrandconfig can't provide. So we
 > simply disallow such configurations.

 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Committed to 2022.08.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2022-11-15 13:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-11 21:57 [Buildroot] [PATCH 1/2] arch/arch.mk.xtensa: relax check on overlay file to apply only to internal toolchains Thomas Petazzoni via buildroot
2022-11-11 21:57 ` [Buildroot] [PATCH 2/2] utils/genrandconfig: disallow configs with BR2_XTENSA_CUSTOM=y Thomas Petazzoni via buildroot
2022-11-13 21:40   ` Yann E. MORIN
2022-11-15 13:22   ` Peter Korsgaard
2022-11-13 21:39 ` [Buildroot] [PATCH 1/2] arch/arch.mk.xtensa: relax check on overlay file to apply only to internal toolchains Yann E. MORIN
2022-11-15 13:22 ` 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.