0

I wanted to try out the bootlin toolchain support in buildroot, because now I can simply select them in menuconfig.

  • BR version: branch 2022.02
  • Defconfig: atmel_sama5d3_xplained_defconfig
  • Toolchain: `Toolchain -> Toolchain (Bootlin toolchains)"
    • "Bootlin toolchain variant": armv7-eabihf glibc stable 2021.11-1

On a clean git checkout, after loading and modifying the above defconfig via menuconfig, the build stops with:

Incorrect selection of kernel headers: expected 4.9.x, got 4.6.x

The expectation (autogenerated by helper script gen-bootlin-toolchains) seems to be ok, because the release announcement also mentions 4.9 for stable toolchain versions.

Any idea what goes wrong here? Or how buildroot calculates the "got" version? (I don't see any downloaded files in output/build/toolchain-external-bootlin-2021.11-1 other then the stamp files and the file-list files)

If I download the file manually and check arm-buildroot-linux-gnueabihf/sysroot/usr/include/linux/version.h, the version is indeed 4.9


I could just manually download the toolchain and specify the parameters manually, but then the bootlin integration (which is nice) doesn't make sense.

lnksz
  • 421
  • 3
  • 15

1 Answers1

1

The root cause for this mis-match was that the bootlin toolchain won't be downloaded by buildroot automatically, but is expected in the PATH as arm-linux-gcc. I did have arm-linux-gcc in my PATH but linked to another toolchain.

After manually installing (download+extract) the bootlin toolchain and adding the "bin" folder of the toolchain to the PATH of the environment in which buildroot was run, the build succeeded as expected.

lnksz
  • 421
  • 3
  • 15
  • This wouldn't have been an issue, if the "Toolchain origin" is set to Download and Extract. – lnksz Mar 22 '22 at 15:07