Devraj Mukherjee | 1 Nov 2004 01:29

ELF image for U-Boot

Hi everyone,

I managed to get U-Boot compiled for a LPD7A400, thanks to the patches 
that I got out of the list serve. Once compiled I got u-boot.bin, u-boot 
and u-boot.srec. I also got u-boot.map and System.map

I read around a bit and it seems to me that u-boot is the elf image for 
u-boot. When I load it on as an elf, our board does not want to accept 
it. I was just wondering if I have to combine System.map in anyway with 
the binary images to make a proper elf image?

Any leads are welcome. Thanks

Devraj

--

-- 
----------------------------------------------------------------------
Devraj Mukherjee, Eternity Technologies Pty. Ltd. Australia
Host: Debian (Sarge) 3.1 Kernel 2.4.27-1-686 / GCC version 3.3.5
Target: LPD7A400 (ARM9) LogicPD eval. board / ARM GCC 3.3 GlibC 2.3.2
----------------------------------------------------------------------

-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
Devraj Mukherjee | 1 Nov 2004 03:15

Problem loading ELF image on LPD7A400

Hi everyone,

A bit more information from what we have been doing with U-Boot and the 
LogicPD boards. We managed to compile the U-Boot images, tried to load 
elf image using LogicLoader (that already comes on it) and here is what 
we get.

Does anyone think the image that we made has something wrong with it? 
The following is a dump of what happened. Thanks in advance for any advise.

Please note our versions of GCC/GlibC for ARM created using Kegel's scripts.

Regards,
Devraj

losh> load elf /tftp/10.0.1.2:u-boot
loading from /tftp/10.0.1.2:u-boot:
R............
elf file type : 0x0002
machine type: 0028  version: 1
prog start addr : 0xc1fc0000
num prog headers: 1
num sect headers: 23
offset : 0x00008000  disk length: 0x0001662c  mem len: 0x0001aa30
phyaddr: 0xc1fc0000  vaddr      : 0xc1fc0000  dl addr: 0xc1fc0000
ignoring rest of file...done
running md5sum on the _loaded_ portion of the file:
0d5cf2336110e4fcdc35b446b224f8f5 - addr: c1fc0000 len: 0001662c
losh> burn
unable to burn without a loaded flash image
(Continue reading)

Jhavk | 1 Nov 2004 06:17
Picon
Favicon

Re: Hello world application running problem

Thanks for all the valuable info.

Actually i went thru the doc/README.standalone file
and theres a table which tell abt load and entry point
address of various architecture.

For arm load = 0x0c100000
entry pt = 0x0c100000.

I still have 2 doubts( hope it doesnt annoys u)
1.Cant i tftp my hello_world.bin to any valid address
of RAM eg "tftp 0x30000000 hello_world.bin" 

2.How do i find out the entry point of my binary
image?

Regards,
Jhavk

--- Wolfgang Denk <wd <at> denx.de> wrote:

> In message
> <20041029154109.80624.qmail <at> web12009.mail.yahoo.com>
> you wrote:
> > 
> > > I have read README.standalone. My target board
> is
> > > smdk2440(Arm 9).
> > > 
> > > So i transfer hello_world using tftp to address
(Continue reading)

Wolfgang Denk | 1 Nov 2004 09:50
Picon
Picon
Favicon

Re: ELF image for U-Boot

In message <41858367.7050000 <at> eternitytechnologies.com> you wrote:
> 
> I read around a bit and it seems to me that u-boot is the elf image for 

This is correct.

> u-boot. When I load it on as an elf, our board does not want to accept 
> it. I was just wondering if I have to combine System.map in anyway with 
> the binary images to make a proper elf image?

Thoie "board does not want to accept it"? This is wrong. The board is
just hardware, and it does not want anything. I guess you  mean  that
there  is already another boot loader installed and running, and that
this boot  loader  does  not  load  the  U-Boot  ELF  file?  If  this
assumption  is  correct,  than  I  am not surprised. U-Boot cannot be
loaded dynamically. You must install it in flash memory,  overwriting
the existing boot loader.

Best regards,

Wolfgang Denk

--

-- 
See us  <at>  Embedded/Electronica Munich, Nov 09 - 12, Hall A.6 Booth 513
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd <at> denx.de
...though his invention worked superbly -- his theory was a crock  of
sewage from beginning to end.         - Vernor Vinge, "The Peace War"

-------------------------------------------------------
This SF.Net email is sponsored by:
(Continue reading)

Wolfgang Denk | 1 Nov 2004 09:52
Picon
Picon
Favicon

Re: Problem loading ELF image on LPD7A400

In message <41859C32.2060909 <at> eternitytechnologies.com> you wrote:
> 
> A bit more information from what we have been doing with U-Boot and the 
> LogicPD boards. We managed to compile the U-Boot images, tried to load 
> elf image using LogicLoader (that already comes on it) and here is what 
> we get.
...
> losh> load elf /tftp/10.0.1.2:u-boot
> loading from /tftp/10.0.1.2:u-boot:
...
> losh> burn
> unable to burn without a loaded flash image

You may want to read the documentation that  comes  with  LogicLoader
why  it  thinks it has no loaded flash image. Maybe there are special
format requirements for "flash images".

Best regards,

Wolfgang Denk

--

