在内核编译时经常出现各种错误。下图是内核编译常见问题之一:
"mkimage" command not found -U-Boot images will not be built
make[1]: *** [arch/arm/boot/uImage] Error 1
make: *** [uImage] Error 2
根据上图提示信息,"mkimage" command not found -U-Boot images will not be built,先尝试在linux系统里面安装依赖包mkimage,
输入命令:sudo apt-get install uboot-mkimage
如下图:
运行命令后,提示uboot-mkimage包不可用,被其它包引用了,意味着uboot-mkimage包丢失、废弃或从其它源来获得。
根据提示,可以用另一个包u-boot-tools替代,下面安装u-boot-tools,
输入命令:sudo apt-get install u-boot-tools
如下图:
安装u-boot-tools包后,再继续编译内核,如下图,显示uImage is ready,说明内核编译成功。接着可以给板子上电,启动内核。