Qemu emulation
Run arm32 UEFI in a virtual machine.
Emulating a arm32 UEFI device is useful for developing Linux and debugging it.
In the GDB Debugging page you can find instructions on how to compile Linux for this virtual machine.
A premade ZIP with all required files can be found at the bottom.
Compile OVMF for qemu
Install required packages
Run the following commands to install the required packages.
You will need other stuff too, but that is probably already installed. (e.g. git)
Download source
You need the source code of edk2 and acpica.
Compile OVMF
Go to your source directory and run the following commands.
Your output OVMF firmware file for qemu is$WORKSPACE/Build/ArmVirtQemu-ARM/RELEASEGCC5/FV/QEMU
_EFI.fd
Setup qemu files and run it
Create a directory, where you want your files to be in. Put your QEMU_EFI.fd
firmware file in this directory, compiled in the previous section. Now run the following commands to create some disk images:
Now create a directory named boot
. This will be your EFI partition. You can now easily place your EFI files in there.
Run qemu
To start your virtual machine run the following command, and make sure qemu-system-arm
is installed.
This will run qemu with 4 virtual CPU cores. They are Coretx-A15 cores. Used because it works.
Premade files
The following ZIP includes all files setup in their proper location. In addition its EFI partition folder has a UEFI shell in it. To run it either execute the run.sh
file or enter the command described in Run qemu.
References
Links where the above compiling information is from:
Last updated