Commit ba5976092fc6b5d98397fe86627d7cca0fee9c99

Authored by Benoît Thébaudeau
Committed by Albert ARIBAUD
1 parent 600ed32152

imx: Add u-boot-with-spl.imx make target

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>

Showing 3 changed files with 12 additions and 0 deletions Side-by-side Diff

... ... @@ -30,6 +30,7 @@
30 30 /u-boot
31 31 /u-boot.hex
32 32 /u-boot.imx
  33 +/u-boot-with-spl.imx
33 34 /u-boot.map
34 35 /u-boot.srec
35 36 /u-boot.ldr
... ... @@ -486,6 +486,10 @@
486 486 cat $(obj)spl/u-boot-spl-pad.bin $(obj)u-boot.bin > $@
487 487 rm $(obj)spl/u-boot-spl-pad.bin
488 488  
  489 +$(obj)u-boot-with-spl.imx: $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
  490 + $(MAKE) -C $(SRCTREE)/arch/arm/imx-common \
  491 + $(OBJTREE)/u-boot-with-spl.imx
  492 +
489 493 $(obj)u-boot.ubl: $(obj)u-boot-with-spl.bin
490 494 $(obj)tools/mkimage -n $(UBL_CONFIG) -T ublimage \
491 495 -e $(CONFIG_SYS_TEXT_BASE) -d $< $(obj)u-boot.ubl
... ... @@ -850,6 +854,7 @@
850 854 @rm -f $(obj)u-boot.kwb
851 855 @rm -f $(obj)u-boot.pbl
852 856 @rm -f $(obj)u-boot.imx
  857 + @rm -f $(obj)u-boot-with-spl.imx
853 858 @rm -f $(obj)u-boot.ubl
854 859 @rm -f $(obj)u-boot.ais
855 860 @rm -f $(obj)u-boot.dtb
arch/arm/imx-common/Makefile
... ... @@ -55,6 +55,12 @@
55 55 $(OBJTREE)/tools/mkimage -n $(filter-out %.bin,$^) -T imximage \
56 56 -e $(CONFIG_SPL_TEXT_BASE) -d $< $@
57 57  
  58 +$(OBJTREE)/u-boot-with-spl.imx: $(OBJTREE)/SPL $(OBJTREE)/u-boot.bin
  59 + $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(CONFIG_SPL_PAD_TO) \
  60 + -I binary -O binary $< $(OBJTREE)/spl/u-boot-spl-pad.imx
  61 + cat $(OBJTREE)/spl/u-boot-spl-pad.imx $(OBJTREE)/u-boot.bin > $@
  62 + rm $(OBJTREE)/spl/u-boot-spl-pad.imx
  63 +
58 64  
59 65 #########################################################################
60 66