Commit 7d5a5c79caa9d1cfd5801c7fd2b75080e2733d3d

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

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

This image combines the SPL with the i.MX header, the FCB and U-Boot.

For i.MX25/35/51, the FCB is ignored by the boot ROM, so this image is just
useful because it can be programmed on a NAND Flash page boundary.

For i.MX53, the FCB is required by the boot ROM.

This does not support i.MX6 so far because its FCB is more complicated.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>

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

... ... @@ -31,6 +31,7 @@
31 31 /u-boot.hex
32 32 /u-boot.imx
33 33 /u-boot-with-spl.imx
  34 +/u-boot-with-nand-spl.imx
34 35 /u-boot.map
35 36 /u-boot.srec
36 37 /u-boot.ldr
... ... @@ -490,6 +490,10 @@
490 490 $(MAKE) -C $(SRCTREE)/arch/arm/imx-common \
491 491 $(OBJTREE)/u-boot-with-spl.imx
492 492  
  493 +$(obj)u-boot-with-nand-spl.imx: $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
  494 + $(MAKE) -C $(SRCTREE)/arch/arm/imx-common \
  495 + $(OBJTREE)/u-boot-with-nand-spl.imx
  496 +
493 497 $(obj)u-boot.ubl: $(obj)u-boot-with-spl.bin
494 498 $(obj)tools/mkimage -n $(UBL_CONFIG) -T ublimage \
495 499 -e $(CONFIG_SYS_TEXT_BASE) -d $< $(obj)u-boot.ubl
... ... @@ -855,6 +859,7 @@
855 859 @rm -f $(obj)u-boot.pbl
856 860 @rm -f $(obj)u-boot.imx
857 861 @rm -f $(obj)u-boot-with-spl.imx
  862 + @rm -f $(obj)u-boot-with-nand-spl.imx
858 863 @rm -f $(obj)u-boot.ubl
859 864 @rm -f $(obj)u-boot.ais
860 865 @rm -f $(obj)u-boot.dtb
arch/arm/imx-common/Makefile
... ... @@ -61,6 +61,17 @@
61 61 cat $(OBJTREE)/spl/u-boot-spl-pad.imx $(OBJTREE)/u-boot.bin > $@
62 62 rm $(OBJTREE)/spl/u-boot-spl-pad.imx
63 63  
  64 +$(OBJTREE)/u-boot-with-nand-spl.imx: $(OBJTREE)/SPL $(OBJTREE)/u-boot.bin
  65 + (echo -ne '\x00\x00\x00\x00\x46\x43\x42\x20\x01' && \
  66 + dd bs=1015 count=1 if=/dev/zero 2>/dev/null) | \
  67 + cat - $< > $(OBJTREE)/spl/u-boot-nand-spl.imx
  68 + $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(CONFIG_SPL_PAD_TO) \
  69 + -I binary -O binary $(OBJTREE)/spl/u-boot-nand-spl.imx \
  70 + $(OBJTREE)/spl/u-boot-nand-spl-pad.imx
  71 + rm $(OBJTREE)/spl/u-boot-nand-spl.imx
  72 + cat $(OBJTREE)/spl/u-boot-nand-spl-pad.imx $(OBJTREE)/u-boot.bin > $@
  73 + rm $(OBJTREE)/spl/u-boot-nand-spl-pad.imx
  74 +
64 75  
65 76 #########################################################################
66 77