UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer j_ney
Observer
2,144 Views
Registered: ‎11-26-2017

Openamp with Ubuntu ZCU102

Hello, 

 

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!

0 Kudos
7 Replies
Highlighted
Contributor
Contributor
1,871 Views
Registered: ‎01-24-2013

Re: Openamp with Ubuntu ZCU102

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.

Contributor
Contributor
1,866 Views
Registered: ‎01-24-2013

Re: Openamp with Ubuntu ZCU102

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.

Contributor
Contributor
1,843 Views
Registered: ‎03-03-2017

Re: Openamp with Ubuntu ZCU102

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.

0 Kudos
Contributor
Contributor
1,833 Views
Registered: ‎01-24-2013

Re: Openamp with Ubuntu ZCU102

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

 

 

Contributor
Contributor
402 Views
Registered: ‎03-03-2017

Re: Openamp with Ubuntu ZCU102

Only one addition: The CPU1 modules (*.elf) must be copied in /lib/firmware/

0 Kudos
Visitor cokang
Visitor
278 Views
Registered: ‎09-05-2008

Re: Openamp with Ubuntu ZCU102

Hi.

I'm in troubling in your same problem.

Did you get a good solution?

Please share your idea... 

 

Thanks a lot.

0 Kudos
Contributor
Contributor
43 Views
Registered: ‎03-03-2017

Re: Openamp with Ubuntu ZCU102

Just follow the instructions provided by @steven.bell. It works.

0 Kudos