Booting images with uboot get stuck after execution of rtems
Jan Sommer
soja-lists at aries.uberspace.de
Wed Dec 23 13:35:02 UTC 2015
Am Wednesday 16 December 2015, 18:42:08 schrieb Patrick Gauvin:
>
> I prepare the boot image like this, where "foo.exe" is the RTEMS ELF file:
>
> arm-rtems4.11-objcopy -O binary foo.exe foo.bin
> mkimage -A arm -O rtems -T kernel -C none -a $LOADADDR \
> -e $ENTRYADDR -n foo -d foo.bin foo.img
> You can find $LOADADDR and $ENTRYADDR using readelf, for me they are
> 0x104000 and 0x104040. I'm using the ZedBoard BSP.
>
> Then in U-Boot, assuming you have "foo.img" loaded at 0x300000:
>
> icache off && dcache off && bootm 0x300000
>
Ok, I tried again last week, but still no luck so far.
I am not sure if I get the addresses right. In readelf -e I get:
Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
Class: ELF32
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: EXEC (Executable file)
Machine: ARM
Version: 0x1
Entry point address: 0x8040
Start of program headers: 52 (bytes into file)
Start of section headers: 3321920 (bytes into file)
Flags: 0x5000202, has entry point, Version5 EABI, soft-float ABI
Size of this header: 52 (bytes)
Size of program headers: 32 (bytes)
Number of program headers: 4
Size of section headers: 40 (bytes)
Number of section headers: 33
Section header string table index: 30
[...]
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
EXIDX 0x01f5c8 0x00102648 0x00102648 0x00008 0x00008 R 0x4
LOAD 0x0000b4 0x00000000 0x00000000 0x00000 0x01440 RW 0x1
LOAD 0x0000b8 0x00008000 0x00008000 0x1ceb8 0xf8000 RWE 0x8
LOAD 0x01cf80 0x00100000 0x00100000 0x02d40 0x7efc000 RW 0x20
Thus I used LOADADDR = 0x8000 and ENTRYADDR = 0x8040. Is this correct?
For loading I tried "dhcp ${kernel_addr_r} ticker.img" where kernel_addr_r is 0x01000000.
I also tried to load the image to 0x8000 although I think that might overwrite u-boot.
If I load the raspbian kernel to kernel_addr_r and start it with bootz it runs fine.
I searched the bare bone section of the raspberrypi-forums, but there is not too much discussion regarding u-boot.
I didn't think it would be so complicated to get started with that... :-/
Best regards and happy holidays,
Jan
> I apologize if this is a little off-topic, but maybe it will be of use to Jan.
>
> -Patrick
> _______________________________________________
> users mailing list
> users at rtems.org
> http://lists.rtems.org/mailman/listinfo/users
More information about the users
mailing list