[U-Boot] [PATCH v4 10/13] tegra20: add u-boot-t2.bin target

Allen Martin
2012-06-22T00:00:44Z

Add target for tegra20 u-boot image. This is a concatenation of tegra
spl and normal u-boot binaries. For non-devicetree builds this is
named "u-boot-t2.bin" for devicetree builds is named
"u-boot-dtb-t2.bin".

Signed-off-by: Allen Martin <amartin@nvidia.com>
---
Makefile | 13 +++++++++++++
1 file changed, 13 insertions(+)

diff --git a/Makefile b/Makefile
index b2275ed..b021e5b 100644
--- a/Makefile
+++ b/Makefile
@@ -456,6 +456,18 @@ $(obj)u-boot.sb: $(obj)u-boot.bin $(obj)spl/u-boot-spl.bin
elftosb -zdf imx28 -c $(TOPDIR)/board/$(BOARDDIR)/u-boot.bd \
-o $(obj)u-boot.sb

+ifeq ($(CONFIG_OF_SEPARATE),y)
+T2_UBOOT_IN=$(obj)u-boot-dtb.bin
+T2_UBOOT_OUT=$(obj)u-boot-dtb-t2.bin
+else
+T2_UBOOT_IN=$(obj)u-boot.bin
+T2_UBOOT_OUT=$(obj)u-boot-t2.bin
+endif
+$(T2_UBOOT_OUT): $(obj)spl/u-boot-spl.bin $(T2_UBOOT_IN)
+ $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(CONFIG_SYS_TEXT_BASE) -O binary $(obj)spl/u-boot-spl $(obj)spl/u-boot-spl-pad.bin
+ cat $(obj)spl/u-boot-spl-pad.bin $(T2_UBOOT_IN) > $(T2_UBOOT_OUT)
+ rm $(obj)spl/u-boot-spl-pad.bin
+
ifeq ($(CONFIG_SANDBOX),y)
GEN_UBOOT = \
cd $(LNDIR) && $(CC) $(SYMS) -T $(obj)u-boot.lds \
@@ -775,6 +787,7 @@ clobber: tidy
@rm -f $(obj)u-boot.ais
@rm -f $(obj)u-boot.dtb
@rm -f $(obj)u-boot.sb
+ @rm -f $(obj)u-boot.t2
@rm -f $(obj)tools/inca-swap-bytes
@rm -f $(obj)arch/powerpc/cpu/mpc824x/bedbug_603e.c
@rm -f $(obj)arch/powerpc/cpu/mpc83xx/ddr-gen?.c
--
1.7.9.5