mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-20 22:20:53 +10:00
sys_patch: Clean up patch set logic
This commit is contained in:
Binary file not shown.
+5
-48
@@ -990,30 +990,11 @@ class SystemPatchDictionary():
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"Sonoma 3802 Extended": {
|
# On macOS Sonoma, the IOSurface ABI changed and broke support for Monterey framebuffer drivers:
|
||||||
"Display Name": "",
|
# - Intel and Nvidia: Page Fault panics on boot
|
||||||
"OS Support": {
|
# - IOAccelResource::pageonIfNeeded() in IOAcceleratorFamily2.kext
|
||||||
"Minimum OS Support": {
|
# - AMD: Corrupted UI elements
|
||||||
"OS Major": os_data.os_data.sonoma,
|
# - Menubar, wallpaper, etc.
|
||||||
"OS Minor": 0
|
|
||||||
},
|
|
||||||
"Maximum OS Support": {
|
|
||||||
"OS Major": os_data.os_data.max_os,
|
|
||||||
"OS Minor": 99
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"Install": {
|
|
||||||
"/System/Library/Frameworks": {
|
|
||||||
"MetalPerformanceShaders.framework": "13.5",
|
|
||||||
},
|
|
||||||
"/System/Library/PrivateFrameworks": {
|
|
||||||
"MTLCompiler.framework": "14.0",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
# On macOS Sonoma, the IOSurface ABI changed slightly that we now get corrupted UI elements
|
|
||||||
# Namely, macOS wallpaper and menubar.
|
|
||||||
# Temporary workaround for development only, until we can figure out what's going on.
|
|
||||||
"Sonoma Legacy Metal Extended": {
|
"Sonoma Legacy Metal Extended": {
|
||||||
"Display Name": "",
|
"Display Name": "",
|
||||||
"OS Support": {
|
"OS Support": {
|
||||||
@@ -1033,30 +1014,6 @@ class SystemPatchDictionary():
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
# On macOS Sonoma, the IOAcceleratorFamily2 ABI changed slightly that now Intel Metal GPUs will hard lock
|
|
||||||
# on rendering.
|
|
||||||
# Specific functions at fault are:
|
|
||||||
# - IOAccelResource::pageonIfNeeded()
|
|
||||||
# - IOAccelResource::pageoffIfNeeded()
|
|
||||||
# Due to these kexts sitting in the main cache, KDK is required to patch them.
|
|
||||||
"Sonoma Intel Extended": {
|
|
||||||
"Display Name": "",
|
|
||||||
"OS Support": {
|
|
||||||
"Minimum OS Support": {
|
|
||||||
"OS Major": os_data.os_data.sonoma,
|
|
||||||
"OS Minor": 0
|
|
||||||
},
|
|
||||||
"Maximum OS Support": {
|
|
||||||
"OS Major": os_data.os_data.max_os,
|
|
||||||
"OS Minor": 99
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"Install": {
|
|
||||||
"/System/Library/Extensions": {
|
|
||||||
"IOAcceleratorFamily2.kext": "13.5",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
"Audio": {
|
"Audio": {
|
||||||
"Legacy Realtek": {
|
"Legacy Realtek": {
|
||||||
|
|||||||
@@ -273,7 +273,7 @@ class DetectRootPatch:
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
# Increase OS check if modern wifi is detected
|
# Increase OS check if modern wifi is detected
|
||||||
if self.constants.detected_os < os_data.os_data.ventura if self.legacy_wifi is True else os_data.os_data.sonoma:
|
if self.constants.detected_os < (os_data.os_data.ventura if self.legacy_wifi is True else os_data.os_data.sonoma):
|
||||||
return
|
return
|
||||||
if self.legacy_wifi is False and self.modern_wifi is False:
|
if self.legacy_wifi is False and self.modern_wifi is False:
|
||||||
return
|
return
|
||||||
@@ -289,7 +289,7 @@ class DetectRootPatch:
|
|||||||
oclp_patch_path = "/System/Library/CoreServices/OpenCore-Legacy-Patcher.plist"
|
oclp_patch_path = "/System/Library/CoreServices/OpenCore-Legacy-Patcher.plist"
|
||||||
if Path(oclp_patch_path).exists():
|
if Path(oclp_patch_path).exists():
|
||||||
oclp_plist = plistlib.load(open(oclp_patch_path, "rb"))
|
oclp_plist = plistlib.load(open(oclp_patch_path, "rb"))
|
||||||
if "Legacy Wireless" in oclp_plist:
|
if "Legacy Wireless" in oclp_plist or "Modern Wireless" in oclp_plist:
|
||||||
return
|
return
|
||||||
|
|
||||||
# Due to the reliance of KDKs for most older patches, we'll allow KDK-less
|
# Due to the reliance of KDKs for most older patches, we'll allow KDK-less
|
||||||
@@ -312,6 +312,14 @@ class DetectRootPatch:
|
|||||||
self.legacy_gmux = False
|
self.legacy_gmux = False
|
||||||
self.legacy_keyboard_backlight = False
|
self.legacy_keyboard_backlight = False
|
||||||
|
|
||||||
|
# Currently all graphics patches require a KDK
|
||||||
|
if self.constants.detected_os >= os_data.os_data.sonoma:
|
||||||
|
self.kepler_gpu = False
|
||||||
|
self.ivy_gpu = False
|
||||||
|
self.haswell_gpu = False
|
||||||
|
self.broadwell_gpu = False
|
||||||
|
self.skylake_gpu = False
|
||||||
|
|
||||||
|
|
||||||
def _check_dgpu_status(self):
|
def _check_dgpu_status(self):
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -64,9 +64,7 @@ class GenerateRootPatchSets:
|
|||||||
required_patches.update({"Big Sur OpenCL": all_hardware_patchset["Graphics"]["Big Sur OpenCL"]})
|
required_patches.update({"Big Sur OpenCL": all_hardware_patchset["Graphics"]["Big Sur OpenCL"]})
|
||||||
required_patches.update({"WebKit Monterey Common": all_hardware_patchset["Graphics"]["WebKit Monterey Common"]})
|
required_patches.update({"WebKit Monterey Common": all_hardware_patchset["Graphics"]["WebKit Monterey Common"]})
|
||||||
required_patches.update({"Intel Ivy Bridge": all_hardware_patchset["Graphics"]["Intel Ivy Bridge"]})
|
required_patches.update({"Intel Ivy Bridge": all_hardware_patchset["Graphics"]["Intel Ivy Bridge"]})
|
||||||
required_patches.update({"Sonoma Intel Extended": all_hardware_patchset["Graphics"]["Sonoma Intel Extended"]})
|
|
||||||
required_patches.update({"Sonoma Legacy Metal Extended": all_hardware_patchset["Graphics"]["Sonoma Legacy Metal Extended"]})
|
required_patches.update({"Sonoma Legacy Metal Extended": all_hardware_patchset["Graphics"]["Sonoma Legacy Metal Extended"]})
|
||||||
required_patches.update({"Sonoma 3802 Extended": all_hardware_patchset["Graphics"]["Sonoma 3802 Extended"]})
|
|
||||||
|
|
||||||
if self.hardware_details["Graphics: Intel Haswell"] is True:
|
if self.hardware_details["Graphics: Intel Haswell"] is True:
|
||||||
required_patches.update({"Metal 3802 Common": all_hardware_patchset["Graphics"]["Metal 3802 Common"]})
|
required_patches.update({"Metal 3802 Common": all_hardware_patchset["Graphics"]["Metal 3802 Common"]})
|
||||||
@@ -74,22 +72,18 @@ class GenerateRootPatchSets:
|
|||||||
required_patches.update({"Monterey GVA": all_hardware_patchset["Graphics"]["Monterey GVA"]})
|
required_patches.update({"Monterey GVA": all_hardware_patchset["Graphics"]["Monterey GVA"]})
|
||||||
required_patches.update({"Monterey OpenCL": all_hardware_patchset["Graphics"]["Monterey OpenCL"]})
|
required_patches.update({"Monterey OpenCL": all_hardware_patchset["Graphics"]["Monterey OpenCL"]})
|
||||||
required_patches.update({"Intel Haswell": all_hardware_patchset["Graphics"]["Intel Haswell"]})
|
required_patches.update({"Intel Haswell": all_hardware_patchset["Graphics"]["Intel Haswell"]})
|
||||||
required_patches.update({"Sonoma Intel Extended": all_hardware_patchset["Graphics"]["Sonoma Intel Extended"]})
|
|
||||||
required_patches.update({"Sonoma Legacy Metal Extended": all_hardware_patchset["Graphics"]["Sonoma Legacy Metal Extended"]})
|
required_patches.update({"Sonoma Legacy Metal Extended": all_hardware_patchset["Graphics"]["Sonoma Legacy Metal Extended"]})
|
||||||
required_patches.update({"Sonoma 3802 Extended": all_hardware_patchset["Graphics"]["Sonoma 3802 Extended"]})
|
|
||||||
|
|
||||||
if self.hardware_details["Graphics: Intel Broadwell"] is True:
|
if self.hardware_details["Graphics: Intel Broadwell"] is True:
|
||||||
required_patches.update({"Monterey GVA": all_hardware_patchset["Graphics"]["Monterey GVA"]})
|
required_patches.update({"Monterey GVA": all_hardware_patchset["Graphics"]["Monterey GVA"]})
|
||||||
required_patches.update({"Monterey OpenCL": all_hardware_patchset["Graphics"]["Monterey OpenCL"]})
|
required_patches.update({"Monterey OpenCL": all_hardware_patchset["Graphics"]["Monterey OpenCL"]})
|
||||||
required_patches.update({"Intel Broadwell": all_hardware_patchset["Graphics"]["Intel Broadwell"]})
|
required_patches.update({"Intel Broadwell": all_hardware_patchset["Graphics"]["Intel Broadwell"]})
|
||||||
required_patches.update({"Sonoma Intel Extended": all_hardware_patchset["Graphics"]["Sonoma Intel Extended"]})
|
|
||||||
required_patches.update({"Sonoma Legacy Metal Extended": all_hardware_patchset["Graphics"]["Sonoma Legacy Metal Extended"]})
|
required_patches.update({"Sonoma Legacy Metal Extended": all_hardware_patchset["Graphics"]["Sonoma Legacy Metal Extended"]})
|
||||||
|
|
||||||
if self.hardware_details["Graphics: Intel Skylake"] is True:
|
if self.hardware_details["Graphics: Intel Skylake"] is True:
|
||||||
required_patches.update({"Monterey GVA": all_hardware_patchset["Graphics"]["Monterey GVA"]})
|
required_patches.update({"Monterey GVA": all_hardware_patchset["Graphics"]["Monterey GVA"]})
|
||||||
required_patches.update({"Monterey OpenCL": all_hardware_patchset["Graphics"]["Monterey OpenCL"]})
|
required_patches.update({"Monterey OpenCL": all_hardware_patchset["Graphics"]["Monterey OpenCL"]})
|
||||||
required_patches.update({"Intel Skylake": all_hardware_patchset["Graphics"]["Intel Skylake"]})
|
required_patches.update({"Intel Skylake": all_hardware_patchset["Graphics"]["Intel Skylake"]})
|
||||||
required_patches.update({"Sonoma Intel Extended": all_hardware_patchset["Graphics"]["Sonoma Intel Extended"]})
|
|
||||||
required_patches.update({"Sonoma Legacy Metal Extended": all_hardware_patchset["Graphics"]["Sonoma Legacy Metal Extended"]})
|
required_patches.update({"Sonoma Legacy Metal Extended": all_hardware_patchset["Graphics"]["Sonoma Legacy Metal Extended"]})
|
||||||
|
|
||||||
if self.hardware_details["Graphics: Nvidia Tesla"] is True:
|
if self.hardware_details["Graphics: Nvidia Tesla"] is True:
|
||||||
@@ -113,9 +107,7 @@ class GenerateRootPatchSets:
|
|||||||
required_patches.update({"Big Sur OpenCL": all_hardware_patchset["Graphics"]["Big Sur OpenCL"]})
|
required_patches.update({"Big Sur OpenCL": all_hardware_patchset["Graphics"]["Big Sur OpenCL"]})
|
||||||
required_patches.update({"WebKit Monterey Common": all_hardware_patchset["Graphics"]["WebKit Monterey Common"]})
|
required_patches.update({"WebKit Monterey Common": all_hardware_patchset["Graphics"]["WebKit Monterey Common"]})
|
||||||
required_patches.update({"Nvidia Kepler": all_hardware_patchset["Graphics"]["Nvidia Kepler"]})
|
required_patches.update({"Nvidia Kepler": all_hardware_patchset["Graphics"]["Nvidia Kepler"]})
|
||||||
required_patches.update({"Sonoma Intel Extended": all_hardware_patchset["Graphics"]["Sonoma Intel Extended"]})
|
|
||||||
required_patches.update({"Sonoma Legacy Metal Extended": all_hardware_patchset["Graphics"]["Sonoma Legacy Metal Extended"]})
|
required_patches.update({"Sonoma Legacy Metal Extended": all_hardware_patchset["Graphics"]["Sonoma Legacy Metal Extended"]})
|
||||||
required_patches.update({"Sonoma 3802 Extended": all_hardware_patchset["Graphics"]["Sonoma 3802 Extended"]})
|
|
||||||
for gpu in self.constants.computer.gpus:
|
for gpu in self.constants.computer.gpus:
|
||||||
# Handle mixed GPU situations (ie. MacBookPro11,3: Haswell iGPU + Kepler dGPU)
|
# Handle mixed GPU situations (ie. MacBookPro11,3: Haswell iGPU + Kepler dGPU)
|
||||||
if gpu.arch == device_probe.Intel.Archs.Haswell:
|
if gpu.arch == device_probe.Intel.Archs.Haswell:
|
||||||
|
|||||||
Reference in New Issue
Block a user