QEMU Emulation for Orange Pi (H3 Model)

Host Enviroment Setup

A Windows 10 system with WSL (using OpenEuler) serves as the host. Other Linux distributions are acceptable (differences exist mainly in package management workflows).

QEMU Package Installation

To emulate the ARM-based Orange Pi (H3), install these two QEMU packages:

  • qemu-system-aarch64 (enables ARM64 emulation)
  • qemu-img (resizes disk images; QEMU requires the SD image to be at least 64MB)

Run the following (using YUM as an example):

sudo yum install qemu-system-aarch64.x86_64
sudo yum install qemu-img.x86_64

SD Card Image Creation

  1. Compile U-Boot and related firmware for Orange Pi H3 (refer to official build guides).
  2. After successful compilation, generate the SD boot image:
# Execute in the U-Boot source directory
dd if=spl/sunxi-spl.bin of=boot.img bs=1024 seek=8 conv=notrunc
dd if=u-boot.img of=boot.img bs=1024 seek=40
qemu-img resize -f raw boot.img 64M

Launching QEMU Emulation

Start the emulation with this command:

qemu-system-aarch64 -machine orangepi-pc -vnc :1 -monitor telnet:127.0.0.1:6666,server,nowait -serial stdio -sd boot.img

In testing, the SPL (Secondary Program Loader) executed successfully, but U-Boot failed to start due to a custom repository issue (using an outdated mainline U-Boot with Python 2, modified for Orange Pi PC2). Using the latest mainline U-Boot should resolve this (QEMU emulation can reach U-Boot with valid builds).

Mainline U-Boot Compilation Test

  1. Download Source: Fetch the latest U-Boot code from [https://ftp.denx.de/pub/u-boot/](e.g., a July release).
  2. Compile: Follow official U-Boot build instructions (refer to linked resources).
  3. Run Test: Boooting the mainline U-Boot failed with both qemu-system-aarch64 and qemu-system-arm. The process stalled in sd_get_capabilities when sending SD_CMD_APP_SEND_SCR (the mmc_send_cmd function is called multiple times, but the root cause is under analysis).

Tags: qemu OrangePi ARM uboot emulation

Posted on Mon, 01 Jun 2026 18:05:04 +0000 by maseeha