Running Fedora 21 on qemu-system-aarch64

Foundation Model V8 is a emulator for ARM64 architecture, but it has many limits, such as slow CPU, small memory (about 2GB), etc. Therefore I want to run fedora on qemu emulator for aarch64. There are already many docs to introduce how to run Foundation Model V8 on Fedora 21 on the web, but none of them could point out the way to run qemu-aarch64 on Fedora 21. Spent about a week, I finally find out the path.

Step 1 Build the edk2 UEFI
Followed this article,you should download the linaro toolchain and edit the “Conf/target.txt”. Then follow these steps to build a file in “Build/ArmVirtualizationQemu-AARCH64/DEBUG_GCC48/FV/QEMU_EFI.fd”

Step 2 Build the qemu-aarch64
I recommend the latest stable QEMU-2.2.0

Now, you have file in “qemu-2.2.0/aarch64-softmmu/qemu-system-aarch64”

Step 3 Download the Fedora 21 image for Foundation Model V8

Now you have “F21-20140829-foundation-v8/F21-20140829-foundation-v8.img”

Step 4 Run the qemu

The Qemu will boot into the UEFI, you could select into the “shell”, in the UEFI shell:

Then you can enter into a grub provided by Fedora 21 and boot into it automaticly.

Step 5 Add the UEFI entry for fedora permanently (optional)

Launch qemu-system-aarch64 by change “-bios xxx” to “-pflash flash0.img -pflash flash1.img” and after enter the UEFI shell:

The UEFI boot entry will write into flash*.img file and the Qemu could boot into Fedora 21 automaticly now.

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*