使用 Buildroot 配置错误

Configuring error with Buildroot

我正在为 Raspberry Pi 3 开发一个项目,我正在使用 buildroot 构建 linux 内核、fs 等。但时不时地(当我更改 buildroot 的设置时例如)我不再能够成功完成构建过程,即使我回滚到以前的配置(即使我选择初始 raspberrypi3_defconfig 配置)。错误总是类似:

host-binutils 2.28.1 Configuring (cd /home/andy/embedded_linux/buildroot/output/build/host-binutils-2.28.1/ && rm -rf config.cache; PATH="/home/andy/embedded_linux/buildroot/output/host/bin:/home/andy/embedded_linux/buildroot/output/host/sbin:/home/andy/bin:/home/andy/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" PKG_CONFIG="/home/andy/embedded_linux/buildroot/output/host/bin/pkg-config" PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG_LIBDIR="/home/andy/embedded_linux/buildroot/output/host/lib/pkgconfig:/home/andy/embedded_linux/buildroot/output/host/share/pkgconfig" AR="/usr/bin/ar" AS="/usr/bin/as" LD="/usr/bin/ld" NM="/usr/bin/nm" CC="/usr/bin/gcc" GCC="/usr/bin/gcc" CXX="/usr/bin/g++" CPP="/usr/bin/cpp" OBJCOPY="/usr/bin/objcopy" RANLIB="/usr/bin/ranlib" CPPFLAGS="-I/home/andy/embedded_linux/buildroot/output/host/include" CFLAGS="-O2 -I/home/andy/embedded_linux/buildroot/output/host/include" CXXFLAGS="-O2 -I/home/andy/embedded_linux/buildroot/output/host/include" LDFLAGS="-L/home/andy/embedded_linux/buildroot/output/host/lib -Wl,-rpath,/home/andy/embedded_linux/buildroot/output/host/lib" INTLTOOL_PERL=/usr/bin/perl CFLAGS="-O2 -I/home/andy/embedded_linux/buildroot/output/host/include" LDFLAGS="-L/home/andy/embedded_linux/buildroot/output/host/lib -Wl,-rpath,/home/andy/embedded_linux/buildroot/output/host/lib" MAKEINFO=true CONFIG_SITE=/dev/null ./configure --prefix="/home/andy/embedded_linux/buildroot/output/host" --sysconfdir="/home/andy/embedded_linux/buildroot/output/host/etc" --localstatedir="/home/andy/embedded_linux/buildroot/output/host/var" --enable-shared --disable-static --disable-gtk-doc --disable-gtk-doc-html --disable-doc --disable-docs --disable-documentation --disable-debug --with-xmlto=no --with-fop=no --disable-dependency-tracking --disable-multilib --disable-werror --target=-buildroot-linux-uclibcgnueabihf --disable-shared --enable-static --with-sysroot=/home/andy/embedded_linux/buildroot/output/host/-buildroot-linux-uclibcgnueabihf/sysroot --enable-poison-system-directories --disable-sim --disable-gdb ) configure: loading site script /dev/null checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking target system type... configure: error: /bin/bash ./config.sub -buildroot-linux-uclibcgnueabihf failed

配置其他一些实用程序时(例如配置 flex 2.6.4 或 dropbear 等)时可能会发生错误,但错误的主要部分始终相同: 检查目标系统类型...配置:错误:/bin/bash ./config.sub -buildroot-linux-something failed

找不到解决该问题的方法,请帮助我。

我不太明白哪里出了问题,但正如您所描述的 "when i change the settings of buildroot for example",我可以告诉您,buildroot 无法在所有情况下从正常 make 支持此功能。你应该例如使用 make clean 并进行完全重建。

有关详细信息,请参阅 https://buildroot.org/downloads/manual/manual.html#full-rebuild