AW: Loading RTEMS applications from u-boot on Raspberry Pi 2
Jan.Sommer at dlr.de
Jan.Sommer at dlr.de
Tue Feb 18 16:31:01 UTC 2020
Hi Cláudio,
I build a current BSP for the raspberry pi 2 recently (atm without SMP though).
> -----Ursprüngliche Nachricht-----
> Von: devel [mailto:devel-bounces at rtems.org] Im Auftrag von Cláudio Maia
> Gesendet: Montag, 17. Februar 2020 21:19
> An: devel at rtems.org
> Betreff: Loading RTEMS applications from u-boot on Raspberry Pi 2
>
[...]
>
> -------------------
> For approach #2, I do the following:
>
I skip the whole mkimage step entirely and boot the elf-files directly.
So my u-boot commands look like this:
U-Boot> fatload mmc 0 0x30000000 ticker.exe
4043404 bytes read in 169 ms (22.8 MiB/s)
U-Boot> bootelf 0x30000000
## Starting application at 0x00200080 ...
RTEMS RPi 2B 1.1 (1GB) [00a01041]
*** BEGIN OF TEST CLOCK TICK ***
Note, that I load the file quite far at the end of the RAM to avoid conflicts with the sections loaded by the elf-file.
When I used lower values (below 0x10000000), my application got stuck at transfer to RTEMS as well.
Maybe that is also the problem with your image loading?
> $ arm-rtems5-objcopy -R -S -O binary hello.exe hello.bin
> $ mkimage -A arm -O rtems -T kernel -C none -a 0x200000 -e 0x200080 -d
> hello.bin hello-rtems.img
>
> Image Name:
> Created: Mon Feb 17 13:59:50 2020
> Image Type: ARM RTEMS Kernel Image (uncompressed)
> Data Size: 1055340 Bytes = 1030.61 kB = 1.01 MB
> Load Address: 00200000
> Entry Point: 00200080
>
> Then, after u-boot loads on the target, I do the following:
>
> U-Boot> fatload mmc 0:1 0x200000 hello-rtems.img
> reading hello-rtems.img
> 1055404 bytes read in 103 ms (9.8 MiB/s)
>
> U-Boot> iminfo
>
> ## Checking Image at 00200000 ...
> Legacy image found
> Image Name:
> Image Type: ARM RTEMS Kernel Image (uncompressed)
> Data Size: 1055340 Bytes = 1 MiB
> Load Address: 00200000
> Entry Point: 00200080
> Verifying Checksum ... OK
>
> U-Boot> bootm 0x200000
> ## Booting kernel from Legacy Image at 00200000 ...
> Image Name:
> Image Type: ARM RTEMS Kernel Image (uncompressed)
> Data Size: 1055340 Bytes = 1 MiB
> Load Address: 00200000
> Entry Point: 00200080
> Verifying Checksum ... OK
> Loading Kernel Image ... OK
> ## Transferring control to RTEMS (at address 00200080) ...
>
> After this point, nothing happens on the board.
> -------------------
>
> Thank you in advance. Regards
> Cláudio Maia
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
More information about the devel
mailing list