summaryrefslogtreecommitdiff
path: root/nand_spl/board/karo
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2012-10-19 05:00:10 +0000
committerTom Rini <trini@ti.com>2012-10-22 08:29:29 -0700
commit97b24d3d51a92cb8c0c1e1a74abf22fe1a1807a3 (patch)
tree2c8a4ea2c41b9e09482857d68557d45692754f8d /nand_spl/board/karo
parent047cea3655cf34ce1f911c282e82598ded998dd2 (diff)
downloadu-boot-imx-97b24d3d51a92cb8c0c1e1a74abf22fe1a1807a3.zip
u-boot-imx-97b24d3d51a92cb8c0c1e1a74abf22fe1a1807a3.tar.gz
u-boot-imx-97b24d3d51a92cb8c0c1e1a74abf22fe1a1807a3.tar.bz2
common: Add symbol handling for generic lists into Makefile
This patch adds essential components for generation of the contents of the linker section that is used by the linker-generated array. All of the contents is held in a separate file, u-boot.lst, which is generated at runtime just before U-Boot is linked. The purpose of this code is to especially generate the appropriate boundary symbols around each subsection in the section carrying the linker-generated arrays. Obviously, the interim linker code for actual placement of the variables into the section is generated too. The generated file, u-boot.lst, is included into u-boot.lds via the linker INCLUDE directive in u-boot.lds . Adjustments are made in the Makefile and spl/Makefile so that the u-boot.lds and u-boot-spl.lds depend on their respective .lst files. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Tested-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'nand_spl/board/karo')
-rw-r--r--nand_spl/board/karo/tx25/Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/nand_spl/board/karo/tx25/Makefile b/nand_spl/board/karo/tx25/Makefile
index 0336346..becf7fa 100644
--- a/nand_spl/board/karo/tx25/Makefile
+++ b/nand_spl/board/karo/tx25/Makefile
@@ -27,6 +27,7 @@ include $(TOPDIR)/nand_spl/board/$(BOARDDIR)/config.mk
nandobj := $(OBJTREE)/nand_spl/
LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds
+LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst
LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(LDFLAGS) \
$(LDFLAGS_FINAL)
AFLAGS += -DCONFIG_SPL_BUILD -DCONFIG_NAND_SPL
@@ -57,8 +58,12 @@ $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot.lds
-Map $(nandobj)u-boot-spl.map \
-o $@
-$(nandobj)u-boot.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.lds: $(LDSCRIPT) $(LSTSCRIPT)
+ $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(obj) -ansi -D__ASSEMBLY__ -P - <$< >$@
#########################################################################