public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] Re: how to run hello_world
@ 2004-10-08 13:21 Farrukh Masood
  2004-10-08 15:06 ` T Michael Turney
  2004-10-08 18:11 ` Wolfgang Denk
  0 siblings, 2 replies; 6+ messages in thread
From: Farrukh Masood @ 2004-10-08 13:21 UTC (permalink / raw)
  To: u-boot

Hi!
   Please tell me where can i find hello_world.bin file and where should it be put on the host system to be accessible from u-boot based target system with tftpboot command.
 
It will be quite helpful for me if you can stepwise describe the procedure as I am unable to understand it from the denx tutorial.
          
thanks alot
 
Regards
Chishti
 
Wolfgang Denk <wd@denx.de> wrote:
In message <20041007160300.20228.qmail@web25404.mail.ukl.yahoo.com> you wrote:
>
> As described in u-boot readme file, to run hello_world example we have to write "loads", but this command doesnt seem to work with me and give the following msg
> 
> Unknown command 'loads' - try 'help'

Then it seems this command was not enabled in your board
configuration. But you can load the file using TFTP as well.

> and when i give the command go 40004 Hello World! This is a test.
> 
> following error msg appears

Ummm.. did you really expect that some magic code would spring into
life and do something reasonable when you jump to this address after


		
---------------------------------
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20041008/5938a1ce/attachment.htm 

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

* [U-Boot-Users] Re: how to run hello_world
@ 2004-10-08 14:22 Smith, Craig
  0 siblings, 0 replies; 6+ messages in thread
From: Smith, Craig @ 2004-10-08 14:22 UTC (permalink / raw)
  To: u-boot

>>Please tell me where can i find hello_world.bin file

In the "examples" directory.

>>and where should it be put on
>>the host system to be accessible from u-boot based target system with
tftpboot command.

That depends on how your tftp server was set up. 
See http://www.denx.de/twiki/bin/view/DULG/SystemSetup#Section_4.6.

>>It will be quite helpful for me if you can stepwise describe the procedure
as I
>>am unable to understand it from the denx tutorial.

The procedure is already described "stepwise".
See http://www.denx.de/twiki/bin/view/DULG/UBootStandalone#Section_5.12.1.

Now, everyone, all together..."Please don't post HTML",
that's a good way to get your message ignored.

Regards,
-Craig

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

* [U-Boot-Users] Re: how to run hello_world
  2004-10-08 13:21 [U-Boot-Users] Re: how to run hello_world Farrukh Masood
@ 2004-10-08 15:06 ` T Michael Turney
  2004-10-08 18:11 ` Wolfgang Denk
  1 sibling, 0 replies; 6+ messages in thread
From: T Michael Turney @ 2004-10-08 15:06 UTC (permalink / raw)
  To: u-boot

Your system should have a root directory called /tftpboot
Any file that tftp can download from your host system to your
target should be in a directory under /tftpboot.  Keep things
simple and put hello_world.bin file directly in /tftpboot.

As for finding hello_world.bin on your system, you might try...
    cd /
    find . -name "hello_world.bin" -print

Note that above command will yield a bunch of warnings if your
aren't the superuser or root user.
Cheers,
T.mike
  -----Original Message-----
  From: u-boot-users-admin at lists.sourceforge.net
[mailto:u-boot-users-admin at lists.sourceforge.net]On Behalf Of Farrukh Masood
  Sent: Friday, October 08, 2004 6:22 AM
  To: u-boot-users at lists.sourceforge.net
  Subject: [U-Boot-Users] Re: how to run hello_world


  Hi!
     Please tell me where can i find hello_world.bin file and where should
it be put on the host system to be accessible from u-boot based target
system with tftpboot command.

  It will be quite helpful for me if you can stepwise describe the procedure
as I am unable to understand it from the denx tutorial.

  thanks alot

  Regards
  Chishti

  Wolfgang Denk <wd@denx.de> wrote:
    In message <20041007160300.20228.qmail@web25404.mail.ukl.yahoo.com> you
wrote:
    >
    > As described in u-boot readme file, to run hello_world example we have
to write "loads", but this command doesnt seem to work with me and give the
following msg
    >
    > Unknown command 'loads' - try 'help'

    Then it seems this command was not enabled in your board
    configuration. But you can load the file using TFTP as well.

    > and when i give the command go 40004 Hello World! This is a test.
    >
    > following error msg appears

    Ummm.. did you really expect that some magic code would spring into
    life and do something reasonable when you jump to this address after



----------------------------------------------------------------------------
--
  Do you Yahoo!?
  Yahoo! Mail Address AutoComplete - You start. We finish.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20041008/62becb8a/attachment.htm 

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

