imx6ull:uboot的make过程分析

本文详细分析了U-Boot的Makefile,解释了默认目标_all如何依赖于all和modules,以及all目标的构建过程。从u-boot.srec到u-boot.bin,通过链接不同阶段的文件和命令,最终生成可执行的u-boot二进制文件。同时,还介绍了其他如u-boot.srec、u-boot.sym等依赖的生成方法。
摘要由CSDN通过智能技术生成

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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值