1. Host Setup & Vivado Preparation
This page covers everything you need to do before starting the PetaLinux project itself. It’s the one-time setup for your development machine and the hardware definition from Vivado.
Setting Up the Build Host
Your build host is the computer where you will build the PetaLinux project. We recommend using Windows Subsystem for Linux (WSL) with Ubuntu 24.04.
Install WSL and Ubuntu
- Open a Command Prompt or PowerShell window in Windows and install WSL with Ubuntu:
wsl --install ubuntu
- Launch your new Ubuntu distribution:
wsl -d ubuntu
- Upon first launch, it’s a good practice to update and upgrade the system packages:
sudo apt update && sudo apt upgrade
Install PetaLinux Tools
- Download the PetaLinux environment setup script (
plnx-env-setup.sh
) from the AMD/Xilinx support website. This script will help install all the required dependencies. - Create a directory for the PetaLinux tools:
mkdir -p ~/petalinux-tools
- Download and install the PetaLinux tools installer from the official Xilinx downloads page into the
~/petalinux-tools
directory. You will need to run the installer withsudo
.
Vivado Hardware Configuration
Before creating the PetaLinux project, you need a hardware definition file (.xsa
) exported from Vivado.
Processing System Configuration
In your Vivado project, ensure that the Zynq Processing System is configured correctly:
- Interfaces: The Ethernet, USB0, and UART1 interfaces must be configured exactly as they are in a default Digilent Zybo project.
- MIO & Clocks: All MIO (Multiplexed I/O) and clock configurations should be identical to the Zybo defaults.
Generate Bitstream and Export Hardware
- In Vivado, run synthesis and implementation to generate the bitstream.
- Go to
File > Export > Export Hardware
. Make sure to include the bitstream in the exported hardware file. - Copy the generated
.xsa
file to your~/petalinux-tools
directory on the build host.