OSDev.org
https://forum.osdev.org/

Can we compile EDK2 UEFI Bootloader without waiting too long
https://forum.osdev.org/viewtopic.php?f=1&t=56510
Page 1 of 1

Author:  devc1 [ Sat Oct 01, 2022 1:30 pm ]
Post subject:  Can we compile EDK2 UEFI Bootloader without waiting too long

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 ?

Author:  nexos [ Sat Oct 01, 2022 2:28 pm ]
Post subject:  Re: Can we compile EDK2 UEFI Bootloader without waiting too

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.

Author:  Octocontrabass [ Sat Oct 01, 2022 2:48 pm ]
Post subject:  Re: Can we compile EDK2 UEFI Bootloader without waiting too

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.

Author:  kzinti [ Sat Oct 01, 2022 7:43 pm ]
Post subject:  Re: Can we compile EDK2 UEFI Bootloader without waiting too

+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

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/