Page 1 of 1

Can we compile EDK2 UEFI Bootloader without waiting too long

Posted: Sat Oct 01, 2022 1:30 pm
by devc1
The EDK2 page in the osdev wiki tells us to build all the MdeModulePkg to make our UEFI executable image, but this takes too long even for minor changes in my bootloader (almost 5 minutes on my PC).
Shouldn't we build MdeModulePkg only one time then build our UEFI app ?
how can I compile my EFI bootloader in EDK2 without having to compile every other package ?

Re: Can we compile EDK2 UEFI Bootloader without waiting too

Posted: Sat Oct 01, 2022 2:28 pm
by nexos
5 minutes? You must be using a very old PC.

Anyway, yes, you must build the whole MdeModulePkg. I've tried other ways, they don't work.

TBH, I would recommend avoiding EDK2 and use CL or MinGW directly.

Re: Can we compile EDK2 UEFI Bootloader without waiting too

Posted: Sat Oct 01, 2022 2:48 pm
by Octocontrabass
Another vote for avoiding EDK2. I use Clang and MinGW-w64 GCC directly (though obviously you don't need to use both - one compiler is enough). Build times are under 1 second on my machine, and that includes the overhead of WSL.

I also wrote my own UEFI headers, but you don't need to do that.

Re: Can we compile EDK2 UEFI Bootloader without waiting too

Posted: Sat Oct 01, 2022 7:43 pm
by kzinti
+1 for clang with my own headers, makes it very simple (mingw is as easy to use as clang).

Here are some cmake toolchain files if you use cmake:
https://github.com/kiznit/rainbow-os/tr ... toolchains