Error loading bitstream - PYNQ v3.0.1. Zybo-010


I’ve just created a custom PYNQ v3.0.1 image for Zybo-010 and I’ve found some troubles programing the FPGA with a .xsa file.

In particular, the following piece of code:

from pynq import Overlay
overlay = Overlay("design_1_wrapper.xsa")

The result is:

/usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/pl_server/ UserWarning: No devices found, is the XRT environment sourced?

More information about the image:

  1. The image has been created with the from PYNQ repository and I’ve used the v3.0.1 agnostic rootfs and distribution files.

  2. Moreover, I’ve tested what devices are detected by the xbutil and the results are:

root@pynq:/home/xilinx# xbutil examine
System Configuration
  OS Name              : Linux
  Release              : 5.15.19-xilinx-v2022.1
  Version              : #1 SMP PREEMPT Mon Apr 11 17:52:14 UTC 2022
  Machine              : armv7l
  CPU Cores            : 2
  Memory               : 1000 MB
  Distribution         : PynqLinux, based on Ubuntu 22.04
  GLIBC                : 2.35
  Model                : unknown

  Version              : 2.13.0
  Branch               : temp
  Hash                 : f5505e402c2ca1ffe45eb6d3a9399b23a0dc8776
  Hash Date            : 2022-10-21 17:40:17
  ZOCL                 : 2.13.0, f5505e402c2ca1ffe45eb6d3a9399b23a0dc8776

Devices present
  0 devices found
BDF  :  Shell  Platform UUID  Device ID  Device Ready* 
  1. Nonetheless, if I export the variable XILINX_XRT (as read on the forum) before executing the previous Python code from the terminal:
export XILINX_XRT=/usr

The FPGA is programmed but the following error is shown:

XRT build version: 2.13.0
Build hash: f5505e402c2ca1ffe45eb6d3a9399b23a0dc8776
Build date: 2022-10-21 17:40:17
Git branch: temp
PID: 899
UID: 0
[Sat Mar  4 01:04:01 2023 GMT]
EXE: /usr/bin/python3.10
[XRT] ERROR: boost::filesystem::directory_iterator::construct: No such file or directory: "/dev/dri/by-path/"
[XRT] ERROR: boost::filesystem::directory_iterator::construct: No such file or directory: "/dev/dri/by-path/"
Load Xclbin Failed
Traceback (most recent call last):
  File "/home/xilinx/jupyter_notebooks/debug/", line 8, in <module>
    overlay = Overlay("design_1_wrapper.xsa")
  File "/usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/", line 348, in __init__
  File "/usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/", line 428, in download
  File "/usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/", line 168, in download, parser)
  File "/usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/pl_server/", line 686, in download
  File "/usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/pl_server/", line 529, in _xrt_download
    raise RuntimeError(
RuntimeError: Programming Device failed: ENODEV (19) No such device

I’d appreciate any piece of advice. Thanks!!


Hi Dave,

What branch of the PYNQ repo did you use to build the image? I don’t think works in 3.0.1, which makes me think you might be using an earlier pynq sdbuild version.

In pynq 3.0 we split xrt and zocl into 2 separate packages, xrt library files now live in the agnostic image (which is why you can still use xbutil), but the zocl driver files get generated during the petalinux build and copied onto your rootfs during image generation (if the xrt package is included in your .spec file). The missing “/dev/dri/by-path/” directories hint that you are missing the zocl driver files.

I would generate new images from the latest pynq branch, using make, e.g.

make BOARDDIR=/path/to/your/board/folder PYNQ_SDIST=/path/to/pynq_sdist.tar.gz PYNQ_ROOTFS=/path/to/pynq_rootfs.arm.tar.gz


Hi Shawn,

Indeed, the script doesn’t work as is with v3.0.1. However, if you put the agnostic rootfs and the distribution files in PYNQ/sdbuild/prebuilt the script generates the faulty image I’ve working with so far.

So I generated the image as you said and it’s working now, thank you!!

Just to clarify, you can have several custom specification boards in your board folder. Every spec must be in a separate folder as it is explained on the PYNQ documentation website. That is:

├── board
│   ├── pynqz2
│   │   ├── pynqz2_uart01.bsp
│   │   └── pynqz2.spec
│   └── zybo010
│       ├── zybo010.spec
│       └── zybo010_uart01_2022.1.bsp

When building a new image you can specify the spec to use by using BOARDS flag, e.g.

make BOARDDIR=/path/to/your/board/folder BOARDS=zybo010 PYNQ_SDIST=/path/to/pynq_sdist.tar.gz PYNQ_ROOTFS=/path/to/pynq_rootfs.arm.tar.gz