How to add AD9361 driver after making Linux system with Petalinux2017.4 tool

Hello, I am using Zynq7020, and then using the Petalinux2017.4 tool to customize a Linux system. Then I read in wiki.analog.com/.../zynq_2015r2 "Building with Petalinux" -- -- - wiki.analog.com/.../petalinux will ad9361 driver added to my own custom Linux system, but suggest there is an error, according to the tutorial section, I don't know how to add my own device tree where is part a. I would like to know if this is only available on Petalinux2018.3.

Parents
  • 0
    •  Analog Employees 
    on Feb 4, 2021 9:54 PM 2 months ago

    We only have official support since PetaLinux 2018.3 but newer versions are (will be) supported as our HDL repo moves.

    -Travis

  • Hello, I would like to discuss with you again the need to add "KERNEL_DTB=$DTB_TO_USE" in the "conf" file mentioned above. I was wrong to use what you said. I hope to get your reply.

  • 0
    •  Analog Employees 
    on Feb 9, 2021 8:06 AM 2 months ago in reply to zhuangzi

    Hello,

    That line does not apply to the petalinux version you are using (hence 2019_R1 meta-adi). It was an improvement done in meta-adi that is only visible from 2019_R2 onwards.

    That line is the one that will tell the devicetree.bbappend file wich devicetree to use. For example "echo KERNEL_DTB=\"zynq-zc702-adv7511-ad9361-fmcomms5\" > petalinux.conf"...

    - Nuno Sá

  • Hello, so do I need to upgrade Petalinux above 2019.1 and then use this method to build again? I just went straight to your method and it went wrong.

  • 0
    •  Analog Employees 
    on Feb 9, 2021 8:43 AM 2 months ago in reply to zhuangzi

    So, are you using petalinux 2018.3 or 2019.1? If you are using 2019.1, then you can use the conf file method.

    Just realized that the README has a slight bug. You need to escape the " for things to work as what you want to have in the file is KERNEL_DTB="zynq-zed-adv7511-ad9361-fmcomm2-3". Hence run the command like this: echo "KERNEL_DTB=\"zynq-zed-adv7511-ad9361-fmcomm2-3\"" >> project-spec/.../petalinuxbsp.conf

    - Nuno Sá

  • Hello, I am using Petalinux2018.3, and there are a lot of errors after using the add method you are providing now.

    Here's what happened, and I'm at a loss. Looking forward to your reply:

    [INFO] building project
    [INFO] sourcing bitbake
    INFO: bitbake petalinux-user-image
    WARNING: /opt/pkg/petalinux/components/yocto/source/arm/layers/meta-xilinx/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bb: KERNEL_DTB is not defined. Your build is likely to fail! Make sure to define it in a conf file...
    Parsing recipes: 100% |##########################################| Time: 0:01:33
    Parsing of 2573 .bb files complete (0 cached, 2573 parsed). 3449 targets, 149 skipped, 0 masked, 0 errors.
    WARNING: No recipes available for:
    /home/ry/test1/meta-adi/meta-adi-xilinx/recipes-core/lsb/lsb_5.0.bbappend
    NOTE: Resolving any missing task queue dependencies
    Initialising tasks: 100% |#######################################| Time: 0:00:05
    Checking sstate mirror object availability: 100% |###############| Time: 0:00:35
    NOTE: Executing SetScene Tasks
    NOTE: Executing RunQueue Tasks
    WARNING: KERNEL_DTB is not defined. Your build is likely to fail! Make sure to define it in a conf file...
    WARNING: KERNEL_DTB is not defined. Your build is likely to fail! Make sure to define it in a conf file...
    WARNING: KERNEL_DTB is not defined. Your build is likely to fail! Make sure to define it in a conf file...
    WARNING: KERNEL_DTB is not defined. Your build is likely to fail! Make sure to define it in a conf file...
    WARNING: KERNEL_DTB is not defined. Your build is likely to fail! Make sure to define it in a conf file...
    WARNING: KERNEL_DTB is not defined. Your build is likely to fail! Make sure to define it in a conf file...
    ERROR: linux-xlnx-4.19-adi_master+gitAUTOINC+d13306d80c-r0 do_kernel_version_sanity_check: Package Version (4.19-adi_master+gitAUTOINC+d13306d80c) does not match of kernel being built (5.4). Please update the PV variable to match the kernel source or set KERNEL_VERSION_SANITY_SKIP="1" in your recipe.
    ERROR: linux-xlnx-4.19-adi_master+gitAUTOINC+d13306d80c-r0 do_kernel_version_sanity_check: Function failed: do_kernel_version_sanity_check (log file is located at /home/ry/test1/ax_peta/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/linux-xlnx/4.19-adi_master+gitAUTOINC+d13306d80c-r0/temp/log.do_kernel_version_sanity_check.52630)
    ERROR: Logfile of failure stored in: /home/ry/test1/ax_peta/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/linux-xlnx/4.19-adi_master+gitAUTOINC+d13306d80c-r0/temp/log.do_kernel_version_sanity_check.52630
    ERROR: Task (/opt/pkg/petalinux/components/yocto/source/arm/layers/meta-xilinx/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_2018.3.bb:do_kernel_version_sanity_check) failed with exit code '1'
    NOTE: Tasks Summary: Attempted 2992 tasks of which 2242 didn't need to be rerun and 1 failed.
    Summary: 1 task failed:
    /opt/pkg/petalinux/components/yocto/source/arm/layers/meta-xilinx/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_2018.3.bb:do_kernel_version_sanity_check
    Summary: There were 8 WARNING messages shown.
    Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
    ERROR: Failed to build project
    *****************************************************************************
    [INFO] building project
    [INFO] sourcing bitbake
    INFO: bitbake petalinux-user-image
    Parsing recipes: 100% |##########################################| Time: 0:01:05
    Parsing of 2573 .bb files complete (0 cached, 2573 parsed). 3449 targets, 149 skipped, 0 masked, 0 errors.
    WARNING: No recipes available for:
    /home/ry/test1/meta-adi/meta-adi-xilinx/recipes-core/lsb/lsb_5.0.bbappend
    NOTE: Resolving any missing task queue dependencies
    Initialising tasks: 100% |#######################################| Time: 0:00:05
    Checking sstate mirror object availability: 100% |###############| Time: 0:00:26
    NOTE: Executing SetScene Tasks
    NOTE: Executing RunQueue Tasks
    ERROR: linux-xlnx-4.19-adi_master+gitAUTOINC+d13306d80c-r0 do_populate_lic: QA Issue: linux-xlnx: The LIC_FILES_CHKSUM does not match for file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7
    linux-xlnx: The new md5 checksum is bbea815ee2795b2f4230826c0c6b8814
    linux-xlnx: Here is the selected license text:
    vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
    The Linux Kernel is provided under:
    SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
    Being under the terms of the GNU General Public License version 2 only,
    according with:
    LICENSES/preferred/GPL-2.0
    With an explicit syscall exception, as stated at:
    LICENSES/exceptions/Linux-syscall-note
    In addition, other licenses may also apply. Please see:
    Documentation/process/license-rules.rst
    for more details.
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    linux-xlnx: Check if the license information has changed in /home/ry/test1/ax_peta/build/tmp/work-shared/plnx-zynq7/kernel-source/COPYING to verify that the LICENSE value "GPLv2" remains valid [license-checksum]
    ERROR: linux-xlnx-4.19-adi_master+gitAUTOINC+d13306d80c-r0 do_populate_lic: Fatal QA errors found, failing task.
    ERROR: linux-xlnx-4.19-adi_master+gitAUTOINC+d13306d80c-r0 do_populate_lic: Function failed: populate_lic_qa_checksum
    ERROR: Logfile of failure stored in: /home/ry/test1/ax_peta/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/linux-xlnx/4.19-adi_master+gitAUTOINC+d13306d80c-r0/temp/log.do_populate_lic.55905
    ERROR: linux-xlnx-4.19-adi_master+gitAUTOINC+d13306d80c-r0 do_kernel_version_sanity_check: Package Version (4.19-adi_master+gitAUTOINC+d13306d80c) does not match of kernel being built (5.4). Please update the PV variable to match the kernel source or set KERNEL_VERSION_SANITY_SKIP="1" in your recipe.
    ERROR: linux-xlnx-4.19-adi_master+gitAUTOINC+d13306d80c-r0 do_kernel_version_sanity_check: Function failed: do_kernel_version_sanity_check (log file is located at /home/ry/test1/ax_peta/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/linux-xlnx/4.19-adi_master+gitAUTOINC+d13306d80c-r0/temp/log.do_kernel_version_sanity_check.55904)
    ERROR: Logfile of failure stored in: /home/ry/test1/ax_peta/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/linux-xlnx/4.19-adi_master+gitAUTOINC+d13306d80c-r0/temp/log.do_kernel_version_sanity_check.55904
    ERROR: Task (/opt/pkg/petalinux/components/yocto/source/arm/layers/meta-xilinx/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_2018.3.bb:do_kernel_version_sanity_check) failed with exit code '1'
    ERROR: Task (/opt/pkg/petalinux/components/yocto/source/arm/layers/meta-xilinx/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_2018.3.bb:do_populate_lic) failed with exit code '1'
    NOTE: Tasks Summary: Attempted 2056 tasks of which 2053 didn't need to be rerun and 2 failed.
    Summary: 2 tasks failed:
    /opt/pkg/petalinux/components/yocto/source/arm/layers/meta-xilinx/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_2018.3.bb:do_kernel_version_sanity_check
    /opt/pkg/petalinux/components/yocto/source/arm/layers/meta-xilinx/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_2018.3.bb:do_populate_lic
    Summary: There was 1 WARNING message shown.
    Summary: There were 5 ERROR messages shown, returning a non-zero exit code.
    ERROR: Failed to build project

