Hi there!
So I’m trying to install pynq under Ubuntu 20. I tried with the ros:noetic-perception-focal docker image and I also tried with an Ubuntu 20 based image running directly on the Ultra96v2 board.
In both cases running pip3 install pynq (with or without sudo) results in a build error. First it misses xf86drm.h, so I install libdrm-dev with apt, and then on the next run it misses drm.h.
Thank you, this also seems to have helped, now the installation for pynq and pynq-dpu complete, but I’ve got a runtime error while trying to add the dpu notebooks.
$ pynq get-notebooks pynq-dpu -p .
/home/fpga/.local/lib/python3.8/site-packages/pynq/pl_server/device.py:81: UserWarning: No devices found, is the XRT environment sourced?
warnings.warn(
Traceback (most recent call last):
File "/home/fpga/.local/bin/pynq-get-notebooks", line 8, in <module>
sys.exit(main())
File "/home/fpga/.local/lib/python3.8/site-packages/pynq/_cli/get_notebooks.py", line 154, in main
device = _detect_devices(active_only=True)
File "/home/fpga/.local/lib/python3.8/site-packages/pynq/utils.py", line 164, in _detect_devices
raise RuntimeError("No device found in the system")
RuntimeError: No device found in the system
I did some digging in the PYNQ repo and found that export XILINX_XRT=/usr is set as part of the XRT package so I set that variable, but of course it makes no sense if XRT is not installed. I tried to follow the steps in qemu.sh for XRT but when I run build.sh it exits without error instantly but the compiled files are nowhere to be found.
fpga@fpga:~/XRT/build$ time XRT_NATIVE_BUILD=no ./build.sh -dbg
real 0m0.032s
user 0m0.022s
sys 0m0.017s
fpga@fpga:~/XRT/build$ ll
total 84
drwxrwxr-x 3 fpga fpga 4096 Feb 16 07:31 ./
drwxrwxr-x 6 fpga fpga 4096 Feb 16 07:31 ../
-rwxrwxr-x 1 fpga fpga 8150 Feb 16 07:24 board.sh*
-rwxrwxr-x 1 fpga fpga 5061 Feb 16 07:24 build.bat*
-rw-rw-r-- 1 fpga fpga 3486 Feb 16 07:24 builddrv.bat
-rwxrwxr-x 1 fpga fpga 7885 Feb 16 07:31 build_edge.sh*
-rwxr-xr-x 1 fpga fpga 8116 Feb 16 07:31 build.sh*
-rwxrwxr-x 1 fpga fpga 3723 Feb 16 07:24 build-win.sh*
drwxrwxr-x 2 fpga fpga 4096 Feb 16 07:24 checkpatch/
-rwxrwxr-x 1 fpga fpga 487 Feb 16 07:24 checkpatch.sh*
-rwxrwxr-x 1 fpga fpga 2987 Feb 16 07:24 covbuild.sh*
-rwxrwxr-x 1 fpga fpga 5055 Feb 16 07:24 cross_compile.sh*
-rwxrwxr-x 1 fpga fpga 2144 Feb 16 07:24 dbg.sh*
-rw-rw-r-- 1 fpga fpga 95 Feb 16 07:24 petalinux.build
-rwxrwxr-x 1 fpga fpga 3455 Feb 16 07:31 run.sh*
-rw-rw-r-- 1 fpga fpga 403 Feb 16 07:24 toolchain-edge.cmake
I used tag 202020.2.8.743, which is the 2020.2 release, instead of the older one mentioned in the script. Reasoning is that the kernel of my image is also for 2020.2 and I believe it is the version that introduces Ubuntu 20 support.
I’ve no idea what’s going on with XRT - maybe @rock can help?
You have a second issue which is that your kernel or device-tree doesn’t contain the drivers for the /dev/xlnk device. You’ll need to make sure that CONFIG_XILINX_APF is set in your kernel and this fragment is in your device tree.
The output of time XRT_NATIVE_BUILD=no ./build.sh -dbg does not look correct to me. You will need to clear your XRT github repo and redo the build.sh. A correct output should be a long log of cmake build flow, where you can see XRT has been installed by percentage.