编译uboot错误--make clean 和 make distclean的区别

时间:2020-12-11 16:33:58

错误如下:

[root@localhost u-boot-2008.10]# pwd

/home/qinyuanyi/work/kernel/u-boot-2008.10_net/u-boot-2008.10
[root@localhost u-boot-2008.10]# make mini2440_config
Configuring for mini2440 board...
[root@localhost u-boot-2008.10]# make CROSS_COMPILE=arm-linux-

Generating include/autoconf.mk.dep
cc1: warning: target CPU does not support interworking
for dir in tools examples api_examples ; do make -C $dir _depend ; done
make[1]: Entering directory `/home/qinyuanyi/work/kernel/u-boot-2008.10_net/u-boot-2008.10/tools'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/home/qinyuanyi/work/kernel/u-boot-2008.10_net/u-boot-2008.10/tools'
make[1]: Entering directory `/home/qinyuanyi/work/kernel/u-boot-2008.10_net/u-boot-2008.10/examples'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/home/qinyuanyi/work/kernel/u-boot-2008.10_net/u-boot-2008.10/examples'
make[1]: Entering directory `/home/qinyuanyi/work/kernel/u-boot-2008.10_net/u-boot-2008.10/api_examples'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/home/qinyuanyi/work/kernel/u-boot-2008.10_net/u-boot-2008.10/api_examples'
Generating include/autoconf.mk
cc1: warning: target CPU does not support interworking
make -C tools all
make[1]: Entering directory `/home/qinyuanyi/work/kernel/u-boot-2008.10_net/u-boot-2008.10/tools'
make[1]: *** 没有规则可以创建“mkimage.o”需要的目标“/home/Denny/kernel/u-boot-2008.10/include/sha1.h”。 停止。
make[1]: Leaving directory `/home/qinyuanyi/work/kernel/u-boot-2008.10_net/u-boot-2008.10/tools'

make: *** [tools] 错误 2

问题:编译之前,用了make clean清除了之前编译的文件,再用make编译的时候就是报出这样的错误,一直不明白是什么原因??

解决:然后用make distclean了一下,在进行编译,结果没有发生上面的错误了,e......,看来make distclean清除得比较彻底

分析:原来之前在自己目录下面创建了一个Denny用户,之前的uboot也是在Denny这个用户名下进行编译的,但是后来,删除这个Denny用户后,把原来的uboot拷贝到新建的qinyuanyi用户的目录下面,在对uboot进行编译时,只用make clean清除,清除不够彻底,看来还是用make distclean清除比较彻底

下面对make clean 和 make distclean知识补充:

make clean:仅仅是清除之前编译的可执行文件及配置文件。 
make distclean:要清除所有生成的文件。