OVMF (UEFI) firmare for QEMU

I wanted to figure out how hard it would be to do your own firmware, as the one I had was slow to boot. So I setup a fork of EDK2 with GitHub Actions to build. Also disable some features, do release build and reduce size a bit by build flags.

I also decided to rip out all the logo code, to see if it improved boot.
Not sure if it is much faster, but if anyone wants to try the x86_64 OVMF-files are build artifacts here:

I tried to search if anyone else is doing firmware modification, but hasn’t found anything but abandoned projects. It would be interesting to see time spent in firmware before booting.

I think there is some text? mode switching still in the firmware I’d want to remove as the QEMU window switches size too many times for me to like it…


Do you want to build a firmware to be used in Qemu or on real hardware?

On real hardware proprietary BLOBs (binary parts) are neccessary because the chipset etc. need special init code.

On Qemu there’s a big potential to downsize it; in other words: There’s a lot of “luxury” stuff which can be kicked out. But I doubt that will speed up booting a lot. I mean, the unneccessary parts are mostly not called during boot-time. They just are included for the case that some software uses it. Like boot shell, Uefi bytecode, runtime services etc.


I already built the firmware and OVMF is Open Virtualisation so it is for QEMU. The one I used from Debian was ancient and took many seconds to boot. So big improvement. I also removed showing splash at boot, so anyone who wants to try can do so.
But I mostly want to discuss more technical aspects.