ELF file to .bin convertion (mpc8313erdb)

ray rayx.cn at gmail.com
Sat Sep 27 13:10:13 UTC 2008


Hi, Thomas Doerfler
U-boot is gaining some popularity today.   It is might be a good idea to 
paste this mail as the guide on how to boot RTEMS from U-Boot in the wiki.

On 2008-9-27 17:53, Thomas Doerfler wrote:
> Hi,
>
> you don't need a raw binary file, but U-Boot requires a properly
> formatted image file (in a specific U-Boot format).
>
> First you need the U-Boot formatter "mkimage", which you can build from
> the U-Boot sources.
>
> Then the following steps are needed (here to format the "ticker.exe"):
>
>
> powerpc-rtems4.10-objcopy -R -S -O binary ticker.exe ticker.bin
>
> cat ticker.bin | gzip>ticker.gz
>
> tools/mkimage -Appc -O rtems -T kernel -a 0x100 -e 0x10000 -n "RTEMS"\
>   -d ticker.gz ticker.img
>
> The resulting "ticker.img" can be loaded via TFTP or other means e.g.
> with the following U-Boot commands:
>
>
> setenv ipaddr 192.168.96.92
> setenv serverip 192.168.96.1
> tftpboot 0x400000 mpc8313erdb_ticker.img
> bootm 0x400000
>
>
> wkr,
> Thomas.
>
>
> Yuke Tian schrieb:
>    
>> Hi,
>>
>> I built an RTEMS application on mpc8313erdb (start supported from 4.9).
>> The board come with a pre-installed U-boot to allow download application
>> into memory and run. But it seems U-boot only support .bin raw binary
>> image.  The .exe or .o files generated from the Makefile are all ELF
>> 32-bit MSB executable files.  Does anyone know what tools I should use
>> to convert the ELF to .bin format for this powerpc CPU ?  Specifically
>> for this board, which memory address I should load the .bin file.
>>
>> Thanks,
>>
>> Yuke
>> _______________________________________________
>> rtems-users mailing list
>> rtems-users at rtems.com
>> http://rtems.rtems.org/mailman/listinfo/rtems-users
>>      
>
>
>    


-- 
Thanks&  Best Regards

---Ray




More information about the users mailing list