Porting Fiasco + L4Re to Raspberry Pi 2
Adam Lackorzynski
adam at os.inf.tu-dresden.de
Sun Nov 26 23:18:07 CET 2017
Hi,
On Fri Nov 24, 2017 at 10:30:31 +0100, Alexander Weidinger wrote:
> I'm using U-Boot in the version v2017.09 by denx to boot the device.
> The binary blobs `bootcode.bin` and `start.elf` are from [0].
> Additionally the `config.txt` in use is as follows:
>
> > kernel=u-boot.bin
> > enable_uart=1
> > init_uart_baud=115200
> > init_uart_clock=3000000
>
> I'm directly using the *.elf file(s) and copy them to `loadaddr`,
> which should be 0x00200000.
Thanks for all the info. I can only try to reproduce this to eventually
understand what the problem is.
Thanks, Adam
> [0] https://github.com/raspberrypi/firmware/tree/1.20170811/boot
>
> On 24.11.2017 01:10, Adam Lackorzynski wrote:
> > Hi,
> >
> > On Tue Nov 21, 2017 at 16:19:52 +0100, Alexander Weidinger wrote:
> >> Hello Antoine, hello l4-hackers,
> >>
> >> I'm currently trying to replicate the port to RPi2 for Fiasco/Genode,
> >> which works great, until I get stuck in the boot process:
> >>
> >>> L4 Bootstrapper
> >>> Build: #7 Di 21. Nov 15:19:58 CET 2017, 5.4.0
> >>> Scanning up to 960 MB RAM, starting at offset 32MB
> >>> Memory size is 960MB (00000000 - 3bffffff)
> >>> RAM: 0000000000000000 - 000000003bffffff: 983040kB
> >>> Total RAM: 960MB
> >>> Scanning fiasco
> >>> Scanning sigma0
> >>> Scanning moe
> >>> Moving up to 5 modules behind 1100000
> >>> moving module 02 { 10ed000-111e4a3 } -> { 11de000-120f4a3 } [201892]
> >>> moving module 01 { 10db000-10ec337 } -> { 11cc000-11dd337 } [70456]
> >>> moving module 00 { 1053000-10da0e7 } -> { 1144000-11cb0e7 } [553192]
> >>> moving module 04 { 1031000-105257b } -> { 1122000-114357b } [136572]
> >>> moving module 03 { 100f000-1030467 } -> { 1100000-1121467 } [136296]
> >>> Loading fiasco
> >>> Loading sigma0
> >>> Loading moe
> >>> find kernel info page...
> >>> found kernel info page (via ELF) at 2000
> >>> Regions of list 'regions'
> >>> [ 1000, 1a3f] { a40} Kern fiasco
> >>> [ 2000, 96fff] { 95000} Kern fiasco
> >>> [ 97000, 970eb] { ec} Root mbi_rt
> >>> [ e0000, ea9e7] { a9e8} Sigma0 sigma0
> >>> [ f0000, f517b] { 517c} Sigma0 sigma0
> >>> [ 140000, 17c4eb] { 3c4ec} Root moe
> >>> [ 1000000, 100e523] { e524} Boot bootstrap
> >>> [ 1100000, 1143fff] { 44000} Root Module
> >>> found kernel options (via ELF) at 3000
> >>> Sigma0 config ip:000e0100 sp:00000000
> >>> Roottask config ip:00140254 sp:00000000
> >>> Starting kernel fiasco at 00001200
> >>> Non-HYP kernel detected but running in HYP mode, switching back
> >>
> >> Sometimes (non-reproducible) additionally I get:
> >>> [...]
> >>> Hello from Startup::stage2
> >>
> >> Which means stage2 comes up but hangs afterwards.
> >> And even sometimes I am able to completely boot the device:
> >
> > Seems some initialization thing to me in your case.
> > "Unfortunately" works fine for me so far. Are you using u-boot or
> > are you booting differently?
> >
> > Adam
> >
> >>> [...]
> >>> FPU: Initialize
> >>> FPU0: Subarch: 2, Part: 30, Rev: 5, Var: 7, Impl: 41
> >>> ARM generic timer: freq=19200000 interval=19200 cnt=36679846728534094
> >>> SERIAL ESC: allocated IRQ 57 for serial uart
> >>> Not using serial hack in slow timer handler.
> >>> Welcome to L4/Fiasco.OC!
> >>> L4/Fiasco.OC microkernel on arm
> >>> Rev: r75 compiled with gcc 5.4.0 for Broadcom 2836 []
> >>> Build: #2 Tue Nov 21 15:17:05 CET 2017
> >>>
> >>> Calibrating timer loop... done.
> >>> MDB: use page size: 20
> >>> MDB: use page size: 12
> >>> SIGMA0: Hello!
> >>> KIP @ 2000
> >>> allocated 4KB for maintenance structures
> >>> SIGMA0: Dump of all resource maps
> >>> RAM:------------------------
> >>> [0:0;fff]
> >>> [4:97000;97fff]
> >>> [0:98000;dffff]
> >>> [0:eb000;effff]
> >>> [0:f6000;13ffff]
> >>> [4:140000;17cfff]
> >>> [0:17d000;10fffff]
> >>> [4:1100000;1143fff]
> >>> [0:1144000;3affffff]
> >>> IOMEM:----------------------
> >>> [0:3c000000;ffffffff]
> >>> MOE: Hello world
> >>> MOE: found 965472 KByte free memory
> >>> MOE: found RAM from 97000 to 3b000000
> >>> MOE: allocated 943 KByte for the page array @0x17d000
> >>> MOE: virtual user address space [0-bfffffff]
> >>> MOE: rom name space cap -> [C:103000]
> >>> MOE: rwfs name space cap -> [C:105000]
> >>> BOOTFS: [1100000-1121468] [C:107000] l4re
> >>> BOOTFS: [1122000-114357c] [C:109000] hello
> >>> MOE: cmdline: moe --init=rom/hello
> >>> MOE: Starting: rom/hello
> >>> MOE: loading 'rom/hello'
> >>> Hello World!
> >>
> >> As one can see I tried to replicate this for vanilla Fiasco/L4Re (r75),
> >> just to make sure. The same happens of course with Fiasco/Genode where
> >> I'm also only sometimes (non-reproducible) able to completely boot the
> >> device.
> >>
> >> I also saw the `globalconfig.out` from the thread 'Booting L4Linux on
> >> Raspberry Pi 2'. When using the same configuration, where you (Antoine)
> >> were able to successfully boot the RPi2 I'm stuck with the same problem.
> >>
> >> On the bright side, booting Fiasco/L4Re in Qemu (vers. 2.10.1) seems to
> >> always work when using the following command to start it up:
> >>> qemu-system-arm -M raspi2 -kernel /home/alex/Projects/foc_upstream/l4/build_rpi2/images/bootstrap.elf -nographic
> >>
> >> If one could give me some insight on why this happens and/or how to
> >> resolve this, I'd really appreciate it.
> >>
> >> Regards,
> >> Alexander
> >
> > _______________________________________________
> > l4-hackers mailing list
> > l4-hackers at os.inf.tu-dresden.de
> > http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
> >
>
> _______________________________________________
> l4-hackers mailing list
> l4-hackers at os.inf.tu-dresden.de
> http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
More information about the l4-hackers
mailing list