Yocto/Petalinux Project with PYNQ 2.7 on Aldec TySOM-3-ZU7EV

Hello, I am trying to migrate a previous Yocto project/layer I was working with to support the Aldec TySOM-3-ZU7EV development board, but I am having issues upgrading the meta-xilinx-pynq layer from 2.5.1 to 2.7.

Aldec does provide a pre-built image with PYNQ2.7 support, but I would like to integrate the PYNQ workflow (if possible) into a custom Yocto/Petalinux image that uses the bitbake layer(s) I have been working with.

I was able to build a Yocto petalinux-image-minimal with the PYNQ 2.5.1 recipe provided in the meta-xilinx-pynq layer, but when I try to modify the recipes to target the 2.7 release, the Yocto build fails.

Here’s what I have done so far. I understand this is technically not the proper way to do this with Yocto and should be done with *.bbappend’s which I plan to do when this is completed.

  • Modified ‘libcma_1.0.bb’ in meta-xilinx-pynq/recipes-support/libcma to update the SRCREV to the proper hash for the 2.7 release.
  • Modified ‘python-pynq.inc’ in meta-xilinx-pynq/recipes-devtool/python/ to update the SRC_URI hashes for the 2.7 release
  • Updated ‘0003-Use-sysroot-for-Displayport-library.patch’ to work with the 2.7 release
    • This was done to resolve a Yocto QA issue that complains about libdrm. I do not recall the exact issue.

The build produces the following errors. This has been snipped for brevity as there are quite a bit. Arduino, RPI, logictools and pmod are present in the errors.

python3-pynq-2.7.0-r0 do_package_qa: QA Issue: Architecture did not match (Unknown (189), expected AArch64) on /work/aarch64-xilinx-linux/python3-pynq/2.7.0-r0/packages-split/python3-pynq/usr/lib/python3.7/site-packages/pynq/lib/arduino/bsp_iop_arduino/iop_arduino_mb/lib/xtmrctr_selftest.o
Architecture did not match (Unknown (189), expected AArch64) on /work/aarch64-xilinx-linux/python3-pynq/2.7.0-r0/packages-split/python3-pynq/usr/lib/python3.7/site-packages/pynq/lib/arduino/bsp_iop_arduino/iop_arduino_mb/lib/microblaze_flush_cache_ext.o
Architecture did not match (Unknown (189), expected AArch64) on /work/aarch64-xilinx-linux/python3-pynq/2.7.0-r0/packages-split/python3-pynq/usr/lib/python3.7/site-packages/pynq/lib/arduino/bsp_iop_arduino/iop_arduino_mb/lib/microblaze_flush_dcache.o
Architecture did not match (Unknown (189), expected AArch64) on /work/aarch64-xilinx-linux/python3-pynq/2.7.0-r0/packages-split/python3-pynq/usr/lib/python3.7/site-packages/pynq/lib/arduino/bsp_iop_arduino/iop_arduino_mb/lib/xil_testmem.o
Architecture did not match (Unknown (189), expected AArch64) on /work/aarch64-xilinx-linux/python3-pynq/2.7.0-r0/packages-split/python3-pynq/usr/lib/python3.7/site-packages/pynq/lib/arduino/bsp_iop_arduino/iop_arduino_mb/lib/microblaze_enable_icache.o

Unknown (189) refers to the Microblaze architecture, which I think is correct(?), so I updated the INSANE_SKIP_${PN} variable to add “arch” to ignore this error which did resolve the errors above, but introduce a new error. Again, quite a lengthy log so it has been trimmed down.

