Loading RTEMS applications from u-boot on Raspberry Pi 2

Cláudio Maia clrrm at isep.ipp.pt
Mon Feb 17 20:18:55 UTC 2020


I am currently experimenting with RTEMS and Raspberry Pi 2 with the goal of exploring RTEMS-SMP properties (mainly scheduling and memory behaviour).

Currently, I am able to load an .img file when the default kernel.img file that comes with Raspbian is replaced by the RTEMS aplication .img file in the boot partition (let's call this approach #1).

However, I cannot execute any RTEMS application directly from u-boot (let's call this approach #2). The result is that when an .img is loaded using u-boot there is no output afterwards.
Can someone help me in detecting what is the issue?

-------------------
I use the following settings to build the samples for the target:

$ $RTEMS/rtems/configure --prefix=$RTEMS/rtems/5 --target=arm-rtems5 --enable-rtemsbsp=raspberrypi2 --enable-tests=samples
$ make install


-------------------
For approach #1, the .img file is generated using the following command:

$ arm-rtems5-objcopy -O binary ticker.exe kernel.img

Then, I replace kernel.img in the boot partition and add the following lines to the config.txt file:

kernel_address=0x200000
kernel=kernel.img

The code executes without issues.

-------------------
For approach #2, I do the following:

$ 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


More information about the devel mailing list