u-boot 用哪个lds链接脚本
作者:互联网
顶层Makefile文件中 :
ifndef LDSCRIPT
#LDSCRIPT := $(srctree)/board/$(BOARDDIR)/u-boot.lds.debug
ifdef CONFIG_SYS_LDSCRIPT
# need to strip off double quotes
LDSCRIPT := $(srctree)/$(CONFIG_SYS_LDSCRIPT:"%"=%)
endif
endif
# If there is no specified link script, we look in a number of places for it
ifndef LDSCRIPT
ifeq ($(wildcard $(LDSCRIPT)),)
LDSCRIPT := $(srctree)/board/$(BOARDDIR)/u-boot.lds
endif
ifeq ($(wildcard $(LDSCRIPT)),)
LDSCRIPT := $(srctree)/$(CPUDIR)/u-boot.lds
endif
ifeq ($(wildcard $(LDSCRIPT)),)
LDSCRIPT := $(srctree)/arch/$(ARCH)/cpu/u-boot.lds
endif
endif
之前一直在后面几条里面找,board目录下没有,以为是arch/arm/cpu/u-boot.lds
结果发现是/arch/arm/mach-fmsh/u-boot.lds
grep果然是好东西,
grep -nwr u-boot.lds
发现了
include/configs/fmsh-common.h:120:#define CONFIG_SYS_LDSCRIPT "arch/arm/mach-fmsh/u-boot.lds"
在头文件里定义了这个。
标签:ifeq,LDSCRIPT,boot,lds,srctree,arch,链接 来源: https://www.cnblogs.com/idyllcheung/p/11606460.html