Patchwork [U-Boot,Drivers,18/19] u-boot/spl: Add u-boot-spl.img to u-boot targets

login
register
mail settings
Submitter Vipin Kumar
Date Nov. 2, 2012, 5:40 p.m.
Message ID <be9a7a0beb3629e684484c1d2e61ebe1c4cbdf4a.1351877124.git.vipin.kumar@st.com>
Download mbox | patch
Permalink /patch/196725/
State Superseded
Delegated to: Albert ARIBAUD
Headers show

Comments

Vipin Kumar - Nov. 2, 2012, 5:40 p.m.
Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
---
 Makefile | 10 ++++++++++
 1 file changed, 10 insertions(+)

Patch

diff --git a/Makefile b/Makefile
index 328347d..5d8d430 100644
--- a/Makefile
+++ b/Makefile
@@ -497,6 +497,13 @@  $(obj)u-boot.sb:       $(obj)u-boot.bin $(obj)spl/u-boot-spl.bin
 		elftosb -zdf $(ELFTOSB_TARGET-y) -c $(TOPDIR)/$(CPUDIR)/$(SOC)/u-boot-$(ELFTOSB_TARGET-y).bd \
 			-o $(obj)u-boot.sb
 
+$(obj)spl/u-boot-spl.img:	$(obj)spl/u-boot-spl.bin
+		$(obj)tools/mkimage -A $(ARCH) -T firmware -C none \
+		-a $(CONFIG_SPL_TEXT_BASE) -e $(CONFIG_SPL_TEXT_BASE) \
+		-n $(shell sed -n -e 's/.*U_BOOT_SPL_VERSION//p' $(VERSION_FILE) | \
+			sed -e 's/"[	 ]*$$/ for $(BOARD) board"/') \
+		-d $(obj)spl/u-boot-spl.bin $(obj)spl/u-boot-spl.img
+
 # On x600 (SPEAr600) U-Boot is appended to U-Boot SPL.
 # Both images are created using mkimage (crc etc), so that the ROM
 # bootloader can check its integrity. Padding needs to be done to the
@@ -704,6 +711,9 @@  $(VERSION_FILE):
 			"$(U_BOOT_VERSION)" "$${localvers}" ; \
 		   printf '#define U_BOOT_VERSION "U-Boot %s%s"\n' \
 			"$(U_BOOT_VERSION)" "$${localvers}" ; \
+		   printf '#define U_BOOT_SPL_VERSION "%s %s%s"\n' \
+			$(if $(CONFIG_SPL_IMAGENAME),$(CONFIG_SPL_IMAGENAME),"U-Boot SPL") \
+			"$(U_BOOT_VERSION)" "$${localvers}" ; \
 		) > $@.tmp
 		@( printf '#define CC_VERSION_STRING "%s"\n' \
 		 '$(shell $(CC) --version | head -n 1)' )>>  $@.tmp