[Buildroot] [PATCH 5/7] arch/Config.in.powerpc: disable some variants on ppc64le

Joel Stanley joel at jms.id.au
Tue Jun 7 02:41:29 UTC 2022


On Mon, 6 Jun 2022 at 09:46, Romain Naour <romain.naour at gmail.com> wrote:
>
> Hello Thomas,
>
> Le 05/06/2022 à 21:42, Thomas Petazzoni via buildroot a écrit :
> > Following commit
> > e59b3acc3603e55fbaec25406258ec9ca9623564 ("toolchain/glibc: Restrict
> > ppc64le support to power8"), when selecting ppc64le as the
> > architecture, it is possible to end up with a selection for which no C
> > library is provided.
> >
> > Indeed:
> >
> >  - glibc only supports Power8
> >  - uclibc has no support for ppc64le at all
> >  - musl only supports ppc64le processors that have Altivec support
> >
> > Therefore, this commit adds "depends on !BR2_powerpc64le" to those
> > PowerPC architecture variants for which no C library support exists.
> >
> > Fixes:
> >
> >   http://autobuild.buildroot.net/results/3f6fb1c2d5648e78f7856bdea3171b5a89dfa2f9/
>
> Not related to this patch but it seems that uClibc-ng only support powerpc
> (BR2_powerpc) without ALTIVEC support (!BR2_POWERPC_CPU_HAS_ALTIVEC).
>
> As soon as BR2_POWERPC_CPU_HAS_ALTIVEC is set, the uclibc-ng build due a
> conflicting types for 'elf_vrreg_t':
>
> http://autobuild.buildroot.net/results/084/084bd1df5cf10c81646d6edf01f5347a35fc9e6b/build-end.log
>
> This was not noticed by Toolchain-builder project since it only build powerpc
> configuration without altivec support (e300c3, 440fp, e500mc).
>
> https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc-e300c3/fragments/powerpc-e300c3--uclibc--bleeding-edge-2020.08-1.frag
>
> Surprisingly, it also fail with power4 and power5 where
> BR2_POWERPC_CPU_HAS_ALTIVEC is not set but with the same error.

These are 64 bit machines, and uclibc doesn't support ppc64 big or
little endian.

>
> It seems broken since always, we should restrict uClibc-ng to all know working
> configuration.

We should disable 32 bit userspace for the 64bit CPUs. While they can
run a 32 bit userspace with an appropriate kernel, it doesn't make
sense to expose that option.

The options are:
 - 32 bit big endian
 - 32 bit little endian
 - 64 bit big endian (power4 onwards, and other non-IBM CPUs)
 - 64 bit little endian (power8 onwards, and other non-IBM CPUs)

Power8 and onwards can run big endian, but it's not common. RHEL,
SuSe, Ubuntu build little endian only.

I have had a few goes at writing some kconfig to express this, but I
didn't get something that was worth posting. Thomas' patch has gone in
the tree, and this improves the situation a little, but there's still
the case of being able to select 32 bit for the 64 bit CPUs.

We could add "depends on BR2_ARCH_IS_64" to the 64 bit CPUs?

>
> Best regards,
> Romain
>
>
> >
> > Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
> > ---
> >  arch/Config.in.powerpc | 10 ++++++++++
> >  1 file changed, 10 insertions(+)
> >
> > diff --git a/arch/Config.in.powerpc b/arch/Config.in.powerpc
> > index 272f66f4e7..c48edd3bb4 100644
> > --- a/arch/Config.in.powerpc
> > +++ b/arch/Config.in.powerpc
> > @@ -14,6 +14,8 @@ choice
> >         Specific CPU variant to use
> >  config BR2_generic_powerpc
> >       bool "generic"
> > +     # No C library supports this variant on ppc64le
> > +     depends on !BR2_powerpc64le
> >  config BR2_powerpc_401
> >       bool "401"
> >       depends on !BR2_ARCH_IS_64
> > @@ -64,8 +66,12 @@ config BR2_powerpc_604e
> >       depends on !BR2_ARCH_IS_64
> >  config BR2_powerpc_620
> >       bool "620"
> > +     # No C library supports this variant on ppc64le
> > +     depends on !BR2_powerpc64le
> >  config BR2_powerpc_630
> >       bool "630"
> > +     # No C library supports this variant on ppc64le
> > +     depends on !BR2_powerpc64le
> >  config BR2_powerpc_740
> >       bool "740"
> >       depends on !BR2_ARCH_IS_64
> > @@ -118,8 +124,12 @@ config BR2_powerpc_e6500
> >       select BR2_POWERPC_CPU_HAS_ALTIVEC
> >  config BR2_powerpc_power4
> >       bool "power4"
> > +     # No C library supports this variant on ppc64le
> > +     depends on !BR2_powerpc64le
> >  config BR2_powerpc_power5
> >       bool "power5"
> > +     # No C library supports this variant on ppc64le
> > +     depends on !BR2_powerpc64le
> >  config BR2_powerpc_power6
> >       bool "power6"
> >       select BR2_POWERPC_CPU_HAS_ALTIVEC
>
> _______________________________________________
> buildroot mailing list
> buildroot at buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot



More information about the buildroot mailing list