Discussion:
Raspberry Pi B+ with uboot and genode
Bernhard Blieninger
2017-05-10 17:24:42 UTC
Permalink
Hi,


I am currently working to get the raspberry pi b+ working with genode.
I started with an raspberry pi uboot and a tftp server where genode.img
lies on.
The sd card was flashed via dd and the sd card image from here:
http://wiki.beyondlogic.org/index.php?title=Compiling_uBoot_RaspberryPi

For the genode image I used the newest version of genode on github and
compiled a foc_rpi and an rpi with this command:

./tool/create_builddir foc_rpi BUILD_DIR=buildrpi

or that

./tool/create_builddir rpi BUILD_DIR=./build-rpi

and the command

make run/demo

This is working with the Raspberry Pi B(!) but when i put the sd card in
the Raspberry Pi B +(!) it is not even booting.

Therefore i prepared a sd card with raspbian and changed the kernel.img
with the newly compiled u-boot.bin from http://git.denx.de/u-boot.git
The sd card now boots again and shows u-boot but if I want to load
genode.img it does not continue.
If genode is loaded, for example by manually triggering it with bootz,
the serial connected minicom screen shows encoding problem nonsense.
Starting up a linux kernel works. If I start genode.img directly from
the sd card it is not working either.

If I try this sd card with the Raspberry Pi B(!) it is not working.
What I have tested in a last step is, what happens if I substitute the
u-boot.bin with the genode.img while using the sd card image that was
provided by beyondlogic in the first place, this is working for the B
model but not for the B +.
Also tried a fresh sd card format it to fat16 and put all the stuff on
it, which is in the boot folder from
https://github.com/raspberrypi/firmware , but that is also not working.

