From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aneesh V Date: Thu, 26 Jul 2012 13:41:07 -0700 Subject: [U-Boot] Board-specific commands unintentionally linked into SPL? In-Reply-To: References: Message-ID: <5011AB63.8040101@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Tyler, On 07/26/2012 11:54 AM, Tyler Olmstead wrote: > Hi Christian, > > On Thu, Jul 26, 2012 at 10:03 AM, Christian Riesch > wrote: >> >> [cc'd Prabhakar Lad, Tom Rini, and Scott Wood] >> >> Tyler, >> >> On Thu, Jul 26, 2012 at 5:37 PM, Tyler Olmstead >> wrote: >>> Hi all, >>> >>> I have encountered some issues adding a board-specific command to the >>> board file of a project I have been working on. Specifically, after >>> adding a U-Boot shell command to my board file, I have been seeing >>> link-stage failures when attempting to build SPL. >> >> It's hard to tell without having your code, but I think this problem >> was already discussed in [1]. However I do not remember how Prabhakar >> solved it in the end. > > Yes, I ran into this thread while debugging the problem, which > ultimately lead me to my solution. From that same thread [1], Wolfgang > Denk writes: > > >> >> *I want to add a command using U_BOOT_CMD in uboot, where SPL_BUILD is >> enabled for example for da850evm in spl frame work how can i do that * > > This makes no sense. Commands can only be executed when we have full > U-Boot running (actually even only after relocation). You cannot run > commands in the SPL. > > > I understand of course why it makes no sense to have command support > in the SPL. However, the crux of this problem is that U-Boot and SPL > both link in the same board object file, so in that sense compile-time > switches wont work. From later in [1], Scott Wood writes: No that's not correct. For SPL we build the object files into a different directory "spl/". Please see the below in spl/Makefile # We want the final binaries in this directory obj := $(OBJTREE)/spl/ Object files used for U-Boot and SPL are not the same. You can use compile-time switches and it should work just fine. -Aneesh