From 97b24d3d51a92cb8c0c1e1a74abf22fe1a1807a3 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Fri, 19 Oct 2012 05:00:10 +0000 Subject: 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 Cc: Joe Hershberger Cc: Mike Frysinger Acked-by: Joe Hershberger Tested-by: Joe Hershberger --- spl/Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'spl/Makefile') diff --git a/spl/Makefile b/spl/Makefile index 92267d6dea..20a943c14d 100644 --- a/spl/Makefile +++ b/spl/Makefile @@ -154,8 +154,12 @@ $(START): depend $(LIBS): depend $(MAKE) -C $(SRCTREE)$(dir $(subst $(SPLTREE),,$@)) -$(obj)u-boot-spl.lds: $(LDSCRIPT) depend - $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - < $< > $@ +# The following line expands into whole rule which generates u-boot.lst, +# 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, $(obj)u-boot.lst, $(LIBS))) +$(obj)u-boot-spl.lds: $(LDSCRIPT) $(obj)u-boot.lst depend + $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(obj). -ansi -D__ASSEMBLY__ -P - < $< > $@ depend: $(obj).depend .PHONY: depend -- cgit v1.2.1 From 79b9ebb7007cd99409ff506c1bf57b2ab0975243 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Tue, 16 Oct 2012 13:06:06 +0000 Subject: omapimage: Add support for byteswapped SPI images Add MLO.byteswap as a target to spl/Makefile and un-guard the first MLO rule so we don't have to duplicate it. Signed-off-by: Tom Rini --- spl/Makefile | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'spl/Makefile') diff --git a/spl/Makefile b/spl/Makefile index 92267d6dea..7b52bd1070 100644 --- a/spl/Makefile +++ b/spl/Makefile @@ -112,16 +112,13 @@ LDPPFLAGS += \ $(shell $(LD) --version | \ sed -ne 's/GNU ld version \([0-9][0-9]*\)\.\([0-9][0-9]*\).*/-DLD_MAJOR=\1 -DLD_MINOR=\2/p') -ifdef CONFIG_OMAP $(OBJTREE)/MLO: $(obj)u-boot-spl.bin $(OBJTREE)/tools/mkimage -T omapimage \ -a $(CONFIG_SPL_TEXT_BASE) -d $< $@ -endif -ifdef CONFIG_AM33XX -$(OBJTREE)/MLO: $(obj)u-boot-spl.bin - $(OBJTREE)/tools/mkimage -T omapimage \ + +$(OBJTREE)/MLO.byteswap: $(obj)u-boot-spl.bin + $(OBJTREE)/tools/mkimage -T omapimage -n byteswap \ -a $(CONFIG_SPL_TEXT_BASE) -d $< $@ -endif ALL-y += $(obj)u-boot-spl.bin -- cgit v1.2.1