[U-Boot] Board-specific commands unintentionally linked into SPL?

Aneesh V aneesh at ti.com
Thu Jul 26 22:41:07 CEST 2012


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
> <christian.riesch at omicron.at>  wrote:
>>
>> [cc'd Prabhakar Lad, Tom Rini, and Scott Wood]
>>
>> Tyler,
>>
>> On Thu, Jul 26, 2012 at 5:37 PM, Tyler Olmstead
>> <tyler.j.olmstead at gmail.com>  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:
>
> <quote>
>>
>> *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.
> </quote>
>
> 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


More information about the U-Boot mailing list