Jump to content

Customized OpenCore with additional features


1,145 posts in this topic

Recommended Posts

 OC forked https://github.com/n-d-k/OpenCorePkg.

 

Additional features/changes:

============

 

[ Multi-Boot ]

  - ACPI patches and Booter Quirks are optional for non macOS with setting ACPI->Quirks->EnableForAll / Booter->Quirks->EnableForAll to yes (default is no).

  - SMBIOS and Device Properties patches will only applied to macOS.

    

[ Hotkeys ]

  - Full functional Hotkeys [1-9] corresponding to Boot Entry's Index number and dedicated W (Windows) / X (macOS) keys can be used without seeing Boot Picker.

  - While in boot picker, F10 can use to take a snapshot of the screen.

          

[ Ui Boot Picker ]

  - Bios Date/time, auto boot to the same OS or manual set to always boot one OS mode, and OC version are displayed in boot picker.

  - Auto boot to previous booted OS (if Misc->Security->AllowSetDefault is NO/false).

  - macOS Recovery/Tools Entries are hidden by default, use Spacebar/Mouse click right in Boot Menu as a toggle on/off to show/hide hidden entries.

  - Mouse supported.

          

[ Custom Entries ]

   - Custom entries are now listed first in picker menu and by the orders they are appeared in Misc->Boot->Entries, before all other entries.

   - Ability to change entry name found by auto scanner by adding custom entry with the exact same device path,

     this will give users the option to complete change how all boot entries listed in Boot Picker.

    

[ Others ]

   - No verbose apfs.efi driver loading (if using apfs.efi instead of ApfsDriverLoader.efi).

    - ndk-macbuild.tool script are set to compile with latest edk2 (One can easily set to stable edk2 if prefer).

 

Usage:

 - To build OpenCore, run "./ndk-macbuild.tool" at Terminal (require Xcode and Xcode Command Line Tool installed, and open xcode to accept license agreement before compiling).

 

4k light theme

ScreenShot-2020-03-27-211254.png

 

 

4k dark theme.

ScreenShot-2020-03-16-200552.png

 

 

 

 

Edited by n.d.k
  • Like 7
  • Thanks 5

Brilliant add-ons. Thanks.

Any chances to get the entries in the OC boot picker to show based on the chronological order they appear in Misc/entries?

Ex : 1- Mojave /2- Catalina/3- Windows/4- Linux VS 1- Catalina /2- Mojave/3- Windows/4- Linux, etc...

 

Edited by Ellybz
9 hours ago, Ellybz said:

Brilliant add-ons. Thanks.

Any chances to get the entries in the OC boot picker to show based on the chronological order they appear in Misc/entries?

Ex : 1- Mojave /2- Catalina/3- Windows/4- Linux VS 1- Catalina /2- Mojave/3- Windows/4- Linux, etc...

 

 

TBH,  I set my showpicker to off and used hotkey w and x to switch between Windows and macOS  without having to see boot picker at all. I gave the boot pickers some mods because it was too simple. But i'll add your suggestion into the to do list. 

Edited by n.d.k
  • Like 1
  • Thanks 1
On 12/17/2019 at 4:54 PM, Ellybz said:

Brilliant add-ons. Thanks.

Any chances to get the entries in the OC boot picker to show based on the chronological order they appear in Misc/entries?

Ex : 1- Mojave /2- Catalina/3- Windows/4- Linux VS 1- Catalina /2- Mojave/3- Windows/4- Linux, etc...

 

This is done! in last commit.

  • Like 2
  • Thanks 1
5 hours ago, Andrey1970 said:

Please don't write a bugreports in acidanthera if you use this fork.

 

And Please don't write anything here that are not related to the modification of this fork.

  • Like 6
6 hours ago, texem said:

AFAIK clover doesn't touch smbios but OC does. No idea if this is an potential issue but win believes it's running on a mac. 

It's good thing that Windows and other Oses are running on anything regardless mac hardware or not, unlike restricted OSX. So, just let it be for now.

  • Like 1
  • Thanks 1
16 hours ago, texem said:

