PetaLinux/Pynq in QEMU HowTo

By | 2019年8月22日


Before stepping into the virtio acceleration, we will build and run a Linux(PetaLinux) in FPGA.

Despite the poor performance of simulation in X86, it’s very convenient to create POC.

We choose MPSoC zcu106(PS) to test ARM, Zynq zc702(PS) to test ARM and Kintex UltraScale kcu705(PL) to test MicroBlaze softcore.

0. Essential tools

OS: Ubuntu 16.04 Desktop

Vivado: 2019.1

Xilinx SDK: 2019.1

PetalLinux SDK:  PetaLinux 2019.1

BSP: Evaluation Board BSP or generated from Vivado/Xilinx SDK

1. Build QEMU

QEMU is in the PetaLinux SDK directory, it’s not necessary to rebuild if you do not wanna modify anything.


2. PetaLinux Project

2.1. Create Project


After the project created, pre-built images is in directory pre-built. You can test it via petalinux-boot


To accelerate the sstate mirror check process, you need download the sstate cache in Ref [5].

If you are using petalinux as root, you need modify sanity.conf like this:

2.2. Build Kernel/Rootfs


3. Boot from QEMU

3.1. Debug


3.2. Run with self-compiled-QEMU

Now we’ll add sdcard and try to boot Ubuntu Core OS.


4. Co-Sim


5. Boot from Evaluation Board SDCard



[1] Build QEMU:

[2] Zynq UltraScale+ QEMU:

[3] CoSim:

[4] Xilinx Evaluation Board BSP files and Yocto local mirror: