Post Go back to editing

Unable to Build Petalinux Image for 2019_R2

Category: Software
Product Number: meta-adi
Software Version: 2019_R2

I am following the instructions for building a Petalinux image available at meta-adi/README.md at 2019_R2 · analogdevicesinc/meta-adi · GitHub.

  • I am using Petalinux 2019.1
  • I have built hdl_2019_r2

I keep getting output as follows, with included errors:

jim@jim-VirtualBox:~/ZC706F/build$ petalinux-build
[INFO] building project
[INFO] sourcing bitbake
[INFO] generating user layers
INFO: bitbake petalinux-user-image
Parsing recipes: 100% |##########################################| Time: 0:07:39
Parsing of 2784 .bb files complete (0 cached, 2784 parsed). 3821 targets, 163 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |#######################################| Time: 0:00:06
Checking sstate mirror object availability: 100% |###############| Time: 0:01:37
Sstate summary: Wanted 957 Found 739 Missed 436 Current 0 (77% match, 0% complete)
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: linux-xlnx-4.19-adi_2019_R2+gitAUTOINC+54ce9e369a-r0 do_patch: Could not apply patches for plnx-zynq7.
ERROR: linux-xlnx-4.19-adi_2019_R2+gitAUTOINC+54ce9e369a-r0 do_patch: Patch failures can be resolved in the linux source directory /home/jim/ZC706F/build/tmp/work-shared/plnx-zynq7/kernel-source)
ERROR: linux-xlnx-4.19-adi_2019_R2+gitAUTOINC+54ce9e369a-r0 do_patch: Function failed: do_patch (log file is located at /home/jim/ZC706F/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/linux-xlnx/4.19-adi_2019_R2+gitAUTOINC+54ce9e369a-r0/temp/log.do_patch.12482)
ERROR: Logfile of failure stored in: /home/jim/ZC706F/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/linux-xlnx/4.19-adi_2019_R2+gitAUTOINC+54ce9e369a-r0/temp/log.do_patch.12482
Log data follows:
| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are ['/home/jim/petalinux/2019.1/components/yocto/source/arm/layers/core/meta/recipes-devtools/quilt/quilt-native_0.65.bb:do_populate_sysroot', '/home/jim/petalinux/2019.1/components/yocto/source/arm/layers/core/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb:do_populate_sysroot']
| NOTE: Installed into sysroot: []
| NOTE: Skipping as already exists in sysroot: ['quilt-default', 'kern-tools-default']
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function do_patch
| (1/2) gpio-xilinx.patch
| [INFO]: check of .kernel-meta//patches//./gpio-xilinx.patch with "git am" did not pass, trying reduced context.
| [INFO]: Context reduced git-am of .kernel-meta//patches//./gpio-xilinx.patch with "git am" did not work, trying "apply".
| error: patch failed: drivers/gpio/gpio-xilinx.c:650
| error: drivers/gpio/gpio-xilinx.c: patch does not apply
| [ERROR]: Application of .kernel-meta//patches//./gpio-xilinx.patch failed.
| Patch needs to be refreshed. Sample resolution script:
| .git/rebase-apply/resolve_rejects
| ERROR: Could not apply patches for plnx-zynq7.
| ERROR: Patch failures can be resolved in the linux source directory /home/jim/ZC706F/build/tmp/work-shared/plnx-zynq7/kernel-source)
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_patch (log file is located at /home/jim/ZC706F/build/tmp/work/plnx_zynq7-xilinx-linux-gnueabi/linux-xlnx/4.19-adi_2019_R2+gitAUTOINC+54ce9e369a-r0/temp/log.do_patch.12482)
ERROR: Task (/home/jim/petalinux/2019.1/components/yocto/source/arm/layers/meta-xilinx/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_2019.1.bb:do_patch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1501 tasks of which 1175 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
/home/jim/petalinux/2019.1/components/yocto/source/arm/layers/meta-xilinx/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_2019.1.bb:do_patch
Summary: There were 3 ERROR messages shown, returning a non-zero exit code.
ERROR: Failed to build project

Has anyone run into this before? What do I need to do in order to successfully build this kernel?



Took out the HTML, which would have been useful to highlight the pretty red error messages
[edited by: JJSterling at 3:24 PM (GMT -4) on 19 May 2022]
  • Hi ,

    Could you please tell me what HDL project you are building and what Vivado version you are using?

    -Ciprian

  • Hello, 

    I should have included that. I'm building the FMCOMMS5 project for the ZC706, using Vivado 2019.1.

    -Jim

  • Also tried building master with Vivado and Petalinux 2020.2 (which is compatible with PYNQ 2.7). That generates a different error concerning libiio-python3. I see a lot of activity on github concerning this error, but no clear resolution.

  • Hello Dr. Collins,

    Sorry to have bothered you; I'd hoped to make your acquaintance with something really pithy and complicated. When trying to build master with Petalinux 2020.2, the error that persistently appears is: 

    ERROR: Nothing RPROVIDES 'libiio-python3' (but /home/jim/ZC706A/components/yocto/layers/meta-petalinux/recipes-core/images/petalinux-image-minimal.bb RDEPENDS on or otherwise requires it)

    Others have discussed python bindings problems on GitHub, but not this error exactly. Of course you know I had to force the Petalinux build by modifying the conf file for meta-adi. I am starting over from scratch and rebuilding the modified hdl_2021_r1 branch of ADI HDL in Vivado 2021.1, then building the master branch of meta-adi with Petalinux 2021.1. I'll reply back with my results.

    Thanks! Jim

  • Slight smile

      can you make a comment here. I think you updated this last year?

    -Travis

  • Alright; have attempted building master with 2021.1 Vivado and Petalinux, just as recommended and required. Rebuilt the "Analog Devices HDL Reference Design FROM SCRATCH, and without changes. Used specified device tree "zynq-zc706-adv7511-ad9361-fmcomms5.dts"

    Received the following output:

    jim@jim-VirtualBox:~/ZC706B$ petalinux-config --get-hw-description=/home/jim/hdl/projects/fmcomms5/zc706/fmcomms5_zc706.sdk
    [INFO] Sourcing buildtools
    INFO: Getting hardware description...
    INFO: Renaming system_top.xsa to system.xsa
    [INFO] Generating Kconfig for project
    [INFO] Menuconfig project
    configuration written to /home/jim/ZC706B/project-spec/configs/config

    *** End of the configuration.
    *** Execute 'make' to start the build or try 'make help'.

    [INFO] Extracting yocto SDK to components/yocto. This may take time!
    [INFO] Sourcing build environment
    [INFO] Generating kconfig for Rootfs
    [INFO] Silentconfig rootfs
    [INFO] Generating plnxtool conf
    [INFO] Adding user layers
    [INFO] Generating workspace directory
    jim@jim-VirtualBox:~/ZC706B$ echo "KERNEL_DTB=\"/home/jim/Documents/Devicetree/zynq-zc706-adv7511-ad9361-fmcomms5.dts\"" >> project-spec/meta-user/conf/petalinuxbsp.conf
    jim@jim-VirtualBox:~/ZC706B$ cd build
    jim@jim-VirtualBox:~/ZC706B/build$ petalinux-build
    [INFO] Sourcing buildtools
    [INFO] Building project
    [INFO] Sourcing build environment
    [INFO] Generating workspace directory
    INFO: bitbake petalinux-image-minimal
    NOTE: Started PRServer with DBfile: /home/jim/ZC706B/build/cache/prserv.sqlite3, IP: 127.0.0.1, PORT: 38857, PID: 8258
    Loading cache: 100% | | ETA: --:--:--
    Loaded 0 entries from dependency cache.
    Parsing recipes: 100% |##########################################| Time: 0:18:00
    Parsing of 3475 .bb files complete (0 cached, 3475 parsed). 5110 targets, 259 skipped, 0 masked, 0 errors.
    NOTE: Resolving any missing task queue dependencies
    NOTE: Fetching uninative binary shim file:///home/jim/ZC706B/components/yocto/downloads/uninative/5ec5a9276046e7eceeac749a18b175667384e1f445cd4526300a41404d985a5b/x86_64-nativesdk-libc.tar.xz;sha256sum=5ec5a9276046e7eceeac749a18b175667384e1f445cd4526300a41404d985a5b (will check PREMIRRORS first)
    Initialising tasks: 100% |#######################################| Time: 0:00:09
    Checking sstate mirror object availability: 100% |###############| Time: 0:03:24
    Sstate summary: Wanted 1721 Found 1441 Missed 280 Current 0 (83% match, 0% complete)
    NOTE: Executing Tasks
    ERROR: device-tree-xilinx-v2021.1+gitAUTOINC+252758eb1f-r0 do_configure: Error: Could not find "pl-delete-nodes-/home/jim/Documents/Devicetree/zynq-zc706-adv7511-ad9361-fmcomms5.dts.dtsi" in "/home/jim/ZC706B/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/device-tree/xilinx-v2021.1+gitAUTOINC+252758eb1f-r0"
    ERROR: device-tree-xilinx-v2021.1+gitAUTOINC+252758eb1f-r0 do_configure: Execution of '/home/jim/ZC706B/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/device-tree/xilinx-v2021.1+gitAUTOINC+252758eb1f-r0/temp/run.do_configure.24835' failed with exit code 1:
    MISC_ARG is -hdf_type xsa -yamlconf /home/jim/ZC706B/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/device-tree/xilinx-v2021.1+gitAUTOINC+252758eb1f-r0/device-tree.yaml
    APP_ARG is -app "device-tree"
    Using xsct from: /home/jim/petalinux/2021.1/tools/xsct//bin/xsct
    cmd is: xsct -sdx -nodisp /home/jim/ZC706B/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/device-tree/xilinx-v2021.1+gitAUTOINC+252758eb1f-r0/dtgen.tcl -ws /home/jim/ZC706B/project-spec/configs/../../components/plnx_workspace/device-tree -pname device-tree -rp /home/jim/ZC706B/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/device-tree/xilinx-v2021.1+gitAUTOINC+252758eb1f-r0/git -processor_ip ps7_cortexa9 -hdf /home/jim/ZC706B/build/tmp/deploy/images/zynq-generic/Xilinx-zynq-generic.xsa -arch 32 -app "device-tree" -hdf_type xsa -yamlconf /home/jim/ZC706B/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/device-tree/xilinx-v2021.1+gitAUTOINC+252758eb1f-r0/device-tree.yaml
    INFO: [Hsi 55-2053] elapsed time for repository (/home/jim/petalinux/2021.1/tools/xsct/data/embeddedsw) loading 0 seconds
    WARNING: Interrupt pin "gps_pps_irq" of IP block: "axi_ad9361_0" is not connected to any interrupt controller

    WARNING: Clock pin "clk" of IP block "axi_ad9361_0" is not connected to any of the pl_clk"

    WARNING: Interrupt pin "gps_pps_irq" of IP block: "axi_ad9361_1" is not connected to any interrupt controller

    WARNING: Clock pin "clk" of IP block "axi_ad9361_1" is not connected to any of the pl_clk"

    WARNING: Clock pin "fifo_wr_clk" of IP block "axi_ad9361_adc_dma" is not connected to any of the pl_clk"

    WARNING: Clock pin "m_axis_aclk" of IP block "axi_ad9361_dac_dma" is not connected to any of the pl_clk"

    WARNING: Clock pin "reference_clk" of IP block "axi_hdmi_core" is not connected to any of the pl_clk"

    WARNING: no s_axi_aclk for clockwizard IP block: " sys_audio_clkgen"

    WARNING: Clock pin "spdif_data_clk" of IP block "axi_spdif_tx_core" is not connected to any of the pl_clk"

    zocl:false
    ext_platform:
    hsi::generate_target: Time (s): cpu = 00:00:11 ; elapsed = 00:00:12 . Memory (MB): peak = 2022.102 ; gain = 0.000 ; free physical = 1210 ; free virtual = 18722
    INFO: [Hsi 55-2053] elapsed time for repository (/home/jim/petalinux/2021.1/tools/xsct/data/embeddedsw) loading 0 seconds
    WARNING: exit code 1 from a shell command.

    ERROR: Logfile of failure stored in: /home/jim/ZC706B/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/device-tree/xilinx-v2021.1+gitAUTOINC+252758eb1f-r0/temp/log.do_configure.24835
    ERROR: Task (/home/jim/ZC706B/components/yocto/layers/meta-xilinx/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bb:do_configure) failed with exit code '1'
    NOTE: Tasks Summary: Attempted 3462 tasks of which 2786 didn't need to be rerun and 1 failed.

    Summary: 1 task failed:
    /home/jim/ZC706B/components/yocto/layers/meta-xilinx/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bb:do_configure
    Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
    ERROR: Failed to build project. Check the /home/jim/ZC706B/build/build.log file for more details...

    This is nuts!

  • Hi,

    ERROR: device-tree-xilinx-v2021.1+gitAUTOINC+252758eb1f-r0 do_configure: Error: Could not find "pl-delete-nodes-/home/jim/Documents/Devicetree/zynq-zc706-adv7511-ad9361-fmcomms5.dts.dtsi"

    This is nok... The file should be pl-delete-nodes-zynq-zc706-adv7511-ad9361-fmcomms5.dtsi. You need to make sure to properly set DTB_FILE since the pl-delete-nodes file depends on it.

    - Nuno Sá 

  • Hello Nuno,

    As specified in the instructions at meta-adi/README.md at master · analogdevicesinc/meta-adi · GitHub

    I have executed the command:

    echo "KERNEL_DTB=\"/home/jim/Documents/Devicetree/zynq-zc706-adv7511-ad9361-fmcomms5.dts\"" >> project-spec/meta-user/conf/petalinuxbsp.conf

    The file "pl-delete-nodes-zynq-zc706-adv7511-ad9351-fmcomms5.dtsi" is also in that directory. I believe I'm setting KERNEL_DTB correctly, or I would get the warning that KERNEL_DTB wasn't set (which I have seen before).

    Neither file has been altered from that provided by ADI. Yet the build doesn't work, which helps to explain why any changes I make to the ADI HDL Reference Design won't work either.

    Jim