Op 20/06/2019 om 09:37 schreef Jan Kiszka:
On 19.06.19 23:52, Harco Kuppens via Xenomai wrote:
Op 19/06/2019 om 17:00 schreef Greg Gallagher:
On Wed, Jun 19, 2019 at 8:44 AM Harco Kuppens <[email protected]>
wrote:
The ipipe patched not entirely cleanly on the rpi kernel source; I
had to
make little changes in the patch, but not anything really
seriously. So I
expect it to be fine.
I used the rasbpian kernel source because it has better support for
the
raspberry pi's and mainly because it has better support for the
gpio pins in
its kernel.
However to help you debug I did a similar install using the
mainline kernel
source. The ipipe patch just worked smoothly, however to get the
gpio pins
running in xenomai I had to still port some code of the file
./drivers/pinctrl/bcm/pinctrl-bcm2835.c
What did you have to change here to get the pins to work with Xenomai?
You shouldn't need to change anything here. If you did then it may be
a bug in the ipipe. Can you try with 4.14 ipipe ?
I did try with ipipe 4.19 and when compiling the kernel I got lot of
errors.
Some I could solve, but at the end I gave up.
See my notes on
https://github.com/harcokuppens/xenomai3_rpi_gpio/blob/master/install/__INSTALL_FAILURES__/install__compile_vanilla_kernel_4.19_with_xenomai_3.0.8__assert_error.txt
Maybe this is also interesting for you.
4.19 requires Xenomai master. See our CI (e.g.
https://travis-ci.com/xenomai-ci/xenomai/jobs/209347407) for a working
setup.
Jan
ok, I used the master branch of xenomai, and yes it compiles the kernel
ok!!
You find my installation description and findings at:
https://github.com/harcokuppens/xenomai3_rpi_gpio/blob/master/install/installation_of_xenomai_master_on_mainline_kernel_branch_v4.19.33_from_kernel.org__problem_linux_gpio.md
However I still get the same problem that the xenomai gpio ports are
wrongly numbered!
And within linux the gpio pins are also not working.
In my other builds I fixed this with the pinctrl_bcm2835.c file I
patched for rpi(raspbian) 4.9 kernel.
You can find this file at :
https://github.com/harcokuppens/xenomai3_rpi_gpio/blob/master/install/how_pinctrl-bcm2835_patch_for_rpi-4.9_is_derived/rpi-4.9.y.ipipe-patched/pinctrl-bcm2835.c
However using that file didn't work here, because I got errors about
irq_set_lockdep_class function. However this function wasn't even used
in the mainline version of pinctrl_bcm2835.c .
I probably have to patch it somehow to match the much newer kernel.
But I will wait first if Greg Gallagher finds something for the 4.9.51
build.
Hopefully he finds what is wrong with that build.
Anyway all builds I did for the raspberry pi 2/3 with mainline kernels
4.9/4.14/4.19 with the official pipeline/xenomai patched have xenomai
running ok. However they don't have the gpio pins working for the
raspberry pi. Neither in linux nor for the realtime cobalt kernel.
Best regards,
Harco Kuppens