QEMU Setup Guide

Installing QEMU

Run these commands to install QEMU. Note that KVM support is required to run our images (check that /dev/kvm exists).

sudo apt-get install qemu-system-arm ipxe-qemu seabios

sudo gpasswd -a $USER kvm

This is sufficient for running the Android images that use software rendering. The instructions in the rest of this page are only required for running the Android image with GPU support.

Building QEMU with virtual GPU support

QEMU in Debian/Ubuntu does not support GPU virtualization out of the box, so you will need to recompile it yourself.

Note that this is only necessary to run our reference image which uses hardware GPU support; it is not required for the image using software rendering.

A physical GPU isn't necessary to actually run the image, the virtual GPU will be emulated in software if no physical GPU is present. Note that QEMU GPU emulation works best with desktop OpenGL; OpenGL ES is poorly supported and will most likely not work.

sudo apt-get build-dep qemu

sudo apt-get install libvirglrenderer-dev

wget https://download.qemu.org/qemu-3.1.0.tar.xz

tar xvJf qemu-3.1.0.tar.xz

cd qemu-3.1.0

./configure --enable-gtk --target-list=aarch64-softmmu --enable-virglrenderer --enable-opengl

make -j8

sudo make install

Marvell MACCHIATObin

We recommend the Marvell MACCHIATObin development board for testing Android VMs with hardware GPU support, mainly because it has a PCI-E slot into which a GPU can be installed. Our setup is based on Debian Buster and uses an NVIDIA GT710 GPU.

Required hardware

  • MACCHIATObin board

  • 12V power supply or PSU

  • USB keyboard and mouse

  • PCI-E GPU, and a compatible screen

  • SATA HDD or SSD

  • Micro-USB cable for the serial console

  • Ethernet cable for network connection

Step 1: Build and flash UEFI bootloader

Follow the instructions on this page to build the UEFI bootloader and this page to flash the newly build bootloader.

Step 2: Install Debian

Flash Debian to a USB stick and boot it from the UEFI menu. Follow the Debian install guide and install a desktop environment (we recommend Xfce).

Install any additional firmware packages that may be required depending on your GPU.