本文共 808 字,大约阅读时间需要 2 分钟。
在使用 make menuconfig 重新配置 Kernel 后,编译时可能会遇到以下错误提示:
/home/likewise-open/BJS/lisa.liu/code/sprdroid4.0.3_vlx_3.0_13a/kernel is not clean, please run 'make mrproper'
这条错误来自 Kernel 目录下的 Makefile。Makefile 中的代码检查了 $(srctree) 目录是否包含 .config 文件或 include/config 子目录。如果存在这些文件或目录,Makefile 会提示需要运行 make mrproper 清理。
这段代码的逻辑是:
$(srctree)/.config 是否存在。$(srctree)/include/config 子目录是否存在。要解决这个问题,需要确保 Kernel 目录是干净的,删除可能存在的 .config 文件和 include/config 子目录。
打开终端,进入 Kernel 目录,执行以下命令:
ls -a
观察是否存在以下文件或目录:
.configinclude/config如果发现上述文件或目录,执行以下命令:
rm Kernel/.configrm -rf Kernel/include/config
完成删除后,重新运行 make menuconfig,确保生成新的 .config 文件。
如果问题仍然存在,可以尝试清理构建目录:
make mrproper
通过删除不必要的文件和目录,确保 Kernel 源目录干净,可以解决编译时的错误提示。
转载地址:http://ddgfk.baihongyu.com/