If you're looking for a way to run an Olimex A20 Linux image on your local machine for development, here is a simple setup that works on both Windows and Linux hosts.
This setup is useful for:- Building and testing executables
- Setting up SSH connections
- Initializing databases
- Performing Linux configuration and package installation
- General application development without powering on the physical board
It provides working screen, keyboard, mouse, and network emulation. With some patching, it it can also show graphics, which I will describe below. As expected, it does not emulate GPIO or other board-specific hardware peripherals. later this image can be used on a real device as this does not touch native boot files.
1. Install QEMUTested with QEMU 11.x on Windows 10 x86_64, but should also work well on Linux host
2. Download an Olimex imageFor example: A20-OLinuXino-bookworm-base-20260323-113959.img
3. Build QEMU-comaptibe ARMv7 Linux kernelNotice the kernel must be separately built and applied from QEMU command line and does not interfere with built-in A20 kernel. It does not overwrite the one stored on the SD card image, but remains as a separate file on a host machine. I used Linux 6.12, which at the end boots and works well. The kernels are compatible from the userspace perspective. Also the modules from the SD image are not used and QEMU kernel has to include them in self.
git clone --depth 1 --branch linux-6.12.y https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git linux-6.12
cd linux-6.12
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- multi_v7_defconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j$(nproc) zImage4. Copy the kernel to your Windows machine
Linux Host: linux-6.12/arch/arm/boot/zImage -> Windows Host: linux-6.12-out/zImage
Sorry I used Windows host, but QEMU should also work well on a Linux host
5. Start QEMUqemu-system-arm -M virt -m 1024 -smp 2 -display sdl -kernel linux-6.12-out/zImage -append "root=/dev/vda1 rw rootwait loglevel=8 console=ttyAMA0 console=tty0" -drive if=none,file=A20-OLinuXino-bookworm-base-20260323-113959.img,format=raw,id=hd -device virtio-blk-device,drive=hd -netdev user,id=net0 -device virtio-net-device,netdev=net0 -device virtio-gpu-device -device virtio-tablet-device -device virtio-keyboard-device -monitor none -serial telnet:127.0.0.1:4444,server,nowaitWith this basic setup, the serial console and networking are available.
The serial console is accessible via Telnet on:
localhost:4444
You can connect using PuTTY or any Telnet client.
SSH networking also works, allowing you to connect directly to the virtual machine.
Graphical DesktopGetting the graphical desktop working is a little more involved due to a compatibility issue between the Linux 6.12 kernel and QEMU's VirtIO MMIO implementation. A small kernel patch is required.
This repository (https://github.com/mavstuff/linux-6-arm-qemu-patches) includes the required kernel patches, kernel configuration, and build scripts.
Hopefully this saves someone else a few hours of debugging. ;)