AFAIK clover doesn't touch smbios but OC does. No idea if this is an potential issue but win believes it's running on a mac. 

Nobody should introduce features or "fixes" just for the sake of introducing features or "fixes"

 

9 hours ago, Slice said:

Windows will be better to run on real hardware then fake hardware.

I'm sure you have sources and/or references for that?

38 minutes ago, Download-Fritz said:

Nobody should introduce features or "fixes" just for the sake of introducing features or "fixes"

 

 

This answer is really very helpful. Thanks 

1 hour ago, moozuki said:

After  having to reinstall windows due to OC patching causing kernel errors, I have stopped using OC to boot windows. I now just use the bios boot selector (f12).

 

 

Are you talking about this fork or origin OC ?

14 hours ago, Slice said:

Windows will be better to run on real hardware then fake hardware.

 

I don't know if it's a glitch with previous version of AMD software or the cause of using Mac HW identity, it refused to upgrade my Rx580 driver due to no compatible graphic card found, but the current version work just fine. Anyway, I am stopping the SMBIOS and Device Properties patching for Other Oses, no quirk needed.

  • Thanks 1

Just as a matter of interest, how are you guys compiling this.

I get errors using a customised builder using GCC5 and XCODE5

/Users/stlvnub/src/OpenCorePkg/UDK/OcSupportPkg/Library/OcGuardLib/NativeOverflow.c:29:3: error: expected declaration specifiers or '...' before 'sizeof'
   29 |   sizeof (INTN) == sizeof (INT64) || sizeof (INTN) == sizeof (INT32),
      |   ^~~~~~
/Users/stlvnub/src/OpenCorePkg/UDK/OcSupportPkg/Library/OcGuardLib/NativeOverflow.c:30:3: error: expected declaration specifiers or '...' before string constant
   30 |   "INTN must be 32 or 64 Bits wide."
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/stlvnub/src/OpenCorePkg/UDK/OcSupportPkg/Library/OcGuardLib/NativeOverflow.c:34:3: error: expected declaration specifiers or '...' before 'sizeof'
   34 |   sizeof (UINTN) == sizeof (UINT64) || sizeof (UINTN) == sizeof (UINT32),
      |   ^~~~~~
/Users/stlvnub/src/OpenCorePkg/UDK/OcSupportPkg/Library/OcGuardLib/NativeOverflow.c:35:3: error: expected declaration specifiers or '...' before string constant
   35 |   "UINTN must be 32 or 64 Bits wide."
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [/Users/stlvnub/src/OpenCorePkg/UDK/Build/OpenCorePkg/DEBUG_GCC5/X64/OcSupportPkg/Library/OcGuardLib/OcGuardLib/OUTPUT/NativeOverflow.obj] Error 

 

On 12/28/2019 at 9:13 AM, texem said:

 

This answer is really very helpful. Thanks 

 

Are you talking about this fork or origin OC ?

 

Official release OC, not this fork. Was just giving example of why this mod would be useful.

 

9 hours ago, STLVNUB said:

Just as a matter of interest, how are you guys compiling this.

I get errors using a customised builder using GCC5 and XCODE5


/Users/stlvnub/src/OpenCorePkg/UDK/OcSupportPkg/Library/OcGuardLib/NativeOverflow.c:29:3: error: expected declaration specifiers or '...' before 'sizeof'
   29 |   sizeof (INTN) == sizeof (INT64) || sizeof (INTN) == sizeof (INT32),
      |   ^~~~~~
/Users/stlvnub/src/OpenCorePkg/UDK/OcSupportPkg/Library/OcGuardLib/NativeOverflow.c:30:3: error: expected declaration specifiers or '...' before string constant
   30 |   "INTN must be 32 or 64 Bits wide."
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/stlvnub/src/OpenCorePkg/UDK/OcSupportPkg/Library/OcGuardLib/NativeOverflow.c:34:3: error: expected declaration specifiers or '...' before 'sizeof'
   34 |   sizeof (UINTN) == sizeof (UINT64) || sizeof (UINTN) == sizeof (UINT32),
      |   ^~~~~~
