My Wiki!

qemu-linaro

Download and compile qemu-linaro

./configure --disable-spice --audio-drv-list=alsa

The qemu-system-arm is under 'qemu-linaro/arm-softmmu/qemu-system-arm'.

Prepare image

Download desired image (vexpres-a9). qemu reqires kernel and initrd. These can be extracted from boot.img.

Mount image:

  (IMG=vexpress.img ; if [ -e "$IMG" ] ; then sudo mount -o loop,offset="$(file "$IMG" | awk 'BEGIN { RS=";"; } /partition 2/ { print $7*512; }')" -t auto "$IMG" /mnt/mnt; else echo "$IMG not found"; fi )

or

  sudo mount -o loop,offet=138412032 -t sysfs staging-vexpress-a9.img /mnt/mnt

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

  sudo mount -o loop,offset=$((63*512)) staging-vexpress.img /mnt/mnt 
  

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:

dd if=uInitrd of=initrd skip=64 bs=1

Run qemu-system-arm

  ./toolchain/qemu-linaro/arm-softmmu/qemu-system-arm -kernel ./android_img/vexpress-a9/image -M vexpress-a9 -cpu cortex-a9 -serial stdio -m 256 -initrd ./android_img/vexpress-a9/initrd -append 'root=/dev/mmcblk0p2 rw mem=256M raid=noautodetect console=ttyAMA0,38400n8 rootwait vmalloc=256MB devtmpfs.mount=0' -sd ./android_img/staging-vexpress-a9.img

Resources


Navigation