Misc fixes

- Adjust MacPro/Xserve SMBIOS spoof
- Lower SIP bits flipped
- Force delete SIP on each boot (avoids user error)

Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/510
This commit is contained in:
Mykola Grymalyuk
2021-09-25 11:49:05 -06:00
parent c053fb7244
commit 8f98cac918
5 changed files with 25 additions and 15 deletions

View File

@@ -8,6 +8,15 @@
- Allow usage of legacy AppleHDA
- Only use for machines that cannot achieve audio support normally
- Main usage for Macs without boot screen output
- Revert iMacPro1,1 SMBIOS usage on Mac Pros and Xserves
- Resolves display output issues on Legacy GCN
- Limit SIP bits flipped when disabled
- 0xFEF -> 0xE03
- `CSR_ALLOW_UNTRUSTED_KEXTS`
- `CSR_ALLOW_UNRESTRICTED_FS`
- `CSR_ALLOW_UNAPPROVED_KEXTS`
- `CSR_ALLOW_EXECUTABLE_POLICY_OVERRIDE`
- `CSR_ALLOW_UNAUTHENTICATED_ROOT`
## 0.2.5

View File

@@ -59,7 +59,7 @@ class BuildOpenCore:
elif model in ModelArray.iMac_iGPU:
return "iMac16,1"
elif model in ModelArray.MacPro:
return "iMacPro1,1"
return "MacPro7,1"
else:
return model
@@ -674,8 +674,7 @@ class BuildOpenCore:
self.get_efi_binary_by_path("OpenShell.efi", "Misc", "Tools")["Enabled"] = False
if self.constants.sip_status is False:
print("- Disabling SIP")
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["csr-active-config"] = binascii.unhexlify("EF0F0000")
self.config["NVRAM"]["Delete"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"] += ["csr-active-config"]
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["csr-active-config"] = binascii.unhexlify("030E0000")
# if self.constants.amfi_status is False:
# print("- Disabling AMFI")
# self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " amfi_get_out_of_my_way=1"

View File

@@ -161,7 +161,7 @@ Note: For security reasons, OpenShell will be disabled when Vault is set.
print(
"""SIP is used to ensure proper secuirty measures are set,
however to patch the root volume this must be disabled.
Only disable is absolutely necessary. SIP value = 0xFEF
Only disable is absolutely necessary. SIP value = 0xE03
Valid options:

View File

@@ -142,7 +142,7 @@ class Constants:
self.enable_wake_on_wlan = False # Allow Wake on WLAN for modern Broadcom
self.disable_thunderbolt = False # Disable Thunderbolt Controller
self.set_alc_usage = True # Set AppleALC usage
self.dGPU_switch = True # Set Display GPU Switching for Windows
self.dGPU_switch = True # Set Display GPU Switching for Windows
# OS Versions
## Based off Major Kernel Version
@@ -339,7 +339,7 @@ class Constants:
@property
def bluetool_path(self):
return self.payload_kexts_path / Path(f"Acidanthera/BlueToolFixup-v{self.bluetool_version}.zip")
@property
def cslvfixup_path(self):
return self.payload_kexts_path / Path(f"Acidanthera/CSLVFixup-v{self.cslvfixup_version}.zip")
@@ -570,6 +570,7 @@ class Constants:
@property
def audio_path(self):
return self.payload_apple_kexts_path / Path("Audio")
# High Sierra Extensions
@property
def audio_v2_path(self):
@@ -645,19 +646,19 @@ class Constants:
root_patch_sip_mojave = [
# Variables required to root patch in Mojave and Catalina
"CSR_ALLOW_UNTRUSTED_KEXTS",
"CSR_ALLOW_UNRESTRICTED_FS",
"CSR_ALLOW_UNAPPROVED_KEXTS",
"CSR_ALLOW_EXECUTABLE_POLICY_OVERRIDE",
"CSR_ALLOW_UNTRUSTED_KEXTS", # 0x1
"CSR_ALLOW_UNRESTRICTED_FS", # 0x2
"CSR_ALLOW_UNAPPROVED_KEXTS", # 0x200
"CSR_ALLOW_EXECUTABLE_POLICY_OVERRIDE", # 0x400
]
root_patch_sip_big_sur = [
# Variables required to root patch in Big Sur and Monterey
"CSR_ALLOW_UNTRUSTED_KEXTS",
"CSR_ALLOW_UNRESTRICTED_FS",
"CSR_ALLOW_UNAPPROVED_KEXTS",
"CSR_ALLOW_EXECUTABLE_POLICY_OVERRIDE",
"CSR_ALLOW_UNAUTHENTICATED_ROOT",
"CSR_ALLOW_UNTRUSTED_KEXTS", # 0x1
"CSR_ALLOW_UNRESTRICTED_FS", # 0x2
"CSR_ALLOW_UNAPPROVED_KEXTS", # 0x200
"CSR_ALLOW_EXECUTABLE_POLICY_OVERRIDE", # 0x400
"CSR_ALLOW_UNAUTHENTICATED_ROOT", # 0x800
]
sbm_values = [

View File

@@ -1339,6 +1339,7 @@
<key>7C436110-AB2A-4BBB-A880-FE41995C9F82</key>
<array>
<string>boot-args</string>
<string>csr-active-config</string>
</array>
<key>FA4CE28D-B62F-4C99-9CC3-6815686E30F9</key>
<array/>