Skip to content

Instantly share code, notes, and snippets.

@shtaxxx
Last active September 8, 2020 15:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shtaxxx/0a7819771058d287443b1c58d8ec3762 to your computer and use it in GitHub Desktop.
Save shtaxxx/0a7819771058d287443b1c58d8ec3762 to your computer and use it in GitHub Desktop.
Boot files for PYNQ on Ultra96-V2

How to rebuild boot files for PYNQ on Ultra96-V2

Attached the two pre-rebuilt files here.

  • BOOT.BIN
  • 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 https://github.com/Xilinx/PYNQ.git
git clone https://github.com/Avnet/Ultra96-PYNQ.git

Change the branches to "image_v2.5".

cd PYNQ
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 setup_host.sh script.

source /opt/Xilinx/SDK/2019.1/settings64.sh
source /opt/Xilinx/petalinux/2019.1/settings.sh
cd PYNQ/sdbuild
bash scripts/setup_host.sh

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.

CONFIG_CMA_SIZE_MBYTES=512

Rebuild

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/settings64.sh
source /opt/Xilinx/petalinux/2019.1/settings.sh
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