QEMU

Differences between revisions 1 and 2
Revision 1 as of 2015-03-13 02:31:26
Size: 931
Editor: dannf
Comment:
Revision 2 as of 2015-03-13 14:37:03
Size: 1249
Editor: dannf
Comment:
Deletions are marked like this. Additions are marked like this.
Line 12: Line 12:
 1. Now you'll need to create plflash
 
 1. Now you'll need to create pflash volumes for UEFI. Two volumes are required, one static one for the UEFI firmware, and another dynamic one to store variables. Both need to be exactly 64M in size.
 {{{
 $ dd if=/dev/zero of=flash0.img bs=1M count=64
 $ dd if=QEMU_EFI.fd of=flash0.img conv=notrunc
 $ dd if=/dev/zero of=flash1.img bs=1M count=64
 }}}

Ubuntu/arm64 can run inside the QEMU emulator. You can either do this fully emulated (e.g. on an x86 host) or, accelerated w/ KVM if you have an arm64 host. This page describes how to do both.

I've chosen to describe a UEFI-based system here so I can make use of the kernel on the guest's disk image. It is possible to boot directly into Linux instead.

Note: this requires Ubuntu 15.04 or greater

Getting the bits

  1. Install QEMU
     $ sudo apt-get install qemu-system-aarch64
  2. Get a tianocore UEFI image. Eventually Ubuntu should provide this in a package called qemu-efi (there's one currently in Debian's NEW queue), but for now you can download one from Linaro.

  3. Now you'll need to create pflash volumes for UEFI. Two volumes are required, one static one for the UEFI firmware, and another dynamic one to store variables. Both need to be exactly 64M in size.
     $ dd if=/dev/zero of=flash0.img bs=1M count=64
     $ dd if=QEMU_EFI.fd of=flash0.img conv=notrunc
     $ dd if=/dev/zero of=flash1.img bs=1M count=64

References

https://wiki.linaro.org/LEG/UEFIforQEMU http://blog.eciton.net/uefi

ARM64/QEMU (last edited 2016-01-08 22:27:08 by dannf)