All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot-Users] booting elf image?
@ 2006-08-01 14:37 Ram
  2006-08-01 14:40 ` Alex Zeffertt
  2006-08-01 14:46 ` Wolfgang Denk
  0 siblings, 2 replies; 6+ messages in thread
From: Ram @ 2006-08-01 14:37 UTC (permalink / raw)
  To: u-boot

i,
   i am using omap 5912osk. (ARM architecture).

  I have a C program:
   int  main ( )
  {
          printf ("Hello World\n") ;

   }

im compiling the c program with static linking.

[sriram at sriram sriram]# file a.out
a.out: ELF 32-bit LSB executable, ARM, version 1 (ARM), for GNU/Linux 2.4.3,
statically linked, not stripped


I download the elf executable using tftpboot onto my target . when i do
bootelf   u-boot
hangs?

Am i missing something?



Regards,
sriram
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20060801/e3497c23/attachment.htm 

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

* [U-Boot-Users] booting elf image?
  2006-08-01 14:37 [U-Boot-Users] booting elf image? Ram
@ 2006-08-01 14:40 ` Alex Zeffertt
  2006-08-01 14:47   ` Wolfgang Denk
  2006-08-01 14:46 ` Wolfgang Denk
  1 sibling, 1 reply; 6+ messages in thread
From: Alex Zeffertt @ 2006-08-01 14:40 UTC (permalink / raw)
  To: u-boot

Ram wrote:
> i,
>    i am using omap 5912osk. (ARM architecture).
> 
>   I have a C program:
>    int  main ( )
>   {
>           printf ("Hello World\n") ;
> 
>    }
> 
> im compiling the c program with static linking.
> 
> [sriram at sriram sriram]# file a.out
> a.out: ELF 32-bit LSB executable, ARM, version 1 (ARM), for GNU/Linux 
> 2.4.3, statically linked, not stripped
> 
> 
> I download the elf executable using tftpboot onto my target . when i do 
> bootelf   u-boot
> hangs?
> 
> Am i missing something?
> 

Yes.  You need an operating system to run a.out.  I recommend Linux.

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

* [U-Boot-Users] booting elf image?
  2006-08-01 14:37 [U-Boot-Users] booting elf image? Ram
  2006-08-01 14:40 ` Alex Zeffertt
@ 2006-08-01 14:46 ` Wolfgang Denk
  1 sibling, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2006-08-01 14:46 UTC (permalink / raw)
  To: u-boot

In message <8bf247760608010737n605fd143ob0d96dcb37205e31@mail.gmail.com> you wrote:
>
>   I have a C program:
...
> im compiling the c program with static linking.
> 
> [sriram at sriram sriram]# file a.out
> a.out: ELF 32-bit LSB executable, ARM, version 1 (ARM), for GNU/Linux 2.4.3,
> statically linked, not stripped

So this is a Linux user space application program.

> I download the elf executable using tftpboot onto my target . when i do
> bootelf   u-boot
> hangs?

Yes, this is to be expected.

Would you expect that your program runs under MS$ Windoze?  And  what
makes you think it would run under U-Boot?

> Am i missing something?

Yes, you do: a basic understanding of the concepts of a  boot  loader
and an operating system, of the system services provided by an OS, of
the  libraries  that are based on these services, and of the run-time
environments for C programs.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Computers are not intelligent.  They only think they are.

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

* [U-Boot-Users] booting elf image?
  2006-08-01 14:40 ` Alex Zeffertt
@ 2006-08-01 14:47   ` Wolfgang Denk
  0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2006-08-01 14:47 UTC (permalink / raw)
  To: u-boot

In message <44CF67DB.5010503@cambridgebroadband.com> you wrote:
>
> > [sriram at sriram sriram]# file a.out
> > a.out: ELF 32-bit LSB executable, ARM, version 1 (ARM), for GNU/Linux 
> > 2.4.3, statically linked, not stripped
...
> Yes.  You need an operating system to run a.out.  I recommend Linux.

Actually he *needs* Linux as he used  Linux  libraries  to  link  his
program.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Vulcans never bluff.
	-- Spock, "The Doomsday Machine", stardate 4202.1

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

* [U-Boot-Users] booting elf image?
       [not found] <8bf247760608010750n4da0cde9u376a2b521ed05187@mail.gmail.com>
@ 2006-08-01 15:06 ` Wolfgang Denk
  2006-08-01 15:23   ` Ram
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Denk @ 2006-08-01 15:06 UTC (permalink / raw)
  To: u-boot

[Please keep the list on cc:]

In message <8bf247760608010750n4da0cde9u376a2b521ed05187@mail.gmail.com> you wrote:
>
> That is the reason i have built executable which is statically linked.
> 
> isnt this enough?.

No, of course not.

As I wrote in my first reply, you need at least a basic understanding
of the operating system, of the system services provided by an OS, of
the libraries that are based on these services, and of  the  run-time
environments for C programs.

In your code you use the printf() function - guess what it  does?  It
will  boil  down to using some system calls - like write(). This is a
service provided by your OS. Also it relies on concepts like standard
I/O streams (namely, stdout), which in turn relies  on  the  standard
file  descriptors  0,  1,  and  2  being set up by your OS. The whole
concept of a "process" and it's environment (virtual  address  space,
open file descriptors, etc.) is highly OS dependent.

Do you think another OS (say, Windoze) would provide exactly teh same
(binary compatible!) system call interface? Or process environment?

And do you really think  a  simple  boot  loader  like  U-Boot  would
provide such services?


Well, let me tell you: it ain't so.

Your a.out program will only run in a Linux environment  (or  in  one
which  is  compatible  -  for  example,  it  is possible to run Linux
binaries under FreeBSD).


Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Nothing ever becomes real until it is experienced.       - John Keats

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

* [U-Boot-Users] booting elf image?
  2006-08-01 15:06 ` Wolfgang Denk
@ 2006-08-01 15:23   ` Ram
  0 siblings, 0 replies; 6+ messages in thread
From: Ram @ 2006-08-01 15:23 UTC (permalink / raw)
  To: u-boot

yes sir, got your point.

stupid of me!


Thanks.


regards,
sriram
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20060801/da987ff9/attachment.htm 

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

end of thread, other threads:[~2006-08-01 15:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-01 14:37 [U-Boot-Users] booting elf image? Ram
2006-08-01 14:40 ` Alex Zeffertt
2006-08-01 14:47   ` Wolfgang Denk
2006-08-01 14:46 ` Wolfgang Denk
     [not found] <8bf247760608010750n4da0cde9u376a2b521ed05187@mail.gmail.com>
2006-08-01 15:06 ` Wolfgang Denk
2006-08-01 15:23   ` Ram

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.