0

我对 buildroot 外部工具链有疑问;最后,当我输入“ make linux-menuconfig ”命令时,我收到了以下错误(我想将此配置菜单用于 eth 驱动程序)

ubuntu@upc:~/buildroot-2021.02.5$ make linux-menuconfig

BR_BINARIES_DIR=/home/ubuntu/buildroot-2021.02.5/output/images PKG_CONFIG_PATH="" /usr/bin/make -j9 -C /home/ubuntu/buildroot-2021.02.5/output/build/linux-5.10.9 HOSTCC="/usr/bin/gcc" HOSTCC="/usr/bin/gcc -O2 -I/home/ubuntu/buildroot-2021.02.5/output/host/include -L/home/ubuntu/buildroot-2021.02.5/output/host/lib -Wl,-rpath,/home/ubuntu/buildroot-2021.02.5/output/host/lib" ARCH=arm INSTALL_MOD_PATH=/home/ubuntu/buildroot-2021.02.5/output/target CROSS_COMPILE="/home/ubuntu/buildroot-2021.02.5/output/host/bin/arm-linux-gnueabihf-" DEPMOD=/home/ubuntu/buildroot-2021.02.5/output/host/sbin/depmod INSTALL_MOD_STRIP=1 HOSTCC="/usr/bin/gcc" menuconfig
scripts/Kconfig.include:39: compiler '/home/ubuntu/buildroot-2021.02.5/output/host/bin/arm-linux-gnueabihf-gcc' not found
scripts/kconfig/Makefile:29: recipe for target 'menuconfig' failed
make[3]: *** [menuconfig] Error 1
Makefile:602: recipe for target 'menuconfig' failed
make[2]: *** [menuconfig] Error 2
linux/linux.mk:575: recipe for target '/home/ubuntu/buildroot-2021.02.5/output/build/linux-5.10.9/.kconfig_editor_menuconfig' failed
make[1]: *** [/home/ubuntu/buildroot-2021.02.5/output/build/linux-5.10.9/.kconfig_editor_menuconfig] Error 2
Makefile:84: recipe for target '_all' failed
make: *** [_all] Error 2

在此命令之前,我已成功完成“make”,工具链配置如下:

 Toolchain type (External toolchain)  --->                                                                                       │ │  
  │ │                                                                 *** Toolchain External Options ***                                                                                              │ │  
  │ │                                                                 Toolchain (Custom toolchain)  --->                                                                                              │ │  
  │ │                                                                 Toolchain origin (Pre-installed toolchain)  --->                                                                                │ │  
  │ │                                                             (gcc-linaro) Toolchain path                                                                                                         │ │  
  │ │                                                             (arm-linux-gnueabihf) Toolchain prefix                                                                                              │ │  
  │ │                                                                 External toolchain gcc version (7.x)  --->                                                                                      │ │  
  │ │                                                                 External toolchain kernel headers series (4.10.x)  --->                                                                         │ │  
  │ │                                                                 External toolchain C library (glibc/eglibc)  --->                                                                               │ │  
  │ │                                                             [*] Toolchain has SSP support?                                                                                                      │ │  
  │ │                                                             [*]   Toolchain has SSP strong support?                                                                                             │ │  
  │ │                                                             [*] Toolchain has RPC support?                                                                                                      │ │  
  │ │                                                             [*] Toolchain has C++ support?                                                                                                      │ │  
  │ │                                                             [ ] Toolchain has D support?                                                                                                        │ │  
  │ │                                                             [ ] Toolchain has Fortran support?                                                                                                  │ │  
  │ │                                                             [ ] Toolchain has OpenMP support?                                                                                                   │ │  
  │ │                                                             [ ] Copy gdb server to the Target                                                                                                   │ │  
  │ │                                                                 *** Host GDB Options ***                                                                                                        │ │  
  │ │                                                             [ ] Build cross gdb for the host                                                                                                    │ │  
  │ │                                                                 *** Toolchain Generic Options ***                                                                                               │ │  
  │ │                                                             [ ] Copy gconv libraries                                                                                                            │ │  
  │ │                                                             ()  Extra toolchain libraries to be copied to target                                                                                │ │  
  │ │                                                             [*] Enable MMU support                                                                                                              │ │  
  │ │                                                             ()  Target Optimizations                                                                                                            │ │  
  │ │                                                             ()  Target linker options                                                                                                           │ │  
  │ │   

                                                      [ ] Register toolchain within Eclipse Buildroot plug-in
  

