From mboxrd@z Thu Jan 1 00:00:00 1970 From: Allen Martin Date: Mon, 11 Jun 2012 12:22:06 -0700 Subject: [U-Boot] [PATCH v3 09/14] tegra20: add u-boot.t2 target In-Reply-To: References: <1339190167-20320-1-git-send-email-amartin@nvidia.com> <1339190167-20320-10-git-send-email-amartin@nvidia.com> Message-ID: <20120611192206.GG6633@nvidia.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sat, Jun 09, 2012 at 12:12:09PM -0700, Simon Glass wrote: > Hi Allen, > > On Fri, Jun 8, 2012 at 2:16 PM, Allen Martin > wrote: > Add target for tegra20 u-boot image. This is a concatenation of tegra > spl and normal u-boot binaries. > > Signed-off-by: Allen Martin > > --- > .gitignore | 1 + > Makefile | 11 +++++++++++ > board/nvidia/seaboard/config.mk | 1 + > 3 files changed, 13 insertions(+) > create mode 100644 board/nvidia/seaboard/config.mk > > diff --git a/.gitignore b/.gitignore > index 0f32fd8..b9192bf 100644 > --- a/.gitignore > +++ b/.gitignore > @@ -39,6 +39,7 @@ > /u-boot.ais > /u-boot.dtb > /u-boot.sb > +/u-boot.t2 > > What does t2 mean? If it is a binary file of some sort perhaps u-boot-t2.bin would be better? It's just means "tegra2". I was following the convention that other SPL builds use. I don't have a strong opinion on the name though. > +ifeq ($(CONFIG_OF_SEPARATE),y) > +T2_UBOOT=$(obj)u-boot-dtb.bin > +else > +T2_UBOOT=$(obj)u-boot.bin > +endif > > What is this logic for? The dtb file is separate but that doesn't > necessarily mean that it must be immediately after the U-Boot > image. We provide other options for packaging it, like > getenv(). Maybe if you want to create this composite binary you > should change its name (u-boot-dtb-t2.bin or u-boot-t2.bin) to > indicate what it contains? This just picks up the name of the u-boot binary so it glues the SPL to the right thing depending if devicetree is in use or not. > > +$(obj)u-boot.t2: $(obj)spl/u-boot-spl.bin $(T2_UBOOT) > + $(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 $(T2_UBOOT) > $(obj)u-boot.t2 > + rm $(obj)spl/u-boot-spl-pad.bin > + > > I echo Stephen's comments. But also SPL is supposed to load U-Boot, > so shouldn't this t2 binary do that? The t2 binary is the SPL and u-boot concatenated together into one binary. The whole thing will get loaded into memory by the tegra BootROM. The SPL knows the address of the real u-boot at compile time and uses that as the address for the Cortex A9 to jump to when it comes out of reset. -Allen -- nvpublic