Want to run L4Re on Raspberry PI.

Adam Lackorzynski adam at os.inf.tu-dresden.de
Tue Jun 11 23:32:43 CEST 2019


On Tue Jun 11, 2019 at 02:00:00 +0200, Paul Boddie wrote:
> On Tuesday 11. June 2019 00.18.43 Paul Boddie wrote:
> > On Tuesday 11. June 2019 00.08.59 Adam Lackorzynski wrote:
> > > If it just reboots in the middle of a rather normal C function, then
> > > it's likely some instruction that has been generated there and not
> > > understood by the CPU. Could you maybe use u-boot as it shows a register
> > > dump when something like this happens, allowing to know where it
> > > branched away.
> > 
> > I think that introducing U-Boot may save me some time in the end, so I'll
> > look into that. The Raspberry Pi stuff is rather alien to me, but I had
> > hoped that there was an established recipe for getting things up and
> > running.
> 
> Well, with config.txt updated with...
> 
> kernel=u-boot.bin
> 
> ...I get a prompt on the UART and can tell U-Boot to load and start the 
> payload, according to some instructions I found online:
> 
> https://ltekieli.com/buildroot-with-raspberry-pi-u-boot/
> 
> Here is the conversation:
> 
> ----
> 
> U-Boot> mmc dev 0
> switch to partitions #0, OK
> mmc0 is current device
> U-Boot> fatload mmc 0:1 ${kernel_addr_r} hello.raw
> 1209560 bytes read in 91 ms (12.7 MiB/s)
> U-Boot> bootz ${kernel_addr_r}
> Kernel image @ 0x080000 [ 0x1000000 - 0x11274d8 ]

Interesting way of doing it, i.e. good that our bootstrap image also
looks like a Linux image.
I'd typically do something like this using the uimage:
fatload mmc 0:1 0x0ffffc0 hello.uimage
bootm 0x0ffffc0

But in the end it should not make a difference.

> Starting kernel ...
> 
> 
> L4 Bootstrapper
>   Build: #8 Mon Jun 10 19:44:17 CEST 2019, 7.4.0
>   Scanning up to 512 MB RAM, starting at offset 32MB
>   Memory size is 512MB (00000000 - 1fffffff)
>   RAM: 0000000000000000 - 000000001fffffff: 524288kB
>   Total RAM: 512MB
>   Scanning fiasco
>   Scanning sigma0
>   Scanning moe
>   Moving up to 5 modules behind 1100000
> 
> ----
> 
> Unfortunately, nothing more is shown and there is no register dump. Maybe I 
> have to compile in some kind of exception handler or something.

No, it's built-in. So my suggestion would be to narrow it down by
putting some more printfs etc. in the code so see where it diverts.
But understandably this is pretty cumbersome with the SD card.
Could you put the hello.elf online so that I could have a look to check
for the assumption with the wrong instruction?




Adam




More information about the l4-hackers mailing list