Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Max Filippov <jcmvbkbc@gmail.com>
Cc: "buildroot@buildroot.org" <buildroot@buildroot.org>
Subject: Re: [Buildroot] uclibc-ng build failures on Xtensa
Date: Fri, 22 Jul 2022 14:17:50 +0200	[thread overview]
Message-ID: <20220722141750.0311355d@windsurf> (raw)
In-Reply-To: <CAMo8BfJ+AdrewRkuZzMq+_4w6=A-7SkC16MXneWkTHJ+i_=Crw@mail.gmail.com>

Hello Max,

Thanks for your feedback, very useful as usual!

On Fri, 22 Jul 2022 04:24:16 -0700
Max Filippov <jcmvbkbc@gmail.com> wrote:

> > And the default is BR2_XTENSA_LITTLE_ENDIAN, while normally for
> > BR2_xtensa_fsf, the endianness is BIG.
> >
> > Which configurations are supported?  
> 
> When BR2_XTENSA_CUSTOM is selected BR2_XTENSA_OVERLAY_FILE
> must be specified and selected endianness must match the endianness of the
> configuration in the overlay file. Empty BR2_XTENSA_OVERLAY_FILE is
> equivalent to fsf and it is big endian.

Hm, OK. So what should we do from a testing point of view? Disregard
any testing of the BR2_XTENSA_CUSTOM case?

It's kind of weird to have BR2_XTENSA_LITTLE_ENDIAN be the default if
the default is actually big endian (when there is no overlay file).

What do you think of:

diff --git a/arch/Config.in.xtensa b/arch/Config.in.xtensa
index 45ad2dc487..a69964f515 100644
--- a/arch/Config.in.xtensa
+++ b/arch/Config.in.xtensa
@@ -31,7 +31,7 @@ config BR2_XTENSA_OVERLAY_FILE
 choice
        prompt "Target Architecture Endianness"
        default BR2_XTENSA_LITTLE_ENDIAN
-       depends on BR2_XTENSA_CUSTOM
+       depends on BR2_XTENSA_CUSTOM && BR2_XTENSA_OVERLAY_FILE != ""
 
 config BR2_XTENSA_LITTLE_ENDIAN
        bool "Little endian"
@@ -43,7 +43,9 @@ endchoice
 
 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_fsf
+       default "BIG"           if BR2_XTENSA_CUSTOM && BR2_XTENSA_OVERLAY_FILE = ""
+       default "BIG"           if BR2_XTENSA_BIG_ENDIAN
 
 config BR2_ARCH
        default "xtensa"        if BR2_xtensa

i.e basically: don't choice the endianness choice when the overlay file
is empty, and enforce the fact that the endianess is big when
BR2_XTENSA_CUSTOM with an empty overlay file.

> > Is there something to fix here, or
> > we just need to disallow the usage of little endian?  
> 
> Little endian xtensa configurations are well supported, see e.g.
> configs/qemu_xtensa_lx60_defconfig that uses the dc233c core.

I see there are quite a few overlays at
https://github.com/jcmvbkbc/xtensa-toolchain-build/tree/master/overlays
for well-known cores. Would it make sense to have explicit support for
some of them in Buildroot? At least having support for one of the
little endian cores seems useful to increase the testing coverage.

Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2022-07-22 12:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-22  8:09 [Buildroot] uclibc-ng build failures on Xtensa Thomas Petazzoni via buildroot
2022-07-22 11:24 ` Max Filippov
2022-07-22 12:17   ` Thomas Petazzoni via buildroot [this message]
2022-07-23 13:15     ` Max Filippov

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=20220722141750.0311355d@windsurf \
    --to=buildroot@buildroot.org \
    --cc=jcmvbkbc@gmail.com \
    --cc=thomas.petazzoni@bootlin.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox