All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] SPL Framework: Add support for U_BOOT_CMD
@ 2012-01-25  9:52 Prabhakar Lad
  2012-01-25 10:27 ` Christian Riesch
  2012-01-25 10:37 ` Wolfgang Denk
  0 siblings, 2 replies; 9+ messages in thread
From: Prabhakar Lad @ 2012-01-25  9:52 UTC (permalink / raw)
  To: u-boot

*Hi Folks*,

*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 *
*When I tried to that I get following error,
"error: no memory region specified for loadable section* "
*When i add printf statements and build I get errors for hawkboard_nand
board puts works fine. Is printf being removed as of buffer overriding *issues
or
*is there a support yet* to be added for printf?

Regards,
--Prabhakar lad

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] SPL Framework: Add support for U_BOOT_CMD
  2012-01-25  9:52 [U-Boot] SPL Framework: Add support for U_BOOT_CMD Prabhakar Lad
@ 2012-01-25 10:27 ` Christian Riesch
  2012-01-25 10:50   ` Prabhakar Lad
  2012-01-25 10:37 ` Wolfgang Denk
  1 sibling, 1 reply; 9+ messages in thread
From: Christian Riesch @ 2012-01-25 10:27 UTC (permalink / raw)
  To: u-boot

Hi,

On Wed, Jan 25, 2012 at 10:52 AM, Prabhakar Lad
<prabhakar.csengg@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?

> *When I tried to that I get following error,
> "error: no memory region specified for loadable section* "
> *When i add printf statements and build I get errors for hawkboard_nand
> board puts works fine. Is printf being removed as of buffer overriding *issues
> or
> *is there a support yet* to be added for printf?

Could you please post an example of what you are trying to do?
Are you using Sughosh Ganu's Hawkboard SPL patches or not? Without
those patches hawkboard does not use the new SPL framework.

[U-Boot,1/2,V4] arm926: Flush the data cache before disabling it
http://patchwork.ozlabs.org/patch/136079/

[U-Boot,2/2,V4] Changes to move hawkboard to the new spl infrastructure
http://patchwork.ozlabs.org/patch/135433/

Regards, Christian

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] SPL Framework: Add support for U_BOOT_CMD
  2012-01-25  9:52 [U-Boot] SPL Framework: Add support for U_BOOT_CMD Prabhakar Lad
  2012-01-25 10:27 ` Christian Riesch
@ 2012-01-25 10:37 ` Wolfgang Denk
  2012-01-25 10:50   ` Christian Riesch
  1 sibling, 1 reply; 9+ messages in thread
From: Wolfgang Denk @ 2012-01-25 10:37 UTC (permalink / raw)
  To: u-boot

Dear Prabhakar Lad,

In message <CA+V-a8vtOyW3X82hNrrzq--CBUHDVvSRR7SrhkwM9q6hUWzW+Q@mail.gmail.com> you 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 *

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.

> *is there a support yet* to be added for printf?

This makes also no sense to me - printf is available in the SPL.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Buy land. They've stopped making it."                   - Mark Twain

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] SPL Framework: Add support for U_BOOT_CMD
  2012-01-25 10:37 ` Wolfgang Denk
@ 2012-01-25 10:50   ` Christian Riesch
  0 siblings, 0 replies; 9+ messages in thread
From: Christian Riesch @ 2012-01-25 10:50 UTC (permalink / raw)
  To: u-boot

On Wed, Jan 25, 2012 at 11:37 AM, Wolfgang Denk <wd@denx.de> wrote:
> In message <CA+V-a8vtOyW3X82hNrrzq--CBUHDVvSRR7SrhkwM9q6hUWzW+Q@mail.gmail.com> you wrote:
>> *is there a support yet* to be added for printf?
>
> This makes also no sense to me - printf is available in the SPL.

As long as CONFIG_SPL_LIBCOMMON_SUPPORT is defined.
Regards, Christian

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] SPL Framework: Add support for U_BOOT_CMD
  2012-01-25 10:27 ` Christian Riesch
@ 2012-01-25 10:50   ` Prabhakar Lad
  2012-01-25 11:43     ` Christian Riesch
  0 siblings, 1 reply; 9+ messages in thread
From: Prabhakar Lad @ 2012-01-25 10:50 UTC (permalink / raw)
  To: u-boot

Hi Christian,


On Wed, Jan 25, 2012 at 3:57 PM, Christian Riesch <
christian.riesch@omicron.at> wrote:

> Hi,
>
> On Wed, Jan 25, 2012 at 10:52 AM, Prabhakar Lad
> <prabhakar.csengg@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


> > *When I tried to that I get following error,
> > "error: no memory region specified for loadable section* "
> > *When i add printf statements and build I get errors for hawkboard_nand
> > board puts works fine. Is printf being removed as of buffer overriding
> *issues
> > or
> > *is there a support yet* to be added for printf?
>
> Could you please post an example of what you are trying to do?
> Are you using Sughosh Ganu's Hawkboard SPL patches or not? Without
> those patches hawkboard does not use the new SPL framework.
>
>    I didn't use this patches, ill now.

  I didn't use these patches though ill try it

> [U-Boot,1/2,V4] arm926: Flush the data cache before disabling it
> http://patchwork.ozlabs.org/patch/136079/
>
> [U-Boot,2/2,V4] Changes to move hawkboard to the new spl infrastructure
> http://patchwork.ozlabs.org/patch/135433/
>
> Regards, Christian
>

Thanks, Regards
--Prabhakar Lad

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] SPL Framework: Add support for U_BOOT_CMD
  2012-01-25 10:50   ` Prabhakar Lad
