############################################################################################
转载请注明出处
作者:Andoubi
原文链接:http://blog.youkuaiyun.com/andoubi/article/details/52052186
############################################################################################
编译内核前,配置内核用Initramfs挂载根文件系统,配置选项如下:Genera setup-------------------------------->
[ * ] Initial RAM filesystem and RAM disk (initramfs/initrd)support
( /home/myrootfs )Initramfs source file(s)
配置完毕,第一次编译OK。但是编译第二次时就出问题了,编译过程终止在了/user/Makefil里面,错误原因是多个目标匹配。详细信息如下:
<span style="font-size:18px;">root@localhost kernels]# make CROSS_COMPILE=arm-arago-linux-gnueabi- ARCH=arm uImage
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: “include/generated/mach-types.h”是最新的。
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
/home/ASM335/kernel/kernels/usr/Makefile:58: *** 多个目标匹配。 停止。
make: *** [usr] 错误 2</span>

在编译过程中遇到多个目标匹配的错误,问题源自/usr/Makefile中变量$(deps_initramfs)。通过make -d命令定位到问题,发现.initramfs_data.cpio.d文件中的路径含有冒号导致。虽然Linux文件名可含冒号,但Makefile的目标不应如此。第一次编译成功可能是因为临时文件未保留,后续编译暴露了问题。解决方法是检查并修正含有冒号的变量。
最低0.47元/天 解锁文章
2159

被折叠的 条评论
为什么被折叠?



