Note: this git clone should not be on nfs.
Dependencies: Vivado 2022.1 and petalinux 2022.1
-
git clone https://github.com/Xilinx/PYNQ.git
-
cd PYNQ
-
cd sdbuild/scripts
-
./setup_host.sh
-
source /opt/tools/petalinux/settings.sh
-
source /tools/xilinx/Vivado/2022.1/settings64.sh
-
download zcu102 bsp file from https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/embedded-design-tools/archive.html
-
cd ../../
-
cp -rf ./boards/ZCU104 ./boards/ZCU102
-
rm -rf ./boards/ZCU102/petalinux_bsp/
-
mv ~/Downloads/xilinx-zcu102-v2022.1-final.bsp ./boards/ZCU102/
-
mv ./boards/ZCU104/ZCU104.spec ./boards/ZCU102/ZCU102.spec
-
vim ./boards/ZCU102/ZCU102.spec
-
modify the content as follows:
ARCH_ZCU102 := aarch64 BSP_ZCU102 := xilinx-zcu102-v2022.1-final.bspFPGA_MANAGER_ZCU104 := 1
STAGE4_PACKAGES_ZCU102 := xrt pynq ethernet sensorconf boot_leds pynq_peripherals\
-
Download the ROOTFS and Pynq prebuilt source distribution from https://www.pynq.io/boards.html
move this file to PYNQ/sdbuild/prebuilt/pynq_rootfs.aarch64.tar.gz
and the sdist file to PYNQ/sdbuild/prebuilt/pynq_sdist.tar.gz
make sure the names of the files are rename to pynq_rootfs.aarch64.tar.gz and pynq_sdist.tar.gz -
cd PYNQ/sdbuild
-
make BOARDS=ZCU102
-
This will give an pynq image named ZCU102.img in the sdbuild/output directory.
-
Now to write this image onto the sd card:
check where the sd card is mounted using:
df -T and check the partition name -
Use this command to write onto the sd card the /dev/sdb (should be without number):
sudo dd bs=1M if=ZCU102.img of=/dev/sdb
For Starting the XVC server onto the board put this in your jupyter notebook:
from pynq.lib.debugbridge import DebugBridge from pynqutils.runtime.repr_dict import ReprDict
bridge_desc = ReprDict(ol.ip_dict["debug_bridge_0"]) # ol is the Overlay bridge = DebugBridge(bridge_desc) bridge.start_xvc_server(bufferLen=4096, serverAddress="0.0.0.0", serverPort=2542, reconnect=True, verbose=True)
Stopping the server:
bridge.stop_xvc_server()