Documentation/Platforms/ARM

From QEMU
Revision as of 23:08, 6 November 2016 by Programmingkid (talk | contribs)

QEMU ARM guest support

QEMU has generally good support for ARM guests. It has support for nearly fifty different machines. The reason we support so many is that ARM hardware is much more widely varying than x86 hardware. ARM CPUs are generally built into "system-on-chip" (SoC) designs created by many different companies with different devices, and these SoCs are then built into machines which can vary still further even if they use the same SoC. Even with fifty boards QEMU does not cover more than a small fraction of the ARM hardware ecosystem.

Because ARM systems differ so much and in fundamental ways, typically operating system or firmware images intended to run on one machine will not run at all on any other. This is often surprising for new users who are used to the x86 world where every system looks like a standard PC. (Once the kernel has booted, most userspace software cares much less about the detail of the hardware.)

The situation for 64-bit ARM is fairly similar, except that we don't implement so many different machines.

As well as the more common "A-profile" CPUs (which have MMUs and will run Linux) we also support the Cortex-M3 and Cortex-M4 "M-profile" CPUs (which are microcontrollers used in very embedded boards. We only have two boards which use the M-profile CPU at the moment: "lm3s811evb" and "lm3s6965evb" (which are both TI Stellaris evaluation boards).

Guidelines for choosing a QEMU machine

I have a complete system image already that works on hardware that I'd like to boot with QEMU...
Check whether QEMU lists that machine in its '-machine help' output. If it does, that's the best place to start. If it doesn't then unfortunately you're out of luck: your image won't boot on QEMU. If it's a Linux image and you're mostly interested in the userspace software, then you may be able to extract the filesystem and use that with a different kernel which boots on a system QEMU does emulate.
I don't really care which system I emulate, I just want to run Linux...
Most of the machines QEMU supports have annoying limitations (small amount of RAM, no PCI or other hard disk, etc) which are there because that's what the real hardware is like. If you don't care about reproducing the idiosyncrasies of a particular bit of hardware, the best choice today is the "virt" machine. This is a platform which doesn't correspond to any real hardware and is designed for use in virtual machines. It supports PCI, virtio, recent CPUs and large amounts of RAM. The only thing it doesn't have is graphics. See this tutorial for information on getting 32-bit ARM Debian Linux running on the "virt" board.
For 64-bit ARM "virt" is also the best choice. We don't have a link to a simple tutorial yet, though.
The "versatilepb" machine has also often been used as a general-purpose Linux target in the past; its disadvantage is that it has a very old CPU and only 256MB of RAM, but it does at least have PCI and SCSI. You can find a description of how to install Debian on it here (the author of that tutorial has also provided some prebuilt images). You're probably better off using "virt" though.


Open Source Media Center running in QEMU Open Source Media Center running in QEMU