All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Jonathan Ben Avraham <yba@tkos.co.il>,
	Romain Naour <romain.naour@gmail.com>,
	Buildroot List <buildroot@buildroot.org>
Subject: Re: [Buildroot] [PATCH 1/4] arch/Config.in.xtensa: adjust endianness logic to avoid bogus configurations
Date: Sun, 25 Sep 2022 09:25:02 +0200	[thread overview]
Message-ID: <20220925072502.GU1419013@scaer> (raw)
In-Reply-To: <20220924205327.1489102-1-thomas.petazzoni@bootlin.com>

Thomas, All,

On 2022-09-24 22:53 +0200, Thomas Petazzoni via buildroot spake thusly:
> 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.

This should be a separate patch.

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

As an empty BR2_XTENSA_OVERLAY_FILE is not accepted anymore (see below),
this can be simplified to "sharing the endianness chice for internal and
external toolchains".

>  (2) Defaulting to BE when BR2_XTENSA_OVERLAY_FILE is empty.

An empty BR2_XTENSA_OVERLAY_FILE is now no longer accepted, after commit
4cbf7336914f (arch/xtensa: custom configuration requires an overlay).

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

This commit if from August the 15th; I could not find any such failure
since 4cbf7336914f was applied; the last occured 2022-09-08, on commit
d2141f65e449, which is the parent of 4cbf7336914f (there are build
failures on older branches, of course, but not on master).

Regards,
Yann E. MORIN.

> 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

-- 
.-----------------.--------------------.------------------.--------------------.
|  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

  parent reply	other threads:[~2022-09-25  7:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Yann E. MORIN [this message]
2022-09-25  8:30   ` [Buildroot] [PATCH 1/4] arch/Config.in.xtensa: adjust endianness logic to avoid bogus configurations Thomas Petazzoni
2022-09-25  8:38     ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220925072502.GU1419013@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@buildroot.org \
    --cc=romain.naour@gmail.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=yba@tkos.co.il \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.