当我检查 arm-linux-gnueabihf 时,我收到以下输出,我已经安装了 linaro gnueabihf 工具链并将其保存为“gcc-linaro”

ubuntu@upc:~/buildroot-2021.02.5$ find . -name *linux-gnueabi*

./gcc-linaro/bin/arm-linux-gnueabihf-ranlib
./gcc-linaro/bin/arm-linux-gnueabihf-gcc-ar
./gcc-linaro/bin/arm-linux-gnueabihf-gcc
./gcc-linaro/bin/arm-linux-gnueabihf-gcov-tool
./gcc-linaro/bin/arm-linux-gnueabihf-objcopy
./gcc-linaro/bin/arm-linux-gnueabihf-c++
./gcc-linaro/bin/arm-linux-gnueabihf-gfortran
./gcc-linaro/bin/arm-linux-gnueabihf-c++filt
./gcc-linaro/bin/arm-linux-gnueabihf-strip
./gcc-linaro/bin/arm-linux-gnueabihf-g++
./gcc-linaro/bin/arm-linux-gnueabihf-gcov-dump
./gcc-linaro/bin/arm-linux-gnueabihf-gcc-7.5.0
./gcc-linaro/bin/arm-linux-gnueabihf-ld
./gcc-linaro/bin/arm-linux-gnueabihf-gcc-nm
./gcc-linaro/bin/arm-linux-gnueabihf-ld.gold
./gcc-linaro/bin/arm-linux-gnueabihf-gcov
./gcc-linaro/bin/arm-linux-gnueabihf-size
./gcc-linaro/bin/arm-linux-gnueabihf-ar
./gcc-linaro/bin/arm-linux-gnueabihf-addr2line
./gcc-linaro/bin/arm-linux-gnueabihf-cpp
./gcc-linaro/bin/arm-linux-gnueabihf-readelf
./gcc-linaro/bin/arm-linux-gnueabihf-as
./gcc-linaro/bin/arm-linux-gnueabihf-gprof
./gcc-linaro/bin/arm-linux-gnueabihf-gcc-ranlib
./gcc-linaro/bin/arm-linux-gnueabihf-nm
./gcc-linaro/bin/arm-linux-gnueabihf-gdb-add-index
./gcc-linaro/bin/arm-linux-gnueabihf-strings
./gcc-linaro/bin/arm-linux-gnueabihf-elfedit
./gcc-linaro/bin/arm-linux-gnueabihf-gdb
./gcc-linaro/bin/arm-linux-gnueabihf-objdump
./gcc-linaro/bin/arm-linux-gnueabihf-ld.bfd
./gcc-linaro/bin/arm-linux-gnueabihf-dwp
./gcc-linaro/share/man/man5/arm-linux-gnueabihf-gdbinit.5
./gcc-linaro/share/man/man1/arm-linux-gnueabihf-readelf.1
./gcc-linaro/share/man/man1/arm-linux-gnueabihf-strip.1
./gcc-linaro/share/man/man1/arm-linux-gnueabihf-gprof.1
./gcc-linaro/share/man/man1/arm-linux-gnueabihf-cpp.1
./gcc-linaro/share/man/man1/arm-linux-gnueabihf-gdb.1
./gcc-linaro/share/man/man1/arm-linux-gnueabihf-dlltool.1
./gcc-linaro/share/man/man1/arm-linux-gnueabihf-objcopy.1
./gcc-linaro/share/man/man1/arm-linux-gnueabihf-addr2line.1
./gcc-linaro/share/man/man1/arm-linux-gnueabihf-gfortran.1
./gcc-linaro/share/man/man1/arm-linux-gnueabihf-gcov-dump.1
./gcc-linaro/share/man/man1/arm-linux-gnueabihf-gcov-tool.1
./gcc-linaro/share/man/man1/arm-linux-gnueabihf-as.1
./gcc-linaro/share/man/man1/arm-linux-gnueabihf-nm.1
./gcc-linaro/share/man/man1/arm-linux-gnueabihf-strings.1
./gcc-linaro/share/man/man1/arm-linux-gnueabihf-gcc.1
./gcc-linaro/share/man/man1/arm-linux-gnueabihf-nlmconv.1
./gcc-linaro/share/man/man1/arm-linux-gnueabihf-ranlib.1
./gcc-linaro/share/man/man1/arm-linux-gnueabihf-windres.1
./gcc-linaro/share/man/man1/arm-linux-gnueabihf-ar.1
./gcc-linaro/share/man/man1/arm-linux-gnueabihf-c++filt.1
./gcc-linaro/share/man/man1/arm-linux-gnueabihf-gdbserver.1
./gcc-linaro/share/man/man1/arm-linux-gnueabihf-g++.1
./gcc-linaro/share/man/man1/arm-linux-gnueabihf-objdump.1
./gcc-linaro/share/man/man1/arm-linux-gnueabihf-gdb-add-index.1
./gcc-linaro/share/man/man1/arm-linux-gnueabihf-size.1
./gcc-linaro/share/man/man1/arm-linux-gnueabihf-gcov.1
./gcc-linaro/share/man/man1/arm-linux-gnueabihf-ld.1
./gcc-linaro/share/man/man1/arm-linux-gnueabihf-elfedit.1
./gcc-linaro/share/man/man1/arm-linux-gnueabihf-windmc.1
./gcc-linaro/lib/gcc/arm-linux-gnueabihf
./gcc-linaro/libexec/gcc/arm-linux-gnueabihf
./gcc-linaro/arm-linux-gnueabihf
./gcc-linaro/arm-linux-gnueabihf/include/c++/7.5.0/arm-linux-gnueabihf
./output/host/arm-buildroot-linux-gnueabihf
./output/host/bin/arm-linux-gnueabihf-*
./output/build/libwebsockets-4.0.21/contrib/cross-arm-linux-gnueabihf.cmake

