Fix OTA updates on T2 SMBIOS

Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/471
This commit is contained in:
Mykola Grymalyuk
2021-09-29 11:49:30 -06:00
parent 8d02a7984d
commit dd40ddc452
9 changed files with 35 additions and 22 deletions

View File

@@ -33,7 +33,6 @@ class BuildOpenCore:
self.gfx0_path = None
def smbios_set(self, model):
print("- Setting macOS Monterey Supported SMBIOS")
if model in ModelArray.MacBookAir_11:
return "MacBookAir7,1"
elif model in ModelArray.MacBookAir_13:
@@ -180,11 +179,12 @@ class BuildOpenCore:
if self.constants.allow_oc_everywhere is False:
self.get_item_by_kv(self.config["Kernel"]["Patch"], "Identifier", "com.apple.driver.AppleSMC")["Enabled"] = True
# if self.get_kext_by_bundle_path("latebloom.kext")["Enabled"] is True:
# print(f"- Setting latebloom delay of {self.constants.latebloom_delay}ms, range {self.constants.latebloom_range}ms, debug {bool(self.constants.latebloom_debug)}")
# self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"][
# "boot-args"
# ] += f" latebloom={self.constants.latebloom_delay} lb_range={self.constants.latebloom_range} lb_debug={self.constants.latebloom_debug}"
if self.smbios_set(self.model) in ModelArray.T2_Models:
# Monterey T2 SMBIOS don't get OS updates without a T2 SBM
# Forces VMM patch instead
if self.get_kext_by_bundle_path("RestrictEvents.kext")["Enabled"] is False:
self.enable_kext("RestrictEvents.kext", self.constants.restrictevents_version, self.constants.restrictevents_path)
if self.model in ModelArray.PCIRaceCondition:
# Ref: https://github.com/reenigneorcim/SurPlus
print("- Adding SurPlus Patch for Race Condition")
@@ -736,6 +736,7 @@ class BuildOpenCore:
def set_smbios(self):
spoofed_model = self.model
if self.constants.override_smbios == "Default":
print("- Setting macOS Monterey Supported SMBIOS")
spoofed_model = self.smbios_set(self.model)
else:
spoofed_model = self.constants.override_smbios

View File

@@ -29,8 +29,8 @@ class Constants:
self.airportbcrmfixup_version = "2.1.3" # AirPortBrcmFixup
self.nvmefix_version = "1.0.9" # NVMeFix
self.applealc_version = "1.6.3" # AppleALC
self.restrictevents_version = "1.0.3" # RestrictEvents
self.restrictevents_mbp_version = "1.0.3" # RestrictEvents blocking displaypolicyd (see RestrictEvents-MBP91.patch)
self.restrictevents_version = "1.0.5" # RestrictEvents
self.restrictevents_mbp_version = "1.0.5" # RestrictEvents blocking displaypolicyd (see RestrictEvents-MBP91.patch)
self.featureunlock_version = "1.0.3" # FeatureUnlock
self.debugenhancer_version = "1.0.4" # DebugEnhancer
self.cpufriend_version = "1.2.4" # CPUFriend

View File

@@ -1047,3 +1047,22 @@ Bluetooth_BRCM20702_v1 = [
"iMac13,2",
"iMac13,3",
]
T2_Models = [
"MacBookAir8,1",
"MacBookAir8,2",
"MacBookAir9,1",
"MacBookPro15,1",
"MacBookPro15,2",
"MacBookPro15,3",
"MacBookPro15,4",
"MacBookPro16,1",
"MacBookPro16,2",
"MacBookPro16,3",
"MacBookPro16,4",
"Macmini8,1",
"iMac20,1",
"iMac20,2",
"iMacPro1,1",
"MacPro7,1",
]