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