[Android] 编译出现 xxx is not clean, please run 'make mrproper'

本文详细介绍了在Linux内核目录进行makemenuconfig配置并尝试编译时遇到xxxisnotclean,pleaserun'makemrproper'错误的解决方法。通过分析Makefile,发现该错误与.config文件及include/config目录的存在有关。解决方案为删除这些文件,确保内核源码目录干净。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在kernel目录进行过make menuconfig之后,再编译整包出现 xxx is not clean, please run 'make mrproper'报错
但是根据提示在kernel路径下执行 make mrproper,依旧出现错误

这时候去根据提示内容,去找相应的Makefile,看看设么条件下会报这样的错

Makefile位于kernel的根目录下

# prepare3 is used to check if we are building in a separate output directory,
# and if so do:
# 1) Check that make has not been executed in the kernel src $(srctree)
prepare3: include/config/kernel.release
ifneq ($(KBUILD_SRC),)
	@$(kecho) '  Using $(srctree) as source for kernel'
	$(Q)if [ -f $(srctree)/.config -o -d $(srctree)/include/config ]; then \
		echo >&2 "  $(srctree) is not clean, please run 'make mrproper'"; \
		echo >&2 "  in the '$(srctree)' directory.";\
		/bin/false; \
	fi;
ndif

也就是会检查kernel根目录下是否有名.config的文件以及include路径下是否存在名为config的目录,如果有就出现" $(srctree) is not clean, please run 'make mrproper'"提示

所以解决这个问题的办法就是删掉 .configinclude/config
继续工作~

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值