OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 4:53 am

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: 435
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: 1071
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 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5099
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: 898
+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: No registered users and 53 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