make时使用的是默认目标,主Makefile 中的默认目标如下:
128 # That's our default target when none is given on the command line 129 PHONY := _all 130 _all:
如果KBUILD_EXTMOD为空的话_all依赖于all。这里不编译模块,所以KBUILD_EXTMOD 肯定为空,目标_all 又依赖于 all:
194 # If building an external module we do not care about the all: rule 195 # but instead _all depend on modules 196 PHONY += all 197 ifeq ($(KBUILD_EXTMOD),) 198 _all: all 199 else 200 _all: modules 201 endif
在主 Makefile 中 all 目标规则如下:
802 all: $(ALL-y) 803 ifneq ($(CONFIG_SYS_GENERIC_BOARD),y) 804 @echo "===================== WARNING ======================" 805 @echo "Please convert this board to generic board." 806 @echo "Otherwise it will be removed by the end of 2014." 807 @echo "See doc/README.generic-board for further information" 808 @echo "====================================================" 809 endif 810 ifeq ($(CONFIG_DM_I2C_COMPAT),y) 811 @echo "===================== WARNING ======================" 812 @echo "This board uses CONFIG_DM_I2C_COMPAT. Please remove" 813 @echo "(possibly in a subsequent patch in your series)" 814 @echo "before sending patches to the mailing list." 815 @ech
imx6ull:uboot的make过程分析
最新推荐文章于 2023-06-02 22:40:55 发布
本文详细分析了U-Boot的Makefile,解释了默认目标_all如何依赖于all和modules,以及all目标的构建过程。从u-boot.srec到u-boot.bin,通过链接不同阶段的文件和命令,最终生成可执行的u-boot二进制文件。同时,还介绍了其他如u-boot.srec、u-boot.sym等依赖的生成方法。
摘要由CSDN通过智能技术生成