* [U-Boot-Users] Re: how to run hello_world
  2004-10-08 13:21 [U-Boot-Users] Re: how to run hello_world Farrukh Masood
  2004-10-08 15:06 ` T Michael Turney
@ 2004-10-08 18:11 ` Wolfgang Denk
  1 sibling, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2004-10-08 18:11 UTC (permalink / raw)
  To: u-boot

In message <20041008132154.14864.qmail@web25405.mail.ukl.yahoo.com> you wrote:
>
>    Please tell me where can i find hello_world.bin file and where should it be put on the host system to be accessible from u-boot based target system with tftpboot command.

You can find it in the examples/ directory (after  building  u-boot),
and  you  load  it  to the address it is linked for - 0x40000 in this
case.

> It will be quite helpful for me if you can stepwise describe the procedure as I am unable to understand it from the denx tutorial.

Maybe you explain which part of
http://www.denx.de/twiki/bin/view/DULG/UBootStandalone#Section_5.12.1.
you were unable to understand so we can improve the documentation.

I thought the description on this page was pretty explicit...

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
Systems programmers are the high priests of a low cult.
                                                       -- R.S. Barton

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

* [U-Boot-Users] Re: how to run hello_world
@ 2004-10-08 23:01 Robin Getz
  2004-10-09 13:50 ` Wolfgang Denk
  0 siblings, 1 reply; 6+ messages in thread
From: Robin Getz @ 2004-10-08 23:01 UTC (permalink / raw)
  To: u-boot

Wolfgang Denk wrote:

>I thought the description on this page was pretty explicit...

The only think I don't see (and have been looking for a standalone app that 
I am writing, is the difference between load address and entry address.

In the hello_world.c application, it's configured to run at address 
0x00040004, but the load address is 0x00040000 - why in this case is there 
a 4 byte difference.

=> tftp 40000 /tftpboot/hello_world.bin
...
=> go 40004 This is another test.

I assume that this is a toolchain issue, and may be offtopic for this list.

A slightly different issue - I know that you can load up an elf image as a 
standalone app as well, but I don't seem to be able to pass it any command 
line args.

=> tftp 1000000 /tftpboot/hello_world
=> bootelf this is another test

fails, becuase U-boot trys to pass "this is another test" to bootelf, and 
it doesn't like it.

-Robin

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

* [U-Boot-Users] Re: how to run hello_world
  2004-10-08 23:01 Robin Getz
@ 2004-10-09 13:50 ` Wolfgang Denk
  0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2004-10-09 13:50 UTC (permalink / raw)
  To: u-boot

In message <6.1.1.1.0.20041008155338.01e26910@wheresmymailserver.com> you wrote:
> 
> The only think I don't see (and have been looking for a standalone app that 
> I am writing, is the difference between load address and entry address.
> 
> In the hello_world.c application, it's configured to run at address 
> 0x00040004, but the load address is 0x00040000 - why in this case is there 
> a 4 byte difference.

If you create a linker map and have a look at  it  things  might  get
clearer; try for example:

bash$ ${CROSS_COMPILE}ld -g  -Ttext 0x40000 \
>  -Map hello_world.map \
> -o hello_world -e hello_world hello_world.o libstubs.a \
> -L/opt/eldk/3.0/usr/bin/../lib/gcc-lib/ppc-linux/3.2.2/m603 -lgcc

and then have a look at "hello_world.map":

...
     86  .text          0x00040000       0xd4 hello_world.o
     87                 0x00040004                hello_world
     88  .text          0x000400d4      0x154 libstubs.a(stubs.o)
...

As you can see, the code of hello_world() starts at 0x00040004.

Then check the assembler code generated for hello_world.c:

...
     55         .section        ".text"
     56         .align 2
     57         .globl hello_world
     58 .LCL0:
     59         .long .LCTOC1-.LCF0
     60         .type   hello_world, at function
     61 hello_world:
...

As you can see, GCC places a ".long"  immediately  in  front  of  the
hello_world() function.

> I assume that this is a toolchain issue, and may be offtopic for this list.

Yes, it's a tolchain issue.

> A slightly different issue - I know that you can load up an elf image as a 
> standalone app as well, but I don't seem to be able to pass it any command 
> line args.

Loading standalone programs using  the  "bootelf"  comand  was  never
tested  by  me.  It  is  easily  possible that there are bugs or even
conceptual problems on that way. Please use the simpler & faster "go"
instead.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
"One planet is all you get."

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

end of thread, other threads:[~2004-10-09 13:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-08 13:21 [U-Boot-Users] Re: how to run hello_world Farrukh Masood
2004-10-08 15:06 ` T Michael Turney
2004-10-08 18:11 ` Wolfgang Denk
  -- strict thread matches above, loose matches on Subject: below --
2004-10-08 14:22 Smith, Craig
2004-10-08 23:01 Robin Getz
2004-10-09 13:50 ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox