mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-13 20:28:21 +10:00
Clean up code
This commit is contained in:
@@ -33,6 +33,8 @@
|
||||
- TeraScale 2 acceleration to be added in the future
|
||||
- Allow Trackpad gestures on MacBook4,1 and MacBook5,2
|
||||
- System Preferences will not report settings however
|
||||
- Allow Root Volume Patched Systems to use FileVault 2
|
||||
- Requires macOS 11.3 (20E232) or newer
|
||||
|
||||
## 0.2.4
|
||||
|
||||
|
||||
@@ -213,18 +213,19 @@ If you plan to create the USB for another machine, please select the "Change Mod
|
||||
# self.constants.secure_status = True # Monterey
|
||||
self.constants.amfi_status = True
|
||||
elif host_is_target:
|
||||
self.constants.sip_status = False # Unsigned kexts
|
||||
self.constants.sip_status = False # Unsigned kexts
|
||||
self.constants.secure_status = False # Root volume modified
|
||||
self.constants.amfi_status = False # Unsigned binaries
|
||||
self.constants.amfi_status = False # Unsigned binaries
|
||||
if model in ModelArray.ModernGPU:
|
||||
if host_is_target and model in ["iMac13,1", "iMac13,3"] and self.computer.dgpu:
|
||||
# Some models have a supported dGPU, others don't
|
||||
print("- Detected Metal dGPU, overriding default configuration")
|
||||
self.constants.sip_status = True
|
||||
elif host_is_target:
|
||||
self.constants.sip_status = False # Unsigned kexts
|
||||
self.constants.sip_status = False # Unsigned kexts
|
||||
self.constants.secure_status = False # Modified root volume
|
||||
# self.constants.amfi_status = True # Signed bundles, Don't need to explicitly set currently
|
||||
self.constants.allow_fv_root = True # Allow FileVault on broken seal
|
||||
# self.constants.amfi_status = True # Signed bundles, Don't need to explicitly set currently
|
||||
if model == "MacBook8,1" and host_is_target:
|
||||
# MacBook8,1 has an odd bug where it cannot install Monterey with Minimal spoofing
|
||||
self.constants.serial_settings == "Moderate"
|
||||
|
||||
@@ -53,11 +53,12 @@ class OpenCoreLegacyPatcher:
|
||||
# Some models have a supported dGPU, others don't
|
||||
self.constants.sip_status = True
|
||||
# self.constants.secure_status = True # Monterey
|
||||
# self.constants.amfi_status = True # Signed bundles, Don't need to explicitly set currently
|
||||
# self.constants.amfi_status = True # Signed bundles, Don't need to explicitly set currently
|
||||
else:
|
||||
self.constants.sip_status = False # Unsigned kexts
|
||||
self.constants.sip_status = False # Unsigned kexts
|
||||
self.constants.secure_status = False # Modified root volume
|
||||
# self.constants.amfi_status = True # Signed bundles, Don't need to explicitly set currently
|
||||
self.constants.allow_fv_root = True # Allow FileVault on broken seal
|
||||
# self.constants.amfi_status = True # Signed bundles, Don't need to explicitly set currently
|
||||
if model == "MacBook8,1":
|
||||
# MacBook8,1 has an odd bug where it cannot install Monterey with Minimal spoofing
|
||||
self.constants.serial_settings = "Moderate"
|
||||
|
||||
@@ -686,12 +686,12 @@ class BuildOpenCore:
|
||||
if self.model in ModelArray.dGPU_switch:
|
||||
print("- Allowing GMUX switching in Windows")
|
||||
self.config["Booter"]["Quirks"]["SignalAppleOS"] = True
|
||||
# if self.constants.allow_fv_root is True:
|
||||
if self.constants.allow_fv_root is True:
|
||||
# apfs.kext has an undocumented boot-arg that allows FileVault usage on broken APFS seals (-arv_allow_fv)
|
||||
# This is however hidden behind kern.development, thus we patch _apfs_filevault_allowed to always return true
|
||||
# Note this function was added in 11.3 (20E232, 20.4), older builds do not support this (ie. 11.2.3)
|
||||
print("- Allowing FileVault on Root Patched systems")
|
||||
self.get_item_by_kv(self.config["Kernel"]["Patch"], "Identifier", "com.apple.filesystems.apfs")["Enabled"] = True
|
||||
print("- Allowing FileVault on Root Patched systems")
|
||||
self.get_item_by_kv(self.config["Kernel"]["Patch"], "Identifier", "com.apple.filesystems.apfs")["Enabled"] = True
|
||||
|
||||
|
||||
def set_smbios(self):
|
||||
|
||||
Reference in New Issue
Block a user