Post Go back to editing

How to install AD9361 driver on yocto (bitbake)


I have some problem installing AD9361 driver on yocto OS.

I successfully build all components too run yocto ,on zed board,

To do that i used bitbake, next in order to support the ad9361 device i added the adi-fmcomms2.dtsi

on meta-zedboard/conf/machine/boards/zeboard/zedboard.dtsi.

As a result i should have something like in this tutorial (not the case),

I suppose that i need to create recipe for that, to put the source code of the driver...

If somebody already did that, can you explain please the steps to do?

Thanks in advance.

Top Replies

  • Hi,

    You would need to compile the Linux kernel from our own tree: analogdevicesinc/linux · GitHub

    The ad9361 driver won't compile with a mainline kernel as some of our work on the IIO framework isn't upstream yet.

    I'm pretty sure that OpenEmbedded / Yocto allows you to specify a custom git repository for the kernel (although I personally didn't test that).



  • Hi, thx for your prompt response, and sorry for my late,I was working on another project.

    If you are familiar with bitbake, can you give a few more details...,

    I create a layer "meta-fmc" where I specify to use a kernel from your source, but I have a problem:

         "ERROR: Multiple. BB files are due to be built which each provides virtual/kernel      (/home/user/yocto2/meta-forms/recipes-kernel/Linux/Linux-yocto-custom. BB /home/user/yocto2/meta-      Xilinx/recipes-kernel/Linux/linux-xlnx_3.

         This usually means one provides something the other doesn't and should."

    should I erase "meta-Xilinx"?

  • Hi,

    I am facing a similar problem. Could you share the layer you created? I am already struggling with specyfing the AD kernel as source...

    Thank you!



  • Creating a layer is not so difficult,

    yocto-bsp create fmc arm , (this command will create a meta-fmc)

    you chose  a custom kernel not the default one, and bitbake will ask you for a remote git repo,

    git:// in our case, you chose the branch and others parameters ...

    at the end you add this layer on conf/bblayers.conf,

    and you add the line PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-custom" on clonf/local.conf

    otherwise bitbake will build the linux-xlnx kernel.

  • Hi,

    still struggling :-) I managed to create the layer but after downloading the kernel sources the job do_validate_branches fails because git complains about the commit ID.

    What does your file look like?



  • Hi, I didn't change too much...

    inherit kernel

    require recipes-kernel/linux/

    KBRANCH = "2014_R2"

    SRC_URI = "git://;protocol=git;bareclone=1;branch=${KBRANCH}"

    SRC_URI += "file://defconfig"

    SRC_URI += "file://fmc.scc \

                file://fmc.cfg \

                file://fmc-user-config.cfg \

                file://fmc-user-patches.scc \


    LINUX_VERSION ?= "3.17"



    PR = "r0"

    PV = "${LINUX_VERSION}+git${SRCPV}"

    COMPATIBLE_MACHINE_fmc = "fmc"

  • Hi - I little late to the party, but:

    will the ad9361.c now compile with a mainline kernel?
    I'm on the Xilinx Yocto 2021.1 branch, and I see the ad9467.c as part of the mainline kernel's collection of iio/adc/ drivers; but not ad9361.c

    Should I be able to just add the src appropriately to the BBs/src folders?

    Thanks for any advice you can provide

    - Paulito

  • Please don't post to an old closed thread. Please create a new one.

    The ad9361 is not mainline. You need to use our Linux kernel from here: