首页 / 操作系统 / Linux / make mrproper解决u-boot for tiny210编译问题
之前编译移植遇到各种问题,之后找到方法make mrproper
make clean
make tiny210_config
make
解决编译问题内核编译时, 到底用make clean, make mrproper还是make distclean
在编译内核时, 被make clean, make mrproer 和 make distclean搞的纠结, 稍微总结一下这三者之间的区别: 解压内核源码包后, 到内核源代码目录树的顶层目录, 执行 # make help Cleaning targets: clean - Remove most generated files but keep the config and enough build support to build external modules
mrproper - Remove all generated files + config + various backup files
distclean - mrproper + remove editor backup and patch files
make help的结果: make clean 删除大多数的编译生成文件, 但是会保留内核的配置文件.config, 还有足够的编译支持来建立扩展模块 make mrproper 删除所有的编译生成文件, 还有内核配置文件, 再加上各种备份文件 make distclean mrproper删除的文件, 加上编辑备份文件和一些补丁文件。 看帮助可以发现删除的文件范围从小到大依次为: make clean < make mrproper < make distclean, 查看源码目录树的顶层目录下的Makefile求证, 可以发现: clean: archclean $(clean-dirs) $(call cmd,rmdirs) $(call cmd,rmfiles) @find . $(RCS_FIND_IGNORE) ( -name "*.[oas]" -o -name "*.ko" -o -name ".*.cmd" -o -name ".*.d" -o -name ".*.tmp" -o -name "*.mod.c" -o -name "*.symtypes" -o -name "modules.order" -o -name "Module.markers" ) -type f -print | xargs rm -f