为了构建我的主板的 u-boot,我遵循了以下两个命令:
$ sudo make nanopi_h3_defconfig ARCH=arm CROSS_COMPILE=arm-linux-
$ sudo make ARCH=arm CROSS_COMPILE=arm-linux-
Run Code Online (Sandbox Code Playgroud)
我从第一个命令得到结果:配置写入.config 这意味着成功。但从第二个命令得到以下内容:
make: arm-linux-gcc: No such file or directory
/bin/sh: 1: arm-linux-gcc: not found
dirname: missing operand
Try 'dirname --help' for more information.
scripts/kconfig/conf --silentoldconfig Kconfig
./scripts/binutils-version.sh: line 18: arm-linux-as: command not found
CHK include/config.h
CFG u-boot.cfg
/bin/sh: 1: arm-linux-gcc: not found
make[1]: *** [scripts/Makefile.autoconf:79: u-boot.cfg] Error 1
make: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/uboot.release'. Stop.
Run Code Online (Sandbox Code Playgroud)
似乎来自arm-linux-gcc的麻烦,但我运行了命令“arm-linux-gcc”,它有效。那么,为什么第一个命令可以通过arm-linux-gcc,而第二个命令却失败了呢?
我\xe2\x80\x99m猜测问题是你的ARM工具链安装在\xe2\x80\x99s而不是root
\xe2\x80\x99s上的某个地方PATH
;由于您使用\xe2\x80\x99 进行构建sudo
,因此无法找到编译器\xe2\x80\x99。
要解决此问题,请恢复构建树中所有文件的正确所有权:
\nsudo chown -R $USER .\n
Run Code Online (Sandbox Code Playgroud)\n(sudo
此处是必需的,因为您不拥有所有文件。)
现在运行构建,无需 sudo
:
make ARCH=arm CROSS_COMPILE=arm-linux-\n
Run Code Online (Sandbox Code Playgroud)\n内核构建中唯一需要运行的部分root
是安装阶段;因为您\xe2\x80\x99re交叉编译,所以您\xe2\x80\x99不需要在构建系统上执行此操作(您\xe2\x80\x99可能会将构建的内核和模块复制到另一个设备,并安装他们在那里)。
归档时间: |
|
查看次数: |
35 次 |
最近记录: |