编译正点原子LINUX报错make: arm-linux-gnueabihf-gcc:命令未找到
- 1.报错内容
- 2.解决办法
- 3./bin/sh: 1: lzop: not found
- 4.编译成功
1.报错内容
make: arm-linux-gnueabihf-gcc:命令未找到CHK include/config/kernel.releaseCHK include/generated/uapi/linux/version.hCC scripts/mod/empty.o
/bin/sh: 1: arm-linux-gnueabihf-gcc: not found
make[2]: *** [scripts/mod/empty.o] 错误 127
make[2]: *** 正在等待未完成的任务....CC scripts/mod/devicetable-offsets.s
/bin/sh: 1: arm-linux-gnueabihf-gcc: not found
make[2]: *** [scripts/mod/devicetable-offsets.s] 错误 127CHK include/generated/utsrelease.h
make[1]: *** [scripts/mod] 错误 2
make: *** [scripts] 错误 2
make: *** 正在等待未完成的任务.
2.解决办法
需要在 Makefile 添加完整路径内容:
ARCH ?= arm
CROSS_COMPILE ?= /usr/local/arm/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
3./bin/sh: 1: lzop: not found
/bin/sh: 1: lzop: not found
make[2]: *** [arch/arm/boot/compressed/piggy.lzo] 错误 1
make[1]: *** [arch/arm/boot/compressed/vmlinux] 错误 2
make: *** [zImage] 错误 2
make: *** 正在等待未完成的任务....MODPOST 77 modules
make: INTERNAL: Exiting with 17 jobserver tokens available; should be 16!
解决办法:
sudo apt-get install lzop
4.编译成功
SHIPPED arch/arm/boot/compressed/lib1funcs.SSHIPPED arch/arm/boot/compressed/ashldi3.SSHIPPED arch/arm/boot/compressed/bswapsdi2.SAS arch/arm/boot/compressed/hyp-stub.oAS arch/arm/boot/compressed/lib1funcs.oAS arch/arm/boot/compressed/ashldi3.oAS arch/arm/boot/compressed/bswapsdi2.oAS arch/arm/boot/compressed/piggy.lzo.oLD arch/arm/boot/compressed/vmlinuxOBJCOPY arch/arm/boot/zImageKernel: arch/arm/boot/zImage is ready