/Users/stlvnub/src/OpenCorePkg/UDK/OcSupportPkg/Library/OcGuardLib/NativeOverflow.c:35:3: error: expected declaration specifiers or '...' before string constant
   35 |   "UINTN must be 32 or 64 Bits wide."
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [/Users/stlvnub/src/OpenCorePkg/UDK/Build/OpenCorePkg/DEBUG_GCC5/X64/OcSupportPkg/Library/OcGuardLib/OcGuardLib/OUTPUT/NativeOverflow.obj] Error 

 

You need to link both OpenCorePkg and OcSupportPkg from this fork.

  • Like 1
11 hours ago, n.d.k said:

You need to link both OpenCorePkg and OcSupportPkg from this fork.

build.py...
/Users/stlvnub/src/OpenCorePkg/UDK/OpenCorePkg/OpenCorePkg.dsc(61): error 000E: File/directory not found in workspace
	/Users/stlvnub/src/OpenCorePkg/UDK/OcSupportPkg/Library/OcAppleKeyMapLib/OcAppleKeyMapLib.inf

 

 

I've changed the script to point to said PKG but still same error.

AppleRamDiskLib/OcAppleRamDiskLib.c:17:
/Users/stlvnub/src/OpenCorePkg/UDK/EfiPkg/Include/Protocol/AppleRamDisk.h:282:16: error: expected declaration specifiers or '...' before 'sizeof'
  282 | STATIC_ASSERT (sizeof (APPLE_RAM_DISK_DP_VENDOR) == 24, "Invalid APPLE_RAM_DISK_DP_VENDOR size");
      |                ^~~~~~
/Users/stlvnub/src/OpenCorePkg/UDK/EfiPkg/Include/Protocol/AppleRamDisk.h:282:57: error: expected declaration specifiers or '...' before string constant
  282 | STATIC_ASSERT (sizeof (APPLE_RAM_DISK_DP_VENDOR) == 24, "Invalid APPLE_RAM_DISK_DP_VENDOR size");
      |                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/stlvnub/src/OpenCorePkg/UDK/EfiPkg/Include/Protocol/AppleRamDisk.h:283:16: error: expected declaration specifiers or '...' before 'sizeof'
  283 | STATIC_ASSERT (sizeof (APPLE_RAM_DISK_DP) == 52, "Invalid APPLE_RAM_DISK_DP size");
      |                ^~~~~~
/Users/stlvnub/src/OpenCorePkg/UDK/EfiPkg/Include/Protocol/AppleRamDisk.h:283:50: error: expected declaration specifiers or '...' before string constant
  283 | STATIC_ASSERT (sizeof (APPLE_RAM_DISK_DP) == 52, "Invalid APPLE_RAM_DISK_DP size");
      |                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/stlvnub/src/OpenCorePkg/UDK/EfiPkg/Include/Protocol/AppleRamDisk.h:284:16: error: expected declaration specifiers or '...' before 'sizeof'
  284 | STATIC_ASSERT (sizeof (APPLE_RAM_DISK_EXTENT) == 16, "Invalid APPLE_RAM_DISK_EXTENT size");
      |                ^~~~~~
/Users/stlvnub/src/OpenCorePkg/UDK/EfiPkg/Include/Protocol/AppleRamDisk.h:284:54: error: expected declaration specifiers or '...' before string constant
  284 | STATIC_ASSERT (sizeof (APPLE_RAM_DISK_EXTENT) == 16, "Invalid APPLE_RAM_DISK_EXTENT size");
      |                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/stlvnub/src/OpenCorePkg/UDK/EfiPkg/Include/Protocol/AppleRamDisk.h:285:16: error: expected declaration specifiers or '...' before 'sizeof'
  285 | STATIC_ASSERT (sizeof (APPLE_RAM_DISK_EXTENT_TABLE) == 4096, "Invalid APPLE_RAM_DISK_EXTENT_TABLE size");
      |                ^~~~~~
