问题描述
在windows子系统交叉编译 u-boot 时,使用 arm-linux-gnueabi-gcc 报错
arm-linux-gnueabi-gcc: not found
解决方案
文件存在却无法运行,让我想到了之前运行 32 位的 samp 服务器程序时也是这样,安装 lib32stdc++6 即可解决。
sudo apt update
sudo apt install -y lib32stdc++6
后续问题
编译时又报错
error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
解决方案
参考 64位Kali和Ubuntu安装32位运行环境和编译环境 | MambaInVeins Blog
需要安装 32 位的 zlib1g 代码包,先开启系统 32 位软件源,然后安装 32 位zlib1g。
sudo dpkg --add-architecture i386
sudo apt update
sudo apt-get install zlib1g:i386
后续问题2
编译时又报错
error: redefinition of ‘fdt_appendprop_u64’
解决方案
参考 Build error when libfdt.h is installed in the system · Issue #73 · hardkernel/u-boot (github.com)
sudo apt-get purge -y --auto-remove libfdt-dev
文章评论