Executing ELF file with U-Boot
SAeeD
salpha.2004 at gmail.com
Tue Jul 17 09:04:43 UTC 2012
Merci Pierre.
That's exactly what I was looking for.
But I have one little question:
I read the man page for *mkimage* but didn't get the usage of -d option and
what I should give to it.
I used to make image with following command:
*sudo mkimage -A arm -O rtems -T kernel -C gzip -a 0x30000000 -e 0x30000000
-n hello-img -d hello.exe hello.exe*
After doing this, I wasn't able to dump my ELF file (hello.exe) with *
readelf* command any more. But this wasn't any problem as when I loaded
image to QEMU for Mini2440, it was detected by *iminfo* command from
U-Boot. I got the output:
## Checking Image at 30000000 ...
Legacy image found
Image Name: hello-img
Created: 2012-07-17 8:50:04 UTC
Image Type: ARM RTEMS Kernel Image (gzip compressed)
Data Size: 1872721 Bytes = 1.8 MB
Load Address: 30000000
Entry Point: 30000000
Verifying Checksum ... OK
But when I executed bootm command, I got the following error followed by
board restart:
*MINI2440 # bootm*
## Booting kernel from Legacy Image at 30000000 ...
Image Name: hello-img
Created: 2012-07-17 8:50:04 UTC
Image Type: ARM RTEMS Kernel Image (gzip compressed)
Data Size: 1872721 Bytes = 1.8 MB
Load Address: 30000000
Entry Point: 30000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... Error: Bad gzipped data
GUNZIP: uncompress or overwrite error - must RESET board to recover
I guess my problem is the value I enter after -d option when using *mkimage*.
What's your idea?
Thanks in advance
SAeeD
On Mon, Jul 16, 2012 at 1:09 PM, Pierre Ficheux
<pierre.ficheux at openwide.fr>wrote:
> Le 15/07/2012 22:18, SAeeD a écrit :
>
> Hello everyone,
>>
>> I have already booted hello.exe from sample applications by GRUB on an
>> i386 machine. (As you know, hello.exe is in ELF format.)
>> But I am unable to boot it via U-Boot on Mini2440. I guess it is
>> platform independent and it must be some problem either with U-Boot or
>> my link script for RTEMS.
>> I use tftp to transfer hello.exe on RAM and then use go 0x30000000 to
>> execute it. I also tried 0x30000060, 0x30000100, and 0x30000160 but none
>> of them working.
>> This is while I can execute hello.bin. (achieved by using
>> arm-rtems4.10-objcopy command)
>> Has any one have any experience of booting or running ELF files with
>> U-Boot, specially when that ELF file is related to RTEMS?
>>
>>
>
> Be careful as mini2440 console is 38400 bps, but works fine for me.
>
>
> MINI2440 # setenv baudrate 38400
> ## Switch baudrate to 38400 bps and press ENTER ...
>
> MINI2440 # tftp 32000000 hello.img
> dm9000 i/o: 0x20000300, id: 0x90000a46
> DM9000: running in 16 bit mode
> MAC: 08:08:11:18:12:27
> TFTP from server 10.5.20.63; our IP address is 10.5.20.64
> Filename 'hello.img'.
> Load address: 0x32000000
> Loading: * ##########
> done
> Bytes transferred = 134868 (20ed4 hex)
> MINI2440 # bootm
> ## Booting kernel from Legacy Image at 32000000 ...
> Image Name: RTEMS Application
> Created: 2012-07-16 8:16:18 UTC
> Image Type: ARM RTEMS Kernel Image (uncompressed)
> Data Size: 134804 Bytes = 131.6 kB
> Load Address: 30000100
> Entry Point: 30000100
> Verifying Checksum ... OK
> Loading Kernel Image ... OK
> OK
> ## Transferring control to RTEMS (at address 30000100) ...
>
>
> *** HELLO WORLD TEST ***
> Hello World
> *** END OF HELLO WORLD TEST ***
>
>
> EXECUTIVE SHUTDOWN! Any key to reboot...bsp_reset....
>
>
>
> regards
>
>
> --
> Pierre FICHEUX -/- CTO OWI, France -\- pierre.ficheux at openwide.fr
>
> http://ingenierie.openwide.fr
> http://www.ficheux.org
> I would love to change the world, but they won't give me the source code
>
>
> ______________________________**_________________
> rtems-users mailing list
> rtems-users at rtems.org
> http://www.rtems.org/mailman/**listinfo/rtems-users<http://www.rtems.org/mailman/listinfo/rtems-users>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20120717/841bc93f/attachment-0001.html>
More information about the users
mailing list