/Users/stlvnub/src/OpenCorePkg/UDK/EfiPkg/Include/Protocol/AppleRamDisk.h:285:62: error: expected declaration specifiers or '...' before string constant
  285 | STATIC_ASSERT (sizeof (APPLE_RAM_DISK_EXTENT_TABLE) == 4096, "Invalid APPLE_RAM_DISK_EXTENT_TABLE size");
      |                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/stlvnub/src/OpenCorePkg/UDK/EfiPkg/Include/Protocol/AppleRamDisk.h:286:16: error: expected declaration specifiers or '...' before 'sizeof'
  286 | STATIC_ASSERT (sizeof (APPLE_RAM_DISK_CONTEXT) == 8192, "Invalid APPLE_RAM_DISK_CONTEXT size");
      |                ^~~~~~
/Users/stlvnub/src/OpenCorePkg/UDK/EfiPkg/Include/Protocol/AppleRamDisk.h:286:57: error: expected declaration specifiers or '...' before string constant
  286 | STATIC_ASSERT (sizeof (APPLE_RAM_DISK_CONTEXT) == 8192, "Invalid APPLE_RAM_DISK_CONTEXT size");
      |                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [/Users/stlvnub/src/OpenCorePkg/UDK/Build/OpenCorePkg/DEBUG_GCC5/X64/OcSupportPkg/Library/OcAppleRamDiskLib/OcAppleRamDiskLib/OUTPUT/OcAppleRamDiskLib.obj] Error 1


build.py...
 : error 7000: Failed to execute command
	/Users/stlvnub/opt/local/cross/bin/x86_64-clover-linux-gnu-make tbuild [/Users/stlvnub/src/OpenCorePkg/UDK/Build/OpenCorePkg/DEBUG_GCC5/X64/OcSupportPkg/Library/OcAppleRamDiskLib/OcAppleRamDiskLib]


build.py...
 : error F002: Failed to build module
	/Users/stlvnub/src/OpenCorePkg/UDK/OcSupportPkg/Library/OcAppleRamDiskLib/OcAppleRamDiskLib.inf [X64, GCC5, DEBUG]

- Failed -
Build end time: 16:43:56, Dec.30 2019
Build total time: 00:00:03

 

Edited by STLVNUB
1 hour ago, STLVNUB said:

build.py...
/Users/stlvnub/src/OpenCorePkg/UDK/OpenCorePkg/OpenCorePkg.dsc(61): error 000E: File/directory not found in workspace
	/Users/stlvnub/src/OpenCorePkg/UDK/OcSupportPkg/Library/OcAppleKeyMapLib/OcAppleKeyMapLib.inf

 

 

I've changed the script to point to said PKG but still same error.


AppleRamDiskLib/OcAppleRamDiskLib.c:17:
/Users/stlvnub/src/OpenCorePkg/UDK/EfiPkg/Include/Protocol/AppleRamDisk.h:282:16: error: expected declaration specifiers or '...' before 'sizeof'
  282 | STATIC_ASSERT (sizeof (APPLE_RAM_DISK_DP_VENDOR) == 24, "Invalid APPLE_RAM_DISK_DP_VENDOR size");
      |                ^~~~~~
/Users/stlvnub/src/OpenCorePkg/UDK/EfiPkg/Include/Protocol/AppleRamDisk.h:282:57: error: expected declaration specifiers or '...' before string constant
  282 | STATIC_ASSERT (sizeof (APPLE_RAM_DISK_DP_VENDOR) == 24, "Invalid APPLE_RAM_DISK_DP_VENDOR size");
      |                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/stlvnub/src/OpenCorePkg/UDK/EfiPkg/Include/Protocol/AppleRamDisk.h:283:16: error: expected declaration specifiers or '...' before 'sizeof'
  283 | STATIC_ASSERT (sizeof (APPLE_RAM_DISK_DP) == 52, "Invalid APPLE_RAM_DISK_DP size");
      |                ^~~~~~
