Post Go back to editing

AD9361 driver in Yocto / Xilinx / ZC706 equivalent (redux)

Category: Software
Product Number: AD9361

Hi - posting a new thread / reviving a previously asked question (see below):

 How to install AD9361 driver on yocto (bitbake) 

I'm new to Yocto based Linux builds; we want to install the AD9361 driver in a Xilinx (similar-to ZC706 / Zynq-7000 based) board

Our build is currently based on the Xilinx release branch rel v2018.3 / Linux kernel 4.14. 

The above link has some very useful info; thanks for the recent response as well. 
To reiterate: the most recent response indicates that the AD kernel is required, as this driver will not build on mainline Linux kernel repos.

I believe the referenced AD kernel does have a branch "ad9361-xilinx-4.14", which I assume I should be using.

If anyone has any further details / info on configuring / setting up / using an alternative Linux kernel, 

or any additional / updated advice in using the AD9361 in Yocto / Xilinx based Linux builds, it would be greatly appreciated!

thanks,

- Paulito

  • UPDATE: I found a related thread, where a user created a kernel module for a ZC706-based board:

     How to add the AD9361 Linux driver on Petalinux 

    It's not explicitly stated, but: I think this thread implies that the user did not use the AD kernel, but instead was able to create a kernel module separately. Based on the responses, it seems like this is also a valid approach.

    If anyone can corroborate that this kernel-module approach w/ a mainline kernel (rather than requiring the AD kernel as described above) is also a valid method, it would be most appreciated -

    thanks,

    - Paulito 

  • Hi Paulito,

    If anyone can corroborate that this kernel-module approach w/ a mainline kernel (rather than requiring the AD kernel as described above) is also a valid method, it would be most appreciated -

    Well, that will only work if you want to have the work to forward port (or backport) the ad9361 driver to the mainline Linux version you want to use...

    Regarding your question, note that we don't support plain yocto.. You'll need to use meta-adi with petalinux... From what I can tell, you want to use the 2019_R1 branch which supports petalinux 2018.3 and used ADI kernel 4.14. Take a look at the README and try to build it... Let me know if you find any issue.

    - Nuno Sá

  • Hi Nuno - Appreciate the response.

    As an initial attempt, I just replaced the kernel repo from our existing Zynq 7000-based Yocto build with the 2019_R1 branch of the ADI kernel repo. The initial build (w/o updating config) was successful, but: i am now updating the kernel config (via "bitbake <TARGET> -c menuconfig") to enable the AD9361 driver.

    The most recent AD9361 driver support page at

    AD9361 high performance, highly integrated RF Agile TransceiverTm Linux device driver [Analog Devices Wiki]

    indicates the "menuconfig" options as follows:

    + Enable ring buffer support within IIO
    +     Industrial I/O lock free software ring
    + Enable triggered sampling support

    however: in the 2019_R1 kernel I am using, the "menuconfig" options are 

    -  Enable buffer support within IIO
    -    IIO callback buffer used for push in-kernel interfaces
    -    Industrial I/O vuffering based on kfifo
    -  Enable IIO configuration via configfs
    -  Enable triggered sampling support
    (2)   Maximum number of consumers per trigger
    -  Enable software IIO device support
    -  Enable software triggers support

    ? is the difference because I am using an older release of the kernel?
    ? can you tell me what above are the minimum features I must select for AD9361?

    Thanks in advance,

    - Paulito

  • is the difference because I am using an older release of the kernel?

    Probably is just the wiki outdated...

    You should enable everything related with buffering and probably also triggering. But you might have to enable other devices as our hdl converter cores. Probably your best bet to start with is to just use ADI defconfig... Add this to your local.conf file (or kernel recipe):

    KBUILD_DEFCONFIG_zynq ?= "zynq_xcomm_adv7511_defconfig". IIRC, you also need to add:

    KCONFIG_MODE ?= "alldefconfig" afterwards...

    Note that we don't really support plain yocto builds so the support I can give you is very limited...

    Hope this helps!

    - Nuno Sá

  • Hi Nuno - thanks for the pointers; understood that your support is limited, thanks for the info you have provided so far, very helpful. I will next look into the above details...

    Paulito