-- 
See us  <at>  Embedded/Electronica Munich, Nov 09 - 12, Hall A.6 Booth 513
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd <at> denx.de
"Science makes godlike -- it is all over with priests and  gods  when
man becomes scientific. Moral: science is the forbidden as such -- it
alone  is  forbidden. Science is the *first* sin, the *original* sin.
*This alone is  morality.*  ``Thou  shalt  not  know''  --  the  rest
follows."                                       - Friedrich Nietzsche

(Continue reading)

Wolfgang Denk | 1 Nov 2004 09:55
Picon
Picon
Favicon

Re: Hello world application running problem

In message <20041101051752.7411.qmail <at> web12010.mail.yahoo.com> you wrote:
> 
> Actually i went thru the doc/README.standalone file
> and theres a table which tell abt load and entry point
> address of various architecture.
> 
> For arm load = 0x0c100000
> entry pt = 0x0c100000.

You are right.

> I still have 2 doubts( hope it doesnt annoys u)
> 1.Cant i tftp my hello_world.bin to any valid address
> of RAM eg "tftp 0x30000000 hello_world.bin" 

You, you can do this (but the code will not run if  downloaded  to  a
different address).

> 2.How do i find out the entry point of my binary
> image?

	-> nm hello_world
	0c108228 A __bss_end__
	0c108228 A __bss_start
	0c108228 A __bss_start__
	0c108228 D __data_start
	0c108228 A __end__
	0c108228 A _bss_end__
	0c108228 A _edata
	0c108228 A _end
(Continue reading)

Jhavk | 1 Nov 2004 15:09
Picon
Favicon

Serial driver for smdk2440 board

I was testing my hello_world application. It jumps
corectly but prints some crap and then returns.

I think since there is no serial driver in uboot for
s3c2440 therefore it gives junk output.

I have found a serial driver for my smdk2440 board in
linux/drivers/serial/serial_s3c2440.c

So i now would like to plug in that driver in uboot.
What are the steps for plugging a new driver?

Also where does the driver get initialised? 

Regards,
Jhavk 

		
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
Paul Wujek | 1 Nov 2004 15:49

PCI initialization in U-Boot


When U-Boot initializes a PCI board are all the
PCI memory regions properly assigned and ready
for use?

I am testing an IceCube/MPC5200 motherboard together
with a Diamond Stealth ATI Radeon 9200SE PCI card.

In drivers/pci_auto.c the function pciauto_setup_device looks
like it is setting up the memory regions.

I can access BAR1 (I/O region), and BAR2 (memory region),
although I haven't verified that I am looking at
the right memory.

Attempting to access BAR0 (memory region), results in a 'bus fault'.

I am writing a standalone application and my initial development
must use these boards, unfortunately I can't use an OS to set
PCI up properly.

Are there further configuration commands that must be executed
to access the BAR0 memory region?

Alternately, is there a source of information that I can read
to learn how to set up PCI so that my standalone application
can use it?

Here's example output that illustrates  my problem:
===================================================
(Continue reading)

Wolfgang Denk | 1 Nov 2004 16:33
Picon
Picon
Favicon

Re: Serial driver for smdk2440 board

In message <20041101140932.49098.qmail <at> web12005.mail.yahoo.com> you wrote:
> I was testing my hello_world application. It jumps
> corectly but prints some crap and then returns.
> 
> I think since there is no serial driver in uboot for
> s3c2440 therefore it gives junk output.

Ummm... If you have U-Boot running to the extend that you are able to
load and start a standalone program, then  there  is  also  a  serial
driver  in  place  and working. Or what do you think where the U-Boot
console messages are coming from?

> I have found a serial driver for my smdk2440 board in
> linux/drivers/serial/serial_s3c2440.c
> 
> So i now would like to plug in that driver in uboot.

No, you don't want to do that. The difference between a  full-fledged
Linux  serial  driver  and  an U-Boot console driver are about as the
differences between an ICBM and an arrow.

> What are the steps for plugging a new driver?

Understand the hardware.  Understand  the  U-Boot  design.  Code  the
driver. Debug the driver. Submit a patch.

> Also where does the driver get initialised? 

Probably in serial_init() ?

(Continue reading)

Wolfgang Denk | 1 Nov 2004 16:39
Picon
Picon
Favicon

Re: PCI initialization in U-Boot

In message <23153.216.8.140.170.1099320579.squirrel <at> 216.8.140.170> you wrote:
> 
> I am testing an IceCube/MPC5200 motherboard together
> with a Diamond Stealth ATI Radeon 9200SE PCI card.

Are you sure that this card works at all in a PowerPC environment?

> Attempting to access BAR0 (memory region), results in a 'bus fault'.

This may be  an  indication  that  your  card  requires  some  "BIOS"
initialization code to be run.

> Are there further configuration commands that must be executed
> to access the BAR0 memory region?

Many graphic cards come  with  their  own  BIOS  code  that  must  be
executed  to  initialize the card. I have no idea if this is the case
for the 9200SE, but I would not be  surprised  either.  Without  such
initialization  it  is  likely  that  the  memory on the card remains
uninitialized and thus unaccessable.

The only way to make such cards work is by enabling the BIOS emulator
(see board/MAI/bios_emulator directory) and use this to run the  init
code of your card.

Good luck!!

> Alternately, is there a source of information that I can read
> to learn how to set up PCI so that my standalone application
> can use it?
(Continue reading)


Gmane