From 27383b5bc71874b554e79aef4fc96bf0a9ee4daf Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk Date: Wed, 6 Oct 2021 18:08:11 -0600 Subject: [PATCH 1/3] Update docs --- README.md | 4 +++- docs/.vuepress/config.js | 1 - docs/CLI.md | 41 ---------------------------------------- docs/LICENSE.md | 2 ++ docs/PATCHEXPLAIN.md | 12 +++++------- resources/cli_menu.py | 11 ++++++++--- 6 files changed, 18 insertions(+), 53 deletions(-) delete mode 100644 docs/CLI.md diff --git a/README.md b/README.md index 93f2f7c8c..f74825ef1 100644 --- a/README.md +++ b/README.md @@ -55,10 +55,12 @@ Nightly builds can be found here courteous of nightly.link: * Mac Pro on OpenCore Patch set and documentation * [Innie](https://github.com/cdf/Innie) and [NightShiftEnabler](https://github.com/cdf/NightShiftEnabler) * [Syncretic](https://forums.macrumors.com/members/syncretic.1173816/) - * [AAAMouSSE](https://forums.macrumors.com/threads/mp3-1-others-sse-4-2-emulation-to-enable-amd-metal-driver.2206682/) and [telemetrap](https://forums.macrumors.com/threads/mp3-1-others-sse-4-2-emulation-to-enable-amd-metal-driver.2206682/post-28447707) + * [AAAMouSSE](https://forums.macrumors.com/threads/mp3-1-others-sse-4-2-emulation-to-enable-amd-metal-driver.2206682/), [telemetrap](https://forums.macrumors.com/threads/mp3-1-others-sse-4-2-emulation-to-enable-amd-metal-driver.2206682/post-28447707) and [SurPlus](https://github.com/reenigneorcim/SurPlus) * [dosdude1](https://github.com/dosdude1) * Main author of GUI * Development of previous patchers, laying out much of what needs to be patched +* [parrotgeek1](https://github.com/parrotgeek1) + * [VMM Patch Set](https://github.com/dortania/OpenCore-Legacy-Patcher/blob/4a8f61a01da72b38a4b2250386cc4b497a31a839/payloads/Config/config.plist#L1222-L1281) * [BarryKN](https://github.com/BarryKN) * Development of previous patchers, laying out much of what needs to be patched * [mario_bros_tech](https://github.com/mariobrostech) and the rest of the Unsupported Mac Discord diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index ffdd51dd8..d62698ba5 100755 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -134,7 +134,6 @@ module.exports = { 'TERMS', 'HOW', 'PATCHEXPLAIN', - 'CLI', ] }, diff --git a/docs/CLI.md b/docs/CLI.md deleted file mode 100644 index 861aad6aa..000000000 --- a/docs/CLI.md +++ /dev/null @@ -1,41 +0,0 @@ -# Command Line Args - -With OpenCore Legacy Patcher, we include an extra binary called [OCLP-CLI](https://github.com/dortania/OpenCore-Legacy-Patcher/releases/). The purpose of this binary is to easily run our OpenCore build process for other programs to hook onto. Below is documentation on currently supported arguments. - -### Build Arguments - -* **--build**: Build OpenCore - * **--model xxxx**: override default model detection - * ex. **--model iMac11,2** - * **--metal_gpu xxxx**: override default GPU detection (ie. Nvidia, AMD) - * **--metal_gpu Nvidia** - * **--smbios_spoof xxxx**: set spoofing mode, defaults to Minimal if no arg provided (ie. Minimal, Moderate, Advanced) - * ex. **--smbios_spoof Moderate** - * **--verbose**: enable verbose booting - * **--debug_oc**: enable debug OpenCore - * **--debug_kext**: enable debug kexts - * **--skip_wifi**: skip wifi patch - * **--hide_picker**: hide OpenCore's picker - * **--disable_sip**: disables SIP - * **--disable_smb**: disables SecureBootModel - * **--vault**: enable OpenCore vaulting - -Example usage: - -```bash -./OCLP-CLI --build --verbose --debug_oc --debug_kext --model iMac11,2 -``` - -Note, when building OpenCore the output folder will be next to the OCLP binary as OpenCore-RELEASE or OpenCore-DEBUG folder. - -### Patch System Arguments - -* **--patch_sys_vol**: patches root volume with detected hardware - -Example usage: - -```bash -sudo ./OCLP-CLI --patch_sys_vol -``` - -Note, root volume patching needs to be run as sudo diff --git a/docs/LICENSE.md b/docs/LICENSE.md index 3be9c3b8a..37698bc5b 100644 --- a/docs/LICENSE.md +++ b/docs/LICENSE.md @@ -16,6 +16,8 @@ This patcher is made of multiple external applications from different people and * All rights reserved to respective authors * [AAAMouSSE](https://forums.macrumors.com/threads/mp3-1-others-sse-4-2-emulation-to-enable-amd-metal-driver.2206682/) - Syncretic * [telemetrap](https://forums.macrumors.com/threads/mp3-1-others-sse-4-2-emulation-to-enable-amd-metal-driver.2206682/post-28447707) - Syncretic + * [SurPlus](https://github.com/reenigneorcim/SurPlus) - Syncretic + * [VMM Patch Set](https://github.com/dortania/OpenCore-Legacy-Patcher/blob/4a8f61a01da72b38a4b2250386cc4b497a31a839/payloads/Config/config.plist#L1222-L1281) - parrotgeek1 * Apple Binaries - Apple Inc. Remaining files within OpenCore Legacy Patcher are copyrighted 2020-2021 Mykola Grymalyuk & Dhinak G. For integration into other projects, please request written permission. diff --git a/docs/PATCHEXPLAIN.md b/docs/PATCHEXPLAIN.md index 319a66ed3..1be2edccc 100644 --- a/docs/PATCHEXPLAIN.md +++ b/docs/PATCHEXPLAIN.md @@ -19,7 +19,7 @@ Below is a run down of the main logic OpenCore Legacy Patcher uses to gain nativ * EHCx and XHC1 Patches * Reason: Required for proper USB operation * Logic: Avoids USB maps of newer models attaching and breaking USB port functionality - * Models: All models require + * Models: All models require when spoofing with Moderate or Advanced SMBIOS ### Booter -> Quirks @@ -53,11 +53,11 @@ Below is a run down of the main logic OpenCore Legacy Patcher uses to gain nativ * SMC Patch * Reason: Required to avoid SMC Firmware updates * Logic: Patches out `smc-version` in AppleSMC.kext, requires SMC-Spoof.kext for full functionality - * Models: All models require + * Models: All models require when spoofing SMBIOS * IOHIDFamily Patch * Reason: Required for HID peripheral support in macOS on older hardware * Logic: Tricks IOHIDFamily into thinking it's always booting recovery - * Models: [2010 and older](https://github.com/dortania/OpenCore-Legacy-Patcher/blob/79ab028b0a039e97a528e0b99c876d95d9c2d41d/Resources/ModelArray.py#L310-L332) + * Models: Penryn CPUs (Core2 series) ### Kernel -> Quirks @@ -196,15 +196,13 @@ Below is an explanation of what Kexts OpenCore Legacy Patcher will inject into m Unfortunately certain on-disk patches are required to achieve full functionality. Below is a breakdown of patches supported -Note, GPU Acceleration Patches are not public yet, the below section is simply documentation for easier research with new aids. - ::: details Audio Patches ### Extensions * AppleHDA - * Reason: Re-add High Sierra's AppleHDA to achieve audio support - * Models: 2011 and older Macs (excluding MacPro4,1+) + * Reason: Re-add El Capitan's AppleHDA to achieve audio support + * Models: iMac7,1 and iMac8,1 ::: diff --git a/resources/cli_menu.py b/resources/cli_menu.py index 315ecce5e..7b6557d1e 100644 --- a/resources/cli_menu.py +++ b/resources/cli_menu.py @@ -712,12 +712,17 @@ the event there's issues. """Many thanks to the following: - Acidanthera:\tOpenCore, kexts and other tools - - Khronokernel:\tWriting and maintaining this patcher - DhinakG:\t\tWriting and maintaining this patcher + - Khronokernel:\tWriting and maintaining this patcher - ASentientBot:\tLegacy Acceleration Patches - Ausdauersportler:\tLinking fixes for SNBGraphicsFB and AMDX3000 - - Syncretic:\t\tAAAMouSSE and telemetrap - - cdf:\t\tNightShiftEnabler and Innie""" + - Syncretic:\t\tAAAMouSSE, telemetrap, and SurPlus + - cdf:\t\tNightShiftEnabler and Innie + - parrotgeek1:\tVMM Patch Set + +Source Code: +https://github.com/dortania/OpenCore-Legacy-Patcher + """ ], ).start() From a0fa3a880877a8b589aad7c5a0dc177ab9d614ca Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk Date: Wed, 6 Oct 2021 19:23:52 -0600 Subject: [PATCH 2/3] Fix desync off vmm branch Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/549 --- data/sys_patch_data.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/data/sys_patch_data.py b/data/sys_patch_data.py index 509cd3080..eb5f29de6 100644 --- a/data/sys_patch_data.py +++ b/data/sys_patch_data.py @@ -159,10 +159,18 @@ AddIntelGen2Accel = [ "AppleIntelHD3000GraphicsGA.plugin", "AppleIntelHD3000GraphicsGLDriver.bundle", "AppleIntelHD3000GraphicsVADriver.bundle", - "AppleIntelSNBGraphicsFB.kext", + # "AppleIntelSNBGraphicsFB.kext", "AppleIntelSNBVA.bundle", ] +AddIntelGen2AccelStock = [ + "AppleIntelSNBGraphicsFB-Clean.kext", +] + +AddIntelGen2AccelPatched = [ + "AppleIntelSNBGraphicsFB.kext", +], + AddIntelGen3Accel = [ "AppleIntelFramebufferCapri.kext", "AppleIntelHD4000Graphics.kext", From 96fd706ead7c1b0b5822f0871bb8a9e95b01d7a8 Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk Date: Fri, 8 Oct 2021 08:42:29 -0600 Subject: [PATCH 3/3] Implement EFICheckDisabler Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/552 Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/551 --- CHANGELOG.md | 2 ++ payloads/Config/config.plist | 18 ++++++++++++++++++ .../Acidanthera/EFICheckDisabler-v1.0.5.zip | Bin 0 -> 2596 bytes .../Kexts/Acidanthera/EFICheckDisabler.md | 1 + resources/build.py | 4 ++++ resources/cli_menu.py | 2 +- resources/constants.py | 4 ++++ 7 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 payloads/Kexts/Acidanthera/EFICheckDisabler-v1.0.5.zip create mode 100644 payloads/Kexts/Acidanthera/EFICheckDisabler.md diff --git a/CHANGELOG.md b/CHANGELOG.md index c1e62e2e1..580a29a94 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,8 @@ - Resolves Brightness control - Add AppleGVA patch set for HD3000 machines - Mainly applicable for iMac12,x and iGPU-only MacBooks +- Add EFICheckDisabler + - Based off stripped RestrictEvents.kext ## 0.2.5 diff --git a/payloads/Config/config.plist b/payloads/Config/config.plist index 18daca1c3..51c90b3f6 100644 --- a/payloads/Config/config.plist +++ b/payloads/Config/config.plist @@ -610,6 +610,24 @@ PlistPath Contents/Info.plist + + Arch + x86_64 + Comment + Disable EFI Checks + Enabled + + MaxKernel + + MinKernel + + BundlePath + EFICheckDisabler.kext + ExecutablePath + + PlistPath + Contents/Info.plist + Arch x86_64 diff --git a/payloads/Kexts/Acidanthera/EFICheckDisabler-v1.0.5.zip b/payloads/Kexts/Acidanthera/EFICheckDisabler-v1.0.5.z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w~n4b|6}(NJXOJqWSlJt zNbteReq^tKYCafv+qev98Qg2wZ6&@Qg!vI>Epm23wsuM55@067ZX4W>IPwjFhy(>K mazX;-RTx;(_=uIDZ{hZnl5+#RS=m6gumRzEpx5HrK|BDc&61q} literal 0 HcmV?d00001 diff --git a/payloads/Kexts/Acidanthera/EFICheckDisabler.md b/payloads/Kexts/Acidanthera/EFICheckDisabler.md new file mode 100644 index 000000000..528124964 --- /dev/null +++ b/payloads/Kexts/Acidanthera/EFICheckDisabler.md @@ -0,0 +1 @@ +Based off RestrictEvents.kext, stripped binary to block Apple's EFICheck driver diff --git a/resources/build.py b/resources/build.py index 6c0f8cf93..2e0858dd6 100644 --- a/resources/build.py +++ b/resources/build.py @@ -708,6 +708,10 @@ class BuildOpenCore: self.get_item_by_kv(self.config["Kernel"]["Patch"], "Identifier", "com.apple.filesystems.apfs")["Enabled"] = True # Lets us check in sys_patch.py if config supports FileVault self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["OCLP-Settings"] += " -allow_fv" + if self.get_kext_by_bundle_path("RestrictEvents.kext")["Enabled"] is False: + # Ensure this is done at the end so all previous RestrictEvents patches are applied + # RestrictEvents and EFICheckDisabler will confilict if both are injected + self.enable_kext("EFICheckDisabler.kext", self.constants.restrictevents_version, self.constants.efi_disabler_path) def set_smbios(self): spoofed_model = self.model diff --git a/resources/cli_menu.py b/resources/cli_menu.py index 7b6557d1e..3b6105a06 100644 --- a/resources/cli_menu.py +++ b/resources/cli_menu.py @@ -854,7 +854,7 @@ system_profiler SPHardwareDataType | grep 'Model Identifier' # MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_amfi, # ], [ - f"Set System Intrgity Protection (SIP):\tCurrently {self.constants.sip_status}", + f"Set System Integrity Protection (SIP):\tCurrently {self.constants.sip_status}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).change_sip, ], [ diff --git a/resources/constants.py b/resources/constants.py index 09b69bf59..32abb26fe 100644 --- a/resources/constants.py +++ b/resources/constants.py @@ -256,6 +256,10 @@ class Constants: @property def restrictevents_path(self): return self.payload_kexts_path / Path(f"Acidanthera/RestrictEvents-v{self.restrictevents_version}.zip") + + @property + def efi_disabler_path(self): + return self.payload_kexts_path / Path(f"Acidanthera/EFICheckDisabler-v{self.restrictevents_version}.zip") @property def restrictevents_mbp_path(self):