]> git.sur5r.net Git - u-boot/commitdiff
keystone: add support for NAND gpheader image
authorKhoronzhuk, Ivan <ivan.khoronzhuk@ti.com>
Fri, 4 Jul 2014 12:03:26 +0000 (15:03 +0300)
committerTom Rini <trini@ti.com>
Fri, 25 Jul 2014 19:21:06 +0000 (15:21 -0400)
Add support for NAND gpheader image. TI Keystone2 ROM bootloader
expects 8 bytes of trailing zeroes in the nand u-boot image.
So add zeros at the end of the nand gph image.

Acked-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
Makefile

index 686cab1460fc82f433edb4466de5498dbf8b7d31..76533135f27f61bc09ff114d28e9825e3d8a879e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -914,6 +914,12 @@ OBJCOPYFLAGS_u-boot-spi.gph = -I binary -O binary --pad-to=$(CONFIG_SPL_PAD_TO)
 u-boot-spi.gph: spl/u-boot-spl.gph u-boot.img FORCE
        $(call if_changed,pad_cat)
 
+MKIMAGEFLAGS_u-boot-nand.gph = -A $(ARCH) -T gpimage -C none \
+       -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) -n U-Boot
+u-boot-nand.gph: u-boot.bin FORCE
+       $(call if_changed,mkimage)
+       @dd if=/dev/zero bs=8 count=1 2>/dev/null >> $@
+
 ifneq ($(CONFIG_SUNXI),)
 OBJCOPYFLAGS_u-boot-sunxi-with-spl.bin = -I binary -O binary \
                                   --pad-to=$(CONFIG_SPL_PAD_TO) --gap-fill=0xff