@ 2012-01-25 11:43     ` Christian Riesch
  2012-01-25 18:19       ` Tom Rini
  0 siblings, 1 reply; 9+ messages in thread
From: Christian Riesch @ 2012-01-25 11:43 UTC (permalink / raw)
  To: u-boot

Hi,

On Wed, Jan 25, 2012 at 11:50 AM, Prabhakar Lad
<prabhakar.csengg@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@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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] SPL Framework: Add support for U_BOOT_CMD
  2012-01-25 11:43     ` Christian Riesch
@ 2012-01-25 18:19       ` Tom Rini
  2012-01-25 18:55         ` Scott Wood
  0 siblings, 1 reply; 9+ messages in thread
From: Tom Rini @ 2012-01-25 18:19 UTC (permalink / raw)
  To: u-boot

On Wed, Jan 25, 2012 at 4:43 AM, Christian Riesch
<christian.riesch@omicron.at> wrote:
> Hi,
>
> On Wed, Jan 25, 2012 at 11:50 AM, Prabhakar Lad
> <prabhakar.csengg@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@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

Maybe we should poke <command.h> to nop out U_BOOT_CMD for
CONFIG_SPL_BUILD?  OTOH, #ifndef'ing U_BOOT_CMD and the code itself
gets us a space savings we wouldn't get otherwise (I suspect giving
the MTD/NAND issue I've mentioned before)...

-- 
Tom

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] SPL Framework: Add support for U_BOOT_CMD
  2012-01-25 18:19       ` Tom Rini
@ 2012-01-25 18:55         ` Scott Wood
  2012-01-25 19:03           ` Tom Rini
  0 siblings, 1 reply; 9+ messages in thread
From: Scott Wood @ 2012-01-25 18:55 UTC (permalink / raw)
  To: u-boot

On 01/25/2012 12:19 PM, Tom Rini wrote:
> Maybe we should poke <command.h> to nop out U_BOOT_CMD for
> CONFIG_SPL_BUILD?  OTOH, #ifndef'ing U_BOOT_CMD and the code itself
> gets us a space savings we wouldn't get otherwise (I suspect giving
> the MTD/NAND issue I've mentioned before)...

Commands should be stripped out already with the new SPL -- that's what
the (unfortunately uncommented) sed command in GEN_UBOOT appears to be
doing.

-Scott

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] SPL Framework: Add support for U_BOOT_CMD
  2012-01-25 18:55         ` Scott Wood
@ 2012-01-25 19:03           ` Tom Rini
  0 siblings, 0 replies; 9+ messages in thread
From: Tom Rini @ 2012-01-25 19:03 UTC (permalink / raw)
  To: u-boot

On Wed, Jan 25, 2012 at 11:55 AM, Scott Wood <scottwood@freescale.com> wrote:
> On 01/25/2012 12:19 PM, Tom Rini wrote:
>> Maybe we should poke <command.h> to nop out U_BOOT_CMD for
>> CONFIG_SPL_BUILD? ?OTOH, #ifndef'ing U_BOOT_CMD and the code itself
>> gets us a space savings we wouldn't get otherwise (I suspect giving
>> the MTD/NAND issue I've mentioned before)...
>
> Commands should be stripped out already with the new SPL -- that's what
> the (unfortunately uncommented) sed command in GEN_UBOOT appears to be
> doing.

Ah that's right.  Should be easy enough to test on say beagleboard,
along with a patch to make <commands.h> do the right thing.

-- 
Tom

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-01-25 19:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-25  9:52 [U-Boot] SPL Framework: Add support for U_BOOT_CMD Prabhakar Lad
2012-01-25 10:27 ` Christian Riesch
2012-01-25 10:50   ` Prabhakar Lad
2012-01-25 11:43     ` Christian Riesch
2012-01-25 18:19       ` Tom Rini
2012-01-25 18:55         ` Scott Wood
2012-01-25 19:03           ` Tom Rini
2012-01-25 10:37 ` Wolfgang Denk
2012-01-25 10:50   ` Christian Riesch

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.