diff mbox

[U-Boot,7/9] tegra: add u-boot.t2 target

Message ID 1336633347-8049-8-git-send-email-amartin@nvidia.com
State Superseded
Headers show

Commit Message

Allen Martin May 10, 2012, 7:02 a.m. UTC
Add target for tegra2 u-boot image.  This is a concatenation of tegra
spl and normal u-boot binaries.

Signed-off-by: Allen Martin <amartin@nvidia.com>
---
 Makefile                        |    6 ++++++
 board/nvidia/seaboard/config.mk |    1 +
 2 files changed, 7 insertions(+)
 create mode 100644 board/nvidia/seaboard/config.mk

Comments

Stephen Warren May 15, 2012, 5:08 a.m. UTC | #1
On 05/10/2012 01:02 AM, Allen Martin wrote:
> Add target for tegra2 u-boot image.  This is a concatenation of tegra
> spl and normal u-boot binaries.

> diff --git a/Makefile b/Makefile

> +$(obj)u-boot.t2:       $(obj)spl/u-boot-spl.bin $(obj)u-boot-dtb.bin

Hmmm. Only some boards boot using DT, so that second file is sometimes
just u-boot.bin. Is there any way we can make this handle both cases?
Perhaps we just need to convert all Tegra boards to DT to solve this.
Allen Martin May 18, 2012, 10:14 p.m. UTC | #2
On Mon, May 14, 2012 at 10:08:05PM -0700, Stephen Warren wrote:
> On 05/10/2012 01:02 AM, Allen Martin wrote:
> > Add target for tegra2 u-boot image.  This is a concatenation of tegra
> > spl and normal u-boot binaries.
> 
> > diff --git a/Makefile b/Makefile
> 
> > +$(obj)u-boot.t2:       $(obj)spl/u-boot-spl.bin $(obj)u-boot-dtb.bin
> 
> Hmmm. Only some boards boot using DT, so that second file is sometimes
> just u-boot.bin. Is there any way we can make this handle both cases?
> Perhaps we just need to convert all Tegra boards to DT to solve this.

I can make it handle both, shouldn't be a problem.

-Allen
diff mbox

Patch

diff --git a/Makefile b/Makefile
index 8e587f4..a7cf175 100644
--- a/Makefile
+++ b/Makefile
@@ -456,6 +456,11 @@  $(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
 
+$(obj)u-boot.t2:       $(obj)spl/u-boot-spl.bin $(obj)u-boot-dtb.bin
+		$(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $(obj)spl/u-boot-spl $(obj)spl/u-boot-spl-pad.bin
+		cat $(obj)spl/u-boot-spl-pad.bin $(obj)u-boot-dtb.bin > $(obj)u-boot.t2
+		rm $(obj)spl/u-boot-spl-pad.bin
+
 ifeq ($(CONFIG_SANDBOX),y)
 GEN_UBOOT = \
 		cd $(LNDIR) && $(CC) $(SYMS) -T $(obj)u-boot.lds \
@@ -768,6 +773,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
diff --git a/board/nvidia/seaboard/config.mk b/board/nvidia/seaboard/config.mk
new file mode 100644
index 0000000..1d6e878
--- /dev/null
+++ b/board/nvidia/seaboard/config.mk
@@ -0,0 +1 @@ 
+PAD_TO=0x00108000