12-10-2017 05:07 AM
I could successfully implement an OpemAmp application between APU and RPU on the Ultrascale with Petalinux.
I did this following this manuall: OpenAMP-Xilinx.
Also I was able to load Ubuntu with the Petalinux-Kernel.
If I try to combine both solutions, the Ubuntu Rootfs overrides the Modules and Drivers created by Petalinux for the OpenAMP interface. I tried to coppy the modules in /lib/modules from petalinux to ubuntu but if I ran "modprobe zynqmp_r5_remoteproc" this gives me a Segmantation Fault.
How can I implement the OpenAMP drivers in Ubuntu? Or is there a way I can tell the rootfs not to override the drivers created by Petalinux?
Thanks for your help!
02-13-2018 10:29 AM
Can you share the output of dmesg? That might help us debug the issue of why the drivers aren't loading.
Also, if you build the drivers into the kernel rather than leaving them as modules, they won't be missing when you switch to the Ubuntu rootfs. You can set this in the kernel configuration menu.
02-13-2018 02:57 PM - edited 02-13-2018 04:04 PM
I was able to reproduce the same behavior on my Ubuntu system. However, the driver also segfaults using the stock rootfs from Petalinux, which leads me to believe it's not an Ubuntu problem, but rather a bug in the driver. My guess is that something isn't configured correctly in the devicetree, so the driver misses it, and then tries to use something that isn't configured.
[ 87.067141] zynqmp_r5_remoteproc ff9a0100.zynqmp_r5_rproc: RPU core_conf: split0 [ 87.074499] Unable to handle kernel NULL pointer dereference at virtual address 00000000
I'm using 2017.2 at the moment; it's possible this has been fixed in a later version.
UPDATE: My problem was due to using the 2017.2 kernel/driver with the device tree nodes for 2017.3 on the wiki.
j_ney, if you can share your device tree and tool versions, we can probably help.
02-15-2018 04:26 AM
Facing the same problem, @steven.bell, how can you build the drivers into the kernel?
As @j_ney, I was able to run the examples using petalinux, but I need to use Ubuntu instead. The way I proceed is: I follow the same procedure to generate BOOT.BIN, image.ub and system.dtb, but rootfs is completely replaced by the rootfs of Ubuntu, as described here. Therefore, neither the examples nor the drivers appear when booting on Ubuntu. Any help will be welcome.
02-15-2018 09:53 AM
To get my system working, I first built everything with petalinux, and created the rootfs from Ubuntu base (our scripts are here: https://github.com/stevenbell/ultrazynqbuilder/tree/master/ubuntu).
Then I extracted rootfs.cpio (created from petalinux), and copied the contents of /lib/modules/* over to the Ubuntu rootfs. This worked fine, and the modules loaded on boot.
However, if this doesn't work, you should be able to find the module configuration in the kernel setup. The default is "<M>" (build as a module), but you can change it to "<Y>" to have it built-in.
petalinux-config -c kernel Device drivers > remoteproc drivers > ZynqMP_r5 support