OSDev.org

The Place to Start for Operating System Developers
It is currently Mon Dec 05, 2022 12:20 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Can we compile EDK2 UEFI Bootloader without waiting too long
PostPosted: Sat Oct 01, 2022 1:30 pm 
Offline
Member
Member

Joined: Fri Feb 11, 2022 4:55 am
Posts: 330
Location: behind the keyboard
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 ?


Top
 Profile  
 
 Post subject: Re: Can we compile EDK2 UEFI Bootloader without waiting too
PostPosted: Sat Oct 01, 2022 2:28 pm 
Offline
Member
Member

Joined: Tue Feb 18, 2020 3:29 pm
Posts: 1045
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.

_________________
"How did you do this?"
"It's very simple — you read the protocol and write the code." - Bill Joy
Projects: NexNix | libnex | nnpkg


Top
 Profile  
 
 Post subject: Re: Can we compile EDK2 UEFI Bootloader without waiting too
PostPosted: Sat Oct 01, 2022 2:48 pm 
Online
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 4344
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.


Top
 Profile  
 
 Post subject: Re: Can we compile EDK2 UEFI Bootloader without waiting too
PostPosted: Sat Oct 01, 2022 7:43 pm 
Offline
Member
Member

Joined: Mon Feb 02, 2015 7:11 pm
Posts: 864
+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

_________________
https://github.com/kiznit/rainbow-os


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Google [Bot], Octocontrabass and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group