Skip to content

Instantly share code, notes, and snippets.

Last active September 8, 2020 15:27
What would you like to do?
Boot files for PYNQ on Ultra96-V2

How to rebuild boot files for PYNQ on Ultra96-V2

Attached the two pre-rebuilt files here.

  • image.ub

Install Petalinux and Vivado SDK.

Download Petalinux and Vivado SDK and install them.

Clone the repositories of PYNQ and Ultra96-PYNQ

mkdir build_pynq_ultra96v2
cd build_pynq_ultra96v2
git clone
git clone

Change the branches to "image_v2.5".

git checkout image_v2.5
cd ../
cd Ultra96-PYNQ
git checkout image_v2.5

Setup the build environment

Install some required softwares by using the script.

source /opt/Xilinx/SDK/2019.1/
source /opt/Xilinx/petalinux/2019.1/
cd PYNQ/sdbuild
bash scripts/

Modify the build script

Edit "CONFIG_CMA_SIZE_MBYTES=128" in "PYNQ/sdbuild/boot/meta-pynq/recipes-kernel/linux/linux-xlnx/pynq.cfg". In this example, the CMA size is increased to 512MB.



At "PYNQ/sdbuild/sdbuild", do "make boot_files" to update the boot files. Note that the "Ultra96-PYNQ" location must be correctly specified via the "BOARDDIR" option.

source /opt/Xilinx/SDK/2019.1/
source /opt/Xilinx/petalinux/2019.1/
export PATH=/opt/qemu/bin:/opt/crosstool-ng/bin:$PATH
cd PYNQ/sdbuild
make boot_files BOARDDIR=/home/yourname/build_pynq_ultra96v2/Ultra96-PYNQ

You can find two generated files, "BOOT.BIN" and "image.ub" at "PYNQ/sdbuild/output/boot/Ultra96/". Please copy them to the first partition of the SD card with the pre-built SD image.

This file has been truncated, but you can view the full file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment