PetaLinux
PetaLinux can be built for these reference designs by using the Makefile in the PetaLinux directory
of the repository.
Requirements
To build the PetaLinux projects, you will need a physical or virtual machine running one of the supported Linux distributions as well as the Vitis Core Development Kit installed.
Attention
You cannot build the PetaLinux projects in the Windows operating system. Windows users are advised to use a Linux virtual machine to build the PetaLinux projects.
How to build
From a command terminal, clone the Git repository and
cdinto it.git clone https://github.com/fpgadeveloper/fpga-drive-aximm-pcie.git cd fpga-drive-aximm-pcie
Launch PetaLinux by sourcing the
settings.shbash script, eg:source <path-to-petalinux-install>/2025.2/settings.sh
Launch Vivado by sourcing the
settings64.shbash script, eg:source <path-to-xilinx-tools>/2025.2/Vivado/settings64.sh
Build the Vivado and PetaLinux project for your specific target platform by running the following commands and replacing
<target>with one of the target design labels found in the build instructions.cd PetaLinux make petalinux TARGET=<target>
The last command will launch the build process for the corresponding Vivado project if that project has not already been built and it’s hardware exported.
Boot from SD card
These instructions only apply to the target boards that allow booting from SD card. This includes all Zynq-7000 boards, Zynq UltraScale+ boards and Zynq RFSoC boards.
Prepare the SD card
Once the build process is complete, you must prepare the SD card for booting PetaLinux.
The SD card must first be prepared with two partitions: one for the boot files and another for the root file system.
Plug the SD card into your computer and find it’s device name using the
dmesgcommand. The SD card should be found at the end of the log, and it’s device name should be something like/dev/sdX, whereXis a letter such as a,b,c,d, etc. Note that you should replace theXin the following instructions.
Warning
Do not continue these steps until you are certain that you have found the correct device name for the SD card. If you use the wrong device name in the following steps, you risk losing data on one of your hard drives.
Run
fdiskby typing the commandsudo fdisk /dev/sdXMake the
bootpartition: typingnto create a new partition, then typepto make it primary, then use the default partition number and first sector. For the last sector, type+1Gto allocate 1GB to this partition.Make the
bootpartition bootable by typingaMake the
rootpartition: typingnto create a new partition, then typepto make it primary, then use the default partition number, first sector and last sector.Save the partition table by typing
wFormat the
bootpartition (FAT32) by typingsudo mkfs.vfat -F 32 -n boot /dev/sdX1Format the
rootpartition (ext4) by typingsudo mkfs.ext4 -L root /dev/sdX2
Copy the following files to the
bootpartition of the SD card: Assuming thebootpartition was mounted to/media/user/boot, follow these instructions:$ cd /media/user/boot/ $ sudo cp /<petalinux-project>/images/linux/BOOT.BIN . $ sudo cp /<petalinux-project>/images/linux/boot.scr . $ sudo cp /<petalinux-project>/images/linux/image.ub .
Create the root file system by extracting the
rootfs.tar.gzfile to therootpartition. Assuming therootpartition was mounted to/media/user/root, follow these instructions:$ cd /media/user/root/ $ sudo cp /<petalinux-project>/images/linux/rootfs.tar.gz . $ sudo tar xvf rootfs.tar.gz -C . $ sync
Once the
synccommand returns, you will be able to eject the SD card from the machine.
Boot PetaLinux
Plug the SD card into your target board.
Ensure that the target board is configured to boot from SD card:
PicoZed: DIP switch SW1 (on the SoM) is set to 11 (1=ON,2=ON)
ZC706: DIP switch SW11 must be set to 00110 (1=OFF,2=OFF,3=ON,4=ON,5=OFF)
UltraZed-EV: DIP switch SW2 (on the SoM) is set to 1000 (1=ON,2=OFF,3=OFF,4=OFF)
ZCU10x: DIP switch SW6 must be set to 1000 (1=ON,2=OFF,3=OFF,4=OFF)
ZCU111: DIP switch SW6 must be set to 1000 (1=ON,2=OFF,3=OFF,4=OFF)
ZCU208: DIP switch SW2 must be set to 1000 (1=ON,2=OFF,3=OFF,4=OFF)
Connect one or more M.2 NVMe PCIe SSDs to the FPGA Drive FMC Gen4. Connect the FPGA Drive FMC Gen4 to the FMC connector of the target board.
Connect the USB-UART to your PC and then open a UART terminal set to 115200 baud and the comport that corresponds to your target board.
Connect and power your hardware.
Boot via JTAG
Tip
You need to install the cable drivers before being able to boot via JTAG. Note that the Vitis installer does not automatically install the cable drivers, it must be done separately. For instructions, read section installing the cable drivers from the Vivado release notes.
Warning
If you boot the Zynq-7000, Zynq UltraScale+ or Zynq RFSoC designs via JTAG, you must still
first prepare the SD card. The reason is because these designs are configured to use the SD card to store
the root filesystem. If you boot these designs via JTAG without preparing and connecting the SD card, the
boot will hang during at a message similar to this: Waiting for root device /dev/mmcblk0p2...
Setup hardware
If you are using a Zynq-7000, Zynq UltraScale+ or Zynq RFSoC board, prepare the SD card according to the instructions above and plug the SD card into your target board.
Ensure that the target board is configured to boot from JTAG:
KC705: DIP switch SW13 must be set to xx101 (1-2=DONTCARE,3=ON,4=OFF,5=ON)
KCU105: DIP switch SW15 must be set to xxxx01 (1-4=DONTCARE,5=OFF,6=ON)
VCU118: DIP switch SW16 must be set to x101 (1=DONTCARE,2=ON,3=OFF,4=ON)
PicoZed: DIP switch SW1 (on the SoM) is set to 00 (1=OFF,2=OFF)
ZC706: DIP switch SW11 must be set to 00000 (1=OFF,2=OFF,3=OFF,4=OFF,5=OFF)
UltraZed-EV: DIP switch SW2 (on the SoM) is set to 1111 (1=ON,2=ON,3=ON,4=ON)
ZCU10x: DIP switch SW6 must be set to 1111 (1=ON,2=ON,3=ON,4=ON)
ZCU111: DIP switch SW6 must be set to 1111 (1=ON,2=ON,3=ON,4=ON)
ZCU208: DIP switch SW2 must be set to 1111 (1=ON,2=ON,3=ON,4=ON)
Connect one or more M.2 NVMe PCIe SSDs to the FPGA Drive FMC Gen4. Connect the FPGA Drive FMC Gen4 to the FMC connector of the target board. Instructions for doing this can be found in the Getting started guide.
Connect the USB-UART to your PC and then open a UART terminal set to 115200 baud and the comport that corresponds to your target board.
Connect and power your hardware.
Boot PetaLinux
To boot PetaLinux on hardware via JTAG, use the following commands in a Linux command terminal:
Change current directory to the PetaLinux project directory for your target design:
cd <project-dir>/PetaLinux/<target>
Download bitstream to the FPGA:
petalinux-boot --jtag --kernel --fpga
An explanation of the above command is provided by the petalinux-boot command:
For microblaze, it will download the bitstream to target board, and
then boot the kernel image on target board.
For Zynq, it will download the bitstream and FSBL to target board,
and then boot the u-boot and then the kernel on target
board.
For Zynq UltraScale+, it will download the bitstream, PMUFW and FSBL,
and then boot the kernel with help of linux-boot.elf to set kernel
start and dtb addresses.
UART terminal
You will need to setup a terminal emulator to use the PetaLinux command line over the USB-UART connection. Connect with a baud rate of 115200.
In Windows
You will need to find the comport for the USB-UART in Windows Device Manager. As a terminal emulator, you can use the open source and free Putty.
In Linux
In Linux, you can find the USB-UART device by running dmesg | grep tty. Typically, the device will be
/dev/ttyUSB0 or it could be followed by a different number. To open a terminal emulator, you can use
the following command:
sudo screen /dev/ttyUSB0 115200
Setup the NVMe SSD in PetaLinux
Log into PetaLinux using the username
petalinux. On the first time you boot, you will be forced to choose a password for this user. The password you choose will be required on all future boots, so choose a password that you will remember.Check that the SSD has been enumerated using:
lspci. Without any arguments, you get the output as shown in the image below. Use the-vvargument, to get a more detailed output with the link speed, number of lanes used, etc.
Use lsblk to make sure that the SSD has been recognized as a block device:
lsblk.
Run fdisk to create a partition on the SSD:
fdisk /dev/nvme0n1.
Type these options in fdisk:
Type
nto create a new partitionThen type
p, then1to create a new primary partitionUse the defaults for the sector numbers
Then type
wto write the data to the disk

Get the name of the partition created by running
lsblkagain. In the example below, it isnvme0n1p1.
Create a file system on the new partition using:
mkfs -t ext2 /dev/nvme0n1p1.
After a reboot, systemd auto-mounts the new partition under
/run/media/nvme0n1p1. For example, on a dual-SSD board you’ll see:uzev-fpgadrv-2025-2:~$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS ... nvme0n1 259:0 0 931.5G 0 disk `-nvme0n1p1 259:2 0 931.5G 0 part /run/media/nvme0n1p1 nvme1n1 259:1 0 931.5G 0 disk `-nvme1n1p1 259:3 0 931.5G 0 part /run/media/nvme1n1p1
If you want to mount the SSD in the same session in which you formatted it (without rebooting), do it manually:
mkdir -p /media/nvme mount /dev/nvme0n1p1 /media/nvme
From this point you will be able to access the SSD from the Linux command line. You should be able to copy files to the mount point, create new files, delete files and use all the disk tools that are available in the PetaLinux build.
Patches and Known Issues
For a full description of each patch applied on top of the stock AMD BSPs, see advanced.