我正在尝试编译掉落熊使用 GNU ARM 工具链。我经历过这指导并成功构建了所有必需的工具。
它们位于目录中:
/home/tester/Misc/gnuarm/install
$ ls
arm-none-eabi bin include lib libexec share
$ ls bin/
arm-none-eabi-addr2line arm-none-eabi-c++filt arm-none-eabi-gcc arm-none-eabi-gcc-ranlib arm-none-eabi-ld.bfd arm-none-eabi-ranlib arm-none-eabi-strip
arm-none-eabi-ar arm-none-eabi-cpp arm-none-eabi-gcc-4.8.2 arm-none-eabi-gcov arm-none-eabi-nm arm-none-eabi-readelf
arm-none-eabi-as arm-none-eabi-elfedit arm-none-eabi-gcc-ar arm-none-eabi-gprof arm-none-eabi-objcopy arm-none-eabi-size
arm-none-eabi-c++ arm-none-eabi-g++ arm-none-eabi-gcc-nm arm-none-eabi-ld arm-none-eabi-objdump arm-none-eabi-strings
$ ls lib/
gcc libiberty.a
如何配置 dropbear 在构建时使用 GNU ARM 工具?
答案1
我相信你需要做的就是:
- 将编译器二进制文件添加到您的路径中。
export PATH="/home/tester/Misc/gnuarm/install/bin:$PATH"
configure
使用正确的交叉编译选项在 Dropbear 源目录中 运行。./configure --host=arm-none-eabi
- 按照
INSTALL
指南继续编译。
笔记:如果您确实遇到因--build
缺少该选项而导致的任何问题,您可以添加它。只需运行gcc -dumpmachine
即可返回当前构建机器的平台,然后将其作为参数提供给configure
.
例如,如果gcc -dumpmachine
返回x86_64-linux-gnu
运行
./configure --build=x86_64-linux-gnu --host=arm-none-eabi