Reply
  • Hello, I am using Petalinux2018.3, and there are a lot of errors after using the add method you are providing now.

    Here's what happened, and I'm at a loss. Looking forward to your reply:

    [INFO] building project
    [INFO] sourcing bitbake
    INFO: bitbake petalinux-user-image
    WARNING: /opt/pkg/petalinux/components/yocto/source/arm/layers/meta-xilinx/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bb: KERNEL_DTB is not defined. Your build is likely to fail! Make sure to define it in a conf file...
    Parsing recipes: 100% |##########################################| Time: 0:01:33
    Parsing of 2573 .bb files complete (0 cached, 2573 parsed). 3449 targets, 149 skipped, 0 masked, 0 errors.
    WARNING: No recipes available for:
    /home/ry/test1/meta-adi/meta-adi-xilinx/recipes-core/lsb/lsb_5.0.bbappend
    NOTE: Resolving any missing task queue dependencies
    Initialising tasks: 100% |#######################################| Time: 0:00:05
    Checking sstate mirror object availability: 100% |###############| Time: 0:00:35
    NOTE: Executing SetScene Tasks
    NOTE: Executing RunQueue Tasks
    WARNING: KERNEL_DTB is not defined. Your build is likely to fail! Make sure to define it in a conf file...
    WARNING: KERNEL_DTB is not defined. Your build is likely to fail! Make sure to define it in a conf file...
    WARNING: KERNEL_DTB is not defined. Your build is likely to fail! Make sure to define it in a conf file...
    WARNING: KERNEL_DTB is not defined. Your build is likely to fail! Make sure to define it in a conf file...
    WARNING: KERNEL_DTB is not defined. Your build is likely to fail! Make sure to define it in a conf file...
    WARNING: KERNEL_DTB is not defined. Your build is likely to fail! Make sure to define it in a conf file...
    ERROR: linux-xlnx-4.19-adi_master+gitAUTOINC+d13306d80c-r0 do_kernel_version_sanity_check: Package Version (4.19-adi_master+gitAUTOINC+d13306d80c) does not match of kernel being built (5.4). Please update the PV variable to match the kernel source or set KERNEL_VERSION_SANITY_SKIP="1" in your recipe.
    ERROR: linux-xlnx-4.19-adi_master+gitAUTOINC+d13306d80c-r0 do_kernel_version_sanity_check: Function failed: do_kernel_version_sanity_check (log file is located at /home/ry/test1/ax_peta/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/linux-xlnx/4.19-adi_master+gitAUTOINC+d13306d80c-r0/temp/log.do_kernel_version_sanity_check.52630)
    ERROR: Logfile of failure stored in: /home/ry/test1/ax_peta/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/linux-xlnx/4.19-adi_master+gitAUTOINC+d13306d80c-r0/temp/log.do_kernel_version_sanity_check.52630
    ERROR: Task (/opt/pkg/petalinux/components/yocto/source/arm/layers/meta-xilinx/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_2018.3.bb:do_kernel_version_sanity_check) failed with exit code '1'
    NOTE: Tasks Summary: Attempted 2992 tasks of which 2242 didn't need to be rerun and 1 failed.
    Summary: 1 task failed:
    /opt/pkg/petalinux/components/yocto/source/arm/layers/meta-xilinx/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_2018.3.bb:do_kernel_version_sanity_check
    Summary: There were 8 WARNING messages shown.
    Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
    ERROR: Failed to build project
    *****************************************************************************
    [INFO] building project
    [INFO] sourcing bitbake
    INFO: bitbake petalinux-user-image
    Parsing recipes: 100% |##########################################| Time: 0:01:05
    Parsing of 2573 .bb files complete (0 cached, 2573 parsed). 3449 targets, 149 skipped, 0 masked, 0 errors.
    WARNING: No recipes available for:
    /home/ry/test1/meta-adi/meta-adi-xilinx/recipes-core/lsb/lsb_5.0.bbappend
    NOTE: Resolving any missing task queue dependencies
    Initialising tasks: 100% |#######################################| Time: 0:00:05
    Checking sstate mirror object availability: 100% |###############| Time: 0:00:26
    NOTE: Executing SetScene Tasks
    NOTE: Executing RunQueue Tasks
    ERROR: linux-xlnx-4.19-adi_master+gitAUTOINC+d13306d80c-r0 do_populate_lic: QA Issue: linux-xlnx: The LIC_FILES_CHKSUM does not match for file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7
    linux-xlnx: The new md5 checksum is bbea815ee2795b2f4230826c0c6b8814
    linux-xlnx: Here is the selected license text:
    vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
    The Linux Kernel is provided under:
    SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
    Being under the terms of the GNU General Public License version 2 only,
    according with:
    LICENSES/preferred/GPL-2.0
    With an explicit syscall exception, as stated at:
    LICENSES/exceptions/Linux-syscall-note
    In addition, other licenses may also apply. Please see:
    Documentation/process/license-rules.rst
    for more details.
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    linux-xlnx: Check if the license information has changed in /home/ry/test1/ax_peta/build/tmp/work-shared/plnx-zynq7/kernel-source/COPYING to verify that the LICENSE value "GPLv2" remains valid [license-checksum]
    ERROR: linux-xlnx-4.19-adi_master+gitAUTOINC+d13306d80c-r0 do_populate_lic: Fatal QA errors found, failing task.
    ERROR: linux-xlnx-4.19-adi_master+gitAUTOINC+d13306d80c-r0 do_populate_lic: Function failed: populate_lic_qa_checksum
    ERROR: Logfile of failure stored in: /home/ry/test1/ax_peta/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/linux-xlnx/4.19-adi_master+gitAUTOINC+d13306d80c-r0/temp/log.do_populate_lic.55905
    ERROR: linux-xlnx-4.19-adi_master+gitAUTOINC+d13306d80c-r0 do_kernel_version_sanity_check: Package Version (4.19-adi_master+gitAUTOINC+d13306d80c) does not match of kernel being built (5.4). Please update the PV variable to match the kernel source or set KERNEL_VERSION_SANITY_SKIP="1" in your recipe.
    ERROR: linux-xlnx-4.19-adi_master+gitAUTOINC+d13306d80c-r0 do_kernel_version_sanity_check: Function failed: do_kernel_version_sanity_check (log file is located at /home/ry/test1/ax_peta/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/linux-xlnx/4.19-adi_master+gitAUTOINC+d13306d80c-r0/temp/log.do_kernel_version_sanity_check.55904)
    ERROR: Logfile of failure stored in: /home/ry/test1/ax_peta/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/linux-xlnx/4.19-adi_master+gitAUTOINC+d13306d80c-r0/temp/log.do_kernel_version_sanity_check.55904
    ERROR: Task (/opt/pkg/petalinux/components/yocto/source/arm/layers/meta-xilinx/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_2018.3.bb:do_kernel_version_sanity_check) failed with exit code '1'
    ERROR: Task (/opt/pkg/petalinux/components/yocto/source/arm/layers/meta-xilinx/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_2018.3.bb:do_populate_lic) failed with exit code '1'
    NOTE: Tasks Summary: Attempted 2056 tasks of which 2053 didn't need to be rerun and 2 failed.
    Summary: 2 tasks failed:
    /opt/pkg/petalinux/components/yocto/source/arm/layers/meta-xilinx/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_2018.3.bb:do_kernel_version_sanity_check
    /opt/pkg/petalinux/components/yocto/source/arm/layers/meta-xilinx/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_2018.3.bb:do_populate_lic
    Summary: There was 1 WARNING message shown.
    Summary: There were 5 ERROR messages shown, returning a non-zero exit code.
    ERROR: Failed to build project

Children
  • 0
    •  Analog Employees 
    on Feb 9, 2021 11:28 AM 2 months ago in reply to zhuangzi

    If you are using petalinux 2018.3, then you need to use meta-adi 2019_r1...

    So, are you using petalinux 2018.3 or 2019.1? If you are using 2019.1, then you can use the conf file method.

    The method I explained does not apply to your petalinux version. Also it looks like that you are using meta-adi master branch and you need to use 2019_R1. Please follow the instructions in this readme file and forget about the conf file method (unless you are willing to upgrade to petalinux 2019.1).

    - Nuno Sá