I am part of a team working on a product containing an AD9361. It is a custom board with a Xilinx ZynqMP Ultrascale+ ZU9 SoC. Due to the nature of the project and our customers we are locked in to using Xilinx Petalinux (currently 2017.4). We are having some trouble figuring out how to integrate the Analog Devices iio drivers into the Petalinux Kernel. Based on the documentation in your Analog Devices Linux repo, it appears that your 2018_R1 branch is based on Xilinx Petalinux 2017.4 (and therefore, based on Linux kernel 4.9.0). However, there appears to be a significant amount of change in your 2018_R1 branch from Xilinx Petalinux 2017.4. We would like some assistance in figuring out which new files and file changes we need to incorporate into our Petalinux, and any additional guidance you can provide in integrating the AD9361 into our environment. We will also be trying to integrate libiio with the goal of getting gnuradio running on the system.
Will have to wait for our kernel guru mhennerich to get an idea on the scope. We are a bit out of his timezone right now.
Our recommendation would be to use the ADI kernel which is basically a Xilinx kernel with ADI patches on top of it as an external kernel.
Please check the using external kernel section in the Petalinux Tools Reference Guide UG1144.
We understand that will add some patches you don’t need, however I would still consider this the best solution.
We have some special rebased branches which is basically upstream 4.9 with rebased Xilinx and ADI modifications on top:
Please see here:
Starting with branch adi-4.9.0 there are rebased branches. They're typically rebased branches from Xilinx with the ADI patches on top.
For adi-4.9.0 the base was branch xlnx_rebase_v4.9 at commit d45e196f59364e9f5eafe46027a7d2af349083974 in the ADI repo and commit 45e196f59364e9f5eafe46027a7d2af349083974 in the Xilinx repo. All ADI patches & drivers up to a specific point in time were cherry-picked to that branch from master. Note that since the adi-4.9.0 branch is the first rebased branch, it's not particularly the best rebase that could have been done, but it should provide some patches that are somewhat reasonable to take and apply on top of an upstream 4.9 kernel [after some polishing].
The current master branch has an equivalent adi-4.14.0. The common base/commit for this branch is commit github.com/.../ad4cd988ba86ab0fb306d57f244b7eaa6cce79a4 from the xlnx_rebase_v4.14. Note that the same hash is present in the Xilinx. As such, the adi-4.14.0 is an incremental improvement for rebased branches in this repo.
Using this you can revert or cherry-pick what you think you need or not.
Late in 2017 I created a patchset against a vanilla 4.9. kernel which has everything you need to get full AD9361 support.
Please see patches attached.
0003-iio-add-generic-data-type.patch is optional - only used by Mathworks
I hope this helps.
Thanks for the info. I will try building from external source using the 2018_R1 branch as s short term experiment. Long term, however, I will have to get this integrated into a Petalinux build. We have multiple customers using this product for various purposes, some already using Petalinux builds. Asking them all to switch their code base is not feasible.
I will examine these patches as a starting point toward integrating them with our Petalinux 2017.4 build.
This is great information. Do you have a similar patch zip file for the xlnx_rebase_v4.14_2018.3 release?
We have a rebased kernel tree derived from it.