diff --git a/OpCore-Simplify.py b/OpCore-Simplify.py index 43319b3..d07538a 100644 --- a/OpCore-Simplify.py +++ b/OpCore-Simplify.py @@ -90,19 +90,24 @@ class OCPE: return path, data - def select_macos_version(self, supported_macos_version): + def select_macos_version(self, native_macos_version, ocl_patched_macos_version): version_pattern = re.compile(r'^(\d+)(?:\.(\d+)(?:\.(\d+))?)?$') while True: self.u.head("Select macOS Version") print("") - for darwin_version in range(int(supported_macos_version[0][:2]), int(supported_macos_version[-1][:2]) + 1): - print("{}. {}".format(darwin_version, os_data.get_macos_name_by_darwin(str(darwin_version)))) + if ocl_patched_macos_version: + print("* Native macOS versions: ") + for darwin_version in range(int(native_macos_version[0][:2]), min(int(native_macos_version[-1][:2]), (int(ocl_patched_macos_version[-1][:2]) - 1) if ocl_patched_macos_version else 99) + 1): + print("{}{}. {}".format(" "*3 if ocl_patched_macos_version else "", darwin_version, os_data.get_macos_name_by_darwin(str(darwin_version)))) + if ocl_patched_macos_version: + print("* Requires OpenCore Legacy Patcher: ") + for darwin_version in range(int(ocl_patched_macos_version[-1][:2]), int(ocl_patched_macos_version[0][:2]) + 1): + print(" {}. {}".format(darwin_version, os_data.get_macos_name_by_darwin(str(darwin_version)))) print("") print("Please enter the macOS version you want to select:") print("- To select a major version, enter the number (e.g., 19).") print("- To specify a full version, use the Darwin version format (e.g., 22.4.6).") - print("- The version must be in the range from {} to {}.".format(supported_macos_version[0], supported_macos_version[-1])) print("") print("Q. Quit") print("") @@ -114,10 +119,11 @@ class OCPE: if match: target_version = "{}.{}.{}".format(match.group(1), match.group(2) if match.group(2) else 99, match.group(3) if match.group(3) else 99) - if self.u.parse_darwin_version(supported_macos_version[0]) <= self.u.parse_darwin_version(target_version) <= self.u.parse_darwin_version(supported_macos_version[-1]): + if self.u.parse_darwin_version(native_macos_version[0]) <= self.u.parse_darwin_version(target_version) <= self.u.parse_darwin_version(native_macos_version[-1]) or \ + (ocl_patched_macos_version and self.u.parse_darwin_version(ocl_patched_macos_version[-1]) <= self.u.parse_darwin_version(target_version) <= self.u.parse_darwin_version(ocl_patched_macos_version[0])): return target_version - def build_opencore_efi(self, hardware_report, unsupported_devices, smbios_model, macos_version): + def build_opencore_efi(self, hardware_report, unsupported_devices, smbios_model, macos_version, needs_oclp): self.u.head("Building OpenCore EFI") print("") print("1. Copy EFI base to results folder...", end=" ") @@ -136,7 +142,7 @@ class OCPE: if not config_data: raise Exception("Error: The file {} does not exist.".format(config_file)) - self.co.genarate(hardware_report, smbios_model, macos_version, self.k.kexts, config_data) + self.co.genarate(hardware_report, smbios_model, macos_version, needs_oclp, self.k.kexts, config_data) print("Done") print("3. Apply ACPI patches...", end=" ") if self.ac.ensure_dsdt(): @@ -252,9 +258,11 @@ class OCPE: def main(self): hardware_report_path = None - supported_macos_version = None + native_macos_version = None unsupported_devices = None macos_version = None + ocl_patched_macos_version = None + needs_oclp = False smbios_model = None while True: @@ -264,15 +272,15 @@ class OCPE: print("") if hardware_report_path: print("* Hardware Compatibility:") - if supported_macos_version: - print(" - Supported macOS Version: {} - {}".format(os_data.get_macos_name_by_darwin(supported_macos_version[-1]), os_data.get_macos_name_by_darwin(supported_macos_version[0]))) + if native_macos_version: + print(" - Native macOS Version: {}".format(self.c.show_macos_compatibility((native_macos_version[-1], native_macos_version[0])))) if unsupported_devices: print(" - Unsupported devices:") for index, device_name in enumerate(unsupported_devices, start=1): device_props = unsupported_devices.get(device_name) print("{}{}. {}{}".format(" "*6, index, device_name, "" if not device_props.get("Audio Endpoints") else " ({})".format(", ".join(device_props.get("Audio Endpoints"))))) print("* EFI Options:") - print(" - macOS Version: {}{}".format("Unknown" if not macos_version else os_data.get_macos_name_by_darwin(macos_version), "" if not macos_version else " ({})".format(macos_version))) + print(" - macOS Version: {}{}{}".format("Unknown" if not macos_version else os_data.get_macos_name_by_darwin(macos_version), "" if not macos_version else " ({})".format(macos_version), ". \033[1;36mRequires OpenCore Legacy Patcher\033[0m" if needs_oclp else "")) print(" - SMBIOS: {}".format("Unknown" if not smbios_model else smbios_model)) print("") print("1. Select Hardware Report") @@ -295,15 +303,15 @@ class OCPE: if option == 1: hardware_report_path, hardware_report = self.select_hardware_report() - supported_macos_version, hardware_report, unsupported_devices = self.c.check_compatibility(hardware_report) - macos_version = supported_macos_version[-1] + native_macos_version, hardware_report, unsupported_devices, needs_oclp, ocl_patched_macos_version = self.c.check_compatibility(hardware_report) + macos_version = native_macos_version[-1] if int(macos_version[:2]) == os_data.macos_versions[-1].darwin_version and os_data.macos_versions[-1].release_status == "beta": macos_version = str(int(macos_version[:2]) - 1) + macos_version[2:] smbios_model = self.s.select_smbios_model(hardware_report, macos_version) if not self.ac.ensure_dsdt(): self.ac.select_acpi_tables() self.ac.select_acpi_patches(hardware_report, unsupported_devices, smbios_model) - self.k.select_required_kexts(hardware_report, smbios_model, macos_version, self.ac.patches) + self.k.select_required_kexts(hardware_report, smbios_model, macos_version, needs_oclp, self.ac.patches) elif option < 7: try: hardware_report @@ -312,10 +320,10 @@ class OCPE: continue if option == 2: - macos_version = self.select_macos_version(supported_macos_version) - hardware_report, unsupported_devices = self.c.get_unsupported_devices(macos_version) + macos_version = self.select_macos_version(native_macos_version, ocl_patched_macos_version) + hardware_report, unsupported_devices, needs_oclp = self.c.get_unsupported_devices(macos_version) smbios_model = self.s.select_smbios_model(hardware_report, macos_version) - self.k.select_required_kexts(hardware_report, smbios_model, macos_version, self.ac.patches) + self.k.select_required_kexts(hardware_report, smbios_model, macos_version, needs_oclp, self.ac.patches) elif option == 3: self.ac.customize_patch_selection(hardware_report, unsupported_devices, smbios_model) elif option == 4: @@ -325,7 +333,7 @@ class OCPE: self.k.select_required_kexts(hardware_report, smbios_model, macos_version, self.ac.patches) elif option == 6: self.gathering_files(macos_version) - self.build_opencore_efi(hardware_report, unsupported_devices, smbios_model, macos_version) + self.build_opencore_efi(hardware_report, unsupported_devices, smbios_model, macos_version, needs_oclp) self.results(hardware_report, smbios_model) if __name__ == '__main__': diff --git a/README.md b/README.md index b2cdf4c..af32ec6 100644 --- a/README.md +++ b/README.md @@ -56,13 +56,13 @@ - Disable System Integrity Protection (SIP). - Spoof CPU IDs for Intel Pentium, Celeron, Core, and Xeon processors. - Add custom CPU names for AMD CPUs, as well as Intel Pentium, Celeron, Xeon, and Core lines from the Rocket Lake (11th) generation and newer. - - Include the necessary kexts to enable modern Broadcom Wi-Fi since macOS Sonoma 14. - Add a patch to allow booting macOS with unsupported SMBIOS. - Add NVRAM entries to bypass checking the internal Bluetooth controller. - Properly configure ResizeAppleGpuBars based on specific Resizable BAR information. - Allow flexible iGPU configuration between headless and driving a display when a supported discrete GPU is present. - Force Intel GPUs into VESA mode with HDMI and DVI connectors to simplify installation process. - Use random layout IDs have comment based on author or motherboard brand for better sound quality. + - Provide configuration required for using OpenCore Legacy Patcher and more... @@ -121,7 +121,9 @@ > > 3. If you use Intel WiFi card with macOS Sonoma and later, it will default to using the itlwm kext. Once the installation is complete, you need to use the Heliport app to connect to Wi-Fi. > -> 4. With the configuration using a modern Broadcom WiFi, after the installation is complete, you just need to use OpenCore Legacy Patcher to run 'Post Install Root Patch' for Wi-Fi, AirDrop, and other related functions to work fully +> 4. After a successful installation, if OpenCore Legacy Patcher is required, simply apply root patches to activate the missing features (such as modern Broadcom Wi-Fi card and graphics acceleration). +> +> 5. For AMD GPUs, after applying root patches from OpenCore Legacy Patcher, you need to remove the boot argument `-radvesa` for graphics acceleration to work. ## 🤝 **Contributing** diff --git a/Scripts/compatibility_checker.py b/Scripts/compatibility_checker.py index 83b6219..e734cd4 100644 --- a/Scripts/compatibility_checker.py +++ b/Scripts/compatibility_checker.py @@ -59,8 +59,8 @@ class CompatibilityChecker: self.utils.request_input("\n\nThe CPU is not compatible with macOS!") self.utils.exit_program() - self.max_supported_macos_version = max_version - self.min_supported_macos_version = min_version + self.max_native_macos_version = max_version + self.min_native_macos_version = min_version def discrete_gpu_settings(self, gpu_name, compatibility): while True: @@ -88,6 +88,8 @@ class CompatibilityChecker: max_version = os_data.get_latest_darwin_version() min_version = os_data.get_lowest_darwin_version() + ocl_patched_max_version = max_version + ocl_patched_min_version = "20.0.0" if "Intel" in gpu_manufacturer: if device_id.startswith("01") and not device_id[-2] in ("5", "6") and not device_id in ("0102", "0106", "010A"): @@ -113,6 +115,7 @@ class CompatibilityChecker: if "Navi 2" in gpu_codename: if not "AVX2" in self.hardware_report.get("CPU").get("SIMD Features"): max_version = "21.99.99" + ocl_patched_max_version = max_version else: if gpu_codename in ("Navi 23", "Navi 22"): min_version = "21.2.0" @@ -121,10 +124,19 @@ class CompatibilityChecker: else: max_version = min_version = None elif "Navi 1" in gpu_codename: + if not "AVX2" in self.hardware_report.get("CPU").get("SIMD Features"): + max_version = "21.99.99" + ocl_patched_min_version = "22.0.0" min_version = "19.0.0" elif "Vega 20" in gpu_codename: + if not "AVX2" in self.hardware_report.get("CPU").get("SIMD Features"): + max_version = "21.99.99" + ocl_patched_min_version = "22.0.0" min_version = "18.6.0" elif gpu_codename in ("Vega 10", "Polaris 22", "Polaris 20", "Baffin", "Ellesmere") or device_id == "699F": + if not "AVX2" in self.hardware_report.get("CPU").get("SIMD Features"): + max_version = "21.99.99" + ocl_patched_min_version = "22.0.0" min_version = "17.0.0" elif self.utils.contains_any(gpu_data.AMDCodenames, gpu_codename): max_version = "21.99.99" @@ -147,6 +159,9 @@ class CompatibilityChecker: gpu_props["Compatibility"] = (None, None) else: gpu_props["Compatibility"] = (max_version, min_version) + if max_version != ocl_patched_max_version: + gpu_props["OCLP Compatibility"] = (ocl_patched_max_version, ocl_patched_min_version if self.utils.parse_darwin_version(ocl_patched_min_version) > self.utils.parse_darwin_version("{}.{}.{}".format(int(max_version[:2]) + 1, 0, 0)) else "{}.{}.{}".format(int(max_version[:2]) + 1, 0, 0)) + self.ocl_patched_macos_version = (ocl_patched_max_version, self.ocl_patched_macos_version[-1] if self.ocl_patched_macos_version and self.utils.parse_darwin_version(self.ocl_patched_macos_version[-1]) < self.utils.parse_darwin_version(gpu_props.get("OCLP Compatibility")[-1]) else gpu_props.get("OCLP Compatibility")[-1]) print("{}- {}: {}{}".format( " "*3, @@ -205,6 +220,8 @@ class CompatibilityChecker: max_version = os_data.get_latest_darwin_version() min_version = os_data.get_lowest_darwin_version() + ocl_patched_max_version = max_version + ocl_patched_min_version = "23.0.0" if bus_type.startswith("PCI"): if device_id in ("8086-125B", "8086-125C", "8086-125D", "8086-3102"): @@ -217,6 +234,10 @@ class CompatibilityChecker: else: if pci_data.NetworkIDs.index(device_id) < 108: if device_id == primary_wifi_device: + if device_id in ("14E4-43A0", "14E4-43A3", "14E4-43BA"): + max_version = "22.99.99" + device_props["OCLP Compatibility"] = (ocl_patched_max_version, ocl_patched_min_version) + self.ocl_patched_macos_version = (ocl_patched_max_version, self.ocl_patched_macos_version[-1] if self.ocl_patched_macos_version and self.utils.parse_darwin_version(self.ocl_patched_macos_version[-1]) < self.utils.parse_darwin_version(device_props.get("OCLP Compatibility")[-1]) else device_props.get("OCLP Compatibility")[-1]) device_props["Compatibility"] = (max_version, min_version) primary_wifi_device = None else: @@ -252,6 +273,7 @@ class CompatibilityChecker: def get_unsupported_devices(self, macos_verison): new_hardware_report = {} unsupported_device = {} + needs_oclp = False for device_type, devices in self.hardware_report.items(): if device_type in ("Motherboard", "CPU", "USB Controllers", "Input", "Bluetooth", "System Devices"): @@ -261,6 +283,11 @@ class CompatibilityChecker: new_hardware_report[device_type] = {} for device_name, device_props in devices.items(): + if device_props.get("OCLP Compatibility") and self.utils.parse_darwin_version(device_props.get("OCLP Compatibility")[0]) >= self.utils.parse_darwin_version(macos_verison) >= self.utils.parse_darwin_version(device_props.get("OCLP Compatibility")[-1]): + new_hardware_report[device_type][device_name] = device_props + needs_oclp = True + continue + device_compatibility = device_props.get("Compatibility") if device_compatibility: @@ -274,10 +301,11 @@ class CompatibilityChecker: if not new_hardware_report[device_type]: del new_hardware_report[device_type] - return new_hardware_report, unsupported_device + return new_hardware_report, unsupported_device, needs_oclp def check_compatibility(self, hardware_report): self.hardware_report = hardware_report + self.ocl_patched_macos_version = None self.utils.head("Compatibility Checker") print() @@ -324,11 +352,11 @@ class CompatibilityChecker: self.utils.request_input("\n\nNo compatible GPU card for macOS was found!") self.utils.exit_program() - self.max_supported_macos_version = max_supported_gpu_version if self.utils.parse_darwin_version(max_supported_gpu_version) < self.utils.parse_darwin_version(self.max_supported_macos_version) else self.max_supported_macos_version - self.min_supported_macos_version = min_supported_gpu_version if self.utils.parse_darwin_version(min_supported_gpu_version) > self.utils.parse_darwin_version(self.min_supported_macos_version) else self.min_supported_macos_version + self.max_native_macos_version = max_supported_gpu_version if self.utils.parse_darwin_version(max_supported_gpu_version) < self.utils.parse_darwin_version(self.max_native_macos_version) else self.max_native_macos_version + self.min_native_macos_version = min_supported_gpu_version if self.utils.parse_darwin_version(min_supported_gpu_version) > self.utils.parse_darwin_version(self.min_native_macos_version) else self.min_native_macos_version if discrete_gpu_mode == "Unknown": print("") self.utils.request_input() - return (self.min_supported_macos_version, self.max_supported_macos_version), *self.get_unsupported_devices(self.max_supported_macos_version) \ No newline at end of file + return (self.min_native_macos_version, self.max_native_macos_version), *self.get_unsupported_devices(self.max_native_macos_version), self.ocl_patched_macos_version \ No newline at end of file diff --git a/Scripts/config_prodigy.py b/Scripts/config_prodigy.py index f1e298a..79f0e53 100644 --- a/Scripts/config_prodigy.py +++ b/Scripts/config_prodigy.py @@ -368,7 +368,7 @@ class ConfigProdigy: return kernel_patch - def boot_args(self, hardware_report, macos_version, kexts, resize_bar): + def boot_args(self, hardware_report, macos_version, needs_oclp, kexts, resize_bar): boot_args = [ "-v", "debug=0x100", @@ -391,8 +391,12 @@ class ConfigProdigy: self.utils.parse_darwin_version(macos_version) < self.utils.parse_darwin_version("20.0.0"): boot_args.append("-cdfon") - if "Intel" in hardware_report.get("CPU").get("Manufacturer"): + if "Intel" in hardware_report.get("CPU").get("Manufacturer") and \ + "Integrated GPU" in list(hardware_report.get("GPU").items())[-1][-1].get("Device Type"): intergrated_gpu = list(hardware_report.get("GPU").items())[-1] + if needs_oclp and intergrated_gpu[-1].get("OCLP Compatibility"): + boot_args.append("ipc_control_port_options=0") + if intergrated_gpu[-1].get("Device ID")[5:].startswith(("3E", "87", "9B")) and \ self.utils.parse_darwin_version(macos_version) >= self.utils.parse_darwin_version("19.4.0"): boot_args.append("igfxonln=1") @@ -420,6 +424,12 @@ class ConfigProdigy: if discrete_gpu.get("Device ID") in ("1002-67B0", "1002-67B1", "1002-67B8", "1002-6810", "1002-6811"): boot_args.append("-raddvi") + + if needs_oclp: + if discrete_gpu.get("Manufacturer") == "AMD": + boot_args.append("-radvesa") + elif discrete_gpu.get("Manufacturer") == "NVIDIA": + boot_args.extend(("nvda_drv_vrl=1", "ngfxcompat=1", "ngfxgl=1")) elif kext.name == "AppleALC": if hardware_report.get("Sound"): codec_id = list(hardware_report.get("Sound").items())[0][-1].get("Device ID") @@ -431,10 +441,6 @@ class ConfigProdigy: boot_args.append("-vi2c-force-polling") elif kext.name == "CpuTopologyRebuild": boot_args.append("-ctrsmt") - elif kext.name == "RestrictEvents": - if self.utils.parse_darwin_version(macos_version) >= self.utils.parse_darwin_version("23.0.0"): - boot_args.append("revpatch=sbvmm{}".format(",cpuname" if not (" Core" in hardware_report.get("CPU").get("Processor Name") and \ - self.utils.contains_any(cpu_data.IntelCPUGenerations, hardware_report.get("CPU").get("Codename"), start=4)) else "")) return " ".join(boot_args) @@ -460,7 +466,7 @@ class ConfigProdigy: return uefi_drivers - def genarate(self, hardware_report, smbios_model, macos_version, kexts, config): + def genarate(self, hardware_report, smbios_model, macos_version, needs_oclp, kexts, config): del config["#WARNING - 1"] del config["#WARNING - 2"] del config["#WARNING - 3"] @@ -529,12 +535,12 @@ class ConfigProdigy: config["Misc"]["Entries"] = [] config["Misc"]["Security"]["AllowSetDefault"] = True config["Misc"]["Security"]["ScanPolicy"] = 0 - config["Misc"]["Security"]["SecureBootModel"] = "Default" if self.utils.parse_darwin_version("20.0.0") <= self.utils.parse_darwin_version(macos_version) < self.utils.parse_darwin_version("23.0.0") else "Disabled" + config["Misc"]["Security"]["SecureBootModel"] = "Default" if not needs_oclp and self.utils.parse_darwin_version("20.0.0") <= self.utils.parse_darwin_version(macos_version) < self.utils.parse_darwin_version("23.0.0") else "Disabled" config["Misc"]["Security"]["Vault"] = "Optional" config["Misc"]["Tools"] = [] del config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["#INFO (prev-lang:kbd)"] - config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] = self.boot_args(hardware_report, macos_version, kexts, config["Booter"]["Quirks"]["ResizeAppleGpuBars"] == 0) + config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] = self.boot_args(hardware_report, macos_version, needs_oclp, kexts, config["Booter"]["Quirks"]["ResizeAppleGpuBars"] == 0) config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["csr-active-config"] = self.utils.hex_to_bytes(self.csr_active_config(macos_version)) config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["prev-lang:kbd"] = "en:252" config["NVRAM"]["Delete"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"].append("csr-active-config") @@ -555,13 +561,37 @@ class ConfigProdigy: if kext.name == "BlueToolFixup": config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["bluetoothExternalDongleFailed"] = self.utils.hex_to_bytes("00") config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["bluetoothInternalControllerInfo"] = self.utils.hex_to_bytes("0000000000000000000000000000") - config["NVRAM"]["Delete"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"].extend(["bluetoothExternalDongleFailed", "bluetoothInternalControllerInfo"]) elif kext.name == "RestrictEvents": + revpatch = [] + revblock = [] + if self.utils.parse_darwin_version(macos_version) > self.utils.parse_darwin_version("23.0.0") or \ + len(config["Booter"]["Patch"]) and self.utils.parse_darwin_version(macos_version) > self.utils.parse_darwin_version("20.4.0"): + revpatch.append("sbvmm") if not (" Core" in hardware_report.get("CPU").get("Processor Name") and \ self.utils.contains_any(cpu_data.IntelCPUGenerations, hardware_report.get("CPU").get("Codename"), start=4)): config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["revcpu"] = 1 config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["revcpuname"] = hardware_report.get("CPU").get("Processor Name") - config["NVRAM"]["Delete"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"].extend(["revcpu", "revcpuname"]) + if self.utils.parse_darwin_version(macos_version) > self.utils.parse_darwin_version("23.0.0"): + revpatch.append("cpuname") config["PlatformInfo"]["Generic"]["ProcessorType"] = 1537 if int(hardware_report.get("CPU").get("Core Count")) < 8 else 3841 + if "Intel" in hardware_report.get("CPU").get("Manufacturer") and \ + "Integrated GPU" in list(hardware_report.get("GPU").items())[-1][-1].get("Device Type"): + intergrated_gpu = list(hardware_report.get("GPU").items())[-1][-1] + if needs_oclp and intergrated_gpu.get("OCLP Compatibility"): + config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["OCLP-Settings"] = "-allow_amfi" + if self.utils.parse_darwin_version(macos_version) >= self.utils.parse_darwin_version("20.4.0"): + if intergrated_gpu.get("Codename") in ("Broadwell", "Haswell", "Ivy Bridge", "Sandy Bridge"): + revblock.append("media") + if intergrated_gpu.get("Codename") in ("Kaby Lake", "Skylake", "Broadwell", "Haswell"): + revpatch.append("asset") + elif intergrated_gpu.get("Codename") in ("Ivy Bridge", "Sandy Bridge"): + revpatch.append("f16c") + if revpatch: + config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["revpatch"] = ",".join(revpatch) + if revblock: + config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["revblock"] = ",".join(revblock) + + config["NVRAM"]["Delete"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"] = list(config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"].keys()) + config["NVRAM"]["Delete"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"] = list(config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"].keys()) return config \ No newline at end of file diff --git a/Scripts/kext_maestro.py b/Scripts/kext_maestro.py index 2a9523c..f7561ab 100644 --- a/Scripts/kext_maestro.py +++ b/Scripts/kext_maestro.py @@ -96,7 +96,7 @@ class KextMaestro: if other_kext.conflict_group_id == kext.conflict_group_id and other_kext.name != kext.name: other_kext.checked = False - def select_required_kexts(self, hardware_report, smbios_model, macos_version, acpi_patches): + def select_required_kexts(self, hardware_report, smbios_model, macos_version, needs_oclp, acpi_patches): for kext in self.kexts: kext.checked = kext.required @@ -143,6 +143,9 @@ class KextMaestro: self.is_intel_hedt_cpu(hardware_report.get("CPU").get("Codename")): selected_kexts.append("ForgedInvariant") + if needs_oclp: + selected_kexts.extend(("AMFIPass", "RestrictEvents")) + ethernet_pci = None for network_name, network_props in hardware_report.get("Network", {}).items(): device_id = network_props.get("Device ID") @@ -150,7 +153,7 @@ class KextMaestro: if self.utils.contains_any(pci_data.NetworkIDs, device_id, end=21): if device_id in ["14E4-43A0", "14E4-43A3", "14E4-43BA"]: if self.utils.parse_darwin_version(macos_version) >= self.utils.parse_darwin_version("23.0.0"): - selected_kexts.extend(("AirportBrcmFixup", "IOSkywalkFamily", "AMFIPass")) + selected_kexts.extend(("AirportBrcmFixup", "IOSkywalkFamily")) elif device_id in pci_data.NetworkIDs: selected_kexts.append("AirportBrcmFixup") elif self.utils.contains_any(pci_data.NetworkIDs, device_id, start=21, end=108):