【问题标题】:Buildroot and Crosstool-NG configuration errorBuildroot 和 Crosstool-NG 配置错误
【发布时间】:2020-08-18 21:03:43
【问题描述】:

在 Buildroot 上为 Beaglebone Black 目标构建根文件系统。使用带有 buildroot 的 crosstool-NG 工具链,我在 buildroot 中收到此错误:

>>> toolchain-external-custom  Configuring
Incorrect selection of kernel headers: expected 4.2.x, got 4.20.x
john@vmpc:/home/emmet/Downloads/crosstool-ng-1.24.0$ arm-cortex_a8-linux-gnueabihf-gcc -v
Using built-in specs.
COLLECT_GCC=arm-cortex_a8-linux-gnueabihf-gcc
COLLECT_LTO_WRAPPER=/home/emmet/x-tools/arm-cortex_a8-linux-gnueabihf/libexec/gcc/arm-cortex_a8-linux-gnueabihf/8.3.0/lto-wrapper
Target: arm-cortex_a8-linux-gnueabihf
Configured with: /home/emmet/Downloads/crosstool-ng-1.24.0/.build/arm-cortex_a8-linux-gnueabihf/src/gcc/configure --build=x86_64-build_pc-linux-gnu --host=x86_64-build_pc-linux-gnu --target=arm-cortex_a8-linux-gnueabihf --prefix=/home/emmet/x-tools/arm-cortex_a8-linux-gnueabihf --with-sysroot=/home/emmet/x-tools/arm-cortex_a8-linux-gnueabihf/arm-cortex_a8-linux-gnueabihf/sysroot --enable-languages=c,c++ --with-cpu=cortex-a8 --with-fpu=vfpv3 --with-float=hard --with-pkgversion='crosstool-NG 1.24.0' --enable-__cxa_atexit --disable-libmudflap --disable-libgomp --disable-libssp --disable-libquadmath --disable-libquadmath-support --disable-libsanitizer --disable-libmpx --with-gmp=/home/emmet/Downloads/crosstool-ng-1.24.0/.build/arm-cortex_a8-linux-gnueabihf/buildtools --with-mpfr=/home/emmet/Downloads/crosstool-ng-1.24.0/.build/arm-cortex_a8-linux-gnueabihf/buildtools --with-mpc=/home/emmet/Downloads/crosstool-ng-1.24.0/.build/arm-cortex_a8-linux-gnueabihf/buildtools --with-isl=/home/emmet/Downloads/crosstool-ng-1.24.0/.build/arm-cortex_a8-linux-gnueabihf/buildtools --enable-lto --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --enable-threads=posix --enable-target-optspace --enable-plugin --enable-gold --disable-nls --disable-multilib --with-local-prefix=/home/emmet/x-tools/arm-cortex_a8-linux-gnueabihf/arm-cortex_a8-linux-gnueabihf/sysroot --enable-long-long
Thread model: posix
gcc version 8.3.0 (crosstool-NG 1.24.0) 

知道如何解决这个问题吗?

【问题讨论】:

  • 认为我已经解决了这个问题。 crosstool-NG 网站上的 tarball 已经过时,tarball 上最新的内核是 4.2.8,现在已经过时。拉下它的github repo,最新的内核是5.5.X

标签: linux-kernel cross-compiling embedded-linux buildroot crosstool-ng


【解决方案1】:

在 Buildroot 中使用自定义外部工具链时,您必须告诉 Buildroot 哪些内核头文件已用于构建工具链。

只需输入make menuconfig -> Toolchain -> External toolchain kernel headers series 即可设置。

【讨论】:

  • 是的,crosstool-NG tarball 在他们的网站上已经过时了,所以它拥有的最新内核头文件是 4.2.X。立即使用他们的 GitHub 存储库并显示 4.20.X
猜你喜欢
  • 2019-12-24
  • 1970-01-01
  • 2017-07-02
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-12-02
  • 2015-05-03
相关资源
最近更新 更多