]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
imx: Add u-boot-with-spl.imx make target
authorBenoît Thébaudeau <benoit.thebaudeau@advansee.com>
Thu, 11 Apr 2013 09:35:56 +0000 (09:35 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Fri, 12 Apr 2013 05:55:07 +0000 (07:55 +0200)
This image combines the SPL with the i.MX header and U-Boot. This is a
convenient way of having a single image to program on some boot devices.

The i.MX header has to be added to the SPL before appending U-Boot, so that the
boot ROM loads only the SPL.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
.gitignore
Makefile
arch/arm/imx-common/Makefile

index bff721ea542c8dd7eab7971d5ddf7e08728371c6..e42d837993cff4bc1bc4ff1d1089fac3b90daed7 100644 (file)
@@ -30,6 +30,7 @@
 /u-boot
 /u-boot.hex
 /u-boot.imx
+/u-boot-with-spl.imx
 /u-boot.map
 /u-boot.srec
 /u-boot.ldr
index caca851365205c2298c8a94c0ab8a0e8c9e93667..e22faa5d471959fc3ae6c7fb2e2e4098c4976584 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -486,6 +486,10 @@ $(obj)u-boot-with-spl.bin: $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
                cat $(obj)spl/u-boot-spl-pad.bin $(obj)u-boot.bin > $@
                rm $(obj)spl/u-boot-spl-pad.bin
 
+$(obj)u-boot-with-spl.imx: $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
+               $(MAKE) -C $(SRCTREE)/arch/arm/imx-common \
+                       $(OBJTREE)/u-boot-with-spl.imx
+
 $(obj)u-boot.ubl:       $(obj)u-boot-with-spl.bin
                $(obj)tools/mkimage -n $(UBL_CONFIG) -T ublimage \
                -e $(CONFIG_SYS_TEXT_BASE) -d $< $(obj)u-boot.ubl
@@ -850,6 +854,7 @@ clobber:    tidy
        @rm -f $(obj)u-boot.kwb
        @rm -f $(obj)u-boot.pbl
        @rm -f $(obj)u-boot.imx
+       @rm -f $(obj)u-boot-with-spl.imx
        @rm -f $(obj)u-boot.ubl
        @rm -f $(obj)u-boot.ais
        @rm -f $(obj)u-boot.dtb
index 428a57e1cb7ce8308a5582e18b44a6fb47527cb1..f59ae6fca55deeb3ad75eee775067912509b41fd 100644 (file)
@@ -55,6 +55,12 @@ $(OBJTREE)/SPL: $(OBJTREE)/spl/u-boot-spl.bin $(OBJTREE)/$(patsubst "%",%,$(CONF
        $(OBJTREE)/tools/mkimage -n $(filter-out %.bin,$^) -T imximage \
        -e $(CONFIG_SPL_TEXT_BASE) -d $< $@
 
+$(OBJTREE)/u-boot-with-spl.imx: $(OBJTREE)/SPL $(OBJTREE)/u-boot.bin
+       $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(CONFIG_SPL_PAD_TO) \
+               -I binary -O binary $< $(OBJTREE)/spl/u-boot-spl-pad.imx
+       cat $(OBJTREE)/spl/u-boot-spl-pad.imx $(OBJTREE)/u-boot.bin > $@
+       rm $(OBJTREE)/spl/u-boot-spl-pad.imx
+
 
 #########################################################################