Jump to content
  • 0

Petalinux builds failing for Zybo Z7-20 board starting May 1, 2023


mbritton

Question

Hello:

I have been successfully compiling Petalinux for a Zybo Z7-20 board for the past ~6 weeks.  On May 1st the Petalinux kernel build started failing: 

petalinux-build  -c kernel

with the message content

NOTE: Executing Tasks
ERROR: device-tree-xilinx-v2022.1+gitAUTOINC+1b364a44fa-r0 do_compile: Error executing a python function in exec_func_python() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_func_python() autogenerated', lineno: 2, function: <module>
     0001:
 *** 0002:devicetree_do_compile(d)
     0003:
File: '/mnt/2Tb/local/src/zyboZ7/build191/PetaLinux/zyboZ7/components/yocto/layers/core/meta/classes/devicetree.bbclass', lineno: 131, function: devicetree_do_compile
     0127:            if not(os.path.isfile(dtspath)) or not(dts.endswith(".dts") or devicetree_source_is_overlay(dtspath)):
     0128:                continue # skip non-.dts files and non-overlay files
     0129:        except:
     0130:            continue # skip if can't determine if overlay
 *** 0131:        devicetree_compile(dtspath, includes, d)
     0132:}
     0133:
     0134:devicetree_do_install() {
     0135:    for DTB_FILE in `ls *.dtb *.dtbo`; do
File: '/mnt/2Tb/local/src/zyboZ7/build191/PetaLinux/zyboZ7/components/yocto/layers/core/meta/classes/devicetree.bbclass', lineno: 119, function: devicetree_compile
     0115:        dtcargs += ["-i", i]
     0116:    dtcargs += ["-o", "{0}.{1}".format(dtname, "dtbo" if isoverlay else "dtb")]
     0117:    dtcargs += ["-I", "dts", "-O", "dtb", "{0}.pp".format(dts)]
     0118:    bb.note("Running {0}".format(" ".join(dtcargs)))
 *** 0119:    subprocess.run(dtcargs, check = True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
     0120:
     0121:python devicetree_do_compile() {
     0122:    includes = expand_includes("DT_INCLUDE", d)
     0123:    listpath = d.getVar("DT_FILES_PATH")
File: '/mnt/2Tb/tools/Xilinx/PetaLinux/2022.1/components/yocto/buildtools/sysroots/x86_64-petalinux-linux/usr/lib/python3.9/subprocess.py', lineno: 528, function: run
     0524:            # We don't call process.wait() as .__exit__ does that for us.
     0525:            raise
     0526:        retcode = process.poll()
     0527:        if check and retcode:
 *** 0528:            raise CalledProcessError(retcode, process.args,
     0529:                                     output=stdout, stderr=stderr)
     0530:    return CompletedProcess(process.args, retcode, stdout, stderr)
     0531:
     0532:
Exception: subprocess.CalledProcessError: Command '['dtc', '-@', '-p', '0x1000', '-@', '-i', '/mnt/2Tb/local/src/zyboZ7/build191/PetaLinux/zyboZ7/build/tmp/work-shared/zynq-generic/kernel-source/arch/arm/boot/dts', '-i', '/mnt/2Tb/local/src/zyboZ7/build191/PetaLinux/zyboZ7/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/device-tree/xilinx-v2022.1+gitAUTOINC+1b364a44fa-r0', '-i', '/mnt/2Tb/local/src/zyboZ7/build191/PetaLinux/zyboZ7/project-spec/configs/../../components/plnx_workspace/device-tree/device-tree', '-i', '/mnt/2Tb/local/src/zyboZ7/build191/PetaLinux/zyboZ7/build/tmp/work-shared/zynq-generic/kernel-source/scripts/dtc/include-prefixes', '-i', '/mnt/2Tb/local/src/zyboZ7/build191/PetaLinux/zyboZ7/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/device-tree/xilinx-v2022.1+gitAUTOINC+1b364a44fa-r0/git/device_tree/data/kernel_dtsi/2022.1/BOARD/', '-o', 'system-top.dtb', '-I', 'dts', '-O', 'dtb', 'system-top.dts.pp']' returned non-zero exit status 2.

Subprocess output:
/mnt/2Tb/local/src/zyboZ7/build191/PetaLinux/zyboZ7/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/device-tree/xilinx-v2022.1+gitAUTOINC+1b364a44fa-r0/system-user.dtsi:80.26-84.9: ERROR (phandle_references): /dma_smm_asymmetric: Reference to non-existent node or label "axi_dma_0"

/mnt/2Tb/local/src/zyboZ7/build191/PetaLinux/zyboZ7/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/device-tree/xilinx-v2022.1+gitAUTOINC+1b364a44fa-r0/system-user.dtsi:80.26-84.9: ERROR (phandle_references): /dma_smm_asymmetric: Reference to non-existent node or label "axi_dma_0"

/mnt/2Tb/local/src/zyboZ7/build191/PetaLinux/zyboZ7/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/device-tree/xilinx-v2022.1+gitAUTOINC+1b364a44fa-r0/system-user.dtsi:80.26-84.9: ERROR (phandle_references): /dma_smm_asymmetric: Reference to non-existent node or label "axi_dma_1"

/mnt/2Tb/local/src/zyboZ7/build191/PetaLinux/zyboZ7/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/device-tree/xilinx-v2022.1+gitAUTOINC+1b364a44fa-r0/system-user.dtsi:80.26-84.9: ERROR (phandle_references): /dma_smm_asymmetric: Reference to non-existent node or label "axi_dma_1"

ERROR: Input tree has errors, aborting (use -f to force output)

ERROR: Logfile of failure stored in: /mnt/2Tb/local/src/zyboZ7/build191/PetaLinux/zyboZ7/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/device-tree/xilinx-v2022.1+gitAUTOINC+1b364a44fa-r0/temp/log.do_compile.1592130
ERROR: Task (/mnt/2Tb/local/src/zyboZ7/build191/PetaLinux/zyboZ7/components/yocto/layers/meta-xilinx/meta-xilinx-core/recipes-bsp/device-tree/device-tree.bb:do_compile) failed with exit code '1'

 

After tracing the problem, I found that the Petalinux/yocto build system had started making a new directory containing board-specific dtsi files.  On my system, the directory is

/mnt/2Tb/local/src/zyboZ7/build191/PetaLinux/zyboZ7/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/device-tree/xilinx-v2022.1+gitAUTOINC+1b364a44fa-r0/git/device_tree/data/kernel_dtsi/2022.1/BOARD/

and the directory contains a dtsi file for many types of boards.  For example,

zc702.dtsi
zc706.dtsi
zcu100-reva.dtsi
zcu100-revb.dtsi
zcu100-revc.dtsi
zcu102-rev1.0.dtsi
zcu102-reva.dtsi
zcu102-revb.dtsi
zcu104-reva.dtsi

 

The Zybo Z7-20 does not seem to me to have a dtsi file.

Can you pls advise on how to get a petalinux build for the Zybo z7-20 board to succeed?

 

Many thanks

Matthew

 

 

 

 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

I don't have a great answer for you as I don't do a lot of Linux builds using Linux tools for ZYNQ platforms.

I do know that you have the option of downloading extra support packages like BSPs and sstate-cache Artifacts. Personally, I am loathe to do development that requires on-line access to current resources; partly for just the situation that you appear to have run into where things change and go missing. I do this kind of development on a PC that normally doesn't have internet access. I'm posting this as a potential route of investigation that might cause you to re-evaluate your development processes. Every road to a terminal point has pros and cons to consider. It's about control and time management. If your tool controls your project in a way that suits you and saves time then that's great. I haven't found that to be the case in general.

Edited by zygot
Link to comment
Share on other sites

  • 0

Zygot:


Thank you for sharing your thoughts. 

My response is to note that the Zybo Z7 board is advertised as supporting Petalinux.  To build the Petalinux kernel requires the Yocto package manager to retrieve the packages at least once over the internet.  After retrieving the packages, one could adopt your perspective of not relying on internet access to update the Petalinux kernel via Yocto package manager.  However, package download does need to work over the internet at least once, I think.

 

As I understand it and have implemented it, the Petalinux build procedure requires a configuration step via petalinux-config that takes the board support package as an argument.  Then one runs petalinux-build -c kernel to build the kernel.  I think this second step fails because of a missing .dtsi file for the Zybo Z7 board that should come from the package manager.  There may have been some upgrade of the package manager that implemented a new directory structure, and Digilent hasn't yet adhered to the new standard.  (I'm speculating here).

Regardless, right now I cannot build the Petalinux kernel using the commands that worked for me last week.

 

Just my thoughts... pls share your own

 

Many thanks

Matthew

Link to comment
Share on other sites

  • 0
17 minutes ago, mbritton said:

package download does need to work over the internet at least once

You may well be correct about this, It's been a while since I've done this, and it was for a Xilinx board, the ZCU106.

18 minutes ago, mbritton said:

Regardless, right now I cannot build the Petalinux kernel using the commands that worked for me last week

Yeah, that's what's bothering me. I'd expect that this shouldn't happen, unless you are updating or changing something. Sorry, I'm out of my league on this one. Hopefully, someone from Digilent who does this regularly will have something more useful to report.

Link to comment
Share on other sites

  • 0
 Subprocess output:
/mnt/2Tb/local/src/zyboZ7/build191/PetaLinux/zyboZ7/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/device-tree/xilinx-v2022.1+gitAUTOINC+1b364a44fa-r0/system-user.dtsi:80.26-84.9: ERROR (phandle_references): /dma_smm_asymmetric: Reference to non-existent node or label "axi_dma_0"

/mnt/2Tb/local/src/zyboZ7/build191/PetaLinux/zyboZ7/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/device-tree/xilinx-v2022.1+gitAUTOINC+1b364a44fa-r0/system-user.dtsi:80.26-84.9: ERROR (phandle_references): /dma_smm_asymmetric: Reference to non-existent node or label "axi_dma_0"

/mnt/2Tb/local/src/zyboZ7/build191/PetaLinux/zyboZ7/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/device-tree/xilinx-v2022.1+gitAUTOINC+1b364a44fa-r0/system-user.dtsi:80.26-84.9: ERROR (phandle_references): /dma_smm_asymmetric: Reference to non-existent node or label "axi_dma_1"

/mnt/2Tb/local/src/zyboZ7/build191/PetaLinux/zyboZ7/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/device-tree/xilinx-v2022.1+gitAUTOINC+1b364a44fa-r0/system-user.dtsi:80.26-84.9: ERROR (phandle_references): /dma_smm_asymmetric: Reference to non-existent node or label "axi_dma_1" 

You have made changes to the design (xsa) wich leads to changes in pl.dtsi file. This took place after issuing `petalinux-config --get-hw-description` leading to removal of axi_dma_0 and axi_dma_1 nodes. In system-user.dtsi those exact node are referred leading to a device tree compilation error.
If you did not do any changes to xsa then a clean build should solve this issue. (rm -rf  build components && petaliunx-build).

You may want to avoid removing build/download directory by moving it to a different path and make a symlink to it in build directrory after issuing petalinux-config --silent(creates the build directory).

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...