$(srctree) is not clean, please run 'make mrproper'

在使用make menuconfig重新配置后,再编译kernel时常会遇到这样的问题:

Using /home/likewise-open/BJS/lisa.liu/code/sprdroid4.0.3_vlx_3.0_13a/kernel as source for 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:

ifneq ($(KBUILD_SRC),)
    @$(kecho) '  Using $(srctree) as source for kernel'
    $(Q)if [ -f $(srctree)/.config -o -d $(srctree)/include/config ]; then \
        echo "  $(srctree) is not clean, please run 'make mrproper'";\
        echo "  in the '$(srctree)' directory.";\
        /bin/false; \
    fi;
endif


仔细阅读这句话:

    $(Q)if [ -f $(srctree)/.config -o -d $(srctree)/include/config ]; then \
        echo "  $(srctree) is not clean, please run 'make mrproper'";\
        echo "  in the '$(srctree)' directory.";\

也就是说如果kernel目录下存在.config文件或者kernel/include目录下存在config目录,则会打印后面的

        echo "  $(srctree) is not clean, please run 'make mrproper'";\
        echo "  in the '$(srctree)' directory.";\

解决方案:

检查这两处,删掉对应的文件和目录即可


你可能感兴趣的:(Linux)