到时候你能指导我吗?

我想将 eth 接口添加到图像和 arm-linux-gnueabihf 外部工具链中,

我的主机是 ubuntu 18

buildroot 版本是 buildroot-2021.02.5

linaro 版本是 gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf.tar.xz

谢谢!

4

1 回答 1

1
 │ │          Toolchain (Custom toolchain)  --->  
 │ │          Toolchain origin (Pre-installed toolchain)  --->  
 │        (gcc-linaro) Toolchain path 
 ...     

为此,Toolchain path您需要指定完整的绝对路径,而不仅仅是目录的名称。


我已经安装了 linaro gnueabihf 工具链并将其保存为“gcc-linaro”

您似乎已经在 Buildroot 目录下安装了这个 Linaro 工具链。
由于这应该是一个外部工具链(即 Buildroot 外部),这真的没有意义。
例如,我将此类工具链安装在/opt/linaro/

x:/opt$ la -1 linaro
gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabi
gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabi
gcc-linaro-7.3.1-2018.05-x86_64_arm-linux-gnueabi
gcc-linaro-7.3.1-2018.05-x86_64_arm-linux-gnueabihf
x:/opt$ 

还要验证是否为您的主机系统安装了所有必需的软件包;学习docs/manual/prerequisite.txthttps://buildroot.org/downloads/manual/manual.html#requirement

于 2021-10-02T23:05:45.427 回答