Hi Genodians,
I am trying to get a Genode image using the Fiasco.OC-kernel running on an RPi 3. I created an arm_v8a build directory and accordingly set the KERNEL and BOARD variable. I also compiled a u-boot image from the upstream repository.
When I attempt to boot the image from the u-boot prompt, I receive the output below with no further reaction. I am still on Genode 19.05 because of a few modifications so I unless there is no other solution, I would like to avoid upgrading to a newer version.
I also tried to run a few L4Re images provided here [0] with the same result, so the problem might not even be specific to Genode.
Does anyone else have experiences with running on an RPi 3? Is there anything I am missing here?
Best regards,
Simon
[0] https://l4re.org/download/snapshots/pre-built-images/arm64/
U-Boot 2021.01-rc1-00243-g7a8ac9df5d (Nov 04 2020 - 01:56:08 +0100)
DRAM: 948 MiB RPI 3 Model B (0xa22082) MMC: mmc@7e202000: 0, sdhci@7e300000: 1 Loading Environment from FAT... *** Warning - bad CRC, using default environment
In: serial Out: vidconsole Err: vidconsole Net: No ethernet found. starting USB... Bus usb@7e980000: USB DWC2 scanning bus usb@7e980000 for devices... 3 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found Hit any key to stop autoboot: 0 U-Boot> fatload mmc 0 $loadaddr image.elf 3208480 bytes read in 137 ms (22.3 MiB/s) U-Boot> bootelf ## Starting application at 0x01000000 ^��Z��%��XE��TmyAEDMe�@�*`)5��R[qP��� �����?�RQ@���VRY��5� �R A!��y=AA!y5YE)�}AG@A�Ţ�A����ӉR
Hello Simon,
On Wed, Nov 04, 2020 at 11:54:01AM +0100, Simon Himmelbauer wrote:
Hi Genodians,
I am trying to get a Genode image using the Fiasco.OC-kernel running on an RPi 3. I created an arm_v8a build directory and accordingly set the KERNEL and BOARD variable. I also compiled a u-boot image from the upstream repository.
When I attempt to boot the image from the u-boot prompt, I receive the output below with no further reaction. I am still on Genode 19.05 because of a few modifications so I unless there is no other solution, I would like to avoid upgrading to a newer version.
I also tried to run a few L4Re images provided here [0] with the same result, so the problem might not even be specific to Genode.
Does anyone else have experiences with running on an RPi 3? Is there anything I am missing here?
My first suspicion would be that u-boot and Fiasco.OC are using different UART settings, e.g., the baudrate might be different. With which baudrate do you connect to the serial line? I would expect Fiasco.OC to use 115200.
You could also try to find the place in Fiasco.OC/bootstrap where the UART gets configured, and comment out any hardware access there, to verify/falsify my idea. The UART is already configured properly by u-boot, so Fiasco.OC should be able to send characters successfully over serial line.
Regards Stefan
Best regards,
Simon
[0] https://l4re.org/download/snapshots/pre-built-images/arm64/
U-Boot 2021.01-rc1-00243-g7a8ac9df5d (Nov 04 2020 - 01:56:08 +0100)
DRAM: 948 MiB RPI 3 Model B (0xa22082) MMC: mmc@7e202000: 0, sdhci@7e300000: 1 Loading Environment from FAT... *** Warning - bad CRC, using default environment
In: serial Out: vidconsole Err: vidconsole Net: No ethernet found. starting USB... Bus usb@7e980000: USB DWC2 scanning bus usb@7e980000 for devices... 3 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found Hit any key to stop autoboot: 0 U-Boot> fatload mmc 0 $loadaddr image.elf 3208480 bytes read in 137 ms (22.3 MiB/s) U-Boot> bootelf ## Starting application at 0x01000000 ^��Z��%��XE��TmyAEDMe�@�*`)5��R[qP��� �����?�RQ@���VRY��5� �R A!��y=AA!y5YE)�}AG@A�Ţ�A����ӉR
Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Simon Himmelbauer himmelba@in.tum.de writes:
Hi Genodians,
I am trying to get a Genode image using the Fiasco.OC-kernel running on an RPi 3. I created an arm_v8a build directory and accordingly set the KERNEL and BOARD variable. I also compiled a u-boot image from the upstream repository.
When I attempt to boot the image from the u-boot prompt, I receive the output below with no further reaction. I am still on Genode 19.05 because of a few modifications so I unless there is no other solution, I would like to avoid upgrading to a newer version.
I also tried to run a few L4Re images provided here [0] with the same result, so the problem might not even be specific to Genode.
Does anyone else have experiences with running on an RPi 3? Is there anything I am missing here?
Hi,
today I was able to check this configuration and in my setup and it is working ok for me. My setup is somewhat similar to one I described in my article on genodians.org with loading image over tftp although I think I did not describe in datail configuration for 64bit version.
I think one important piece is content of config.txt. Mine is:
kernel=u-boot.bin enable_uart=1
arm_64bit=1
enable_jtag_gpio=1
Based on modification times of files on sd card I prepared it about year ago (November 2019) and if I correctly remember I used current at that time versions of rpi firmware and u-boot.
Below is the complete output I received from running run/log with KERNEL=foc and BOARD=rpi3 on release 20.08
I hope this will help you.
Best regards, Tomasz
MMC: mmc@7e202000: 0, sdhci@7e300000: 1 Loading Environment from FAT... OK In: serial Out: vidconsole Err: vidconsole Net: No ethernet found. starting USB... Bus usb@7e980000: scanning bus usb@7e980000 for devices... 5 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found Hit any key to stop autoboot: 0 lan78xx_eth Waiting for PHY auto negotiation to complete..... done Using lan78xx_eth device TFTP from server 192.168.177.99; our IP address is 192.168.177.53 Filename 'rpi3bplus/uImage'. Load address: 0x8000000 Loading: ################################################## 1.1 MiB 796.9 KiB/s done Bytes transferred = 1140111 (11658f hex) Automatic boot of image at addr 0x08000000 ... ## Booting kernel from Legacy Image at 08000000 ... Image Name: Image Type: AArch64 Linux Kernel Image (gzip compressed) Data Size: 1140047 Bytes = 1.1 MiB Load Address: 01000000 Entry Point: 01000000 Verifying Checksum ... OK Uncompressing Kernel Image
Starting kernel ...
L4 Bootstrapper Build: #3 Sat Nov 7 11:32:04 CET 2020, 8.3.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 /projects/genode/genode/build/arm_v8a/bin/foc-rpi3 Scanning sigma0 Scanning image.elf Moving up to 3 modules behind 1100000 moving module 02 { 10c5000-129e32f } -> { 11b3000-138c32f } [1938224] moving module 01 { 10ac000-10c42bf } -> { 119a000-11b22bf } [99008] moving module 00 { 1012000-10aba07 } -> { 1100000-1199a07 } [629256] Loading /projects/genode/genode/build/arm_v8a/bin/foc-rpi3 Loading sigma0 Loading image.elf find kernel info page... found kernel info page (via ELF) at 3000 Regions of list 'regions' [ 1000, abfff] { ab000} Kern /projects/genode/genode/build/arm_v8a/bin/foc-rpi3 [ ac000, ac0df] { e0} Root mbi_rt [ f0000, 107dc3] { 17dc4} Sigma0 sigma0 [ 117dc8, 11b2ef] { 3528} Sigma0 sigma0 [ 1000000, 101114b] { 1114c} Boot bootstrap [ 2000000, 22bafff] { 2bb000} Root image.elf found kernel options (via ELF) at 4000 Sigma0 config ip:00100244 sp:00000000 Roottask config ip:02000000 sp:00000000 Starting kernel /projects/genode/genode/build/arm_v8a/bin/foc-rpi3 at 00001700 Hello from Startup::stage2 FPU: Initialize ARM generic timer: freq=19200000 interval=19200 cnt=192757258 SERIAL ESC: allocated IRQ 29 for serial uart Not using serial hack in slow timer handler. Welcome to L4/Fiasco.OC! L4/Fiasco.OC microkernel on arm Rev: 4367c50-dirty compiled with gcc 8.3.0 for Broadcom 2837 [] Build: #1 Sat Nov 7 11:19:34 CET 2020
Calibrating timer loop... Cache config: ON Cache config: ON done. Cache config: ON ID_PFR[01]: 00002222 00000000ID_PFR[01]: 00002222 00000000ID_PFR[01]: 00002222 00000000MDB: use page size: 30 ID_[DA]FR0: 10305106 00000000 ID_[DA]FR0: 10305106 00000000 ID_MMFR[04]: 00001122 00000000 00000000 00000000 ID_MMFR[04]: 00001122 00000000 00000000 00000000 MDB: use page size: 21 ID_[DA]FR0: 10305106 00000000 MDB: use page size: 12 ID_MMFR[04]: 00001122 00000000 00000000 00000000 SIGMA0: Hello! KIP @ 3000 allocated 4KB for maintenance structures SIGMA0: Dump of all resource maps RAM:------------------------ [0:0;fff] [4:ac000;acfff] [0:ad000;effff] [0:108000;116fff] [0:11c000;1ffffff] [4:2000000;22bafff] [0:22bb000;1effffff] IOMEM:---------------------- [0:20000000;ffffffffffffffff]
KIP @ 0x3000 magic: 0x4be6344c version: 0x87034444 MBI @ 0xac000 ROM modules: ROM: [0000000002278000,0000000002278156) config ROM: [0000000002279000,00000000022ba2d0) init ROM: [0000000000003000,0000000000004000) l4v2_kip ROM: [00000000021b6000,00000000022703f0) ld.lib.so ROM: [0000000002271000,00000000022771e8) test-log
Genode 20.08-2-g077dacba43 492 MiB RAM and 9238 caps assigned to init [init -> test-log] hex range: [0e00,1680) [init -> test-log] empty hex range: [0abc0000,0abc0000) (empty!) [init -> test-log] hex range to limit: [f8,ff] [init -> test-log] invalid hex range: [f8,08) (overflow!) [init -> test-log] negative hex char: 0xfe [init -> test-log] positive hex char: 0x02 [init -> test-log] floating point: 1.70 [init -> test-log] multiarg string: "parent -> child.7" [init -> test-log] String(Hex(3)): 0x3 [init -> test-log] Very long messages: [init -> test-log -> log] 1.....................................................................................................................................................................................................................................2 [init -> test-log] 3.....................................................................................................................................................................................................................................4 [init -> test-log] 5.....................................................................................................................................................................................................................................6 [init -> test-log] [init -> test-log] Test done.
Run script execution successful. make: Leaving directory '/projects/genode/genode/build/arm_v8a'
Hi Genodians,
I am trying to get a Genode image using the Fiasco.OC-kernel running on an RPi 3. I created an arm_v8a build directory and accordingly set the KERNEL and BOARD variable. I also compiled a u-boot image from the upstream repository.
When I attempt to boot the image from the u-boot prompt, I receive the output below with no further reaction. I am still on Genode 19.05 because of a few modifications so I unless there is no other solution, I would like to avoid upgrading to a newer version.
I also tried to run a few L4Re images provided here [0] with the same result, so the problem might not even be specific to Genode.
Does anyone else have experiences with running on an RPi 3? Is there anything I am missing here?
Hi,
today I was able to check this configuration and in my setup and it is working ok for me. My setup is somewhat similar to one I described in my article on genodians.org with loading image over tftp although I think I did not describe in datail configuration for 64bit version.
I think one important piece is content of config.txt. Mine is:
kernel=u-boot.bin enable_uart=1
arm_64bit=1
enable_jtag_gpio=1
Based on modification times of files on sd card I prepared it about year ago (November 2019) and if I correctly remember I used current at that time versions of rpi firmware and u-boot.
Below is the complete output I received from running run/log with KERNEL=foc and BOARD=rpi3 on release 20.08
I hope this will help you.
Best regards, Tomasz
Hi Tomasz,
I actually used your guide to setup Genode on a Raspberry so before I continue, I wanted to thank you for this article.
Anyway, I don't understand what I am doing wrong here. I followed your guide step-by-step with the exception of booting the image from the sd-card. My config looks very similar to yours (see below). However, I always receive garbage output. I think it must be a UART-issue of some sort. I investigated the Fiasco.OC-kernel code and found out that when the rpi3 configuration is used, it tries to compile a driver for the 16550 instead of the PL011, which is actually used in the RPi3 (unless I am misunderstanding something, I should add that most of this stuff is kind of new to me). Unfortunately, this did not fix the problem either but still, I added the changed files below for clarification.
Could you share me your image to see whether I can get it to boot on my Pi as well?
Best regards, Simon
config.txt: enable_uart=1 arm_64bit=1 init_uart_baud=115200 kernel=u-boot.bin
I modified the file src/kern/arm/bsp/bcm283x/Modules to compile the driver for the PL011 instead:
SUBSYSTEMS += LIBUART PREPROCESS_PARTS += libuart generic_tickless_idle arm_single_ipi_irq PREPROCESS_PARTS += $(if $(CONFIG_ARM_V7PLUS),arm_generic_timer) # PREPROCESS_PARTS += $(if $(CONFIG_PF_BCM283X_RPI3),16550) PREPROCESS_PARTS += $(if $(CONFIG_PF_BCM283X_RPIZW),16550) INTERFACES_KERNEL += $(if $(CONFIG_ARM_V7PLUS),generic_timer) INTERFACES_KERNEL += arm_control irq_handler RAM_PHYS_BASE := 0
#ifeq ($(CONFIG_PF_BCM283X_RPI3),y) # uart_IMPL = uart uart-16550 # kernel_uart_IMPL += kernel_uart-libuart # OBJECTS_LIBUART += uart_16550.o ifeq ($(CONFIG_PF_BCM283X_RPIZW),y) uart_IMPL = uart uart-16550 kernel_uart_IMPL += kernel_uart-libuart OBJECTS_LIBUART += uart_16550.o else uart_IMPL += uart-arm-bcm283x kernel_uart_IMPL += kernel_uart-arm-bcm283x OBJECTS_LIBUART += uart_pl011.o endif arm_control_IMPL += arm_control-arm-bcm283x config_IMPL += config-arm-bcm283x mem_layout_IMPL += mem_layout-arm-bcm283x pic_IMPL += pic-arm-bcm283x timer_IMPL += timer-arm-bcm283x timer_IMPL += $(if $(CONFIG_ARM_V7PLUS),timer-arm-generic) timer_tick_IMPL += $(if $(CONFIG_ARM_V7PLUS),timer_tick-arm-bcm283x,timer_tick-single-vector) reset_IMPL += reset-arm-bcm283x clock_IMPL += clock-generic ipi_IMPL += ipi-arm-bcm283x platform_control_IMPL += platform_control-arm-bcm283x irq_handler_IMPL = irq_handler-arm-bcm283x
I also needed to modify src/kern/arm/bsp/bcm283x/uart-arm-bcm283x.cpp so it is included by the compiler:
IMPLEMENTATION [pf_bcm283x && !(pf_bcm283x_rpizw)]:
#include "koptions.h" #include "uart_pl011.h"
IMPLEMENT Address Uart::base() const { return Koptions::o()->uart.base_address; }
IMPLEMENT int Uart::irq() const { return Koptions::o()->uart.irqno; }
IMPLEMENT L4::Uart *Uart::uart() { //static L4::Uart_pl011 uart(Koptions::o()->uart.base_baud); static L4::Uart_pl011 uart(115200); return &uart; }
Simon Himmelbauer himmelba@in.tum.de writes:
I actually used your guide to setup Genode on a Raspberry so before I continue, I wanted to thank you for this article.
It's really great to hear it is useful.
Anyway, I don't understand what I am doing wrong here. I followed your guide step-by-step with the exception of booting the image from the sd-card. My config looks very similar to yours (see below). However, I always receive garbage output. I think it must be a UART-issue of some sort. I investigated the Fiasco.OC-kernel code and found out that when the rpi3 configuration is used, it tries to compile a driver for the 16550 instead of the PL011, which is actually used in the RPi3 (unless I am misunderstanding something, I should add that most of this stuff is kind of new to me). Unfortunately, this did not fix the problem either but still, I added the changed files below for clarification.
Earlier you wrote that you're still on 19.05. Few days after this release Stefan made a commit 811410fdbb3fb9c41ef97ee480b2fe1678341a81 'foc: update to current github version (fix #3402)'
My advise for you would be to try current version or better 20.08 which I specifically pointed as a release on which I tested.
Could you share me your image to see whether I can get it to boot on my Pi as well?
No problem. But not earlier than tomorrow. Please let me know in case you succeed earlier with newer release - I think that very likely you will. I'm not entirely sure but I briefly remember that I also had problem with uart on foc. Actually when I tested it on Saturday I was a little surprised that it works now.
Regards Tomasz
Thanks for your quick reply!
Earlier you wrote that you're still on 19.05. Few days after this release Stefan made a commit 811410fdbb3fb9c41ef97ee480b2fe1678341a81 'foc: update to current github version (fix #3402)'
My advise for you would be to try current version or better 20.08 which I specifically pointed as a release on which I tested.
Ah, that makes sense, well, then I guess there is no way around, I will try to update to the latest version.
No problem. But not earlier than tomorrow. Please let me know in case you succeed earlier with newer release - I think that very likely you will. I'm not entirely sure but I briefly remember that I also had problem with uart on foc. Actually when I tested it on Saturday I was a little surprised that it works now.
Thanks, I will try to upgrade to a newer Genode version first though, which might take some time. I will report back whether this solved the issue or not so your image might not be necessary anymore.
You pointed to a mail about L4Re and it is not really relevant here. Framebuffer driver for Rpi1 is in Genode for a very long time and in my working branch [0] there is a version that works on rpi3. Currently my work multi rpi support is somewhat in the void due to unresolved yet regression in usb driver which blocks support for almost all communication mouse, keyboard and network.
I see, I thought framebuffer support is a kernel responsibility and not part of Genode or L4Re.
Best regards, Simon
On 10.11.20 21:54, Tomasz Gajewski wrote:
Simon Himmelbauer himmelba@in.tum.de writes:
I actually used your guide to setup Genode on a Raspberry so before I continue, I wanted to thank you for this article.
It's really great to hear it is useful.
Anyway, I don't understand what I am doing wrong here. I followed your guide step-by-step with the exception of booting the image from the sd-card. My config looks very similar to yours (see below). However, I always receive garbage output. I think it must be a UART-issue of some sort. I investigated the Fiasco.OC-kernel code and found out that when the rpi3 configuration is used, it tries to compile a driver for the 16550 instead of the PL011, which is actually used in the RPi3 (unless I am misunderstanding something, I should add that most of this stuff is kind of new to me). Unfortunately, this did not fix the problem either but still, I added the changed files below for clarification.
Earlier you wrote that you're still on 19.05. Few days after this release Stefan made a commit 811410fdbb3fb9c41ef97ee480b2fe1678341a81 'foc: update to current github version (fix #3402)'
My advise for you would be to try current version or better 20.08 which I specifically pointed as a release on which I tested.
Could you share me your image to see whether I can get it to boot on my Pi as well?
No problem. But not earlier than tomorrow. Please let me know in case you succeed earlier with newer release - I think that very likely you will. I'm not entirely sure but I briefly remember that I also had problem with uart on foc. Actually when I tested it on Saturday I was a little surprised that it works now.
Regards Tomasz
Hi Simon,
On 10.11.20 21:12, Simon Himmelbauer wrote:
config.txt:
enable_uart=1 arm_64bit=1 init_uart_baud=115200 kernel=u-boot.bin
does it work with the following line?
init_uart_clock=3000000
I remembered it being mentioned on the mailing list in the past with regard to serial output issues.
Christian
Hi Simon,
On 10.11.20 21:12, Simon Himmelbauer wrote:
config.txt:
enable_uart=1 arm_64bit=1 init_uart_baud=115200 kernel=u-boot.bin
does it work with the following line?
init_uart_clock=3000000
I remembered it being mentioned on the mailing list in the past with regard to serial output issues.
Christian