]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - nand_spl/board/freescale/p1_p2_rdb/Makefile
Merge remote-tracking branch 'u-boot-ti/master'
[karo-tx-uboot.git] / nand_spl / board / freescale / p1_p2_rdb / Makefile
index 43da3df15743902d15f3c17a6579bcb8558f294c..e5388d89c859bfd6092489e915e9ee3f66b4ffd9 100644 (file)
@@ -32,6 +32,7 @@ include $(TOPDIR)/config.mk
 nandobj        := $(OBJTREE)/nand_spl/
 
 LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds
+LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst
 LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \
                $(LDFLAGS) $(LDFLAGS_FINAL)
 AFLAGS += -DCONFIG_NAND_SPL
@@ -61,8 +62,12 @@ $(nandobj)u-boot-spl:        $(OBJS) $(nandobj)u-boot-nand_spl.lds
                -Map $(nandobj)u-boot-spl.map \
                -o $(nandobj)u-boot-spl
 
-$(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT)
-       $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
+# The following line expands into whole rule which generates $(LSTSCRIPT),
+# the file containing u-boots LG-array linker section. This is included into
+# $(LDSCRIPT). The function make_u_boot_list is defined in helper.mk file.
+$(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS)))
+$(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) $(LSTSCRIPT)
+       $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(obj) -ansi -D__ASSEMBLY__ -P - <$< >$@
 
 # create symbolic links for common files