[U-Boot] SPL Framework: Add support for U_BOOT_CMD

Christian Riesch christian.riesch at omicron.at
Wed Jan 25 12:43:20 CET 2012


Hi,

On Wed, Jan 25, 2012 at 11:50 AM, Prabhakar Lad
<prabhakar.csengg at gmail.com> wrote:
> On Wed, Jan 25, 2012 at 3:57 PM, Christian Riesch <
> christian.riesch at omicron.at> wrote:
>
>> Hi,
>>
>> On Wed, Jan 25, 2012 at 10:52 AM, Prabhakar Lad
>> <prabhakar.csengg at gmail.com> wrote:
>> > *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 *
>>
>> Why do you want to do that? A command in an SPL?
>>
>    For davinci soc I wanted to add "clocks" command not particularly for
> SPL only
>    when I move some piece of code from arc/arm/cpu/arm926ejs/cpu.c to say
>    arc/arm/cpu/arm926ejs/speed.c and implement the command I get following
> errors,
>
>   arm-none-linux-gnueabi-ld: error: no memory region specified for
> loadable section `.u_boot_cmd'
>   make[2]: ***
> [/home/plad/ti/uboot/denx_uboot/uboot-ti/u-boot-ti/spl/u-boot-spl] Error 1
>   make[2]: Leaving directory
> `/home/plad/ti/uboot/denx_uboot/uboot-ti/u-boot-ti/spl'
>   I get these errors for SPL enabled

As Wolfgang wrote, commands cannot be run in SPL and therefore you
should not compile them into SPL.

How about something like this:

#ifndef CONFIG_SPL_BUILD
U_BOOT_CMD(
...
);
#endif

If you don't use Sughosh's patches I think you need #ifndef
CONFIG_NAND_SPL instead of #ifndef CONFIG_SPL_BUILD.
Regards, Christian


More information about the U-Boot mailing list