Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/4] arch/Config.in.xtensa: adjust endianness logic to avoid bogus configurations
@ 2022-09-24 20:53 Thomas Petazzoni via buildroot
  2022-09-24 20:53 ` [Buildroot] [PATCH 2/4] Revert "arch/xtensa: custom configuration requires an overlay" Thomas Petazzoni
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-09-24 20:53 UTC (permalink / raw)
  To: Romain Naour, Buildroot List, Max Filippov
  Cc: Jonathan Ben Avraham, Thomas Petazzoni

The Xtensa architecture supports both LE and BE configurations. When
BR2_XTENSA_CUSTOM is chosen, a choice in menuconfig to choose between
LE and BE.

However, if using the internal toolchain backend, when the
BR2_XTENSA_OVERLAY_FILE is empty, in practice, the configuration will
always be big endian. But the choice being present, random
configuration testing ends up testing configurations where
BR2_XTENSA_OVERLAY_FILE is empty, but the endianness selected is LE,
which is incorrect.

This commit fixes this by:

 (1) Showing the overlay file option only when building an internal
     toolchain. For external toolchain configurations, it does not
     make sense to show it as it will have no effect.

 (2) Showing the endianness choice either for internal toolchain
     configurations with non-empty BR2_XTENSA_OVERLAY_FILE, or for
     external toolchain configurations.

 (2) Defaulting to BE when BR2_XTENSA_OVERLAY_FILE is empty.

Fixes:

  http://autobuild.buildroot.net/results/702e2886156f291466375dfcf412c20f1aa5857d/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 arch/Config.in.xtensa | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/Config.in.xtensa b/arch/Config.in.xtensa
index f9d5adb4c9..e9263f888e 100644
--- a/arch/Config.in.xtensa
+++ b/arch/Config.in.xtensa
@@ -14,7 +14,7 @@ endchoice
 
 config BR2_XTENSA_OVERLAY_FILE
 	string "Overlay file for custom configuration"
-	depends on BR2_XTENSA_CUSTOM
+	depends on BR2_XTENSA_CUSTOM && BR2_TOOLCHAIN_BUILDROOT
 	help
 	  Enter the path to the overlay tarball for a custom processor
 	  configuration.
@@ -31,6 +31,7 @@ choice
 	prompt "Target Architecture Endianness"
 	default BR2_XTENSA_LITTLE_ENDIAN
 	depends on BR2_XTENSA_CUSTOM
+	depends on BR2_XTENSA_OVERLAY_FILE != "" || BR2_TOOLCHAIN_EXTERNAL
 
 config BR2_XTENSA_LITTLE_ENDIAN
 	bool "Little endian"
@@ -51,7 +52,9 @@ config BR2_XTENSA_USE_MMU
 
 config BR2_ENDIAN
 	default "LITTLE"	if BR2_XTENSA_LITTLE_ENDIAN
-	default "BIG"		if BR2_xtensa_fsf || BR2_XTENSA_BIG_ENDIAN
+	default "BIG"		if BR2_XTENSA_BIG_ENDIAN
+	default "BIG"		if BR2_xtensa_fsf
+	default "BIG"		if BR2_XTENSA_CUSTOM && BR2_XTENSA_OVERLAY_FILE = ""
 
 config BR2_ARCH
 	default "xtensa"	if BR2_xtensa
-- 
2.37.3

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

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

end of thread, other threads:[~2022-09-25  8:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-24 20:53 [Buildroot] [PATCH 1/4] arch/Config.in.xtensa: adjust endianness logic to avoid bogus configurations Thomas Petazzoni via buildroot
2022-09-24 20:53 ` [Buildroot] [PATCH 2/4] Revert "arch/xtensa: custom configuration requires an overlay" Thomas Petazzoni
2022-09-24 20:53 ` [Buildroot] [PATCH 3/4] arch/{Config.in, arch.mk}.xtensa: add explicit support for DC233C core Thomas Petazzoni
2022-09-24 20:53 ` [Buildroot] [PATCH 4/4] configs/qemu_xtensa_lx60*: use new BR2_xtensa_dc233c option Thomas Petazzoni
2022-09-25  7:25 ` [Buildroot] [PATCH 1/4] arch/Config.in.xtensa: adjust endianness logic to avoid bogus configurations Yann E. MORIN
2022-09-25  8:30   ` Thomas Petazzoni
2022-09-25  8:38     ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox