Tools: PetaLinux/Vivado 2022.1
I have built an image with Pynq and jupyter-notebook on it. The image has no display device.
The build succeeds but invoking pynq throws an error.
When I import pynq into python, I throw a boost exception.
ERROR: Unknown command: ‘dump’
terminate called after throwing an instance of ‘boost::filesystem::filesystem_error’
what(): boost::filesystem::directory_iterator::construct: No such file or directory: “/dev/dri/by-path/”
(The same occurs if I explicitly run /usr/bin/pynq)
From what I can tell, this indicates that I do not have the Direct Rendering Infrastructure installed.
I have tried to import the mesa and wayland packages but I never see the /dev/dri path instantiate.
Any ideas as to what packages install this?
Do I need to have a graphics device defined for this?
(I currently have no display port in this build.)
Could you share your .spec file that you used to generate the image? And what version of PYNQ are you using?
The /dev/dri/by-path directory is related to the zocl driver, it is responsible for accelerator memory allocation (kinda like OpenCL), which is why it appears in the path usually associated with graphics cards.
My guess is your .spec is either missing the xrt package or there’s some version mismatch between pynq and xrt.
I am running Pynq 2.5.1.
I am building pynq by adding
IMAGE_INSTALL:append = " python3-pynq "
IMAGE_INSTALL:append = " python3-pynq-notebooks "
IMAGE_INSTALL:append = " pynq-overlay "
into my petalinux image. (Along a with a number of other python3 recipes.)
This builds fine but is obviously less than the whole solution. I have not done any customization to the image that gets built via Yocto in so obviously I am missing something. (I was not aware of Pynq’s need for the HW definition file.)
I have found the petalinux section in the “Python Productivity for Zynq (Pynq)” manual. I need to read through it and determine what I need to add to my build. At that time I may come back with more questions.
Until that time, it’s RTFM.
I’m curious what is the reason you want to use the pure petalinux flow instead of using a prebuilt ZCU208 PYNQ image?
I don’t believe PYNQ v2.5.1 has been verified with the latest version of petalinux (2022.1), you might run into weird xrt/zocl version issues, which could explain one of the errors you gave in the original post:
ERROR: Unknown command: ‘dump’.
one reason this could be happening could be because v2.5.1 pynq is using the old way of finding the xrt version – with
xbutil dump, which has been deprecated in later releases of XRT. If you are using petalinux 2022.1 it could be that the newer xrt version and zocl driver are being compiled.
You might also have zocl available as a loadable kernel module, but for whatever reason it hasn’t been loaded, in which case you could try to run
and see if that fixes some of the errors.