ERROR: petalinux-image-minimal-1.0-r0 do_rootfs: Could not invoke dnf. Command '/tmp/yocto/work/tysom_3_zu7ev-xilinx-linux/petalinux-image-minimal/1.0-r0/recipe-sysroot-native/usr/bin/dnf -v --rpmverbosity=info -y -c /tmp/yocto/work/tysom_3_zu7ev-xilinx-linux/petalinux-image-minimal/1.0-r0/rootfs/etc/dnf/dnf.conf --setopt=reposdir=/tmp/yocto/work/tysom_3_zu7ev-xilinx-linux/petalinux-image-minimal/1.0-r0/rootfs/etc/yum.repos.d --installroot=/tmp/yocto/work/tysom_3_zu7ev-xilinx-linux/petalinux-image-minimal/1.0-r0/rootfs --setopt=logdir=/tmp/yocto/work/tysom_3_zu7ev-xilinx-linux/petalinux-image-minimal/1.0-r0/temp --repofrompath=oe-repo,/tmp/yocto/work/tysom_3_zu7ev-xilinx-linux/petalinux-image-minimal/1.0-r0/oe-rootfs-repo --nogpgcheck install bridge-utils can-utils firmware haveged hellopm kernel-module-hdmi kernel-module-mali kernel-module-vcu kernel-modules mtd-utils openssh-sftp-server packagegroup-core-boot packagegroup-core-ssh-dropbear packagegroup-petalinux-pynq pciutils run-postinsts tcf-agent' returned 1:
DNF version: 4.2.2
cachedir: /tmp/yocto/work/tysom_3_zu7ev-xilinx-linux/petalinux-image-minimal/1.0-r0/rootfs/var/cache/dnf
Added oe-repo repo from /tmp/yocto/work/tysom_3_zu7ev-xilinx-linux/petalinux-image-minimal/1.0-r0/oe-rootfs-repo
repo: using cache for: oe-repo
not found other for: 
not found modules for: 
not found deltainfo for: 
not found updateinfo for: 
oe-repo: using metadata from Tue 11 Oct 2022 08:01:53 PM UTC.
Last metadata expiration check: 0:00:01 ago on Tue 11 Oct 2022 08:01:54 PM UTC.
No module defaults found
--> Starting dependency resolution
---> Package base-files.tysom_3_zu7ev 3.0.14-r89 will be installed
---> Package base-files-lic.tysom_3_zu7ev 3.0.14-r89 will be installed
---> Package base-passwd.aarch64 3.5.29-r0 will be installed
---> Package base-passwd-lic.aarch64 3.5.29-r0 will be installed
<<<SNIP>>>
Transaction Summary
================================================================================
Install  484 Packages

Total size: 85 M
Installed size: 362 M
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Error: Transaction check error:
  file /usr/lib/python3.7/site-packages/tests/__pycache__/__init__.cpython-37.pyc conflicts between attempted installs of python3-pynq-2.7.0-r0.aarch64 and python3-json5-0.9.2-r0.aarch64

Any assistance or guidance would be greatly appreciated. I am open to alternative configurations, but would prefer to stick with Yocto or Petalinux if possible. I am not a PYNQ developer myself and work in the embedded firmware/software realm and would like to have a single image that both myself and the hardware engineers can use.

Thanks,
Andrew

1 Like

Hi there,

The pure petalinux flow is not something I’ve attempted. It could be worth a shot to try the meta-pynq layer from the PYNQ repo itself – that’s the one used in the petalinux flow for sd card images.

Thanks
Shawn

Hi Shawn,

Thanks for the suggestion. I’ll give the meta-pynq layer a shot. I vaguely recall coming across a post saying that the layer was now deprecated and to use the meta-xilinx-pynq layer instead, but may have been for a different use case.

I did manage to resolve the build errors I mentioned in my initial post. It seems that the following added to my local.conf was ultimately the root cause of the build failures

IMAGE_INSTALL_append = " packagegroup-python3-pynq"

I changed it to

IMAGE_INSTALL_append = " python3-pynq python3-pandas"

python3-pandas was added as calling “pynq -v” in the terminal was causing a runtime failure.

With the changes mentioned above, I was able to get the Jupyter server up and running and dropped in a few notebooks to test, but unfortunately I ran into more errors while running the notebooks.

Hopefully the meta-pynq layer resolves this. Not sure when I will be able to try this again, but will follow up when I get the chance.

Thanks,
Andrew

1 Like

I have been attempting to upgrade from PYNQ 2.5.1 to PYNQ 2.7.0 under the PetaLinux 2020.2 environment recently. So far, I have been able to compile successfully, however, when executing the line

ol = Overlay(“design_1.bit”)

in Jupyter Notebook, I encounter a

RuntimeError: No Devices Found

error message. I was wondering if you have come across a similar issue?

1 Like