/Users/stlvnub/src/OpenCorePkg/UDK/EfiPkg/Include/Protocol/AppleRamDisk.h:283:50: error: expected declaration specifiers or '...' before string constant
  283 | STATIC_ASSERT (sizeof (APPLE_RAM_DISK_DP) == 52, "Invalid APPLE_RAM_DISK_DP size");
      |                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/stlvnub/src/OpenCorePkg/UDK/EfiPkg/Include/Protocol/AppleRamDisk.h:284:16: error: expected declaration specifiers or '...' before 'sizeof'
  284 | STATIC_ASSERT (sizeof (APPLE_RAM_DISK_EXTENT) == 16, "Invalid APPLE_RAM_DISK_EXTENT size");
      |                ^~~~~~
/Users/stlvnub/src/OpenCorePkg/UDK/EfiPkg/Include/Protocol/AppleRamDisk.h:284:54: error: expected declaration specifiers or '...' before string constant
  284 | STATIC_ASSERT (sizeof (APPLE_RAM_DISK_EXTENT) == 16, "Invalid APPLE_RAM_DISK_EXTENT size");
      |                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/stlvnub/src/OpenCorePkg/UDK/EfiPkg/Include/Protocol/AppleRamDisk.h:285:16: error: expected declaration specifiers or '...' before 'sizeof'
  285 | STATIC_ASSERT (sizeof (APPLE_RAM_DISK_EXTENT_TABLE) == 4096, "Invalid APPLE_RAM_DISK_EXTENT_TABLE size");
      |                ^~~~~~
/Users/stlvnub/src/OpenCorePkg/UDK/EfiPkg/Include/Protocol/AppleRamDisk.h:285:62: error: expected declaration specifiers or '...' before string constant
  285 | STATIC_ASSERT (sizeof (APPLE_RAM_DISK_EXTENT_TABLE) == 4096, "Invalid APPLE_RAM_DISK_EXTENT_TABLE size");
      |                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/stlvnub/src/OpenCorePkg/UDK/EfiPkg/Include/Protocol/AppleRamDisk.h:286:16: error: expected declaration specifiers or '...' before 'sizeof'
  286 | STATIC_ASSERT (sizeof (APPLE_RAM_DISK_CONTEXT) == 8192, "Invalid APPLE_RAM_DISK_CONTEXT size");
      |                ^~~~~~
/Users/stlvnub/src/OpenCorePkg/UDK/EfiPkg/Include/Protocol/AppleRamDisk.h:286:57: error: expected declaration specifiers or '...' before string constant
  286 | STATIC_ASSERT (sizeof (APPLE_RAM_DISK_CONTEXT) == 8192, "Invalid APPLE_RAM_DISK_CONTEXT size");
      |                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [/Users/stlvnub/src/OpenCorePkg/UDK/Build/OpenCorePkg/DEBUG_GCC5/X64/OcSupportPkg/Library/OcAppleRamDiskLib/OcAppleRamDiskLib/OUTPUT/OcAppleRamDiskLib.obj] Error 1


build.py...
 : error 7000: Failed to execute command
	/Users/stlvnub/opt/local/cross/bin/x86_64-clover-linux-gnu-make tbuild [/Users/stlvnub/src/OpenCorePkg/UDK/Build/OpenCorePkg/DEBUG_GCC5/X64/OcSupportPkg/Library/OcAppleRamDiskLib/OcAppleRamDiskLib]


build.py...
 : error F002: Failed to build module
	/Users/stlvnub/src/OpenCorePkg/UDK/OcSupportPkg/Library/OcAppleRamDiskLib/OcAppleRamDiskLib.inf [X64, GCC5, DEBUG]

- Failed -
Build end time: 16:43:56, Dec.30 2019
Build total time: 00:00:03

 

 

Please read post #1 how to build, git clone the fork and cd into the folder and run ./ndk-macbuild.tool

From the look of those errors, you may have used out dated UDK version. 

Edited by n.d.k
  • Like 2

I think those are very useful features..... in my opinion it should be merged what you do.

Thanks for your effort and contributions.

I still have to sort out some stuff with my install but that will eventually also work.

 

  • Slice pinned this topic
×
×
  • Create New...