So I assume, that either the bootcode.bin and/or start.elf provided by
raspberry are too new to use them with genode.
I could maybe find older versions but I would just like to ask if this
will help, maybe genode was never (meant to) run with some raspberry
boot code that is newer then 2013.11
(http://genode.org/documentation/release-notes/13.11#Raspberry_Pi).

Thanks in Advance for your help.



Best Regards,

Bernhard.
Johannes Kliemann
2017-05-11 11:10:23 UTC
Permalink
Hi,

when I try to run `make run/acpica` from [1], I get the following error
Genode 17.02-75-g1fcc16420 <local changes>
85 MiB RAM assigned to init
[init] Warning: acpi_input: no route to service "RAM"
[init] Error: Uncaught exception of type 'Genode::Parent::Service_denied'
[init] Warning: abort called - thread: ep
child "init" exited with exit value 1
How can I fix this?

Regards,
JK

[1]: https://github.com/alex-ab/genode/tree/issue_2242
Christian Helmuth
2017-05-11 12:27:41 UTC
Permalink
Hello Johannes,
Post by Johannes Kliemann
when I try to run `make run/acpica` from [1], I get the following error
Genode 17.02-75-g1fcc16420 <local changes>
85 MiB RAM assigned to init
[init] Warning: acpi_input: no route to service "RAM"
[init] Error: Uncaught exception of type 'Genode::Parent::Service_denied'
[init] Warning: abort called - thread: ep
child "init" exited with exit value 1
How can I fix this?
This issue is fixed on the master branch already. Please see

https://github.com/genodelabs/genode/commit/770c7548d8f8dc591f4d0f7540799757c89e9ff2

for reference.

Regards
--
Christian Helmuth
Genode Labs

https://www.genode-labs.com/ · https://genode.org/
https://twitter.com/GenodeLabs · /ˈdʒiː.nəʊd/

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
Johannes Kliemann
2017-05-11 13:43:30 UTC
Permalink
Thanks, I merged the changes into the current master and it worked.
Post by Christian Helmuth
Hello Johannes,
Post by Johannes Kliemann
when I try to run `make run/acpica` from [1], I get the following error
Genode 17.02-75-g1fcc16420 <local changes>
85 MiB RAM assigned to init
[init] Warning: acpi_input: no route to service "RAM"
[init] Error: Uncaught exception of type 'Genode::Parent::Service_denied'
[init] Warning: abort called - thread: ep
child "init" exited with exit value 1
How can I fix this?
This issue is fixed on the master branch already. Please see
https://github.com/genodelabs/genode/commit/770c7548d8f8dc591f4d0f7540799757c89e9ff2
for reference.
Regards
Johannes Kliemann
2017-05-15 11:16:45 UTC
Permalink
Hi,

I tried to play around with the acpica port. I strongly used the code
from `/repos/libports/src/app/acpica/os.cc` as reference. When I compile
/.../genode/repos/demo/src/app/acpi_i2c/main.cc:54:49: error: no match for call to ‘(Genode::Signal_handler<Acpica::Main>) (Genode::Entrypoint&, Acpica::Main&, void (Acpica::Main::*)())’
sci_irq(env.ep(), *this, &Main::acpi_irq)
struct Acpica::Main {
...
env(env),
sci_irq(env.ep(), *this, &Main::acpi_irq)
{ ...
The quite similar code from the file mentioned above compiles without
problems. I cannot see what exactly I need to add/change to fix this.

The code is based of the current master branch, you can view the file at
[1].

Thanks in advance,
JK


[1]:
https://github.com/jklmnn/genode/blob/b99456fb2a293e7e45f3f7f4d25e602ff6a20510/repos/demo/src/app/acpi_i2c/main.cc
Christian Helmuth
2017-05-16 10:29:44 UTC
Permalink
Hello Johannes,
Post by Johannes Kliemann
I tried to play around with the acpica port. I strongly used the code
from `/repos/libports/src/app/acpica/os.cc` as reference. When I compile
/.../genode/repos/demo/src/app/acpi_i2c/main.cc:54:49: error: no match for call to ‘(Genode::Signal_handler<Acpica::Main>) (Genode::Entrypoint&, Acpica::Main&, void (Acpica::Main::*)())’
sci_irq(env.ep(), *this, &Main::acpi_irq)
Please remove line 53 because it's redundant resp. looks like a
copy-paste error.

Greets
--
Christian Helmuth
Genode Labs

https://www.genode-labs.com/ · https://genode.org/
https://twitter.com/GenodeLabs · /ˈdʒiː.nəʊd/

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
Stefan Kalkowski
2017-05-18 09:31:26 UTC
Permalink
Hi Bernhard,
Post by Bernhard Blieninger
Hi,
I am currently working to get the raspberry pi b+ working with genode.
I started with an raspberry pi uboot and a tftp server where genode.img
lies on.
http://wiki.beyondlogic.org/index.php?title=Compiling_uBoot_RaspberryPi
For the genode image I used the newest version of genode on github and
./tool/create_builddir foc_rpi BUILD_DIR=buildrpi
or that
./tool/create_builddir rpi BUILD_DIR=./build-rpi
and the command
make run/demo
This is working with the Raspberry Pi B(!) but when i put the sd card in
the Raspberry Pi B +(!) it is not even booting.
Therefore i prepared a sd card with raspbian and changed the kernel.img
with the newly compiled u-boot.bin from http://git.denx.de/u-boot.git
The sd card now boots again and shows u-boot but if I want to load
genode.img it does not continue.
If genode is loaded, for example by manually triggering it with bootz,
the serial connected minicom screen shows encoding problem nonsense.
Starting up a linux kernel works. If I start genode.img directly from
the sd card it is not working either.
If I try this sd card with the Raspberry Pi B(!) it is not working.
What I have tested in a last step is, what happens if I substitute the
u-boot.bin with the genode.img while using the sd card image that was
provided by beyondlogic in the first place, this is working for the B
model but not for the B +.
Also tried a fresh sd card format it to fat16 and put all the stuff on
it, which is in the boot folder from
https://github.com/raspberrypi/firmware , but that is also not working.
So I assume, that either the bootcode.bin and/or start.elf provided by
raspberry are too new to use them with genode.
I could maybe find older versions but I would just like to ask if this
will help, maybe genode was never (meant to) run with some raspberry
boot code that is newer then 2013.11
(http://genode.org/documentation/release-notes/13.11#Raspberry_Pi).
Thanks in Advance for your help.
I do not think its a "firmware is too new" issue. I guess it is more a
question of how is the firmware configured, and what are the actual
differences in between Model 1 B and 1 B+.
The first question is, what exactly is not working. If everything stays
blank after u-boot started the kernel, then probably Genode does not use
the right physical address for the UART's memory mapped I/O registers,
either because they've changed in between both board revisions, or
because the firmware is configured in a different way than before resp.
configures the GPIO pins to connect to a different (serial) device. In
that case, you might study the options in config.txt for your specific
model. Alternatively, you might somehow find out which UART and base
address Linux is using on the device, e.g. in /proc/iomem.

Unfortunately, I do not have such device, and therefore cannot reproduce
that problem.

Regards
Stefan
Post by Bernhard Blieninger
Best Regards,
Bernhard.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
genode-main mailing list
https://lists.sourceforge.net/lists/listinfo/genode-main
--
Stefan Kalkowski
Genode Labs

https://github.com/skalk · http://genode.org/
rmillo
2017-05-18 13:46:07 UTC
Permalink
Hi Bernhard

Basically the Raspberry PI 1 Model B+ has the same base as Model B, but
it has some improvements such as more GPIO Pins. The UART GPIO pins are
the same in both models:

https://www.raspberrypi.org/documentation/usage/gpio-plus-and-raspi2/README.md
https://pinout.xyz/#

But I think they should be some differences between Model B and Model
B+, which are not specified in the original datahseet (BCM2835 dated
2012 and Model B+ release on 2014), the same for Model B. As Stefan
recommended, check in Linux kernel the addresses the initial
configuration of the UART, and the hardware in general.

I do not have in my hands a Model B+ to test, because if there are
significant differences it is likely that Fiasco.OC kernel is not
completely functional in that model. Try to start compiling Genode for
RPi using the base-hw platform (hw_rpi). This will serve as a starting
point to put GenodeOS on the Model B+, since the implementation of this
is about Genode, and is easier to understand and modify.

When I began to work with Fiasco.OC+GenodeOS on RPi Model B, I used
base-hw as start point to test the hardware and its components.

The firmware its not the problem, i have tested Fiasco.OC+GenodeOS with
a more recently firmware on Model B.

What kernel_address on config.txt are you using? I use 0x00800000 to
load directly the the raw img.

How are you creating the raw img? I use

genode-arm-objcopy -O binary $elf_img $raw_img

Best regards
Post by Stefan Kalkowski
Hi Bernhard,
Post by Bernhard Blieninger
Hi,
I am currently working to get the raspberry pi b+ working with genode.
I started with an raspberry pi uboot and a tftp server where
genode.img
lies on.
http://wiki.beyondlogic.org/index.php?title=Compiling_uBoot_RaspberryPi
For the genode image I used the newest version of genode on github and
./tool/create_builddir foc_rpi BUILD_DIR=buildrpi
or that
./tool/create_builddir rpi BUILD_DIR=./build-rpi
and the command
make run/demo
This is working with the Raspberry Pi B(!) but when i put the sd card in
the Raspberry Pi B +(!) it is not even booting.
Therefore i prepared a sd card with raspbian and changed the
kernel.img
with the newly compiled u-boot.bin from
http://git.denx.de/u-boot.git
The sd card now boots again and shows u-boot but if I want to load
genode.img it does not continue.
If genode is loaded, for example by manually triggering it with bootz,
the serial connected minicom screen shows encoding problem nonsense.
Starting up a linux kernel works. If I start genode.img directly from
the sd card it is not working either.
If I try this sd card with the Raspberry Pi B(!) it is not working.
What I have tested in a last step is, what happens if I substitute the
u-boot.bin with the genode.img while using the sd card image that was
provided by beyondlogic in the first place, this is working for the B
model but not for the B +.
Also tried a fresh sd card format it to fat16 and put all the stuff on
it, which is in the boot folder from
https://github.com/raspberrypi/firmware , but that is also not working.
So I assume, that either the bootcode.bin and/or start.elf provided by
raspberry are too new to use them with genode.
I could maybe find older versions but I would just like to ask if this
will help, maybe genode was never (meant to) run with some raspberry
boot code that is newer then 2013.11
(http://genode.org/documentation/release-notes/13.11#Raspberry_Pi).
Thanks in Advance for your help.
I do not think its a "firmware is too new" issue. I guess it is more a
question of how is the firmware configured, and what are the actual
differences in between Model 1 B and 1 B+.
The first question is, what exactly is not working. If everything stays
blank after u-boot started the kernel, then probably Genode does not use
the right physical address for the UART's memory mapped I/O registers,
either because they've changed in between both board revisions, or
because the firmware is configured in a different way than before resp.
configures the GPIO pins to connect to a different (serial) device. In
that case, you might study the options in config.txt for your specific
model. Alternatively, you might somehow find out which UART and base
address Linux is using on the device, e.g. in /proc/iomem.
Unfortunately, I do not have such device, and therefore cannot
reproduce
that problem.
Regards
Stefan
Post by Bernhard Blieninger
Best Regards,
Bernhard.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
genode-main mailing list
https://lists.sourceforge.net/lists/listinfo/genode-main
--
MSc. Reinier Millo Sánchez
Centro de Estudios de Informática
Universidad Central "Marta Abreu" de Las Villas
Carretera a Camajuaní Km 5 1/2
Santa Clara, Villa Clara, Cuba
CP 54830
Loading...