Home Blog Blog Details

How to boot Linux on a Xilinx FPGA?

June 27 2025
Ampheo

Inquiry

Global electronic component supplier AMPHEO PTY LTD: Rich inventory for one-stop shopping. Inquire easily, and receive fast, customized solutions and quotes.

QUICK RFQ
ADD TO RFQ LIST
Booting Linux on a Xilinx FPGA involves using a SoC-based FPGA platform like the Zynq-7000 or Versal, which integrates both programmable logic (PL) and a processor system (PS, typically ARM Cortex-A9/A53).

Booting Linux on a Xilinx FPGA involves using a SoC-based FPGA platform like the Zynq-7000 or Versal, which integrates both programmable logic (PL) and a processor system (PS, typically ARM Cortex-A9/A53). Here's a step-by-step overview:

How to boot Linux on a Xilinx FPGA?


Booting Linux on a Xilinx FPGA (e.g., Zynq-7000)


1. Use the Right Hardware

You need a Zynq-based FPGA development board, such as:

  • ZedBoard

  • PYNQ-Z1/Z2

  • ZCU102 (for Zynq UltraScale+)

  • Ultra96

These boards contain:

  • ARM processor (PS) to run Linux

  • Programmable logic (PL) for custom hardware


2. Toolchain Setup

Install:


3. Build the Hardware Design (Vivado)

Design your Zynq processing system in Vivado:

  1. Open Vivado → Create Block Design

  2. Add ZYNQ7 Processing System

  3. Run Block Automation

  4. Optionally add custom IP blocks (e.g., GPIO, AXI)

  5. Generate bitstream

 Export the design:

mathematica
 
FileExportExport HardwareInclude Bitstream

4. Create a PetaLinux Project

bash
 
petalinux-create --type project --name my_linux cd my_linux petalinux-config --get-hw-description=<path-to-exported-xsa>

Customize kernel, device tree, and rootfs:

bash
 
petalinux-config -c kernel petalinux-config -c rootfs

5. Build the Linux Image

bash
 
petalinux-build

This generates:

  • BOOT.BIN (bootloader + FPGA bitstream + FSBL)

  • image.ub (kernel + device tree + rootfs)

  • boot.scr (U-Boot script)


6. Prepare SD Card

Format an SD card with FAT32 and copy:

  • BOOT.BIN

  • image.ub

  • Optionally: boot.scr

Insert into the Zynq board’s SD slot.


7. Connect and Boot

  • Open serial terminal (115200 baud)

  • Power on board

  • You’ll see U-Boot, then Linux booting on the serial console

You should see a Linux prompt like:

bash
 
root@petalinux:~#

 Optional: Use Prebuilt Linux (PYNQ)

Boards like PYNQ-Z1 can boot Linux using the official PYNQ image:

  • Download .img

  • Flash to SD card

  • Boot into Linux with Jupyter, Python, and hardware libraries


 Summary of Required Files

File Description
BOOT.BIN FSBL + Bitstream + U-Boot (first-stage)
image.ub Kernel + Device Tree + Root Filesystem
boot.scr U-Boot script (optional, for automation)

 Bonus: What Happens During Boot?

  1. FSBL (First Stage Boot Loader): Sets up clocks, loads bitstream

  2. U-Boot: Loads and runs Linux kernel

  3. Kernel: Initializes drivers, mounts rootfs

  4. Linux Shell: User interface (via UART or network)

Ampheo