Patchwork [U-Boot,RFC,01/17] Add u-boot-pad.bin target to the Makefile

login
register
mail settings
Submitter Scott Wood
Date Sept. 22, 2012, 12:01 a.m.
Message ID <1348272087-29608-2-git-send-email-scottwood@freescale.com>
Download mbox | patch
Permalink /patch/185977/
State RFC
Headers show

Comments

Scott Wood - Sept. 22, 2012, 12:01 a.m.
From: José Miguel Gonçalves <jose.goncalves@inov.pt>

Samsung's S3C24XX SoCs need this in order to generate a binary image
with a padded SPL concatenated with U-Boot.

Signed-off-by: José Miguel Gonçalves <jose.goncalves@inov.pt>
Signed-off-by: Scott Wood <scottwood@freescale.com>
---
 Makefile |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

Patch

diff --git a/Makefile b/Makefile
index 23bd65a..025106e 100644
--- a/Makefile
+++ b/Makefile
@@ -433,14 +433,15 @@  $(obj)u-boot.sha1:	$(obj)u-boot.bin
 $(obj)u-boot.dis:	$(obj)u-boot
 		$(OBJDUMP) -d $< > $@
 
-$(obj)u-boot.ubl:       $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
+$(obj)u-boot-pad.bin:       $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
 		$(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $(obj)spl/u-boot-spl $(obj)spl/u-boot-spl-pad.bin
-		cat $(obj)spl/u-boot-spl-pad.bin $(obj)u-boot.bin > $(obj)u-boot-ubl.bin
-		$(obj)tools/mkimage -n $(UBL_CONFIG) -T ublimage \
-		-e $(CONFIG_SYS_TEXT_BASE) -d $(obj)u-boot-ubl.bin $(obj)u-boot.ubl
-		rm $(obj)u-boot-ubl.bin
+		cat $(obj)spl/u-boot-spl-pad.bin $(obj)u-boot.bin > $(obj)u-boot-pad.bin
 		rm $(obj)spl/u-boot-spl-pad.bin
 
+$(obj)u-boot.ubl:       $(obj)spl/u-boot-pad.bin
+		$(obj)tools/mkimage -n $(UBL_CONFIG) -T ublimage \
+		-e $(CONFIG_SYS_TEXT_BASE) -d $(obj)u-boot-pad.bin $(obj)u-boot.ubl
+
 $(obj)u-boot.ais:       $(obj)spl/u-boot-spl.bin $(obj)u-boot.img
 		$(obj)tools/mkimage -s -n /dev/null -T aisimage \
 			-e $(CONFIG_SPL_TEXT_BASE) \