diff --git a/CHANGELOG.md b/CHANGELOG.md index 8cee44f06..2a1def6a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # OpenCore Legacy Patcher changelog +## 0.1.8 +- Fix Kernel Panic in Big Sur and Monterey +- Increment binaries: + - Lilu (1.5.4 rolling - 06-15-2021) + ## 0.1.7 - Add FireWire Boot Support for Catalina and newer - Add NVMe firmware support for older models (ie. MacPro3,1) diff --git a/OpenCore-Patcher.command b/OpenCore-Patcher.command index 1d83b400d..eae13eb2f 100755 --- a/OpenCore-Patcher.command +++ b/OpenCore-Patcher.command @@ -17,52 +17,47 @@ class OpenCoreLegacyPatcher(): self.current_model: str = None self.current_model = DeviceProbe.smbios_probe().model_detect(False) self.constants.detected_os = int(platform.uname().release.partition(".")[0]) - if self.current_model in ModelArray.LegacyGPU: - dgpu_vendor,dgpu_device,dgpu_acpi = DeviceProbe.pci_probe().gpu_probe("GFX0") - - if (dgpu_vendor == self.constants.pci_amd_ati and (dgpu_device in PCIIDArray.amd_ids().polaris_ids or dgpu_device in PCIIDArray.amd_ids().vega_ids or dgpu_device in PCIIDArray.amd_ids().navi_ids or dgpu_device in PCIIDArray.amd_ids().legacy_gcn_ids)) or (dgpu_vendor == self.constants.pci_nvidia and dgpu_device in PCIIDArray.nvidia_ids().kepler_ids): - self.constants.sip_status = True - self.constants.secure_status = False - self.constants.disable_amfi = False - else: - self.constants.sip_status = False - self.constants.secure_status = False - self.constants.disable_amfi = True - if self.current_model in ModelArray.ModernGPU: - if self.current_model in ["iMac13,1", "iMac13,3"]: - dgpu_vendor,dgpu_device,dgpu_acpi = DeviceProbe.pci_probe().gpu_probe("GFX0") - if not dgpu_vendor: - self.constants.sip_status = False - self.constants.secure_status = False - else: - self.constants.sip_status = False - self.constants.secure_status = False - - # Logic for when user runs custom OpenCore build and do not expose it - # Note: This logic currently only applies for iMacPro1,1 users, see below threads on the culprits: - # - https://forums.macrumors.com/threads/2011-imac-graphics-card-upgrade.1596614/post-17425857 - # - https://forums.macrumors.com/threads/opencore-on-the-mac-pro.2207814/ - # PLEASE FOR THE LOVE OF GOD JUST SET ExposeSensitiveData CORRECTLY!!! - if self.current_model == "iMacPro1,1": - serial: str = subprocess.run("system_profiler SPHardwareDataType | grep Serial".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode() - serial = [line.strip().split("Number (system): ", 1)[1] for line in serial.split("\n") if line.strip().startswith("Serial")][0] - true_model = subprocess.run([str(self.constants.macserial_path), "--info", str(serial)], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - true_model = [i.partition(" - ")[2] for i in true_model.stdout.decode().split("\n") if "Model: " in i][0] - print(f"True Model: {true_model}") - if not true_model.startswith("Unknown"): - self.current_model = true_model + self.check_default_settings(self.current_model, False) custom_cpu_model_value: str = subprocess.run("nvram 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:revcpuname".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode() - if not custom_cpu_model_value.startswith("nvram: Error getting variable"): custom_cpu_model_value = [line.strip().split(":revcpuname ", 1)[1] for line in custom_cpu_model_value.split("\n") if line.strip().startswith("4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:")][0] if custom_cpu_model_value.split("%00")[0] != "": self.constants.custom_cpu_model = 1 self.constants.custom_cpu_model_value = custom_cpu_model_value.split("%00")[0] + if "-v" in Utilities.get_nvram("boot-args", decode=False): + self.constants.verbose_debug = True + # Check if running in RecoveryOS self.check_recovery() + def check_default_settings(self, model, custom): + self.constants.sip_status = True + self.constants.disable_amfi = False + if model in ModelArray.LegacyGPU: + if custom is False: + dgpu_vendor,dgpu_device,dgpu_acpi = DeviceProbe.pci_probe().gpu_probe("GFX0") + if (dgpu_vendor == self.constants.pci_amd_ati and (dgpu_device in PCIIDArray.amd_ids().polaris_ids or dgpu_device in PCIIDArray.amd_ids().vega_ids or dgpu_device in PCIIDArray.amd_ids().navi_ids or dgpu_device in PCIIDArray.amd_ids().legacy_gcn_ids)) or (dgpu_vendor == self.constants.pci_nvidia and dgpu_device in PCIIDArray.nvidia_ids().kepler_ids): + self.constants.sip_status = True + self.constants.secure_status = False + self.constants.disable_amfi = False + else: + self.constants.sip_status = False + self.constants.secure_status = False + self.constants.disable_amfi = True + if model in ModelArray.ModernGPU: + if model in ["iMac13,1", "iMac13,3"]: + + if custom is False: + dgpu_vendor,dgpu_device,dgpu_acpi = DeviceProbe.pci_probe().gpu_probe("GFX0") + if not dgpu_vendor: + self.constants.sip_status = False + self.constants.secure_status = False + else: + self.constants.sip_status = False + self.constants.secure_status = False + def check_recovery(self): root_partition_info = plistlib.loads(subprocess.run("diskutil info -plist /".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()) if root_partition_info["VolumeName"] == "macOS Base System" and \ @@ -95,6 +90,8 @@ system_profiler SPHardwareDataType | grep 'Model Identifier' if print_models in {"y", "Y", "yes", "Yes"}: print("\n".join(ModelArray.SupportedSMBIOS)) input("\nPress [ENTER] to continue") + else: + self.check_default_settings(self.constants.custom_model, True) def patcher_settings(self): response = None @@ -230,7 +227,6 @@ B. Exit def main_menu(self): response = None - ModelArray.SupportedSMBIOS = ModelArray.SupportedSMBIOS12 while not (response and response == -1): title = [ f"OpenCore Legacy Patcher v{self.constants.patcher_version}", diff --git a/Resources/CliMenu.py b/Resources/CliMenu.py index 4cebc6f14..da946a052 100644 --- a/Resources/CliMenu.py +++ b/Resources/CliMenu.py @@ -11,24 +11,6 @@ class MenuOptions: self.model = model self.constants: Constants.Constants = versions - def change_os(self): - Utilities.cls() - Utilities.header(["Select Patcher's Target OS"]) - print(f""" -Minimum Target:\t{self.constants.min_os_support} -Maximum Target:\t{self.constants.max_os_support} -Current target:\t{self.constants.os_support} - """) - temp_os_support = float(input("Please enter OS target: ")) - if (self.constants.max_os_support < temp_os_support) or (temp_os_support < self.constants.min_os_support): - print("Unsupported entry") - else: - self.constants.os_support = temp_os_support - if temp_os_support == 11.0: - ModelArray.SupportedSMBIOS = ModelArray.SupportedSMBIOS11 - elif temp_os_support == 12.0: - ModelArray.SupportedSMBIOS = ModelArray.SupportedSMBIOS12 - def change_verbose(self): Utilities.cls() Utilities.header(["Set Verbose mode"]) diff --git a/Resources/Constants.py b/Resources/Constants.py index 2cc3847a7..1858b1375 100644 --- a/Resources/Constants.py +++ b/Resources/Constants.py @@ -9,7 +9,7 @@ from pathlib import Path class Constants: def __init__(self): - self.patcher_version = "0.1.7" + self.patcher_version = "0.1.8" self.opencore_commit = "4e0ff2d - 05-23-2021" self.opencore_version = "0.7.0" self.lilu_version = "1.5.4" diff --git a/Resources/ModelArray.py b/Resources/ModelArray.py index 772d2c43c..52de2e308 100644 --- a/Resources/ModelArray.py +++ b/Resources/ModelArray.py @@ -1,76 +1,6 @@ # Lists all models and required patches # Copyright (C) 2020-2021, Dhinak G, Mykola Grymalyuk SupportedSMBIOS = [ - # To be overwritten on program start -] - -SupportedSMBIOS11 = [ - # MacBook - "MacBook4,1", - "MacBook5,1", - "MacBook5,2", - "MacBook6,1", - "MacBook7,1", - # MacBook Air - "MacBookAir2,1", - "MacBookAir3,1", - "MacBookAir3,2", - "MacBookAir4,1", - "MacBookAir4,2", - "MacBookAir5,1", - "MacBookAir5,2", - # MacBook Pro - "MacBookPro4,1", - "MacBookPro5,1", - "MacBookPro5,2", - "MacBookPro5,3", - "MacBookPro5,4", - "MacBookPro5,5", - "MacBookPro6,1", - "MacBookPro6,2", - "MacBookPro7,1", - "MacBookPro8,1", - "MacBookPro8,2", - "MacBookPro8,3", - "MacBookPro9,1", - "MacBookPro9,2", - "MacBookPro10,1", - "MacBookPro10,2", - # Mac Mini - "Macmini3,1", - "Macmini4,1", - "Macmini5,1", - "Macmini5,2", - "Macmini5,3", - "Macmini6,1", - "Macmini6,2", - # iMac - "iMac7,1", - "iMac8,1", - "iMac9,1", - "iMac10,1", - "iMac11,1", - "iMac11,2", - "iMac11,3", - "iMac12,1", - "iMac12,2", - "iMac13,1", - "iMac13,2", - "iMac13,3", - "iMac14,1", - "iMac14,2", - "iMac14,3", - # Mac Pro - "MacPro3,1", - "MacPro4,1", - "MacPro5,1", - # Xserve - "Xserve2,1", - "Xserve3,1", - "Dortania1,1", -] - -SupportedSMBIOS12 = [ # MacBook "MacBook4,1", "MacBook5,1", @@ -1115,208 +1045,6 @@ NoFireWireSupport = [ "MacBookAir3,2", ] -DeleteNvidiaAccel11 = [ - "AMDRadeonX4000.kext", - "AMDRadeonX4000HWServices.kext", - "AMDRadeonX5000.kext", - "AMDRadeonX5000HWServices.kext", - "AMDRadeonX6000.kext", - "AMDRadeonX6000Framebuffer.kext", - "AMDRadeonX6000HWServices.kext", - "AppleIntelBDWGraphics.kext", - "AppleIntelBDWGraphicsFramebuffer.kext", - "AppleIntelCFLGraphicsFramebuffer.kext", - "AppleIntelHD4000Graphics.kext", - "AppleIntelHD5000Graphics.kext", - "AppleIntelICLGraphics.kext", - "AppleIntelICLLPGraphicsFramebuffer.kext", - "AppleIntelKBLGraphics.kext", - "AppleIntelKBLGraphicsFramebuffer.kext", - "AppleIntelSKLGraphics.kext", - "AppleIntelSKLGraphicsFramebuffer.kext", - "AppleIntelFramebufferAzul.kext", - "AppleIntelFramebufferCapri.kext", - "AppleParavirtGPU.kext", - "GeForce.kext", - "IOAcceleratorFamily2.kext", - "IOGPUFamily.kext", -] - -DeleteAMDAccel11 = [ - "AMDRadeonX4000.kext", - "AMDRadeonX4000HWServices.kext", - "AMDRadeonX5000.kext", - "AMDRadeonX5000HWServices.kext", - "AMDRadeonX6000.kext", - "AMDRadeonX6000Framebuffer.kext", - "AMDRadeonX6000HWServices.kext", - "AMD7000Controller.kext", # AMDSupport Dependency - "AMD8000Controller.kext", # AMDSupport Dependency - "AMD9000Controller.kext", # AMDSupport Dependency - "AMD9500Controller.kext", # AMDSupport Dependency - "AMD10000Controller.kext", # AMDSupport Dependency - "AppleIntelBDWGraphics.kext", - "AppleIntelBDWGraphicsFramebuffer.kext", - "AppleIntelCFLGraphicsFramebuffer.kext", - "AppleIntelHD4000Graphics.kext", - "AppleIntelHD5000Graphics.kext", - "AppleIntelICLGraphics.kext", - "AppleIntelICLLPGraphicsFramebuffer.kext", - "AppleIntelKBLGraphics.kext", - "AppleIntelKBLGraphicsFramebuffer.kext", - "AppleIntelSKLGraphics.kext", - "AppleIntelSKLGraphicsFramebuffer.kext", - "AppleIntelFramebufferAzul.kext", - "AppleIntelFramebufferCapri.kext", - "AppleParavirtGPU.kext", - "GeForce.kext", - "IOGPUFamily.kext", -] - -DeleteAMDAccel11TS2 = [ - "AppleCameraInterface.kext", -] - -AddNvidiaAccel11 = [ - "GeForceGA.bundle", - "GeForceTesla.kext", - "GeForceTeslaGLDriver.bundle", - "GeForceTeslaVADriver.bundle", - "NVDANV50HalTesla.kext", - "NVDAResmanTesla.kext", - "IOSurface.kext", -] - -AddNvidiaBrightness = [ - "GeForceGA.bundle", - "GeForceTesla.kext", - "GeForceTeslaGLDriver.bundle", - "GeForceTeslaVADriver.bundle", - "NVDANV50HalTesla.kext", - "NVDAResmanTesla.kext", -] - -AddNvidiaKeplerAccel11 = [ - "GeForce.kext", - "GeForceAIRPlugin.bundle", - "GeForceGLDriver.bundle", - "GeForceMTLDriver.bundle", - "GeForceVADriver.bundle", - "NVDAGF100Hal.kext", - "NVDAGK100Hal.kext", - "NVDAResman.kext", - "NVDAStartup.kext", - "NVSMU.kext", -] - -AddAMDAccel11 = [ - "AMD2400Controller.kext", - "AMD2600Controller.kext", - "AMD3800Controller.kext", - "AMD4600Controller.kext", - "AMD4800Controller.kext", - "AMD5000Controller.kext", - "AMD6000Controller.kext", - "AMDFramebuffer.kext", - "AMDLegacyFramebuffer.kext", - "AMDLegacySupport.kext", - "AMDRadeonVADriver.bundle", - "AMDRadeonVADriver2.bundle", - "AMDRadeonX3000.kext", - "AMDRadeonX3000GLDriver.bundle", - "AMDShared.bundle", - "AMDSupport.kext", - "ATIRadeonX2000.kext", - "ATIRadeonX2000GA.plugin", - "ATIRadeonX2000GLDriver.bundle", - "ATIRadeonX2000VADriver.bundle", -] - -AddAMDBrightness = [ - "AMD2400Controller.kext", - "AMD2600Controller.kext", - "AMD3800Controller.kext", - "AMD4600Controller.kext", - "AMD4800Controller.kext", - "AMD5000Controller.kext", - "AMD6000Controller.kext", - "AMDLegacyFramebuffer.kext", - "AMDLegacySupport.kext", - "AMDRadeonVADriver.bundle", - "AMDRadeonVADriver2.bundle", - #"AMDRadeonX3000.kext", - #"AMDRadeonX3000GLDriver.bundle", - "AMDShared.bundle", - "ATIRadeonX2000.kext", - "ATIRadeonX2000GA.plugin", - "ATIRadeonX2000GLDriver.bundle", - "ATIRadeonX2000VADriver.bundle", -] - -AddAMDAccel11TS2 = [ - "IOSurface.kext", -] - -AddIntelGen1Accel = [ - "AppleIntelHDGraphics.kext", - "AppleIntelHDGraphicsFB.kext", - "AppleIntelHDGraphicsGA.plugin", - "AppleIntelHDGraphicsGLDriver.bundle", - "AppleIntelHDGraphicsVADriver.bundle", -] - -AddIntelGen2Accel = [ - "AppleIntelHD3000Graphics.kext", - "AppleIntelHD3000GraphicsGA.plugin", - "AppleIntelHD3000GraphicsGLDriver.bundle", - "AppleIntelHD3000GraphicsVADriver.bundle", - "AppleIntelSNBGraphicsFB.kext", - "AppleIntelSNBVA.bundle", -] - -AddIntelGen3Accel = [ - "AppleIntelFramebufferCapri.kext", - "AppleIntelHD4000Graphics.kext", - "AppleIntelHD4000GraphicsGLDriver.bundle", - "AppleIntelHD4000GraphicsMTLDriver.bundle", - "AppleIntelHD4000GraphicsVADriver.bundle", - "AppleIntelIVBVA.bundle", - "AppleIntelGraphicsShared.bundle", -] - -AddGeneralAccel = [ - # Below 5 from dosdude1, unknown whether they benifit - #"AppleGraphicsControl.kext", - #"AppleGraphicsPowerManagement.kext", - #"AppleMCCSControl.kext", - #"IOGraphicsFamily.kext", - #"IONDRVSupport.kext", - "IOAcceleratorFamily2.kext", - "IOSurface.kext" -] - -DeleteBrightness = [ - "AppleGraphicsControl.kext/Contents/PlugIns/AGDCBacklightControl.kext" -] - -AddBrightness = [ - "AppleBacklight.kext", - "AppleBacklightExpert.kext", -] - -AddVolumeControl = [ - "AppleHDA.kext", - "IOAudioFamily.kext", -] - -DeleteVolumeControl = [ - "AppleVirtIO.kext", - "AppleVirtualGraphics.kext", - "AppleVirtualPlatform.kext", - "ApplePVPanic.kext", - "AppleVirtIOStorage.kext", -] - RecoveryIgnore = [ "Update", "VM", diff --git a/Resources/SysPatch.py b/Resources/SysPatch.py index 64cfa829e..cd6c5410f 100644 --- a/Resources/SysPatch.py +++ b/Resources/SysPatch.py @@ -13,7 +13,7 @@ import zipfile from pathlib import Path from typing import Any -from Resources import Constants, DeviceProbe, ModelArray, PCIIDArray, Utilities +from Resources import Constants, DeviceProbe, ModelArray, SysPatchArray, PCIIDArray, Utilities class PatchSysVolume: @@ -150,58 +150,56 @@ class PatchSysVolume: self.elevated(["chown", "-Rf", "root:wheel", f"{self.mount_extensions}/{add_current_kext}"], stdout=subprocess.PIPE).stdout.decode().strip().encode() def add_brightness_patch(self): - self.delete_old_binaries(ModelArray.DeleteBrightness) - self.add_new_binaries(ModelArray.AddBrightness, self.constants.legacy_brightness) + self.delete_old_binaries(SysPatchArray.DeleteBrightness) + self.add_new_binaries(SysPatchArray.AddBrightness, self.constants.legacy_brightness) self.elevated(["ditto", self.constants.payload_apple_private_frameworks_path_brightness, self.mount_private_frameworks], stdout=subprocess.PIPE).stdout.decode().strip().encode() self.elevated(["chmod", "-Rf", "755", f"{self.mount_private_frameworks}/DisplayServices.framework"], stdout=subprocess.PIPE).stdout.decode().strip().encode() self.elevated(["chown", "-Rf", "root:wheel", f"{self.mount_private_frameworks}/DisplayServices.framework"], stdout=subprocess.PIPE).stdout.decode().strip().encode() def add_audio_patch(self): - self.delete_old_binaries(ModelArray.DeleteVolumeControl) - self.add_new_binaries(ModelArray.AddVolumeControl, self.constants.audio_path) + self.delete_old_binaries(SysPatchArray.DeleteVolumeControl) + self.add_new_binaries(SysPatchArray.AddVolumeControl, self.constants.audio_path) def gpu_accel_legacy_nvidia(self): - self.delete_old_binaries(ModelArray.DeleteNvidiaAccel11) - self.add_new_binaries(ModelArray.AddGeneralAccel, self.constants.legacy_general_path) - self.add_new_binaries(ModelArray.AddNvidiaAccel11, self.constants.legacy_nvidia_path) + self.delete_old_binaries(SysPatchArray.DeleteNvidiaAccel11) + self.add_new_binaries(SysPatchArray.AddGeneralAccel, self.constants.legacy_general_path) + self.add_new_binaries(SysPatchArray.AddNvidiaAccel11, self.constants.legacy_nvidia_path) def gpu_framebuffer_legacy_nvidia(self): - self.add_new_binaries(ModelArray.AddNvidiaBrightness, self.constants.legacy_nvidia_path) + self.add_new_binaries(SysPatchArray.AddNvidiaBrightness, self.constants.legacy_nvidia_path) def gpu_accel_legacy_ts1(self): - self.delete_old_binaries(ModelArray.DeleteAMDAccel11) - self.add_new_binaries(ModelArray.AddGeneralAccel, self.constants.legacy_general_path) - self.add_new_binaries(ModelArray.AddAMDAccel11, self.constants.legacy_amd_path) + self.delete_old_binaries(SysPatchArray.DeleteAMDAccel11) + self.add_new_binaries(SysPatchArray.AddGeneralAccel, self.constants.legacy_general_path) + self.add_new_binaries(SysPatchArray.AddAMDAccel11, self.constants.legacy_amd_path) def gpu_accel_legacy_ts2(self): - self.delete_old_binaries(ModelArray.DeleteAMDAccel11) - self.delete_old_binaries(ModelArray.DeleteAMDAccel11TS2) - self.add_new_binaries(ModelArray.AddGeneralAccel, self.constants.legacy_general_path) - self.add_new_binaries(ModelArray.AddAMDAccel11, self.constants.legacy_amd_path) + self.delete_old_binaries(SysPatchArray.DeleteAMDAccel11) + self.delete_old_binaries(SysPatchArray.DeleteAMDAccel11TS2) + self.add_new_binaries(SysPatchArray.AddGeneralAccel, self.constants.legacy_general_path) + self.add_new_binaries(SysPatchArray.AddAMDAccel11, self.constants.legacy_amd_path) def gpu_framebuffer_legacy_amd(self): - self.add_new_binaries(ModelArray.AddAMDBrightness, self.constants.legacy_amd_path) + self.add_new_binaries(SysPatchArray.AddAMDBrightness, self.constants.legacy_amd_path) def gpu_accel_legacy_ironlake(self): - self.delete_old_binaries(ModelArray.DeleteNvidiaAccel11) - self.add_new_binaries(ModelArray.AddGeneralAccel, self.constants.legacy_general_path) - self.add_new_binaries(ModelArray.AddIntelGen1Accel, self.constants.legacy_intel_gen1_path) + self.delete_old_binaries(SysPatchArray.DeleteNvidiaAccel11) + self.add_new_binaries(SysPatchArray.AddGeneralAccel, self.constants.legacy_general_path) + self.add_new_binaries(SysPatchArray.AddIntelGen1Accel, self.constants.legacy_intel_gen1_path) def gpu_framebuffer_legacy_ironlake(self): - self.add_new_binaries(ModelArray.AddIntelGen1Accel, self.constants.legacy_intel_gen1_path) + self.add_new_binaries(SysPatchArray.AddIntelGen1Accel, self.constants.legacy_intel_gen1_path) def gpu_accel_legacy_sandybridge(self): - self.delete_old_binaries(ModelArray.DeleteNvidiaAccel11) - self.add_new_binaries(ModelArray.AddGeneralAccel, self.constants.legacy_general_path) - self.add_new_binaries(ModelArray.AddIntelGen2Accel, self.constants.legacy_intel_gen2_path) + self.delete_old_binaries(SysPatchArray.DeleteNvidiaAccel11) + self.add_new_binaries(SysPatchArray.AddGeneralAccel, self.constants.legacy_general_path) + self.add_new_binaries(SysPatchArray.AddIntelGen2Accel, self.constants.legacy_intel_gen2_path) def gpu_framebuffer_legacy_sandybridge(self): - self.add_new_binaries(ModelArray.AddIntelGen2Accel, self.constants.legacy_intel_gen1_path) + self.add_new_binaries(SysPatchArray.AddIntelGen2Accel, self.constants.legacy_intel_gen1_path) def gpu_framebuffer_ivybridge(self): - #self.delete_old_binaries(ModelArray.DeleteAMDAccel11) - self.add_new_binaries(ModelArray.AddIntelGen3Accel, self.constants.legacy_intel_gen3_path) - #self.elevated(["ditto", self.constants.payload_apple_frameworks_path_accel, self.mount_frameworks], stdout=subprocess.PIPE).stdout.decode().strip().encode() + self.add_new_binaries(SysPatchArray.AddIntelGen3Accel, self.constants.legacy_intel_gen3_path) def gpu_accel_legacy_extended(self): print("- Merging general legacy Frameworks") @@ -281,7 +279,7 @@ class PatchSysVolume: if self.amd_ts2 is True: # TeraScale 2 patches must be installed after Intel HD3000 - self.add_new_binaries(ModelArray.AddAMDAccel11TS2, self.constants.legacy_amd_path_ts2) + self.add_new_binaries(SysPatchArray.AddAMDAccel11TS2, self.constants.legacy_amd_path_ts2) if self.added_kexts is True: self.gpu_accel_legacy_extended() diff --git a/Resources/SysPatchArray.py b/Resources/SysPatchArray.py new file mode 100644 index 000000000..557e35607 --- /dev/null +++ b/Resources/SysPatchArray.py @@ -0,0 +1,197 @@ +# Lists Root patches used by SysPatch.py +# Copyright (C) 2020-2021, Dhinak G, Mykola Grymalyuk +DeleteNvidiaAccel11 = [ + "AMDRadeonX4000.kext", + "AMDRadeonX4000HWServices.kext", + "AMDRadeonX5000.kext", + "AMDRadeonX5000HWServices.kext", + "AMDRadeonX6000.kext", + "AMDRadeonX6000Framebuffer.kext", + "AMDRadeonX6000HWServices.kext", + "AppleIntelBDWGraphics.kext", + "AppleIntelBDWGraphicsFramebuffer.kext", + "AppleIntelCFLGraphicsFramebuffer.kext", + "AppleIntelHD4000Graphics.kext", + "AppleIntelHD5000Graphics.kext", + "AppleIntelICLGraphics.kext", + "AppleIntelICLLPGraphicsFramebuffer.kext", + "AppleIntelKBLGraphics.kext", + "AppleIntelKBLGraphicsFramebuffer.kext", + "AppleIntelSKLGraphics.kext", + "AppleIntelSKLGraphicsFramebuffer.kext", + "AppleIntelFramebufferAzul.kext", + "AppleIntelFramebufferCapri.kext", + "AppleParavirtGPU.kext", + "GeForce.kext", + "IOAcceleratorFamily2.kext", + "IOGPUFamily.kext", +] + +DeleteAMDAccel11 = [ + "AMDRadeonX4000.kext", + "AMDRadeonX4000HWServices.kext", + "AMDRadeonX5000.kext", + "AMDRadeonX5000HWServices.kext", + "AMDRadeonX6000.kext", + "AMDRadeonX6000Framebuffer.kext", + "AMDRadeonX6000HWServices.kext", + "AMD7000Controller.kext", # AMDSupport Dependency + "AMD8000Controller.kext", # AMDSupport Dependency + "AMD9000Controller.kext", # AMDSupport Dependency + "AMD9500Controller.kext", # AMDSupport Dependency + "AMD10000Controller.kext", # AMDSupport Dependency + "AppleIntelBDWGraphics.kext", + "AppleIntelBDWGraphicsFramebuffer.kext", + "AppleIntelCFLGraphicsFramebuffer.kext", + "AppleIntelHD4000Graphics.kext", + "AppleIntelHD5000Graphics.kext", + "AppleIntelICLGraphics.kext", + "AppleIntelICLLPGraphicsFramebuffer.kext", + "AppleIntelKBLGraphics.kext", + "AppleIntelKBLGraphicsFramebuffer.kext", + "AppleIntelSKLGraphics.kext", + "AppleIntelSKLGraphicsFramebuffer.kext", + "AppleIntelFramebufferAzul.kext", + "AppleIntelFramebufferCapri.kext", + "AppleParavirtGPU.kext", + "GeForce.kext", + "IOGPUFamily.kext", +] + +DeleteAMDAccel11TS2 = [ + "AppleCameraInterface.kext", +] + +AddNvidiaAccel11 = [ + "GeForceGA.bundle", + "GeForceTesla.kext", + "GeForceTeslaGLDriver.bundle", + "GeForceTeslaVADriver.bundle", + "NVDANV50HalTesla.kext", + "NVDAResmanTesla.kext", + "IOSurface.kext", +] + +AddNvidiaBrightness = [ + "GeForceGA.bundle", + "GeForceTesla.kext", + "GeForceTeslaGLDriver.bundle", + "GeForceTeslaVADriver.bundle", + "NVDANV50HalTesla.kext", + "NVDAResmanTesla.kext", +] + +AddNvidiaKeplerAccel11 = [ + "GeForce.kext", + "GeForceAIRPlugin.bundle", + "GeForceGLDriver.bundle", + "GeForceMTLDriver.bundle", + "GeForceVADriver.bundle", + "NVDAGF100Hal.kext", + "NVDAGK100Hal.kext", + "NVDAResman.kext", + "NVDAStartup.kext", + "NVSMU.kext", +] + +AddAMDAccel11 = [ + "AMD2400Controller.kext", + "AMD2600Controller.kext", + "AMD3800Controller.kext", + "AMD4600Controller.kext", + "AMD4800Controller.kext", + "AMD5000Controller.kext", + "AMD6000Controller.kext", + "AMDFramebuffer.kext", + "AMDLegacyFramebuffer.kext", + "AMDLegacySupport.kext", + "AMDRadeonVADriver.bundle", + "AMDRadeonVADriver2.bundle", + "AMDRadeonX3000.kext", + "AMDRadeonX3000GLDriver.bundle", + "AMDShared.bundle", + "AMDSupport.kext", + "ATIRadeonX2000.kext", + "ATIRadeonX2000GA.plugin", + "ATIRadeonX2000GLDriver.bundle", + "ATIRadeonX2000VADriver.bundle", +] + +AddAMDBrightness = [ + "AMD2400Controller.kext", + "AMD2600Controller.kext", + "AMD3800Controller.kext", + "AMD4600Controller.kext", + "AMD4800Controller.kext", + "AMD5000Controller.kext", + "AMD6000Controller.kext", + "AMDLegacyFramebuffer.kext", + "AMDLegacySupport.kext", + "AMDRadeonVADriver.bundle", + "AMDRadeonVADriver2.bundle", + #"AMDRadeonX3000.kext", + #"AMDRadeonX3000GLDriver.bundle", + "AMDShared.bundle", + "ATIRadeonX2000.kext", + "ATIRadeonX2000GA.plugin", + "ATIRadeonX2000GLDriver.bundle", + "ATIRadeonX2000VADriver.bundle", +] + +AddAMDAccel11TS2 = [ + "IOSurface.kext", +] + +AddIntelGen1Accel = [ + "AppleIntelHDGraphics.kext", + "AppleIntelHDGraphicsFB.kext", + "AppleIntelHDGraphicsGA.plugin", + "AppleIntelHDGraphicsGLDriver.bundle", + "AppleIntelHDGraphicsVADriver.bundle", +] + +AddIntelGen2Accel = [ + "AppleIntelHD3000Graphics.kext", + "AppleIntelHD3000GraphicsGA.plugin", + "AppleIntelHD3000GraphicsGLDriver.bundle", + "AppleIntelHD3000GraphicsVADriver.bundle", + "AppleIntelSNBGraphicsFB.kext", + "AppleIntelSNBVA.bundle", +] + +AddIntelGen3Accel = [ + "AppleIntelFramebufferCapri.kext", + "AppleIntelHD4000Graphics.kext", + "AppleIntelHD4000GraphicsGLDriver.bundle", + "AppleIntelHD4000GraphicsMTLDriver.bundle", + "AppleIntelHD4000GraphicsVADriver.bundle", + "AppleIntelIVBVA.bundle", + "AppleIntelGraphicsShared.bundle", +] + +AddGeneralAccel = [ + "IOAcceleratorFamily2.kext", + "IOSurface.kext" +] + +DeleteBrightness = [ + "AppleGraphicsControl.kext/Contents/PlugIns/AGDCBacklightControl.kext" +] + +AddBrightness = [ + "AppleBacklight.kext", + "AppleBacklightExpert.kext", +] + +AddVolumeControl = [ + "AppleHDA.kext", + "IOAudioFamily.kext", +] + +DeleteVolumeControl = [ + "AppleVirtIO.kext", + "AppleVirtualGraphics.kext", + "AppleVirtualPlatform.kext", + "ApplePVPanic.kext", + "AppleVirtIOStorage.kext", +]