OpenDuetPkg
Acidanthera variant of DuetPkg. Specialties:
- Significantly improved boot performance.
- BDS is simplified to load
EFI/OC/OpenCore.efi. - EDID support removed for performance and compatibility.
- PCI option ROM support removed for security and performance.
- Setup and graphical interface removed.
- Resolved PCIe device path instead of PCI.
- Increased variable storage size to 64 KB.
- Always loads from bootstrapped volume first.
- Some changes inherited from Clover EFI bootloader.
Simplified bootstrap process
boot0is loaded by BIOS from MBR at7C00h.boot0finds active MBR or ESP GPT partition.boot0loadsboot1from found partition atE000h.boot1findsbootfile at partition root.boot1loadsbootat20000h(begins withStartX64orStartIA32).Startenables paging (prebuilt forX64or generated forIA32).Startswitches to native CPU mode (X64orIA32) with paging.Startjumps to concatentatedEfiXXat21000h(Efi64orEfi32).EfiXXloadsEfiLdr(concatenated afterEfiXX) at10000h.EfiLdrdecompresses and mapsDUETFV,DxeIpl,DxeCore.EfiLdrjumps toDxeIpl, which startsDxeCorefromDUETFV.DxeCorestarts BDS, which loadsEFI/OC/OpenCore.efi.
| Name | PHYS | VIRT |
|---|---|---|
boot0 |
7C00h |
|
boot1 |
E000h |
|
Start |
20000h |
20000h |
EfiXX |
21000h |
21000h |
EfiLdr |
22000h |
10000h |
DxeIpl+ |
22000h+ |
??? |
Error codes
BOOT MISMATCH!- Bootstrap partition signature identification failed. BDS code will try to lookupEFI/OC/OpenCore.efion any partition in 3 seconds.BOOT FAIL!- No bootableEFI/OC/OpenCore.efifile found on any partition. BDS code will dead-loop CPU in 3 seconds.
Compilation
By default ocbuild-like compilation is used via macbuild.tool.
As an alternative it is possible to perform in-tree compilation by using INTREE=1 environment variable:
TARGETARCH=X64 TARGET=RELEASE INTREE=1 DuetPkg/macbuild.tool
Note: 32-bit version may not work properly when compiled with older Xcode version (tested 11.4.1).
Configuration
Builtin available drivers are set in OpenDuetPkg.fdf (included drivers) and OpenDuetPkg.dsc
(compiled drivers, may not be included). Adding more drivers may result in the need to
change firmware volume size. To do this update NumBlocks in DuetPkg.fdf
(number of 64 KB blocks in the firmware).
Note: OHCI driver is not bundled with DuetPkg (and EDK II) and can be found in
edk2-platforms/Silicon/Intel/QuarkSocPkg/QuarkSouthCluster/Usb/Ohci/Dxe.