[Buildroot] Toolchain issues on multiple architectures

Alistair Francis alistair23 at gmail.com
Thu Sep 24 18:20:18 UTC 2020


On Thu, Sep 24, 2020 at 2:42 AM Thomas Petazzoni
<thomas.petazzoni at bootlin.com> wrote:
>
> Hello Alistair,
>
> On Fri, 11 Sep 2020 09:03:23 -0700
> Alistair Francis <alistair23 at gmail.com> wrote:
>
> > > BR2_riscv=y
> > > BR2_RISCV_32=y
> > > BR2_KERNEL_HEADERS_5_4=y
> > > BR2_BINUTILS_VERSION_2_34_X=y
> > > BR2_GCC_VERSION_10_X=y
> > > BR2_TOOLCHAIN_BUILDROOT_CXX=y
> > > BR2_TOOLCHAIN_BUILDROOT_FORTRAN=y
> > > BR2_INIT_NONE=y
> > > BR2_SYSTEM_BIN_SH_NONE=y
> > > # BR2_PACKAGE_BUSYBOX is not set
> > > BR2_PACKAGE_GDB=y
> > > # BR2_TARGET_ROOTFS_TAR is not set
> >
> > I don't see any errors using this config with buildroot. Do I need to
> > do anything else?
>
> Sorry for the slow feedback. I retested the above defconfig, and it
> fails to build here. Did you try on the 2020.08 tag, with no change ?
> Perhaps you tried on master and something fixed this on master after
> 2020.08 ?

Yep, that doesn't work.

That branch is missing the patches to use upstream glibc:

* acc1330d4a configs/qemu_riscv32_virt: use Linux 5.4 kernel (by
Alistair Francis 3 weeks ago)
* a4889545aa package/glibc: use upstream glibc for RISC-V 32-bit (by
Alistair Francis 3 weeks ago)

Because of that the kernel headers need to be patched to add support
for a 32-bit time_t.

This change in the defconfig should fix that:

BR2_GLOBAL_PATCH_DIR="board/qemu/riscv32-virt/patches/"

Although it looks like the kernel build is also required to get the
patches to take effect:

# Kernel
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.1.12"
BR2_LINUX_KERNEL_DEFCONFIG="rv32"
BR2_LINUX_KERNEL_IMAGE=y

Although applying the two commits mentioned above would be a much better option.


Alistair

>
> Thanks,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com



More information about the buildroot mailing list