Versatile Express support in QEMU

This page briefly summarises the status of QEMU's Versatile Express model and explains how to get a Linaro snapshot running on it.

Status of Versatile Express support

The Versatile Express model generally works, although a few items are missing. Support is complete enough for the Linaro images to boot to a root prompt and display graphics (including working keyboard and mouse support). It is at the same level or better than the existing qemu support for the 'versatilepb' or 'realview-pbx' models.

Implemented components:

Missing components:

Note: there is no PCI, and therefore no way to expose an IDE or SCSI controller to the guest; the only available block device is the SD card. This is a limitation of the hardware, not a missing feature in qemu.

Creating Linaro Versatile Express images for qemu-linaro

The simplest thing is to get a vexpress SD card image file from releases.linaro.org (for instance images/12.01/oneiric/nano/ -- adjust to taste for a different release or image). Or you can use linaro-media-create to create your own if you're after a snapshot image. Uncompress the image if it's gzipped.

Now you need to extract the kernel and initrd from the image file. The following command uses file and awk to find out the offset of the second partition in the image file, and then mounts it via a loopback mount onto /mnt/mnt.

Copy the kernel and initrd out of /mnt/mnt/boot and then unmount the image:

In some images the boot files are in the first partition of the image:

If what you have is a uImage and a uInitrd, you can use the former as your kernel, but you need to extract the u-boot header from the latter to be able to use it as the initrd:

Running the model

Once you have extracted the kernel and initrd, you can run qemu like this (kernel/initrd filenames may vary with other hwpacks):

If you want you can add "-smp 4" to make it boot as a 4-core SMP model. However you should be aware that this is likely to reduce performance, not increase it, so is rarely what you want.


CategoryHowTo

PeterMaydell/QemuVersatileExpress (last modified 2012-02-20 19:13:49)