diff --git a/CHANGELOG.md b/CHANGELOG.md index df8a84dc0..bfae26b46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # OpenCore Legacy Patcher changelog -## 0.6.9 +## 1.1.0 +- Add error handling for corrupted patcher settings + +## 1.0.0 - Resolve BCM2046 and BCM2070 support on macOS 13.3 and newer - Workaround 13.3+ Kernel Panic on AMD GCN GPUs playing DRM content - Add new macOS Installer download menu (Jazzzny) @@ -9,17 +12,37 @@ - Drops Rosetta requirement on Apple Silicon Macs - Note building from source will require Python 3.11 or newer and up-to-date Python modules - Update font handling code, fixing font issues on Yosemite and El Capitan +- Resolve incorrect RELEASE usage of OpenCore binaries when DEBUG enabled +- Add RenderBox.framework patch for 3802-based Intel GPUs on macOS 13.3 and newer + - Works around Weather and Widget freezing + - Applicable for Intel Ivy Bridge and Haswell iGPUs +- Add macOS Sonoma support to PatcherSupportPkg validation in CI +- Implement basic support for macOS Sonoma: + - Supports same range of hardware as Ventura, in addition to: + - iMac18,x + - MacBook10,1 + - MacBookPro14,x + - [T1 chip currently unsupported in Sonoma](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1103) + - Resolved issues: + - Graphics Acceleration support for 3802 and non-Metal GPUs + - UI corruption on 31001 GPUs + - Wireless Networking for BCM94360, 4360, 4350, 4331 and 43224 + - USB ethernet support for adapters based on ECM protocol (ex. Realtek) + - dGPU support for MacBookPro14,3 + - S1X/S3X NVMe Drive Support + - PCIe-based FaceTime Camera support + - Bluetooth support by switching to dynamic VMM spoofing - Increment Binaries: - OpenCorePkg 0.9.3 - release - - Lilu 1.6.6 - release - - WhateverGreen 1.6.5 - release - - RestrictEvents 1.1.2 - release + - Lilu 1.6.7 - release + - WhateverGreen 1.6.6 - release + - RestrictEvents 1.1.3 - (rolling - 4f233dd) - FeatureUnlock 1.1.5 - release - DebugEnhancer 1.0.8 - release - CPUFriend 1.2.7 - release - BlueToolFixup 2.6.8 - rolling (2305aaa) - CryptexFixup 1.0.2 - release - - PatcherSupportPkg 1.2.6 - release + - PatcherSupportPkg 1.3.2 - release - Build Server Changes: - Upgrade Python backend to 3.11.5 - Upgrade Python modules: @@ -62,7 +85,7 @@ - utilities.py: - Fix indexing error on Device Paths (thx [@Ausdauersportler](https://github.com/Ausdauersportler)) - Increment Binaries: - - PatcherSupportPkg 1.2.2 - release +- PatcherSupportPkg 1.2.2 - release ## 0.6.7 - Resolve partition buttons overlapping in Install OpenCore UI diff --git a/OpenCore-Patcher-GUI.spec b/OpenCore-Patcher-GUI.spec index 7100205f9..e87b58e3a 100644 --- a/OpenCore-Patcher-GUI.spec +++ b/OpenCore-Patcher-GUI.spec @@ -1,15 +1,23 @@ # -*- mode: python ; coding: utf-8 -*- -import sys, os, time, subprocess +import sys, os, time, subprocess, pathlib sys.path.append(os.path.abspath(os.getcwd())) from resources import constants block_cipher = None +datas = [ + ('payloads.dmg', '.'), + ('Universal-Binaries.dmg', '.'), + +] +if pathlib.Path("DortaniaInternalResources.dmg").exists(): + datas.append(('DortaniaInternalResources.dmg', '.')) + a = Analysis(['OpenCore-Patcher-GUI.command'], pathex=[], binaries=[], - datas=[('payloads.dmg', '.'), ('Universal-Binaries.dmg', '.')], + datas=datas, hiddenimports=[], hookspath=[], hooksconfig={}, diff --git a/data/model_array.py b/data/model_array.py index 305b62524..3f7fa69e2 100644 --- a/data/model_array.py +++ b/data/model_array.py @@ -8,6 +8,7 @@ SupportedSMBIOS = [ "MacBook7,1", "MacBook8,1", "MacBook9,1", + "MacBook10,1", # MacBook Air "MacBookAir2,1", "MacBookAir3,1", @@ -46,6 +47,9 @@ SupportedSMBIOS = [ "MacBookPro13,1", "MacBookPro13,2", "MacBookPro13,3", + "MacBookPro14,1", + "MacBookPro14,2", + "MacBookPro14,3", # Mac Mini "Macmini3,1", "Macmini4,1", @@ -76,6 +80,9 @@ SupportedSMBIOS = [ "iMac16,1", "iMac16,2", "iMac17,1", + "iMac18,1", + "iMac18,2", + "iMac18,3", # Mac Pro "MacPro3,1", "MacPro4,1", diff --git a/data/pci_data.py b/data/pci_data.py index c137882f7..53a81e979 100644 --- a/data/pci_data.py +++ b/data/pci_data.py @@ -418,17 +418,17 @@ class nvidia_ids: 0x1186, # GK104 [GTX 660 Ti] 0x1187, # GK104 [GTX 760] 0x1188, # GK104 [GTX 690] - 0x1189, # GK104 [GTX 670] - 0x118a, # GK104GL [GRID K520] - 0x118b, # GK104GL [GRID K2 GeForce USM] - 0x118c, # GK104 [GRID K2 NVS USM] + 0x1189, # GK104 [GTX 670] + 0x118a, # GK104GL [GRID K520] + 0x118b, # GK104GL [GRID K2 GeForce USM] + 0x118c, # GK104 [GRID K2 NVS USM] 0x118d, # GK104GL [GRID K200 vGPU] 0x118E, # GK104 [GTX 760 OEM] 0x118F, # GK104GL [Tesla K10] - 0x1191, # GK104 [GTX 760 Rev. 2] - 0x1193, # GK104 [GTX 760 Ti OEM] - 0x1194, # GK104GL [Tesla K8] - 0x1195, # GK104 [GTX 660 Rev. 2] + 0x1191, # GK104 [GTX 760 Rev. 2] + 0x1193, # GK104 [GTX 760 Ti OEM] + 0x1194, # GK104GL [Tesla K8] + 0x1195, # GK104 [GTX 660 Rev. 2] 0x1198, # GK104M [GTX 880M] 0x1199, # GK104M [GTX 870M] 0x119A, # GK104M [GTX 860M] @@ -458,8 +458,8 @@ class nvidia_ids: # GK106 0x11C0, # GK106 [GTX 660] 0x11C2, # GK106 [GTX 650 Ti BOOST] - 0x11c3, # GK106 [GTX 650 Ti OEM] - 0x11c4, # GK106 [GTX 645 OEM] + 0x11c3, # GK106 [GTX 650 Ti OEM] + 0x11c4, # GK106 [GTX 645 OEM] 0x11c5, # GK106 [GT 740] 0x11C6, # GK106 [GTX 650 Ti] 0x11C7, # GK106 [GTX 750 Ti] @@ -627,10 +627,10 @@ class nvidia_ids: 0x17c2, # GM200 [GTX TITAN X] 0x17c8, # GM200 [GTX 980 Ti] - 0x17f0, # GM200GL [Quadro M6000] - 0x17f1, # GM200GL [Quadro M6000 24GB] + 0x17f0, # GM200GL [Quadro M6000] + 0x17f1, # GM200GL [Quadro M6000 24GB] 0x17fd, # GM200GL [Tesla M40] - + 0x13c0, # GM204 [GTX 980] 0x13c1, # GM204 0x13c2, # GM204 [GTX 970] @@ -1171,6 +1171,13 @@ class broadcom_ids: 0x43A0, # BCM4360 ] + # Not natively supported, but supported by AirportBrcmFixup + AirPortBrcmNICThirdParty = [ + 0x4357, # BCM43225 + 0x43B1, # BCM4352 + 0x43B2, # BCM4352 (2.4 GHz) + ] + AirPortBrcm4360 = [ # AirPortBrcm4360 IDs (removed duplicates for 4360 class cards) 0x4331, # BCM94331 diff --git a/data/smbios_data.py b/data/smbios_data.py index 3d933a1b1..0fa0feffc 100644 --- a/data/smbios_data.py +++ b/data/smbios_data.py @@ -259,7 +259,7 @@ smbios_dictionary = { "FirmwareFeatures": "0x8FC0FE13F", "SecureBootModel": None, "CPU Generation": cpu_data.CPUGen.kaby_lake.value, - "Max OS Supported": os_data.os_data.max_os, + "Max OS Supported": os_data.os_data.ventura, "Wireless Model": device_probe.Broadcom.Chipsets.AirportBrcmNIC, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20703_UART, "Screen Size": 12, @@ -708,7 +708,7 @@ smbios_dictionary = { ], }, "MacBookPro3,1": { - "Marketing Name": "MacBook Pro (15-inch, 2.4 2.2GHz) ", + "Marketing Name": "MacBook Pro (15-inch, 2.4 2.2GHz)", "Board ID": "Mac-F4238BC8", "FirmwareFeatures": "0xC0001407", "SecureBootModel": None, @@ -1251,7 +1251,7 @@ smbios_dictionary = { ], }, "MacBookPro13,2": { - "Marketing Name": "MacBook Pro (13-inch, 2016, Four Thunderbolt 3 Ports) ", + "Marketing Name": "MacBook Pro (13-inch, 2016, Four Thunderbolt 3 Ports)", "Board ID": "Mac-66E35819EE2D0D05", "FirmwareFeatures": "0x8FC0FE137", "SecureBootModel": None, @@ -1294,7 +1294,7 @@ smbios_dictionary = { "FirmwareFeatures": "0x8FF0FF57E", "SecureBootModel": None, "CPU Generation": cpu_data.CPUGen.kaby_lake.value, - "Max OS Supported": os_data.os_data.max_os, + "Max OS Supported": os_data.os_data.ventura, "Wireless Model": device_probe.Broadcom.Chipsets.AirportBrcmNIC, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20703_UART, "Screen Size": 13, @@ -1307,12 +1307,12 @@ smbios_dictionary = { ], }, "MacBookPro14,2": { - "Marketing Name": "MacBook Pro (13-inch, 2017, Four Thunderbolt 3 Ports) ", + "Marketing Name": "MacBook Pro (13-inch, 2017, Four Thunderbolt 3 Ports)", "Board ID": "Mac-CAD6701F7CEA0921", "FirmwareFeatures": "0x8FF0FF57E", "SecureBootModel": None, "CPU Generation": cpu_data.CPUGen.kaby_lake.value, - "Max OS Supported": os_data.os_data.max_os, + "Max OS Supported": os_data.os_data.ventura, "Wireless Model": device_probe.Broadcom.Chipsets.AirportBrcmNIC, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20703_UART, "Screen Size": 13, @@ -1330,7 +1330,7 @@ smbios_dictionary = { "FirmwareFeatures": "0x8FF0FF57E", "SecureBootModel": None, "CPU Generation": cpu_data.CPUGen.kaby_lake.value, - "Max OS Supported": os_data.os_data.max_os, + "Max OS Supported": os_data.os_data.ventura, "Wireless Model": device_probe.Broadcom.Chipsets.AirportBrcmNIC, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20703_UART, "Screen Size": 15, @@ -2495,7 +2495,7 @@ smbios_dictionary = { "FirmwareFeatures": "0x8FD0FF576", "SecureBootModel": None, "CPU Generation": cpu_data.CPUGen.kaby_lake.value, - "Max OS Supported": os_data.os_data.max_os, + "Max OS Supported": os_data.os_data.ventura, "Wireless Model": device_probe.Broadcom.Chipsets.AirportBrcmNIC, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20703, "Ethernet Chipset": "Broadcom", @@ -2513,7 +2513,7 @@ smbios_dictionary = { "FirmwareFeatures": "0x8FD0FF576", "SecureBootModel": None, "CPU Generation": cpu_data.CPUGen.kaby_lake.value, - "Max OS Supported": os_data.os_data.max_os, + "Max OS Supported": os_data.os_data.ventura, "Wireless Model": device_probe.Broadcom.Chipsets.AirportBrcmNIC, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20703, "Ethernet Chipset": "Broadcom", @@ -2532,7 +2532,7 @@ smbios_dictionary = { "FirmwareFeatures": "0x8FD0FF576", "SecureBootModel": None, "CPU Generation": cpu_data.CPUGen.kaby_lake.value, - "Max OS Supported": os_data.os_data.max_os, + "Max OS Supported": os_data.os_data.ventura, "Wireless Model": device_probe.Broadcom.Chipsets.AirportBrcmNIC, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20703, "Ethernet Chipset": "Broadcom", diff --git a/data/sys_patch_dict.py b/data/sys_patch_dict.py index f23ebdbdc..ca7995036 100644 --- a/data/sys_patch_dict.py +++ b/data/sys_patch_dict.py @@ -103,6 +103,7 @@ class SystemPatchDictionary(): "/System/Library/PrivateFrameworks": { "GPUSupport.framework": "10.14.3", "SkyLight.framework": f"10.14.6-{self.os_major}", + **({"FaceCore.framework": f"13.5"} if self.os_major >= os_data.os_data.sonoma else {}), }, "/System/Applications": { **({ "Photo Booth.app": "11.7.9"} if self.os_major >= os_data.os_data.monterey else {}), @@ -148,6 +149,8 @@ class SystemPatchDictionary(): **({"defaults write /Library/Preferences/.GlobalPreferences.plist ShowDate -int 1": True } if self.os_float >= self.macOS_12_4 else {}), "defaults write /Library/Preferences/.GlobalPreferences.plist InternalDebugUseGPUProcessForCanvasRenderingEnabled -bool false": True, "defaults write /Library/Preferences/.GlobalPreferences.plist WebKitExperimentalUseGPUProcessForCanvasRenderingEnabled -bool false": True, + **({"defaults write /Library/Preferences/.GlobalPreferences.plist WebKitPreferences.acceleratedDrawingEnabled -bool false": True} if self.os_major >= os_data.os_data.sonoma else {}), + **({"defaults write /Library/Preferences/.GlobalPreferences.plist NSEnableAppKitMenus -bool false": True} if self.os_major >= os_data.os_data.sonoma else {}), }, }, "Non-Metal IOAccelerator Common": { @@ -345,7 +348,7 @@ class SystemPatchDictionary(): }, "Install": { "/System/Library/Frameworks": { - "Metal.framework": "12.5-3802", + "Metal.framework": f"12.5-3802-{self.os_major}", }, "/System/Library/PrivateFrameworks": { "MTLCompiler.framework": "12.5-3802", @@ -373,11 +376,13 @@ class SystemPatchDictionary(): }, "Install": { "/System/Library/Frameworks": { - "Metal.framework": "13.2.1", + "Metal.framework": f"13.2.1-{self.os_major}", + **({ "CoreImage.framework": "14.0 Beta 3" } if self.os_major >= os_data.os_data.ventura else {}), }, "/System/Library/PrivateFrameworks": { - "MTLCompiler.framework": "13.2.1", - "GPUCompiler.framework": "13.2.1", + **({ "MTLCompiler.framework": "13.2.1" } if self.os_major == os_data.os_data.ventura else {}), + **({ "GPUCompiler.framework": "13.2.1" } if self.os_major == os_data.os_data.ventura else {}), + "RenderBox.framework": "13.2.1-3802" if self.os_major == os_data.os_data.ventura else "14.0-3802", }, }, }, @@ -568,14 +573,14 @@ class SystemPatchDictionary(): }, "Install": { "/System/Library/Extensions": { - "GeForce.kext": "12.0 Beta 6", + "GeForce.kext": "12.0 Beta 6" if self.os_major < os_data.os_data.sonoma else "12.0 Beta 6-23", "NVDAGF100Hal.kext": "12.0 Beta 6", "NVDAGK100Hal.kext": "12.0 Beta 6", "NVDAResman.kext": "12.0 Beta 6", "NVDAStartup.kext": "12.0 Beta 6", "GeForceAIRPlugin.bundle": "11.0 Beta 3", "GeForceGLDriver.bundle": "11.0 Beta 3", - "GeForceMTLDriver.bundle": "11.0 Beta 3" if self.os_major <= os_data.os_data.monterey else f"11.0 Beta 3-{self.os_major}", + "GeForceMTLDriver.bundle": "11.0 Beta 3" if self.os_major <= os_data.os_data.monterey else f"11.0 Beta 3-22", "GeForceVADriver.bundle": "12.0 Beta 6", }, "/System/Library/Frameworks": { @@ -765,7 +770,7 @@ class SystemPatchDictionary(): "AMD9000Controller.kext": "12.5", "AMD9500Controller.kext": "12.5", "AMD10000Controller.kext": "12.5", - "AMDRadeonX4000.kext": "12.5", + "AMDRadeonX4000.kext": "12.5" if self.os_major < os_data.os_data.sonoma else "12.5-23", "AMDRadeonX4000HWServices.kext": "12.5", "AMDFramebuffer.kext": "12.5" if self.os_float < self.macOS_13_3 else "12.5-GCN", "AMDSupport.kext": "12.5", @@ -778,6 +783,40 @@ class SystemPatchDictionary(): }, }, }, + + # For MacBookPro14,3 (and other AMD dGPUs that no longer function in Sonoma) + # iMac18,2/3 still function with the generic framebuffer, however if issues arise + # we'll downgrade them as well. + "AMD Legacy GCN v2": { + "Display Name": "Graphics: AMD Legacy GCN (2017)", + "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": { + "AMD9500Controller.kext": "13.5.2", + "AMD10000Controller.kext": "13.5.2", + "AMDRadeonX4000.kext": "13.5.2", + "AMDRadeonX4000HWServices.kext": "13.5.2", + "AMDFramebuffer.kext": "13.5.2", + "AMDSupport.kext": "13.5.2", + + "AMDRadeonVADriver.bundle": "13.5.2", + "AMDRadeonVADriver2.bundle": "13.5.2", + "AMDRadeonX4000GLDriver.bundle": "13.5.2", + "AMDMTLBronzeDriver.bundle": "13.5.2", + "AMDShared.bundle": "13.5.2", + }, + }, + }, + # Used only for AMD Polaris with host lacking AVX2.0 # Note missing framebuffers are not restored (ex. 'ATY,Berbice') "AMD Legacy Polaris": { @@ -794,7 +833,7 @@ class SystemPatchDictionary(): }, "Install": { "/System/Library/Extensions": { - "AMDRadeonX4000.kext": "12.5", + "AMDRadeonX4000.kext": "12.5" if self.os_major < os_data.os_data.sonoma else "12.5-23", "AMDRadeonX4000HWServices.kext": "12.5", "AMDRadeonVADriver2.bundle": "12.5", @@ -818,7 +857,7 @@ class SystemPatchDictionary(): }, "Install": { "/System/Library/Extensions": { - "AMDRadeonX5000.kext": "12.5", + "AMDRadeonX5000.kext": "12.5" if self.os_major < os_data.os_data.sonoma else "12.5-23", "AMDRadeonVADriver2.bundle": "12.5", "AMDRadeonX5000GLDriver.bundle": "12.5", @@ -912,8 +951,8 @@ class SystemPatchDictionary(): "AppleIntelHD4000GraphicsGLDriver.bundle": "11.0 Beta 6", "AppleIntelHD4000GraphicsMTLDriver.bundle": "11.0 Beta 6", "AppleIntelHD4000GraphicsVADriver.bundle": "11.3 Beta 1", - "AppleIntelFramebufferCapri.kext": "11.4", - "AppleIntelHD4000Graphics.kext": "11.4", + "AppleIntelFramebufferCapri.kext": "11.4" if self.os_major < os_data.os_data.sonoma else "11.4-23", + "AppleIntelHD4000Graphics.kext": "11.4" if self.os_major < os_data.os_data.sonoma else "11.4-23", "AppleIntelIVBVA.bundle": "11.4", "AppleIntelGraphicsShared.bundle": "11.4", # libIGIL-Metal.dylib pulled from 11.0 Beta 6 }, @@ -933,8 +972,8 @@ class SystemPatchDictionary(): }, "Install": { "/System/Library/Extensions": { - "AppleIntelFramebufferAzul.kext": "12.5", - "AppleIntelHD5000Graphics.kext": "12.5", + "AppleIntelFramebufferAzul.kext": "12.5" if self.os_major < os_data.os_data.sonoma else "12.5-23", + "AppleIntelHD5000Graphics.kext": "12.5" if self.os_major < os_data.os_data.sonoma else "12.5-23", "AppleIntelHD5000GraphicsGLDriver.bundle": "12.5", "AppleIntelHD5000GraphicsMTLDriver.bundle": "12.5", "AppleIntelHD5000GraphicsVADriver.bundle": "12.5", @@ -957,8 +996,8 @@ class SystemPatchDictionary(): }, "Install": { "/System/Library/Extensions": { - "AppleIntelBDWGraphics.kext": "12.5", - "AppleIntelBDWGraphicsFramebuffer.kext": "12.5", + "AppleIntelBDWGraphics.kext": "12.5" if self.os_major < os_data.os_data.sonoma else "12.5-23", + "AppleIntelBDWGraphicsFramebuffer.kext": "12.5" if self.os_major < os_data.os_data.sonoma else "12.5-23", "AppleIntelBDWGraphicsGLDriver.bundle": "12.5", "AppleIntelBDWGraphicsMTLDriver.bundle": "12.5", "AppleIntelBDWGraphicsVADriver.bundle": "12.5", @@ -981,8 +1020,8 @@ class SystemPatchDictionary(): }, "Install": { "/System/Library/Extensions": { - "AppleIntelSKLGraphics.kext": "12.5", - "AppleIntelSKLGraphicsFramebuffer.kext": "12.5", + "AppleIntelSKLGraphics.kext": "12.5" if self.os_major < os_data.os_data.sonoma else "12.5-23", + "AppleIntelSKLGraphicsFramebuffer.kext": "12.5" if self.os_major < os_data.os_data.sonoma else "12.5-23", "AppleIntelSKLGraphicsGLDriver.bundle": "12.5", "AppleIntelSKLGraphicsMTLDriver.bundle": "12.5", "AppleIntelSKLGraphicsVADriver.bundle": "12.5", @@ -1085,6 +1124,8 @@ class SystemPatchDictionary(): "Install": { "/usr/libexec": { "wps": "12.6.2", + "wifip2pd": "12.6.2", + "wifianalyticsd": "13.5", }, "/System/Library/Frameworks": { "CoreWLAN.framework": "12.6.2", @@ -1092,9 +1133,45 @@ class SystemPatchDictionary(): "/System/Library/PrivateFrameworks": { "CoreWiFi.framework": "12.6.2", "IO80211.framework": "12.6.2", + "WiFiPeerToPeer.framework": "12.6.2", + **({ "CoreAnalytics.framework": "13.5"} if self.os_major >= os_data.os_data.sonoma else {}), + **({ "WiFiAnalytics.framework": "13.5"} if self.os_major >= os_data.os_data.sonoma else {}), }, }, - } + }, + # May lord have mercy on our souls + # Applicable for BCM943324, BCM94331, BCM94360, BCM943602 + "Modern Wireless": { + "Display Name": "Networking: Modern Wireless", + "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": { + "/usr/libexec": { + "airportd": "13.5", + "wifianalyticsd": "13.5", + "wifip2pd": "13.5", + }, + "/System/Library/Frameworks": { + "CoreWLAN.framework": "13.5", + }, + "/System/Library/PrivateFrameworks": { + "CoreAnalytics.framework": "13.5", + "CoreWiFi.framework": "13.5", + "IO80211.framework": "13.5", + "WiFiAnalytics.framework": "13.5", + "WiFiPolicy.framework": "13.5", + "WiFiPeerToPeer.framework": "13.5", + }, + }, + }, }, "Brightness": { "Legacy Backlight Control": { @@ -1186,6 +1263,27 @@ class SystemPatchDictionary(): "IOUSBHostFamily.kext": "12.6.2", }, }, - } + }, + "PCIe FaceTime Camera": { + "Display Name": "Miscellaneous: PCIe FaceTime Camera", + "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 Non-Root": { + "/Library/CoreMediaIO/Plug-Ins/DAL": { + "AppleCamera.plugin": "14.0 Beta 1" + }, + "/Library/LaunchDaemons": { + "com.apple.cmio.AppleCameraAssistant.plist": "14.0 Beta 1" + }, + }, + }, }, - } \ No newline at end of file + } diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index f1ee4bb0f..aa73aa941 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -93,6 +93,15 @@ module.exports = { }, { + title: 'macOS Sonoma', + collapsable: false, + sidebarDepth: 1, + children: [ + ['SONOMA-DROP', 'macOS Sonoma Support'], + ] + }, + + { title: 'macOS Ventura', collapsable: false, sidebarDepth: 1, diff --git a/docs/SONOMA-DROP.md b/docs/SONOMA-DROP.md new file mode 100644 index 000000000..85c39f891 --- /dev/null +++ b/docs/SONOMA-DROP.md @@ -0,0 +1,84 @@ +![](../images/sonoma.png) + +*Well here we are again, it's always such a pleasure~* + +Apple has yet again dropped a bunch of models, continuing their journey on discontinuing Intel Macs. With the release of OpenCore Legacy Patcher v1.0.0, early support for macOS Sonoma has been implemented. + +## Versioning + +With v1.0.0, we'll be switching to a proper major, minor and bug fix system ([Semantic Versioning](https://semver.org/)). This means the coming release will be version 1.0.0, and future releases plan to follow this scheme: + +- First digit: Major changes, including new OS support, API changes, and significant patch set changes, etc +- Second digit: Minor changes, including incoming OS update fixes, minor patch set changes, etc +- Third digit: Bug fixes, primarily hot fixes either due to a regression in prior release or resolving issues in already released OS updates + + +## Newly dropped hardware + +* MacBook10,1: MacBook (Retina, 12-inch, 2017) +* MacBookPro14,1: MacBook Pro (13-inch, 2017, Two Thunderbolt 3 ports) +* MacBookPro14,2: MacBook Pro (13-inch, 2017, Four Thunderbolt 3 Ports) +* MacBookPro14,3: MacBook Pro (15-inch, 2017) +* iMac18,1: iMac (21.5-inch, 2017) +* iMac18,2: iMac (Retina 4K, 21.5-inch, 2017) +* iMac18,3: iMac (Retina 5K, 27-inch, 2017) + +## Current status + +OpenCore Legacy Patcher v1.0.0 will support Sonoma for all models normally supported by the Patcher, however some challenges remain. You can find information about them below. + +## Issues + +* [T1 Security chip](t1-security-chip) +* [USB 1.1 (OHCI/UHCI) Support](#usb-11-ohciuhci-support) +* [Graphics support and issues](#graphics-support-and-issues) + + +### T1 Security chip + +Sonoma has removed support for T1 chips found in most 2016 and 2017 Macs. Therefore on these systems, the following will not function: + +* Enable or disable FileVault +* Open the Password Settings window +* Add fingerprints (if upgrading, existing fingerprints will be deleted) +* Add cards to Apple Pay + +:::warning +Additionally, due to Sonoma no longer caring about T1, erasing the entire drive will remove the T1 firmware and it won't be reinstalled. +::: + +No known solution to resolve supporting, a significant amount of time will be required to understand how both the T1 stack works, as well as where the core issue lies for support. + +[More information here](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1103) + +### USB 1.1 (OHCI/UHCI) Support + +For Penryn systems, pre-2013 Mac Pros and Xserve, USB 1.1 support was outright removed in macOS Ventura and naturally this continues in Sonoma. +While USB 1.1 may seem unimportant, it handles many important devices on your system. These include: + +* Keyboard and Trackpad for laptops +* IR Receivers +* Bluetooth + +With OpenCore Legacy Patcher v0.6.0+, basic support has been implemented via Root Volume patching. However due to this, users will need to use a USB hub for installation and post-OS updates when patches are cleaned: + +![](../images/usb11-chart.png) + +::: warning The following systems rely on USB 1.1 + +* iMac10,x and older +* Macmini3,1 and older +* MacBook7,1 and older +* MacBookAir3,1 and older +* MacPro5,1 and older +* Xserve 3,1 and older +::: + +[More information here](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1021) + +### Graphics support and issues +This build includes both Legacy Metal and non-Metal patches for macOS Sonoma. Refer to the following links for more information about Legacy Metal and non-Metal support and their respective issues. + +* [Legacy Metal](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1008) +* [Non-Metal](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108) + diff --git a/docs/TROUBLESHOOTING.md b/docs/TROUBLESHOOTING.md index 02b74ed0c..ac9f784d4 100644 --- a/docs/TROUBLESHOOTING.md +++ b/docs/TROUBLESHOOTING.md @@ -6,6 +6,7 @@ Here are some common errors that users may experience while using this patcher: * [Stuck on `This version of Mac OS X is not supported on this platform` or (🚫) Prohibited Symbol](#stuck-on-this-version-of-mac-os-x-is-not-supported-on-this-platform-or-(🚫)-prohibited-symbol) * [Cannot boot macOS without the USB](#cannot-boot-macos-without-the-usb) * [Infinite Recovery OS Booting](#infinite-recovery-os-reboot) +* [Stuck on boot after root patching](#stuck-on-boot-after-root-patching) * [Reboot when entering Hibernation (`Sleep Wake Failure`)](#reboot-when-entering-hibernation-sleep-wake-failure) * [How to Boot Recovery through OpenCore Legacy Patcher](#how-to-boot-recovery-through-opencore-legacy-patcher) * [Stuck on "Your Mac needs a firmware update"](#stuck-on-your-mac-needs-a-firmware-update) @@ -51,6 +52,23 @@ With OpenCore Legacy Patcher, we rely on Apple Secure Boot to ensure OS updates * Note: Machines with modified root volumes will also result in an infinite recovery loop until integrity is restored. +## Stuck on boot after root patching + +Boot into recovery by pressing space when your disk is selected on the OCLP bootpicker (if you have it hidden, hold ESC while starting up) + +Note: If your disk name is something else than "Macintosh HD", make sure to change the path accordingly. + +Go into terminal and first mount the disk by typing +```sh +mount -uw "/Volumes/Macintosh HD" +``` +Then revert the snapshot +```sh +bless --mount "/Volumes/Macintosh HD" --bootefi --last-sealed-snapshot +``` + +Then restart and now your system should be restored to the unpatched snapshot and should be able to boot again. + ## Reboot when entering Hibernation (`Sleep Wake Failure`) [Known issue on some models](https://github.com/dortania/Opencore-Legacy-Patcher/issues/72), a temporary fix is to disable Hibernation by executing the following command in the terminal: @@ -172,4 +190,4 @@ Applicable models include: | Mac Pro | Mid 2010 and older | MacPro3,1 - MacPro5,1 | | -![](../images/usb11-chart.png) \ No newline at end of file +![](../images/usb11-chart.png) diff --git a/images/sonoma.png b/images/sonoma.png new file mode 100644 index 000000000..a51b43fb0 Binary files /dev/null and b/images/sonoma.png differ diff --git a/images/usb11-chart.png b/images/usb11-chart.png index c80b3ab29..3938eeb4e 100644 Binary files a/images/usb11-chart.png and b/images/usb11-chart.png differ diff --git a/payloads/Config/config.plist b/payloads/Config/config.plist index e337e579e..2aa72e344 100644 --- a/payloads/Config/config.plist +++ b/payloads/Config/config.plist @@ -429,42 +429,6 @@ PlistPath Contents/Info.plist - - Arch - x86_64 - Comment - Broadcom Wifi Patch - Enabled - - MaxKernel - - MinKernel - 12.0.0 - BundlePath - AirportBrcmFixup.kext - ExecutablePath - Contents/MacOS/AirportBrcmFixup - PlistPath - Contents/Info.plist - - - Arch - x86_64 - Comment - 4331 Wifi Patch - Enabled - - MaxKernel - - MinKernel - 20.0.0 - BundlePath - AirportBrcmFixup.kext/Contents/PlugIns/AirPortBrcmNIC_Injector.kext - ExecutablePath - - PlistPath - Contents/Info.plist - Arch x86_64 @@ -923,7 +887,7 @@ Enabled MaxKernel - + 22.99.99 MinKernel 18.0.0 BundlePath @@ -1585,21 +1549,113 @@ Arch x86_64 BundlePath - AMFIPass.kext + IOSkywalkFamily.kext Comment - AMFIPass + IOSkywalkFamily Enabled ExecutablePath - Contents/MacOS/AMFIPass + Contents/MacOS/IOSkywalkFamily MaxKernel MinKernel - 20.0.0 + 23.0.0 PlistPath Contents/Info.plist + Arch + x86_64 + BundlePath + IO80211FamilyLegacy.kext + Comment + IO80211FamilyLegacy + Enabled + + ExecutablePath + Contents/MacOS/IO80211FamilyLegacy + MaxKernel + + MinKernel + 23.0.0 + PlistPath + Contents/Info.plist + + + Arch + x86_64 + BundlePath + IO80211FamilyLegacy.kext/Contents/PlugIns/AirPortBrcmNIC.kext + Comment + AirPortBrcmNIC + Enabled + + ExecutablePath + Contents/MacOS/AirPortBrcmNIC + MaxKernel + + MinKernel + 23.0.0 + PlistPath + Contents/Info.plist + + + Arch + x86_64 + Comment + Broadcom Wifi Patch + Enabled + + MaxKernel + + MinKernel + 12.0.0 + BundlePath + AirportBrcmFixup.kext + ExecutablePath + Contents/MacOS/AirportBrcmFixup + PlistPath + Contents/Info.plist + + + Arch + x86_64 + Comment + 4331 Wifi Patch + Enabled + + MaxKernel + + MinKernel + 20.0.0 + BundlePath + AirportBrcmFixup.kext/Contents/PlugIns/AirPortBrcmNIC_Injector.kext + ExecutablePath + + PlistPath + Contents/Info.plist + + + Arch + x86_64 + BundlePath + IOS3XeFamily.kext + Comment + Restore S1X/S3X drive support for 14.0 Beta 2 and newer + Enabled + + ExecutablePath + Contents/MacOS/IOS3XeFamily + MaxKernel + + MinKernel + 23.0.0 + PlistPath + Contents/Info.plist + + + Arch + x86_64 Comment Aquantia Ethernet Patch Enabled @@ -1615,9 +1671,182 @@ PlistPath Contents/Info.plist + + Arch + x86_64 + Comment + PCIe Camera + Enabled + + MaxKernel + + MinKernel + 23.0.0 + BundlePath + AppleCameraInterface.kext + ExecutablePath + Contents/MacOS/AppleCameraInterface + PlistPath + Contents/Info.plist + + + Arch + x86_64 + Comment + AMFIPass + Enabled + + MaxKernel + + MinKernel + 20.0.0 + BundlePath + AMFIPass.kext + ExecutablePath + Contents/MacOS/AMFIPass + PlistPath + Contents/Info.plist + + + Arch + x86_64 + Comment + AppleSSE - T1 + Enabled + + MaxKernel + + MinKernel + 23.0.0 + BundlePath + AppleSSE.kext + ExecutablePath + Contents/MacOS/AppleSSE + PlistPath + Contents/Info.plist + + + Arch + x86_64 + Comment + AppleKeyStore - T1 + Enabled + + MaxKernel + + MinKernel + 23.0.0 + BundlePath + AppleKeyStore.kext + ExecutablePath + Contents/MacOS/AppleKeyStore + PlistPath + Contents/Info.plist + + + Arch + x86_64 + Comment + AppleCredentialManager - T1 + Enabled + + MaxKernel + + MinKernel + 23.0.0 + BundlePath + AppleCredentialManager.kext + ExecutablePath + Contents/MacOS/AppleCredentialManager + PlistPath + Contents/Info.plist + + + Arch + x86_64 + Comment + USB Ethernet - ECM + Enabled + + MaxKernel + + MinKernel + 23.0.0 + BundlePath + ECM-Override.kext + ExecutablePath + + PlistPath + Contents/Info.plist + Block - + + + Arch + Any + Comment + Allow IOSkywalk Downgrade + Enabled + + Identifier + com.apple.iokit.IOSkywalkFamily + MaxKernel + + MinKernel + 23.0.0 + Strategy + Exclude + + + Arch + Any + Comment + Allow AppleSSE Downgrade + Enabled + + Identifier + com.apple.driver.AppleSSE + MaxKernel + + MinKernel + 23.0.0 + Strategy + Exclude + + + Arch + Any + Comment + Allow AppleCredentialManager Downgrade + Enabled + + Identifier + com.apple.driver.AppleCredentialManager + MaxKernel + + MinKernel + 23.0.0 + Strategy + Exclude + + + Arch + Any + Comment + Allow AppleKeyStore Downgrade + Enabled + + Identifier + com.apple.driver.AppleKeyStore + MaxKernel + + MinKernel + 23.0.0 + Strategy + Exclude + + Emulate DummyPowerManagement @@ -2001,7 +2230,7 @@ Base __ZN17IOPCIConfigurator18IOPCIIsHotplugPortEP16IOPCIConfigEntry Comment - CaseySJ - Fix PCI bus enumeration + CaseySJ - Fix PCI bus enumeration (Ventura) Count 1 Enabled @@ -2015,7 +2244,7 @@ Mask MaxKernel - + 22.99.99 MinKernel 22.0.0 Replace @@ -2025,6 +2254,36 @@ Skip 0 + + Arch + x86_64 + Base + __ZN17IOPCIConfigurator18IOPCIIsHotplugPortEP16IOPCIConfigEntry + Comment + Fix PCI bus enumeration (Sonoma) + Count + 1 + Enabled + + Find + RYTkdUs= + Identifier + com.apple.iokit.IOPCIFamily + Limit + 0 + Mask + + MaxKernel + + MinKernel + 23.0.0 + Replace + RYTk60s= + ReplaceMask + + Skip + 0 + Quirks @@ -2101,6 +2360,8 @@ HideAuxiliary + LauncherPath Default LauncherOption @@ -2617,6 +2878,18 @@ LoadEarly + + Comment + + Path + OpenLegacyBoot.efi + Enabled + + Arguments + + LoadEarly + + Comment @@ -2793,6 +3066,8 @@ -1 ResizeUsePciRbIo + TscSyncTimeout 0 UnblockFsConnect diff --git a/payloads/Icon/Resources.zip b/payloads/Icon/Resources.zip index 81085595a..65b037585 100644 Binary files a/payloads/Icon/Resources.zip and b/payloads/Icon/Resources.zip differ diff --git a/payloads/Kexts/Acidanthera/AutoPkgInstaller-v1.0.2-DEBUG.zip b/payloads/Kexts/Acidanthera/AutoPkgInstaller-v1.0.2-DEBUG.zip deleted file mode 100644 index 8064daa35..000000000 Binary files a/payloads/Kexts/Acidanthera/AutoPkgInstaller-v1.0.2-DEBUG.zip and /dev/null differ diff --git a/payloads/Kexts/Acidanthera/AutoPkgInstaller-v1.0.2-RELEASE.zip b/payloads/Kexts/Acidanthera/AutoPkgInstaller-v1.0.2-RELEASE.zip deleted file mode 100644 index 371a9cb4b..000000000 Binary files a/payloads/Kexts/Acidanthera/AutoPkgInstaller-v1.0.2-RELEASE.zip and /dev/null differ diff --git a/payloads/Kexts/Acidanthera/AutoPkgInstaller-v1.0.3-DEBUG.zip b/payloads/Kexts/Acidanthera/AutoPkgInstaller-v1.0.3-DEBUG.zip new file mode 100644 index 000000000..513a7f514 Binary files /dev/null and b/payloads/Kexts/Acidanthera/AutoPkgInstaller-v1.0.3-DEBUG.zip differ diff --git a/payloads/Kexts/Acidanthera/AutoPkgInstaller-v1.0.3-RELEASE.zip b/payloads/Kexts/Acidanthera/AutoPkgInstaller-v1.0.3-RELEASE.zip new file mode 100644 index 000000000..ab225ede8 Binary files /dev/null and b/payloads/Kexts/Acidanthera/AutoPkgInstaller-v1.0.3-RELEASE.zip differ diff --git a/payloads/Kexts/Acidanthera/Lilu-v1.6.6-DEBUG.zip b/payloads/Kexts/Acidanthera/Lilu-v1.6.6-DEBUG.zip deleted file mode 100644 index 3304a98fd..000000000 Binary files a/payloads/Kexts/Acidanthera/Lilu-v1.6.6-DEBUG.zip and /dev/null differ diff --git a/payloads/Kexts/Acidanthera/Lilu-v1.6.6-RELEASE.zip b/payloads/Kexts/Acidanthera/Lilu-v1.6.6-RELEASE.zip deleted file mode 100644 index 14ae47385..000000000 Binary files a/payloads/Kexts/Acidanthera/Lilu-v1.6.6-RELEASE.zip and /dev/null differ diff --git a/payloads/Kexts/Acidanthera/Lilu-v1.6.7-DEBUG.zip b/payloads/Kexts/Acidanthera/Lilu-v1.6.7-DEBUG.zip new file mode 100644 index 000000000..a77342251 Binary files /dev/null and b/payloads/Kexts/Acidanthera/Lilu-v1.6.7-DEBUG.zip differ diff --git a/payloads/Kexts/Acidanthera/Lilu-v1.6.7-RELEASE.zip b/payloads/Kexts/Acidanthera/Lilu-v1.6.7-RELEASE.zip new file mode 100644 index 000000000..5b8b8cc8b Binary files /dev/null and b/payloads/Kexts/Acidanthera/Lilu-v1.6.7-RELEASE.zip differ diff --git a/payloads/Kexts/Acidanthera/NVMeFix-v1.1.0-DEBUG.zip b/payloads/Kexts/Acidanthera/NVMeFix-v1.1.0-DEBUG.zip deleted file mode 100644 index 195833373..000000000 Binary files a/payloads/Kexts/Acidanthera/NVMeFix-v1.1.0-DEBUG.zip and /dev/null differ diff --git a/payloads/Kexts/Acidanthera/NVMeFix-v1.1.0-RELEASE.zip b/payloads/Kexts/Acidanthera/NVMeFix-v1.1.0-RELEASE.zip deleted file mode 100644 index 8a9036fdc..000000000 Binary files a/payloads/Kexts/Acidanthera/NVMeFix-v1.1.0-RELEASE.zip and /dev/null differ diff --git a/payloads/Kexts/Acidanthera/NVMeFix-v1.1.1-DEBUG.zip b/payloads/Kexts/Acidanthera/NVMeFix-v1.1.1-DEBUG.zip new file mode 100644 index 000000000..2babf17e7 Binary files /dev/null and b/payloads/Kexts/Acidanthera/NVMeFix-v1.1.1-DEBUG.zip differ diff --git a/payloads/Kexts/Acidanthera/NVMeFix-v1.1.1-RELEASE.zip b/payloads/Kexts/Acidanthera/NVMeFix-v1.1.1-RELEASE.zip new file mode 100644 index 000000000..de5bc555f Binary files /dev/null and b/payloads/Kexts/Acidanthera/NVMeFix-v1.1.1-RELEASE.zip differ diff --git a/payloads/Kexts/Acidanthera/RestrictEvents-v1.1.2-DEBUG.zip b/payloads/Kexts/Acidanthera/RestrictEvents-v1.1.2-DEBUG.zip deleted file mode 100644 index 28be75a6b..000000000 Binary files a/payloads/Kexts/Acidanthera/RestrictEvents-v1.1.2-DEBUG.zip and /dev/null differ diff --git a/payloads/Kexts/Acidanthera/RestrictEvents-v1.1.2-RELEASE.zip b/payloads/Kexts/Acidanthera/RestrictEvents-v1.1.2-RELEASE.zip deleted file mode 100644 index a3a62d538..000000000 Binary files a/payloads/Kexts/Acidanthera/RestrictEvents-v1.1.2-RELEASE.zip and /dev/null differ diff --git a/payloads/Kexts/Acidanthera/RestrictEvents-v1.1.3-DEBUG.zip b/payloads/Kexts/Acidanthera/RestrictEvents-v1.1.3-DEBUG.zip new file mode 100644 index 000000000..5617b2f3f Binary files /dev/null and b/payloads/Kexts/Acidanthera/RestrictEvents-v1.1.3-DEBUG.zip differ diff --git a/payloads/Kexts/Acidanthera/RestrictEvents-v1.1.3-RELEASE.zip b/payloads/Kexts/Acidanthera/RestrictEvents-v1.1.3-RELEASE.zip new file mode 100644 index 000000000..d9483f726 Binary files /dev/null and b/payloads/Kexts/Acidanthera/RestrictEvents-v1.1.3-RELEASE.zip differ diff --git a/payloads/Kexts/Acidanthera/WhateverGreen-v1.6.5-DEBUG.zip b/payloads/Kexts/Acidanthera/WhateverGreen-v1.6.5-DEBUG.zip deleted file mode 100644 index 8bf161b59..000000000 Binary files a/payloads/Kexts/Acidanthera/WhateverGreen-v1.6.5-DEBUG.zip and /dev/null differ diff --git a/payloads/Kexts/Acidanthera/WhateverGreen-v1.6.5-Navi-DEBUG.zip b/payloads/Kexts/Acidanthera/WhateverGreen-v1.6.5-Navi-DEBUG.zip deleted file mode 100644 index 95d9867c8..000000000 Binary files a/payloads/Kexts/Acidanthera/WhateverGreen-v1.6.5-Navi-DEBUG.zip and /dev/null differ diff --git a/payloads/Kexts/Acidanthera/WhateverGreen-v1.6.5-Navi-RELEASE.zip b/payloads/Kexts/Acidanthera/WhateverGreen-v1.6.5-Navi-RELEASE.zip deleted file mode 100644 index 1ae0869d8..000000000 Binary files a/payloads/Kexts/Acidanthera/WhateverGreen-v1.6.5-Navi-RELEASE.zip and /dev/null differ diff --git a/payloads/Kexts/Acidanthera/WhateverGreen-v1.6.5-RELEASE.zip b/payloads/Kexts/Acidanthera/WhateverGreen-v1.6.5-RELEASE.zip deleted file mode 100644 index ea2c8722f..000000000 Binary files a/payloads/Kexts/Acidanthera/WhateverGreen-v1.6.5-RELEASE.zip and /dev/null differ diff --git a/payloads/Kexts/Acidanthera/WhateverGreen-v1.6.6-DEBUG.zip b/payloads/Kexts/Acidanthera/WhateverGreen-v1.6.6-DEBUG.zip new file mode 100644 index 000000000..9754608fe Binary files /dev/null and b/payloads/Kexts/Acidanthera/WhateverGreen-v1.6.6-DEBUG.zip differ diff --git a/payloads/Kexts/Acidanthera/WhateverGreen-v1.6.6-Navi-DEBUG.zip b/payloads/Kexts/Acidanthera/WhateverGreen-v1.6.6-Navi-DEBUG.zip new file mode 100644 index 000000000..9e469b48a Binary files /dev/null and b/payloads/Kexts/Acidanthera/WhateverGreen-v1.6.6-Navi-DEBUG.zip differ diff --git a/payloads/Kexts/Acidanthera/WhateverGreen-v1.6.6-Navi-RELEASE.zip b/payloads/Kexts/Acidanthera/WhateverGreen-v1.6.6-Navi-RELEASE.zip new file mode 100644 index 000000000..528d1cdd6 Binary files /dev/null and b/payloads/Kexts/Acidanthera/WhateverGreen-v1.6.6-Navi-RELEASE.zip differ diff --git a/payloads/Kexts/Acidanthera/WhateverGreen-v1.6.6-RELEASE.zip b/payloads/Kexts/Acidanthera/WhateverGreen-v1.6.6-RELEASE.zip new file mode 100644 index 000000000..73f65b505 Binary files /dev/null and b/payloads/Kexts/Acidanthera/WhateverGreen-v1.6.6-RELEASE.zip differ diff --git a/payloads/Kexts/Misc/AppleCameraInterface-v1.0.0.zip b/payloads/Kexts/Misc/AppleCameraInterface-v1.0.0.zip new file mode 100644 index 000000000..5b9160535 Binary files /dev/null and b/payloads/Kexts/Misc/AppleCameraInterface-v1.0.0.zip differ diff --git a/payloads/Kexts/Misc/AppleCredentialManager-v1.0.0.zip b/payloads/Kexts/Misc/AppleCredentialManager-v1.0.0.zip new file mode 100644 index 000000000..36271b821 Binary files /dev/null and b/payloads/Kexts/Misc/AppleCredentialManager-v1.0.0.zip differ diff --git a/payloads/Kexts/Misc/AppleKeyStore-v1.0.0.zip b/payloads/Kexts/Misc/AppleKeyStore-v1.0.0.zip new file mode 100644 index 000000000..2ee24b55a Binary files /dev/null and b/payloads/Kexts/Misc/AppleKeyStore-v1.0.0.zip differ diff --git a/payloads/Kexts/Misc/AppleSSE-v1.0.0.zip b/payloads/Kexts/Misc/AppleSSE-v1.0.0.zip new file mode 100644 index 000000000..05f515864 Binary files /dev/null and b/payloads/Kexts/Misc/AppleSSE-v1.0.0.zip differ diff --git a/payloads/Kexts/Misc/ECM-Override-v1.0.0.zip b/payloads/Kexts/Misc/ECM-Override-v1.0.0.zip new file mode 100644 index 000000000..6a4496dc2 Binary files /dev/null and b/payloads/Kexts/Misc/ECM-Override-v1.0.0.zip differ diff --git a/payloads/Kexts/Misc/IOS3XeFamily-v1.0.0.zip b/payloads/Kexts/Misc/IOS3XeFamily-v1.0.0.zip new file mode 100644 index 000000000..e07ddccb7 Binary files /dev/null and b/payloads/Kexts/Misc/IOS3XeFamily-v1.0.0.zip differ diff --git a/payloads/Kexts/Plists/AppleGraphicsPowerManagement/Info.plist b/payloads/Kexts/Plists/AppleGraphicsPowerManagement/Info.plist index 9fe9efb5b..f92fe3f11 100644 --- a/payloads/Kexts/Plists/AppleGraphicsPowerManagement/Info.plist +++ b/payloads/Kexts/Plists/AppleGraphicsPowerManagement/Info.plist @@ -633,6 +633,186 @@ 16 + MacBook10,1 + + IGPU + + BoostPState + + 18 + 18 + 274 + 18 + 274 + + BoostTime + + 1 + 1 + 1000 + 15 + 100 + + HardPlimit + 1 + Heuristic + + BusyDownThresholdPercent + 60 + BusyUpThresholdPercent + 80 + CPGControl + + MediaHysteresis + 32 + RenderHysteresis + 200 + Wake_Limit + 80 + + DownStep + 1 + EnableOverride + 1 + EnableRingTableOverride + 1 + EvaluateDownInterval + 40000 + EvaluateUpInterval + 40000 + ID + 2 + IOBusynessSamplingInterval + 1 + LowPriorityPeff + 11 + NumOfRingTableOverride + 23 + NumOfRingTables + 3 + NumOfThresholdsForRingTables + 2 + RCxControl + + RC6_Threshold + 520 + RC6_Wake_Limit + 40 + RC_Eval_Interval + 40000 + RP_Idle_Hysteresis + 25 + + RingOverrideTable0 + + 8 + 8 + 8 + 8 + 8 + 9 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + + RingOverrideTable1 + + 8 + 8 + 8 + 9 + 10 + 11 + 13 + 14 + 15 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + + RingOverrideTable2 + + 8 + 8 + 8 + 9 + 10 + 11 + 13 + 14 + 15 + 16 + 18 + 19 + 20 + 21 + 23 + 24 + 25 + 26 + 28 + 29 + 30 + 31 + 33 + + StartingPstateForRingTableOverride + 11 + ThresholdsForRingOverrideTable0 + + 0 + 10 + + ThresholdsForRingOverrideTable1 + + 5 + 15 + + ThresholdsForRingOverrideTable2 + + 10 + 100 + + UpStep + 1 + sampleInterval + 1000 + + NumPriorityLevels + 4 + PriorityLevelMask + 8 + ThermalSupport + 1 + control-id + 16 + + MacBookAir2,1 IGPU @@ -4472,6 +4652,612 @@ 16 + MacBookPro14,1 + + IGPU + + BoostPState + + 24 + 24 + 280 + 24 + 280 + + BoostTime + + 1 + 1 + 1000 + 15 + 280 + + Heuristic + + BusyDownThresholdPercent + 50 + BusyUpThresholdPercent + 70 + CPGControl + + MediaHysteresis + 32 + RenderHysteresis + 32 + Wake_Limit + 80 + + DownStep + 1 + EnableOverride + 1 + EnableRingTableOverride + 1 + EvaluateDownInterval + 40000 + EvaluateUpInterval + 40000 + GT3Floor + 10 + ID + 2 + IOBusynessSamplingInterval + 1 + NumOfRingTableOverride + 23 + NumOfRingTables + 3 + NumOfThresholdsForRingTables + 2 + PMCounterControl + + PM_C0_Any_Media_Threshold + 26263 + PM_Counter_Eval_Interval + 40 + PM_Counter_Heuristic_Enable + 1 + PM_Counter_Window + 2 + PM_DRAM_Threshold_High + 18 + PM_DRAM_Threshold_Low + 3 + PM_DRAM_Writes_Threshold + 165077 + PM_EU_Idle_Threshold + 55 + PM_EU_Stall_Sampler_Threshold + 40 + PM_EU_Stall_Threshold + 60 + PM_GPU_Busy + 30 + PM_Rasterized_Threshold + 486104 + PM_Render_Idle_GT3_Switch + 0 + PM_Slice_Switch_Timer + 1070 + + RCxControl + + RC6_Threshold + 520 + RC6_Wake_Limit + 40 + RC_Eval_Interval + 40000 + RP_Idle_Hysteresis + 128 + + RingOverrideTable0 + + 8 + 8 + 8 + 8 + 8 + 9 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + + RingOverrideTable1 + + 9 + 11 + 12 + 14 + 15 + 17 + 18 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + + RingOverrideTable2 + + 9 + 11 + 12 + 14 + 15 + 17 + 18 + 20 + 21 + 23 + 24 + 26 + 27 + 29 + 30 + 32 + 33 + 35 + 36 + 38 + 39 + 41 + 42 + + StartingPstateForRingTableOverride + 11 + ThresholdsForRingOverrideTable0 + + 0 + 10 + + ThresholdsForRingOverrideTable1 + + 5 + 15 + + ThresholdsForRingOverrideTable2 + + 10 + 100 + + UpStep + 1 + sampleInterval + 1000 + + NumPriorityLevels + 3 + SliceControl + 1 + ThermalSupport + 1 + control-id + 16 + + + MacBookPro14,2 + + IGPU + + BoostPState + + 24 + 24 + 280 + 24 + 280 + + BoostTime + + 1 + 1 + 1000 + 15 + 100 + + Heuristic + + BusyDownThresholdPercent + 50 + BusyUpThresholdPercent + 70 + CPGControl + + MediaHysteresis + 32 + RenderHysteresis + 32 + Wake_Limit + 80 + + DownStep + 1 + EnableOverride + 1 + EnableRingTableOverride + 1 + EvaluateDownInterval + 40000 + EvaluateUpInterval + 40000 + GT2Floor + 10 + GT3Floor + 10 + ID + 2 + IOBusynessSamplingInterval + 1 + NumOfRingTableOverride + 23 + NumOfRingTables + 3 + NumOfThresholdsForRingTables + 2 + PMCounterControl + + PM_C0_Any_Media_Threshold + 26263 + PM_Counter_Eval_Interval + 40 + PM_Counter_Heuristic_Enable + 1 + PM_Counter_Window + 2 + PM_DRAM_Threshold_High + 18 + PM_DRAM_Threshold_Low + 3 + PM_DRAM_Writes_Threshold + 165077 + PM_EU_Idle_Threshold + 55 + PM_EU_Stall_Sampler_Threshold + 40 + PM_EU_Stall_Threshold + 60 + PM_GPU_Busy + 30 + PM_Rasterized_Threshold + 486104 + PM_Render_Idle_GT3_Switch + 0 + PM_Slice_Switch_Timer + 1070 + + RCxControl + + RC6_Threshold + 520 + RC6_Wake_Limit + 40 + RC_Eval_Interval + 40000 + RP_Idle_Hysteresis + 25 + + RingOverrideTable0 + + 8 + 8 + 8 + 8 + 8 + 9 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + + RingOverrideTable1 + + 9 + 11 + 12 + 14 + 15 + 17 + 18 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + + RingOverrideTable2 + + 9 + 11 + 12 + 14 + 15 + 17 + 18 + 20 + 21 + 23 + 24 + 26 + 27 + 29 + 30 + 32 + 33 + 35 + 36 + 38 + 39 + 41 + 42 + + StartingPstateForRingTableOverride + 11 + ThresholdsForRingOverrideTable0 + + 0 + 10 + + ThresholdsForRingOverrideTable1 + + 5 + 15 + + ThresholdsForRingOverrideTable2 + + 10 + 100 + + UpStep + 1 + sampleInterval + 1000 + + NumPriorityLevels + 3 + SliceControl + 1 + ThermalSupport + 1 + control-id + 16 + + + MacBookPro14,3 + + GFX0 + + AGDCEnabled + 1 + Heuristic + + ID + -1 + + control-id + 17 + max-power-state + 15 + min-power-state + 0 + + IGPU + + BoostPState + + 24 + 24 + 280 + 24 + 280 + + BoostTime + + 1 + 1 + 1000 + 15 + 100 + + Heuristic + + BusyDownThresholdPercent + 60 + BusyUpThresholdPercent + 80 + CPGControl + + MediaHysteresis + 32 + RenderHysteresis + 200 + Wake_Limit + 80 + + DownStep + 1 + EnableOverride + 1 + EnableRingTableOverride + 1 + EvaluateDownInterval + 40000 + EvaluateUpInterval + 40000 + ID + 2 + IOBusynessSamplingInterval + 1 + NumOfRingTableOverride + 23 + NumOfRingTables + 3 + NumOfThresholdsForRingTables + 2 + RCxControl + + RC6_Threshold + 520 + RC6_Wake_Limit + 40 + RC_Eval_Interval + 40000 + RP_Idle_Hysteresis + 25 + + RingOverrideTable0 + + 8 + 8 + 8 + 8 + 8 + 9 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + + RingOverrideTable1 + + 8 + 8 + 8 + 9 + 10 + 11 + 13 + 14 + 15 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 29 + 30 + 31 + 33 + + RingOverrideTable2 + + 8 + 8 + 8 + 9 + 10 + 11 + 13 + 14 + 15 + 16 + 18 + 19 + 20 + 21 + 23 + 24 + 25 + 26 + 28 + 29 + 30 + 31 + 33 + + StartingPstateForRingTableOverride + 11 + ThresholdsForRingOverrideTable0 + + 0 + 10 + + ThresholdsForRingOverrideTable1 + + 5 + 15 + + ThresholdsForRingOverrideTable2 + + 10 + 100 + + UpStep + 1 + sampleInterval + 1000 + + control-id + 16 + + MacPro4,1 Vendor10deDevice05e2 @@ -7132,6 +7918,275 @@ 16 + iMac18,1 + + IGPU + + BoostPState + + 24 + 24 + 280 + 24 + 280 + + BoostTime + + 1 + 1 + 1000 + 15 + 100 + + Heuristic + + BusyDownThresholdPercent + 50 + BusyUpThresholdPercent + 70 + CPGControl + + MediaHysteresis + 32 + RenderHysteresis + 200 + Wake_Limit + 80 + + DownStep + 1 + EnableOverride + 1 + EnableRingTableOverride + 1 + EvaluateDownInterval + 31250 + EvaluateUpInterval + 31250 + GT2Floor + 14 + GT3Floor + 17 + ID + 2 + IOBusynessSamplingInterval + 1 + NumOfRingTableOverride + 23 + NumOfRingTables + 3 + NumOfThresholdsForRingTables + 2 + PMCounterControl + + PM_C0_Any_Media_Threshold + 26263 + PM_Counter_Eval_Interval + 40 + PM_Counter_Heuristic_Enable + 1 + PM_Counter_Window + 2 + PM_DRAM_Threshold_High + 18 + PM_DRAM_Threshold_Low + 3 + PM_DRAM_Writes_Threshold + 165077 + PM_EU_Idle_Threshold + 55 + PM_EU_Stall_Sampler_Threshold + 40 + PM_EU_Stall_Threshold + 60 + PM_GPU_Busy + 30 + PM_Rasterized_Threshold + 486104 + PM_Render_Idle_GT3_Switch + 0 + PM_Slice_Switch_Timer + 1070 + + RCxControl + + RC6_Threshold + 520 + RC6_Wake_Limit + 40 + RC_Eval_Interval + 40000 + RP_Idle_Hysteresis + 25 + + RingOverrideTable0 + + 8 + 8 + 8 + 8 + 8 + 9 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + + RingOverrideTable1 + + 9 + 11 + 12 + 14 + 15 + 17 + 18 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + + RingOverrideTable2 + + 9 + 11 + 12 + 14 + 15 + 17 + 18 + 20 + 21 + 23 + 24 + 26 + 27 + 29 + 30 + 32 + 33 + 35 + 36 + 38 + 39 + 41 + 42 + + StartingPstateForRingTableOverride + 11 + ThresholdsForRingOverrideTable0 + + 0 + 10 + + ThresholdsForRingOverrideTable1 + + 5 + 15 + + ThresholdsForRingOverrideTable2 + + 10 + 100 + + UpStep + 1 + sampleInterval + 1000 + + SliceControl + 1 + control-id + 16 + + + iMac18,2 + + GFX0 + + AGDCEnabled + 1 + Heuristic + + ID + -1 + + control-id + 17 + max-power-state + 15 + min-power-state + 0 + + IGPU + + Heuristic + + EnableOverride + 0 + ID + 2 + + control-id + 16 + + + iMac18,3 + + GFX0 + + AGDCEnabled + 1 + Heuristic + + ID + -1 + + control-id + 17 + max-power-state + 15 + min-power-state + 0 + + IGPU + + Heuristic + + EnableOverride + 0 + ID + 2 + + control-id + 16 + + diff --git a/payloads/Kexts/Wifi/IO80211FamilyLegacy-v1.0.0.zip b/payloads/Kexts/Wifi/IO80211FamilyLegacy-v1.0.0.zip new file mode 100644 index 000000000..1e3452819 Binary files /dev/null and b/payloads/Kexts/Wifi/IO80211FamilyLegacy-v1.0.0.zip differ diff --git a/payloads/Kexts/Wifi/IOSkywalkFamily-v1.0.0.zip b/payloads/Kexts/Wifi/IOSkywalkFamily-v1.0.0.zip new file mode 100644 index 000000000..ee8308fa9 Binary files /dev/null and b/payloads/Kexts/Wifi/IOSkywalkFamily-v1.0.0.zip differ diff --git a/payloads/OpenCore/OpenCore-DEBUG.zip b/payloads/OpenCore/OpenCore-DEBUG.zip index 7fa012e3b..51d1ac654 100644 Binary files a/payloads/OpenCore/OpenCore-DEBUG.zip and b/payloads/OpenCore/OpenCore-DEBUG.zip differ diff --git a/payloads/OpenCore/OpenCore-RELEASE.zip b/payloads/OpenCore/OpenCore-RELEASE.zip index ab0941707..57875fc2c 100644 Binary files a/payloads/OpenCore/OpenCore-RELEASE.zip and b/payloads/OpenCore/OpenCore-RELEASE.zip differ diff --git a/resources/arguments.py b/resources/arguments.py index 62d6eb3d7..9157e35ea 100644 --- a/resources/arguments.py +++ b/resources/arguments.py @@ -119,7 +119,6 @@ If you plan to create the USB for another machine, please select the "Change Mod if self.args.debug_oc: logging.info("- Set OpenCore DEBUG configuration") self.constants.opencore_debug = True - self.constants.opencore_build = "DEBUG" if self.args.debug_kext: logging.info("- Set kext DEBUG configuration") diff --git a/resources/build/build.py b/resources/build/build.py index cdf31e946..911dcde6c 100644 --- a/resources/build/build.py +++ b/resources/build/build.py @@ -65,6 +65,8 @@ class BuildOpenCore: ]: function(self.model, self.constants, self.config) + self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " -lilubetaall" + # Work-around ocvalidate if self.constants.validate is False: logging.info("- Adding bootmgfw.efi BlessOverride") @@ -90,7 +92,7 @@ class BuildOpenCore: shutil.rmtree(self.constants.opencore_release_folder, onerror=rmtree_handler, ignore_errors=True) logging.info("") - logging.info(f"- Adding OpenCore v{self.constants.opencore_version} {self.constants.opencore_build}") + logging.info(f"- Adding OpenCore v{self.constants.opencore_version} {'DEBUG' if self.constants.opencore_debug is True else 'RELEASE'}") shutil.copy(self.constants.opencore_zip_source, self.constants.build_path) zipfile.ZipFile(self.constants.opencore_zip_copied).extractall(self.constants.build_path) @@ -113,7 +115,7 @@ class BuildOpenCore: self.config["#Revision"]["Hardware-Probe"] = pickle.dumps(computer_copy) else: self.config["#Revision"]["Build-Type"] = "OpenCore Built for External Machine" - self.config["#Revision"]["OpenCore-Version"] = f"{self.constants.opencore_version} - {self.constants.opencore_build}" + self.config["#Revision"]["OpenCore-Version"] = f"{self.constants.opencore_version} - {'DEBUG' if self.constants.opencore_debug is True else 'RELEASE'}" self.config["#Revision"]["Original-Model"] = self.model self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["OCLP-Version"] = f"{self.constants.patcher_version}" self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["OCLP-Model"] = self.model diff --git a/resources/build/firmware.py b/resources/build/firmware.py index 87a0c2003..455f20284 100644 --- a/resources/build/firmware.py +++ b/resources/build/firmware.py @@ -212,6 +212,15 @@ class BuildFirmware: shutil.copy(self.constants.link_rate_driver_path, self.constants.drivers_path) support.BuildSupport(self.model, self.constants, self.config).get_efi_binary_by_path("FixPCIeLinkRate.efi", "UEFI", "Drivers")["Enabled"] = True + # CSM check + # For model support, check for GUID in firmware and as well as Bootcamp Assistant's Info.plist ('PreUEFIModels' key) + # Ref: https://github.com/acidanthera/OpenCorePkg/blob/0.9.5/Platform/OpenLegacyBoot/OpenLegacyBoot.c#L19 + # if smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.CPUGen.ivy_bridge.value and self.model != "MacPro6,1": + # logging.info("- Enabling CSM support") + # support.BuildSupport(self.model, self.constants, self.config).get_efi_binary_by_path("OpenLegacyBoot.efi", "UEFI", "Drivers")["Enabled"] = True + # else: + # # Shipped alongside OpenCorePkg, so remove if unused + # (self.constants.drivers_path / Path("OpenLegacyBoot.efi")).unlink() def _firmware_compatibility_handling(self) -> None: """ @@ -236,7 +245,10 @@ class BuildFirmware: ) ): logging.info("- Adding PCI Bus Enumeration Patch") - support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Patch"], "Comment", "CaseySJ - Fix PCI bus enumeration")["Enabled"] = True + support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Patch"], "Comment", "CaseySJ - Fix PCI bus enumeration (Ventura)")["Enabled"] = True + # Sonoma slightly adjusted this line specifically + # - https://github.com/apple-oss-distributions/IOPCIFamily/blob/main/IOPCIConfigurator.cpp#L1009 + support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Patch"], "Comment", "Fix PCI bus enumeration (Sonoma)")["Enabled"] = True if self.constants.set_vmm_cpuid is True: logging.info("- Enabling VMM patch") diff --git a/resources/build/misc.py b/resources/build/misc.py index a12c32183..25d5c4c69 100644 --- a/resources/build/misc.py +++ b/resources/build/misc.py @@ -125,10 +125,11 @@ class BuildMiscellaneous: re_patch_args = [] - # Resolve content caching when kern.hv_vmm_present is set - if support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Patch"], "Comment", "Reroute kern.hv_vmm_present patch (1)")["Enabled"] is True and self.constants.set_content_caching is True: - logging.info("- Fixing Content Caching support") - re_patch_args.append("asset") + # Alternative approach to the kern.hv_vmm_present patch + # Dynamically sets the property to 1 if software update/installer is detected + # Always enabled in installers/recovery environments + if self.constants.allow_oc_everywhere is False and (self.constants.serial_settings == "None" or self.constants.secure_status is False): + re_patch_args.append("sbvmm") # Resolve CoreGraphics.framework crashing on Ivy Bridge in macOS 13.3+ # Ref: https://github.com/acidanthera/RestrictEvents/pull/12 @@ -236,10 +237,18 @@ class BuildMiscellaneous: """ iSight Handler """ + if self.model in smbios_data.smbios_dictionary: + if "Legacy iSight" in smbios_data.smbios_dictionary[self.model]: + if smbios_data.smbios_dictionary[self.model]["Legacy iSight"] is True: + support.BuildSupport(self.model, self.constants, self.config).enable_kext("LegacyUSBVideoSupport.kext", self.constants.apple_isight_version, self.constants.apple_isight_path) - if "Legacy iSight" in smbios_data.smbios_dictionary[self.model]: - if smbios_data.smbios_dictionary[self.model]["Legacy iSight"] is True: - support.BuildSupport(self.model, self.constants, self.config).enable_kext("LegacyUSBVideoSupport.kext", self.constants.apple_isight_version, self.constants.apple_isight_path) + if not self.constants.custom_model: + if self.constants.computer.pcie_webcam is True: + support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleCameraInterface.kext", self.constants.apple_camera_version, self.constants.apple_camera_path) + else: + if self.model.startswith("MacBook") and self.model in smbios_data.smbios_dictionary: + if cpu_data.CPUGen.haswell <= smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.CPUGen.kaby_lake: + support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleCameraInterface.kext", self.constants.apple_camera_version, self.constants.apple_camera_path) def _usb_handling(self) -> None: @@ -267,13 +276,13 @@ class BuildMiscellaneous: # Add UHCI/OHCI drivers # All Penryn Macs lack an internal USB hub to route USB 1.1 devices to the EHCI controller - # And MacPro4,1 and MacPro5,1 are the only post-Penryn Macs that lack an internal USB hub + # And MacPro4,1, MacPro5,1 and Xserve3,1 are the only post-Penryn Macs that lack an internal USB hub # - Ref: https://techcommunity.microsoft.com/t5/microsoft-usb-blog/reasons-to-avoid-companion-controllers/ba-p/270710 # # To be paired for sys_patch_dict.py's 'Legacy USB 1.1' patchset if ( smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.CPUGen.penryn.value or \ - self.model in ["MacPro4,1", "MacPro5,1"] + self.model in ["MacPro4,1", "MacPro5,1", "Xserve3,1"] ): logging.info("- Adding UHCI/OHCI USB support") shutil.copy(self.constants.apple_usb_11_injector_path, self.constants.kexts_path) @@ -329,4 +338,22 @@ class BuildMiscellaneous: if self.constants.vault is True and utilities.check_command_line_tools() is True: logging.info("- Setting Vault configuration") self.config["Misc"]["Security"]["Vault"] = "Secure" - support.BuildSupport(self.model, self.constants, self.config).get_efi_binary_by_path("OpenShell.efi", "Misc", "Tools")["Enabled"] = False \ No newline at end of file + support.BuildSupport(self.model, self.constants, self.config).get_efi_binary_by_path("OpenShell.efi", "Misc", "Tools")["Enabled"] = False + + + def _t1_handling(self) -> None: + """ + T1 Security Chip Handler + """ + if self.model not in ["MacBookPro13,2", "MacBookPro13,3", "MacBookPro14,2", "MacBookPro14,3"]: + return + + logging.info("- Enabling T1 Security Chip support") + + support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Block"], "Identifier", "com.apple.driver.AppleSSE")["Enabled"] = True + support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Block"], "Identifier", "com.apple.driver.AppleCredentialManager")["Enabled"] = True + support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Block"], "Identifier", "com.apple.driver.AppleKeyStore")["Enabled"] = True + + support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleSSE.kext", self.constants.t1_sse_version, self.constants.t1_sse_path) + support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleCredentialManager.kext", self.constants.t1_credential_version, self.constants.t1_credential_path) + support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleKeyStore.kext", self.constants.t1_key_store_version, self.constants.t1_key_store_path) \ No newline at end of file diff --git a/resources/build/networking/wired.py b/resources/build/networking/wired.py index 342d022fc..c2de8cc05 100644 --- a/resources/build/networking/wired.py +++ b/resources/build/networking/wired.py @@ -33,6 +33,20 @@ class BuildWiredNetworking: else: self._prebuilt_assumption() + # Always enable due to chance of hot-plugging + self._usb_ecm_dongles() + + + def _usb_ecm_dongles(self) -> None: + """ + USB ECM Dongle Handling + """ + # With Sonoma, our WiFi patches require downgrading IOSkywalk + # Unfortunately Apple's DriverKit stack uses IOSkywalk for ECM dongles, so we'll need force load + # the kernel driver to prevent a kernel panic + # - DriverKit: com.apple.DriverKit.AppleUserECM.dext + # - Kext: AppleUSBECM.kext + support.BuildSupport(self.model, self.constants, self.config).enable_kext("ECM-Override.kext", self.constants.ecm_override_version, self.constants.ecm_override_path) def _on_model(self) -> None: """ @@ -63,7 +77,7 @@ class BuildWiredNetworking: support.BuildSupport(self.model, self.constants, self.config).enable_kext("nForceEthernet.kext", self.constants.nforce_version, self.constants.nforce_path) elif isinstance(controller, device_probe.Marvell) or isinstance(controller, device_probe.SysKonnect): support.BuildSupport(self.model, self.constants, self.config).enable_kext("MarvelYukonEthernet.kext", self.constants.marvel_version, self.constants.marvel_path) - + # Pre-Ivy Bridge Aquantia Ethernet Patch if isinstance(controller, device_probe.Aquantia) and controller.chipset == device_probe.Aquantia.Chipsets.AppleEthernetAquantiaAqtion: if not self.model in smbios_data.smbios_dictionary: diff --git a/resources/build/networking/wireless.py b/resources/build/networking/wireless.py index 4ee971fae..0ef2af82e 100644 --- a/resources/build/networking/wireless.py +++ b/resources/build/networking/wireless.py @@ -45,6 +45,11 @@ class BuildWirelessNetworking: self.config["#Revision"]["Hardware-Wifi"] = f"{utilities.friendly_hex(self.computer.wifi.vendor_id)}:{utilities.friendly_hex(self.computer.wifi.device_id)}" if isinstance(self.computer.wifi, device_probe.Broadcom): + if self.computer.wifi.chipset in [device_probe.Broadcom.Chipsets.AirportBrcmNIC, device_probe.Broadcom.Chipsets.AirPortBrcm4360]: + support.BuildSupport(self.model, self.constants, self.config).enable_kext("IOSkywalkFamily.kext", self.constants.ioskywalk_version, self.constants.ioskywalk_path) + support.BuildSupport(self.model, self.constants, self.config).enable_kext("IO80211FamilyLegacy.kext", self.constants.io80211legacy_version, self.constants.io80211legacy_path) + support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("IO80211FamilyLegacy.kext/Contents/PlugIns/AirPortBrcmNIC.kext")["Enabled"] = True + support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Block"], "Identifier", "com.apple.iokit.IOSkywalkFamily")["Enabled"] = True # This works around OCLP spoofing the Wifi card and therefore unable to actually detect the correct device if self.computer.wifi.chipset == device_probe.Broadcom.Chipsets.AirportBrcmNIC and self.constants.validate is False and self.computer.wifi.country_code: support.BuildSupport(self.model, self.constants, self.config).enable_kext("AirportBrcmFixup.kext", self.constants.airportbcrmfixup_version, self.constants.airportbcrmfixup_path) @@ -104,6 +109,12 @@ class BuildWirelessNetworking: elif smbios_data.smbios_dictionary[self.model]["Wireless Model"] == device_probe.Broadcom.Chipsets.AirportBrcmNIC: support.BuildSupport(self.model, self.constants, self.config).enable_kext("AirportBrcmFixup.kext", self.constants.airportbcrmfixup_version, self.constants.airportbcrmfixup_path) + if smbios_data.smbios_dictionary[self.model]["Wireless Model"] in [device_probe.Broadcom.Chipsets.AirportBrcmNIC, device_probe.Broadcom.Chipsets.AirPortBrcm4360]: + support.BuildSupport(self.model, self.constants, self.config).enable_kext("IOSkywalkFamily.kext", self.constants.ioskywalk_version, self.constants.ioskywalk_path) + support.BuildSupport(self.model, self.constants, self.config).enable_kext("IO80211FamilyLegacy.kext", self.constants.io80211legacy_version, self.constants.io80211legacy_path) + support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("IO80211FamilyLegacy.kext/Contents/PlugIns/AirPortBrcmNIC.kext")["Enabled"] = True + support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Block"], "Identifier", "com.apple.iokit.IOSkywalkFamily")["Enabled"] = True + def _wowl_handling(self) -> None: """ diff --git a/resources/build/security.py b/resources/build/security.py index ff8936998..1d9cdcb38 100644 --- a/resources/build/security.py +++ b/resources/build/security.py @@ -77,11 +77,6 @@ class BuildSecurity: if self.constants.secure_status is False: logging.info("- Disabling SecureBootModel") self.config["Misc"]["Security"]["SecureBootModel"] = "Disabled" - if self.constants.force_vmm is True: - logging.info("- Forcing VMM patchset to support OTA updates") - support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Patch"], "Comment", "Reroute kern.hv_vmm_present patch (1)")["Enabled"] = True - support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Patch"], "Comment", "Reroute kern.hv_vmm_present patch (2) Legacy")["Enabled"] = True - support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Patch"], "Comment", "Reroute kern.hv_vmm_present patch (2) Ventura")["Enabled"] = True - + logging.info("- Enabling AMFIPass") support.BuildSupport(self.model, self.constants, self.config).enable_kext("AMFIPass.kext", self.constants.amfipass_version, self.constants.amfipass_path) diff --git a/resources/build/smbios.py b/resources/build/smbios.py index 8a1bf46de..296083487 100644 --- a/resources/build/smbios.py +++ b/resources/build/smbios.py @@ -41,10 +41,6 @@ class BuildSMBIOS: logging.info("- Enabling Board ID exemption patch") support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Booter"]["Patch"], "Comment", "Skip Board ID check")["Enabled"] = True - logging.info("- Enabling VMM exemption patch") - support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Patch"], "Comment", "Reroute kern.hv_vmm_present patch (1)")["Enabled"] = True - support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Patch"], "Comment", "Reroute kern.hv_vmm_present patch (2) Legacy")["Enabled"] = True - support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Patch"], "Comment", "Reroute kern.hv_vmm_present patch (2) Ventura")["Enabled"] = True else: logging.info("- Enabling SMC exemption patch") support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Patch"], "Identifier", "com.apple.driver.AppleSMC")["Enabled"] = True diff --git a/resources/build/storage.py b/resources/build/storage.py index 71cc18b54..62d61f5a1 100644 --- a/resources/build/storage.py +++ b/resources/build/storage.py @@ -106,28 +106,44 @@ class BuildStorage: logging.info(f"- Failed to find Device path for PCIe Storage Controller {i}, falling back to Innie") support.BuildSupport(self.model, self.constants, self.config).enable_kext("Innie.kext", self.constants.innie_version, self.constants.innie_path) - if not self.constants.custom_model and self.constants.allow_nvme_fixing is True: + if not self.constants.custom_model: nvme_devices = [i for i in self.computer.storage if isinstance(i, device_probe.NVMeController)] - for i, controller in enumerate(nvme_devices): - logging.info(f"- Found 3rd Party NVMe SSD ({i + 1}): {utilities.friendly_hex(controller.vendor_id)}:{utilities.friendly_hex(controller.device_id)}") - self.config["#Revision"][f"Hardware-NVMe-{i}"] = f"{utilities.friendly_hex(controller.vendor_id)}:{utilities.friendly_hex(controller.device_id)}" + if self.constants.allow_nvme_fixing is True: + for i, controller in enumerate(nvme_devices): + if controller.vendor_id == 0x106b: + continue + logging.info(f"- Found 3rd Party NVMe SSD ({i + 1}): {utilities.friendly_hex(controller.vendor_id)}:{utilities.friendly_hex(controller.device_id)}") + self.config["#Revision"][f"Hardware-NVMe-{i}"] = f"{utilities.friendly_hex(controller.vendor_id)}:{utilities.friendly_hex(controller.device_id)}" - # Disable Bit 0 (L0s), enable Bit 1 (L1) - nvme_aspm = (controller.aspm & (~0b11)) | 0b10 + # Disable Bit 0 (L0s), enable Bit 1 (L1) + nvme_aspm = (controller.aspm & (~0b11)) | 0b10 - if controller.pci_path: - logging.info(f"- Found NVMe ({i}) at {controller.pci_path}") - self.config["DeviceProperties"]["Add"].setdefault(controller.pci_path, {})["pci-aspm-default"] = nvme_aspm - self.config["DeviceProperties"]["Add"][controller.pci_path.rpartition("/")[0]] = {"pci-aspm-default": nvme_aspm} - else: - if "-nvmefaspm" not in self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"]: - logging.info("- Falling back to -nvmefaspm") - self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " -nvmefaspm" + if controller.pci_path: + logging.info(f"- Found NVMe ({i}) at {controller.pci_path}") + self.config["DeviceProperties"]["Add"].setdefault(controller.pci_path, {})["pci-aspm-default"] = nvme_aspm + self.config["DeviceProperties"]["Add"][controller.pci_path.rpartition("/")[0]] = {"pci-aspm-default": nvme_aspm} + else: + if "-nvmefaspm" not in self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"]: + logging.info("- Falling back to -nvmefaspm") + self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " -nvmefaspm" - if (controller.vendor_id != 0x144D and controller.device_id != 0xA804): - # Avoid injecting NVMeFix when a native Apple NVMe drive is present - # https://github.com/acidanthera/NVMeFix/blob/1.0.9/NVMeFix/NVMeFix.cpp#L220-L225 - support.BuildSupport(self.model, self.constants, self.config).enable_kext("NVMeFix.kext", self.constants.nvmefix_version, self.constants.nvmefix_path) + if (controller.vendor_id != 0x144D and controller.device_id != 0xA804): + # Avoid injecting NVMeFix when a native Apple NVMe drive is present + # https://github.com/acidanthera/NVMeFix/blob/1.0.9/NVMeFix/NVMeFix.cpp#L220-L225 + support.BuildSupport(self.model, self.constants, self.config).enable_kext("NVMeFix.kext", self.constants.nvmefix_version, self.constants.nvmefix_path) + + if any((controller.vendor_id == 0x106b and controller.device_id in [0x2001, 0x2003]) for controller in nvme_devices): + # Restore S1X/S3X NVMe support removed in 14.0 Beta 2 + # - APPLE SSD AP0128H, AP0256H, etc + # - APPLE SSD AP0128J, AP0256J, etc + support.BuildSupport(self.model, self.constants, self.config).enable_kext("IOS3XeFamily.kext", self.constants.s3x_nvme_version, self.constants.s3x_nvme_path) + + # Restore S1X/S3X NVMe support removed in 14.0 Beta 2 + # Apple's usage of the S1X and S3X is quite sporadic and inconsistent, so we'll try a catch all for units with NVMe drives + if self.constants.custom_model and self.model in smbios_data.smbios_dictionary: + if "CPU Generation" in smbios_data.smbios_dictionary[self.model]: + if cpu_data.CPUGen.broadwell <= smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.CPUGen.kaby_lake: + support.BuildSupport(self.model, self.constants, self.config).enable_kext("IOS3XeFamily.kext", self.constants.s3x_nvme_version, self.constants.s3x_nvme_path) # Apple RAID Card check if not self.constants.custom_model: diff --git a/resources/constants.py b/resources/constants.py index 13d2009c0..f8c1e6d7b 100644 --- a/resources/constants.py +++ b/resources/constants.py @@ -13,8 +13,8 @@ from data import os_data class Constants: def __init__(self) -> None: # Patcher Versioning - self.patcher_version: str = "0.6.9" # OpenCore-Legacy-Patcher - self.patcher_support_pkg_version: str = "1.2.6" # PatcherSupportPkg + self.patcher_version: str = "1.1.0" # OpenCore-Legacy-Patcher + self.patcher_support_pkg_version: str = "1.3.2" # PatcherSupportPkg self.copyright_date: str = "Copyright © 2020-2023 Dortania" self.patcher_name: str = "OpenCore Legacy Patcher" @@ -33,19 +33,19 @@ class Constants: # Kext Versioning ## Acidanthera ## https://github.com/acidanthera - self.lilu_version: str = "1.6.6" # Lilu - self.whatevergreen_version: str = "1.6.5" # WhateverGreen - self.whatevergreen_navi_version: str = "1.6.5-Navi" # WhateverGreen (Navi Patch) + self.lilu_version: str = "1.6.7" # Lilu + self.whatevergreen_version: str = "1.6.6" # WhateverGreen + self.whatevergreen_navi_version: str = "1.6.6-Navi" # WhateverGreen (Navi Patch) self.airportbcrmfixup_version: str = "2.1.7" # AirPortBrcmFixup - self.nvmefix_version: str = "1.1.0" # NVMeFix + self.nvmefix_version: str = "1.1.1" # NVMeFix self.applealc_version: str = "1.6.3" # AppleALC - self.restrictevents_version: str = "1.1.2" # RestrictEvents + self.restrictevents_version: str = "1.1.3" # RestrictEvents self.featureunlock_version: str = "1.1.5" # FeatureUnlock self.debugenhancer_version: str = "1.0.8" # DebugEnhancer self.cpufriend_version: str = "1.2.7" # CPUFriend self.bluetool_version: str = "2.6.8" # BlueToolFixup (BrcmPatchRAM) self.cslvfixup_version: str = "2.6.1" # CSLVFixup - self.autopkg_version: str = "1.0.2" # AutoPkgInstaller + self.autopkg_version: str = "1.0.3" # AutoPkgInstaller self.cryptexfixup_version: str = "1.0.2" # CryptexFixup ## Apple @@ -65,12 +65,19 @@ class Constants: self.intel_8254x_version: str = "1.0.0" # AppleIntel8254XEthernet self.apple_usb_11_injector: str = "1.0.0" # AppleUSBUHCI/OHCI self.aicpupm_version: str = "1.0.0" # AppleIntelCPUPowerManagement/Client + self.s3x_nvme_version: str = "1.0.0" # IONVMeFamily (14.0 Beta 1, S1X and S3X classes) + self.apple_camera_version: str = "1.0.0" # AppleCameraInterface (14.0 Beta 1) + self.t1_credential_version: str = "1.0.0" # AppleCredentialManager (13.5 - T1 support) + self.t1_sse_version: str = "1.0.0" # AppleSSE (13.5 - T1 support) + self.t1_key_store_version: str = "1.0.0" # AppleKeyStore (13.5 - T1 support) ## Apple - Dortania Modified self.bcm570_version: str = "1.0.2" # CatalinaBCM5701Ethernet self.i210_version: str = "1.0.0" # CatalinaIntelI210Ethernet self.corecaptureelcap_version: str = "1.0.1" # corecaptureElCap self.io80211elcap_version: str = "2.0.0" # IO80211ElCap + self.io80211legacy_version: str = "1.0.0" # IO80211FamilyLegacy (Ventura) + self.ioskywalk_version: str = "1.0.0" # IOSkywalkFamily (Ventura) self.bigsursdxc_version: str = "1.0.0" # BigSurSDXC self.monterey_ahci_version: str = "1.0.0" # CatalinaAHCI @@ -85,6 +92,7 @@ class Constants: self.mce_version: str = "1.0.0" # AppleMCEReporterDisabler self.btspoof_version: str = "1.0.0" # Bluetooth-Spoof self.aspp_override_version: str = "1.0.1" # ACPI_SMC_PlatformPlugin Override + self.ecm_override_version: str = "1.0.0" # AppleUSBECM Override self.rsrhelper_version: str = "1.0.0" # RSRHelper self.amfipass_version: str = "1.3.1" # AMFIPass self.amfipass_compatibility_version: str = "1.2.1" # Minimum AMFIPass version required @@ -155,7 +163,6 @@ class Constants: self.showpicker: bool = True # Show or Hide OpenCore's Boot Picker self.nvram_write: bool = True # Write to hardware NVRAM self.oc_timeout: int = 5 # Set OpenCore timeout - self.opencore_build: str = "RELEASE" ## Kext Settings self.kext_debug: bool = False # Enables Lilu debug and DebugEnhancer @@ -220,7 +227,6 @@ class Constants: self.software_demux: bool = False # Enable Software Demux patch set self.force_vmm: bool = False # Force VMM patch self.disable_connectdrivers: bool = False # Disable ConnectDrivers (hibernation) - self.set_content_caching: bool = False # Set Content Caching self.set_vmm_cpuid: bool = False # Set VMM bit inside CPUID self.disable_mediaanalysisd: bool = False # Set mediaanalysisd to spawn self.set_alc_usage: bool = True # Set AppleALC usage @@ -234,14 +240,7 @@ class Constants: os_data.os_data.big_sur, os_data.os_data.monterey, os_data.os_data.ventura, - ] - - self.icons_path = [ - str(self.icon_path_macos_generic), - str(self.icon_path_macos_big_sur), - str(self.icon_path_macos_monterey), - str(self.icon_path_macos_ventura), - str(self.icon_path_macos_sonoma) + os_data.os_data.sonoma, ] @property @@ -267,11 +266,14 @@ class Constants: def payload_local_binaries_root_path_dmg(self): return self.original_path / Path("Universal-Binaries.dmg") + @property + def overlay_psp_path_dmg(self): + return self.original_path / Path("DortaniaInternalResources.dmg") # OpenCore @property def opencore_zip_source(self): - return self.payload_path / Path(f"OpenCore/OpenCore-{self.opencore_build}.zip") + return self.payload_path / Path(f"OpenCore/OpenCore-{'DEBUG' if self.opencore_debug is True else 'RELEASE'}.zip") @property def plist_template(self): @@ -433,6 +435,18 @@ class Constants: def top_case_path(self): return self.payload_kexts_path / Path(f"Misc/AppleUSBTopCase-v{self.topcase_version}.zip") + @property + def t1_key_store_path(self): + return self.payload_kexts_path / Path(f"Misc/AppleKeyStore-v{self.t1_key_store_version}.zip") + + @property + def t1_credential_path(self): + return self.payload_kexts_path / Path(f"Misc/AppleCredentialManager-v{self.t1_credential_version}.zip") + + @property + def t1_sse_path(self): + return self.payload_kexts_path / Path(f"Misc/AppleSSE-v{self.t1_sse_version}.zip") + @property def mousse_path(self): return self.payload_kexts_path / Path(f"SSE/AAAMouSSE-v{self.mousse_version}.zip") @@ -449,6 +463,14 @@ class Constants: def io80211elcap_path(self): return self.payload_kexts_path / Path(f"Wifi/IO80211ElCap-v{self.io80211elcap_version}.zip") + @property + def io80211legacy_path(self): + return self.payload_kexts_path / Path(f"Wifi/IO80211FamilyLegacy-v{self.io80211legacy_version}.zip") + + @property + def ioskywalk_path(self): + return self.payload_kexts_path / Path(f"Wifi/IOSkywalkFamily-v{self.ioskywalk_version}.zip") + @property def applealc_path(self): return self.payload_kexts_path / Path(f"Acidanthera/AppleALC-v{self.applealc_version}-{self.kext_variant}.zip") @@ -481,6 +503,10 @@ class Constants: def aspp_override_path(self): return self.payload_kexts_path / Path(f"Misc/ASPP-Override-v{self.aspp_override_version}.zip") + @property + def ecm_override_path(self): + return self.payload_kexts_path / Path(f"Misc/ECM-Override-v{self.ecm_override_version}.zip") + @property def nvmefix_path(self): return self.payload_kexts_path / Path(f"Acidanthera/NVMeFix-v{self.nvmefix_version}-{self.kext_variant}.zip") @@ -550,6 +576,14 @@ class Constants: def kdkless_path(self): return self.payload_kexts_path / Path(f"Misc/KDKlessWorkaround-v{self.kdkless_version}-{self.kext_variant}.zip") + @property + def s3x_nvme_path(self): + return self.payload_kexts_path / Path(f"Misc/IOS3XeFamily-v{self.s3x_nvme_version}.zip") + + @property + def apple_camera_path(self): + return self.payload_kexts_path / Path(f"Misc/AppleCameraInterface-v{self.apple_camera_version}.zip") + @property def plist_folder_path(self): return self.payload_kexts_path / Path("Plists") @@ -581,7 +615,7 @@ class Constants: @property def opencore_zip_copied(self): - return self.build_path / Path(f"OpenCore-{self.opencore_build}.zip") + return self.build_path / Path(f"OpenCore-{'DEBUG' if self.opencore_debug is True else 'RELEASE'}.zip") @property def oc_folder(self): @@ -688,27 +722,27 @@ class Constants: @property def icon_path_ssd(self): return self.payload_path / Path("Icon/SSD/.VolumeIcon.icns") - + @property def icon_path_macos_generic(self): return self.payload_path / Path("Icon/AppIcons/Generic.icns") - + @property def icon_path_macos_big_sur(self): return self.payload_path / Path("Icon/AppIcons/BigSur.icns") - + @property def icon_path_macos_monterey(self): return self.payload_path / Path("Icon/AppIcons/Monterey.icns") - + @property def icon_path_macos_ventura(self): return self.payload_path / Path("Icon/AppIcons/Ventura.icns") - + @property def icon_path_macos_sonoma(self): return self.payload_path / Path("Icon/AppIcons/Sonoma.icns") - + @property def gui_path(self): return self.payload_path / Path("Icon/Resources.zip") @@ -737,6 +771,16 @@ class Constants: return Path(self.launcher_binary).parent.parent / Path("Resources") + @property + def icons_path(self): + return [ + str(self.icon_path_macos_generic), + str(self.icon_path_macos_big_sur), + str(self.icon_path_macos_monterey), + str(self.icon_path_macos_ventura), + str(self.icon_path_macos_sonoma) + ] + sbm_values = [ "j137ap", # iMacPro1,1 "j680ap", # MacBookPro15,1 diff --git a/resources/defaults.py b/resources/defaults.py index d654787d0..6c07943fc 100644 --- a/resources/defaults.py +++ b/resources/defaults.py @@ -56,11 +56,6 @@ class GenerateDefaults: General probe for data """ - if "Book" in self.model: - self.constants.set_content_caching = False - else: - self.constants.set_content_caching = True - if self.model in ["MacBookPro8,2", "MacBookPro8,3"]: # Users disabling TS2 most likely have a faulty dGPU # users can override this in settings @@ -152,8 +147,11 @@ class GenerateDefaults: Networking specific probe """ + is_legacy_wifi = False + is_modern_wifi = False + if self.host_is_target: - if not ( + if ( ( isinstance(self.constants.computer.wifi, device_probe.Broadcom) and self.constants.computer.wifi.chipset in [ @@ -165,28 +163,54 @@ class GenerateDefaults: self.constants.computer.wifi.chipset == device_probe.Atheros.Chipsets.AirPortAtheros40 ) ): - return + is_legacy_wifi = True + elif ( + ( + isinstance(self.constants.computer.wifi, device_probe.Broadcom) and + self.constants.computer.wifi.chipset in [ + device_probe.Broadcom.Chipsets.AirPortBrcm4360, + device_probe.Broadcom.Chipsets.AirportBrcmNIC, + ] + ) + ): + is_modern_wifi = True else: - if not self.model in smbios_data.smbios_dictionary: + print("Checking WiFi") + if self.model not in smbios_data.smbios_dictionary: return if ( - smbios_data.smbios_dictionary[self.model]["Wireless Model"] not in [ + smbios_data.smbios_dictionary[self.model]["Wireless Model"] in [ device_probe.Broadcom.Chipsets.AirPortBrcm4331, device_probe.Broadcom.Chipsets.AirPortBrcm43224, - device_probe.Atheros.Chipsets.AirPortAtheros40 + device_probe.Atheros.Chipsets.AirPortAtheros40, ] ): - return + is_legacy_wifi = True + elif ( + smbios_data.smbios_dictionary[self.model]["Wireless Model"] in [ + device_probe.Broadcom.Chipsets.AirPortBrcm4360, + device_probe.Broadcom.Chipsets.AirportBrcmNIC, + ] + ): + print("Modern WiFi") + is_modern_wifi = True + + if is_legacy_wifi is False and is_modern_wifi is False: + return # 12.0: Legacy Wireless chipsets require root patching + # 14.0: Modern Wireless chipsets require root patching self.constants.sip_status = False self.constants.secure_status = False + self.constants.disable_cs_lv = True + self.constants.disable_amfi = True - # 13.0: Enabling AirPlay to Mac patches breaks Control Center on legacy chipsets - # AirPlay to Mac was unsupported regardless, so we can safely disable it - self.constants.fu_status = True - self.constants.fu_arguments = " -disable_sidecar_mac" + if is_legacy_wifi is True: + # 13.0: Enabling AirPlay to Mac patches breaks Control Center on legacy chipsets + # AirPlay to Mac was unsupported regardless, so we can safely disable it + self.constants.fu_status = True + self.constants.fu_arguments = " -disable_sidecar_mac" def _misc_hardwares_probe(self) -> None: @@ -309,8 +333,6 @@ class GenerateDefaults: if is_key_enabled not in ["false", "0"]: subprocess.run(["defaults", "write", "-g", key, "-bool", "true"]) - subprocess.run(["defaults", "write", "-g", "Amy.MenuBar2Beta", "-bool", "false"]) - def _check_amfipass_supported(self) -> None: """ Check if root volume supports AMFIPass diff --git a/resources/device_probe.py b/resources/device_probe.py index 49c37e24d..6d2573186 100644 --- a/resources/device_probe.py +++ b/resources/device_probe.py @@ -15,6 +15,10 @@ from resources import utilities, ioreg from data import pci_data, usb_data +def class_code_to_bytes(class_code: int) -> bytes: + return class_code.to_bytes(4, byteorder="little") + + @dataclass class CPU: name: str @@ -113,6 +117,7 @@ class USBDevice: @dataclass class PCIDevice: VENDOR_ID: ClassVar[int] # Default vendor id, for subclasses. + CLASS_CODES: ClassVar[list[int]] # Default class codes, for subclasses. vendor_id: int # The vendor ID of this PCI device device_id: int # The device ID of this PCI device @@ -127,6 +132,13 @@ class PCIDevice: vendor_id_unspoofed: Optional[int] = -1 # Unspoofed vendor ID of this PCI device device_id_unspoofed: Optional[int] = -1 # Unspoofed device ID of this PCI device + @classmethod + def class_code_matching_dict(cls) -> dict: + return { + "IOProviderClass": "IOPCIDevice", + "IOPropertyMatch": [{"class-code": class_code_to_bytes(class_code)} for class_code in cls.CLASS_CODES] + } + @classmethod def from_ioregistry(cls, entry: ioreg.io_registry_entry_t, anti_spoof=False): properties: dict = ioreg.corefoundation_to_native(ioreg.IORegistryEntryCreateCFProperties(entry, None, ioreg.kCFAllocatorDefault, ioreg.kNilOptions)[1]) # type: ignore @@ -157,7 +169,7 @@ class PCIDevice: device = cls(vendor_id, device_id, int.from_bytes(properties["class-code"][:6], byteorder="little"), name=ioreg.io_name_t_to_str(ioreg.IORegistryEntryGetName(entry, None)[1])) if "model" in properties: model = properties["model"] - if type(model) is bytes: + if isinstance(model, bytes): model = model.strip(b"\0").decode() device.model = model if "acpi-path" in properties: @@ -172,7 +184,7 @@ class PCIDevice: device.populate_pci_path(entry) return device - def vendor_detect(self, *, inherits: ClassVar[Any] = None, classes: list = None): + def vendor_detect(self, *, inherits: Optional[Type["PCIDevice"]] = None, classes: Optional[list] = None): for i in classes or itertools.chain.from_iterable([subclass.__subclasses__() for subclass in PCIDevice.__subclasses__()]): if issubclass(i, inherits or object) and i.detect(self): return i @@ -180,7 +192,7 @@ class PCIDevice: @classmethod def detect(cls, device): - return device.vendor_id == cls.VENDOR_ID and ((device.class_code == cls.CLASS_CODE) if getattr(cls, "CLASS_CODE", None) else True) # type: ignore # pylint: disable=no-member + return device.vendor_id == cls.VENDOR_ID and ((device.class_code in cls.CLASS_CODES) if getattr(cls, "CLASS_CODES", None) else True) and ((device.class_code == cls.CLASS_CODE) if getattr(cls, "CLASS_CODE", None) else True) # type: ignore # pylint: disable=no-member def populate_pci_path(self, original_entry: ioreg.io_registry_entry_t): # Based off gfxutil logic, seems to work. @@ -213,6 +225,7 @@ class PCIDevice: @dataclass class GPU(PCIDevice): + CLASS_CODES: ClassVar[list[int]] = [0x030000, 0x038000] arch: enum.Enum = field(init=False) # The architecture, see subclasses. def __post_init__(self): @@ -224,7 +237,7 @@ class GPU(PCIDevice): @dataclass class WirelessCard(PCIDevice): - CLASS_CODE: ClassVar[int] = 0x028000 # 00800200 hexswapped + CLASS_CODES: ClassVar[list[int]] = [0x028000] country_code: str = field(init=False) chipset: enum.Enum = field(init=False) @@ -254,47 +267,65 @@ class WirelessCard(PCIDevice): @dataclass class NVMeController(PCIDevice): - CLASS_CODE: ClassVar[int] = 0x010802 + CLASS_CODES: ClassVar[list[int]] = [ + 0x010802, + # I don't know if this is a typo or what, but Apple controllers are 01:80:02, not 01:08:02 + 0x018002 + ] aspm: Optional[int] = None # parent_aspm: Optional[int] = None + @classmethod + def from_ioregistry(cls, entry: ioreg.io_registry_entry_t, anti_spoof=True): + device = super().from_ioregistry(entry, anti_spoof=anti_spoof) + + device.aspm: Union[int, bytes] = ioreg.corefoundation_to_native(ioreg.IORegistryEntryCreateCFProperty(entry, "pci-aspm-default", ioreg.kCFAllocatorDefault, ioreg.kNilOptions)) or 0 # type: ignore + if isinstance(device.aspm, bytes): + device.aspm = int.from_bytes(device.aspm, byteorder="little") + + return device + + @dataclass class EthernetController(PCIDevice): - CLASS_CODE: ClassVar[int] = 0x020000 + CLASS_CODES: ClassVar[list[int]] = [0x020000] chipset: enum.Enum = field(init=False) def __post_init__(self): self.detect_chipset() + def detect_chipset(self): + raise NotImplementedError + @dataclass class SATAController(PCIDevice): - CLASS_CODE: ClassVar[int] = 0x010601 + CLASS_CODES: ClassVar[list[int]] = [0x010601] @dataclass class SASController(PCIDevice): - CLASS_CODE: ClassVar[int] = 0x010400 + CLASS_CODES: ClassVar[list[int]] = [0x010400] @dataclass class XHCIController(PCIDevice): - CLASS_CODE: ClassVar[int] = 0x0c0330 + CLASS_CODES: ClassVar[list[int]] = [0x0c0330] @dataclass class EHCIController(PCIDevice): - CLASS_CODE: ClassVar[int] = 0x0c0320 + CLASS_CODES: ClassVar[list[int]] = [0x0c0320] @dataclass class OHCIController(PCIDevice): - CLASS_CODE: ClassVar[int] = 0x0c0310 + CLASS_CODES: ClassVar[list[int]] = [0x0c0310] @dataclass class UHCIController(PCIDevice): - CLASS_CODE: ClassVar[int] = 0x0c0300 + CLASS_CODES: ClassVar[list[int]] = [0x0c0300] @dataclass class SDXCController(PCIDevice): - CLASS_CODE: ClassVar[int] = 0x080501 + CLASS_CODES: ClassVar[list[int]] = [0x080501] @dataclass class NVIDIA(GPU): @@ -467,6 +498,7 @@ class Broadcom(WirelessCard): # pylint: disable=invalid-name AppleBCMWLANBusInterfacePCIe = "AppleBCMWLANBusInterfacePCIe supported" AirportBrcmNIC = "AirportBrcmNIC supported" + AirPortBrcmNICThirdParty = "AirPortBrcmNICThirdParty supported" AirPortBrcm4360 = "AirPortBrcm4360 supported" AirPortBrcm4331 = "AirPortBrcm4331 supported" AirPortBrcm43224 = "AppleAirPortBrcm43224 supported" @@ -479,6 +511,8 @@ class Broadcom(WirelessCard): self.chipset = Broadcom.Chipsets.AppleBCMWLANBusInterfacePCIe elif self.device_id in pci_data.broadcom_ids.AirPortBrcmNIC: self.chipset = Broadcom.Chipsets.AirportBrcmNIC + elif self.device_id in pci_data.broadcom_ids.AirPortBrcmNICThirdParty: + self.chipset = Broadcom.Chipsets.AirPortBrcmNICThirdParty elif self.device_id in pci_data.broadcom_ids.AirPortBrcm4360: self.chipset = Broadcom.Chipsets.AirPortBrcm4360 elif self.device_id in pci_data.broadcom_ids.AirPortBrcm4331: @@ -587,7 +621,7 @@ class Computer: storage: list[PCIDevice] = field(default_factory=list) usb_controllers: list[PCIDevice] = field(default_factory=list) sdxc_controller: list[PCIDevice] = field(default_factory=list) - ethernet: Optional[EthernetController] = field(default_factory=list) + ethernet: list[EthernetController] = field(default_factory=list) wifi: Optional[WirelessCard] = None cpu: Optional[CPU] = None usb_devices: list[USBDevice] = field(default_factory=list) @@ -599,6 +633,7 @@ class Computer: trackpad_type: Optional[str] = None ambient_light_sensor: Optional[bool] = False third_party_sata_ssd: Optional[bool] = False + pcie_webcam: Optional[bool] = False secure_boot_model: Optional[str] = None secure_boot_policy: Optional[int] = None oclp_sys_version: Optional[str] = None @@ -625,6 +660,7 @@ class Computer: computer.bluetooth_probe() computer.topcase_probe() computer.ambient_light_sensor_probe() + computer.pcie_webcam_probe() computer.sata_disk_probe() computer.oclp_sys_patch_probe() computer.check_rosetta() @@ -646,10 +682,10 @@ class Computer: def gpu_probe(self): - # Chain together two iterators: one for class code 00000300, the other for class code 00800300 + # Chain together two iterators: one for class code 03:00:00, the other for class code 03:80:00 devices = ioreg.ioiterator_to_list( ioreg.IOServiceGetMatchingServices( - ioreg.kIOMasterPortDefault, {"IOProviderClass": "IOPCIDevice", "IOPropertyMatch": [{"class-code": binascii.a2b_hex("00000300")}, {"class-code": binascii.a2b_hex("00800300")}]}, None + ioreg.kIOMasterPortDefault, GPU.class_code_matching_dict(), None )[1] ) @@ -685,7 +721,7 @@ class Computer: devices = ioreg.ioiterator_to_list( ioreg.IOServiceGetMatchingServices( ioreg.kIOMasterPortDefault, - {"IOProviderClass": "IOPCIDevice", "IOPropertyMatch": {"class-code": binascii.a2b_hex(utilities.hexswap(hex(WirelessCard.CLASS_CODE)[2:].zfill(8)))}}, + WirelessCard.class_code_matching_dict(), None, )[1] ) @@ -703,11 +739,18 @@ class Computer: self.ambient_light_sensor = True ioreg.IOObjectRelease(device) + def pcie_webcam_probe(self): + # CMRA/14E4:1570 + device = next(ioreg.ioiterator_to_list(ioreg.IOServiceGetMatchingServices(ioreg.kIOMasterPortDefault, ioreg.IOServiceNameMatching("CMRA".encode()), None)[1]), None) + if device: + self.pcie_webcam = True + ioreg.IOObjectRelease(device) + def sdxc_controller_probe(self): sdxc_controllers = ioreg.ioiterator_to_list( ioreg.IOServiceGetMatchingServices( ioreg.kIOMasterPortDefault, - {"IOProviderClass": "IOPCIDevice", "IOPropertyMatch": [{"class-code": binascii.a2b_hex(utilities.hexswap(hex(SDXCController.CLASS_CODE)[2:].zfill(8)))}]}, + SDXCController.class_code_matching_dict(), None, )[1] ) @@ -720,21 +763,21 @@ class Computer: xhci_controllers = ioreg.ioiterator_to_list( ioreg.IOServiceGetMatchingServices( ioreg.kIOMasterPortDefault, - {"IOProviderClass": "IOPCIDevice", "IOPropertyMatch": [{"class-code": binascii.a2b_hex(utilities.hexswap(hex(XHCIController.CLASS_CODE)[2:].zfill(8)))}]}, + XHCIController.class_code_matching_dict(), None, )[1] ) ehci_controllers = ioreg.ioiterator_to_list( ioreg.IOServiceGetMatchingServices( ioreg.kIOMasterPortDefault, - {"IOProviderClass": "IOPCIDevice", "IOPropertyMatch": [{"class-code": binascii.a2b_hex(utilities.hexswap(hex(EHCIController.CLASS_CODE)[2:].zfill(8)))}]}, + EHCIController.class_code_matching_dict(), None, )[1] ) ohci_controllers = ioreg.ioiterator_to_list( ioreg.IOServiceGetMatchingServices( ioreg.kIOMasterPortDefault, - {"IOProviderClass": "IOPCIDevice", "IOPropertyMatch": [{"class-code": binascii.a2b_hex(utilities.hexswap(hex(OHCIController.CLASS_CODE)[2:].zfill(8)))}]}, + OHCIController.class_code_matching_dict(), None, )[1] ) @@ -742,7 +785,7 @@ class Computer: uhci_controllers = ioreg.ioiterator_to_list( ioreg.IOServiceGetMatchingServices( ioreg.kIOMasterPortDefault, - {"IOProviderClass": "IOPCIDevice", "IOPropertyMatch": [{"class-code": binascii.a2b_hex(utilities.hexswap(hex(UHCIController.CLASS_CODE)[2:].zfill(8)))}]}, + UHCIController.class_code_matching_dict(), None, )[1] ) @@ -763,7 +806,7 @@ class Computer: ethernet_controllers = ioreg.ioiterator_to_list( ioreg.IOServiceGetMatchingServices( ioreg.kIOMasterPortDefault, - {"IOProviderClass": "IOPCIDevice", "IOPropertyMatch": [{"class-code": binascii.a2b_hex(utilities.hexswap(hex(EthernetController.CLASS_CODE)[2:].zfill(8)))}]}, + EthernetController.class_code_matching_dict(), None, )[1] ) @@ -778,21 +821,23 @@ class Computer: sata_controllers = ioreg.ioiterator_to_list( ioreg.IOServiceGetMatchingServices( ioreg.kIOMasterPortDefault, - {"IOProviderClass": "IOPCIDevice", "IOPropertyMatch": [{"class-code": binascii.a2b_hex(utilities.hexswap(hex(SATAController.CLASS_CODE)[2:].zfill(8)))}]}, + SATAController.class_code_matching_dict(), None, )[1] ) sas_controllers = ioreg.ioiterator_to_list( ioreg.IOServiceGetMatchingServices( ioreg.kIOMasterPortDefault, - {"IOProviderClass": "IOPCIDevice", "IOPropertyMatch": [{"class-code": binascii.a2b_hex(utilities.hexswap(hex(SASController.CLASS_CODE)[2:].zfill(8)))}]}, + SASController.class_code_matching_dict(), None, )[1] ) nvme_controllers = ioreg.ioiterator_to_list( ioreg.IOServiceGetMatchingServices( - ioreg.kIOMasterPortDefault, {"IOProviderClass": "IONVMeController", "IOParentMatch": {"IOProviderClass": "IOPCIDevice"}, "IOPropertyMatch": {"IOClass": "IONVMeController"}}, None + ioreg.kIOMasterPortDefault, + NVMeController.class_code_matching_dict(), + None, )[1] ) for device in sata_controllers: @@ -804,22 +849,9 @@ class Computer: ioreg.IOObjectRelease(device) for device in nvme_controllers: - parent = ioreg.IORegistryEntryGetParentEntry(device, "IOService".encode(), None)[1] + self.storage.append(NVMeController.from_ioregistry(device)) ioreg.IOObjectRelease(device) - aspm: Union[int, bytes] = ioreg.corefoundation_to_native(ioreg.IORegistryEntryCreateCFProperty(parent, "pci-aspm-default", ioreg.kCFAllocatorDefault, ioreg.kNilOptions)) or 0 # type: ignore - if isinstance(aspm, bytes): - aspm = int.from_bytes(aspm, byteorder="little") - - controller = NVMeController.from_ioregistry(parent) - controller.aspm = aspm - - if controller.vendor_id != 0x106B: - # Handle Apple Vendor ID - self.storage.append(controller) - - ioreg.IOObjectRelease(parent) - def smbios_probe(self): # Reported model entry = next(ioreg.ioiterator_to_list(ioreg.IOServiceGetMatchingServices(ioreg.kIOMasterPortDefault, ioreg.IOServiceMatching("IOPlatformExpertDevice".encode()), None)[1])) @@ -903,7 +935,7 @@ class Computer: self.trackpad_type = "Legacy" elif usb_device.device_id in usb_data.AppleIDs.AppleUSBMultiTouch: self.trackpad_type = "Modern" - + def sata_disk_probe(self): # Get all SATA Controllers/Disks from 'system_profiler SPSerialATADataType' # Determine whether SATA SSD is present and Apple-made diff --git a/resources/global_settings.py b/resources/global_settings.py index 41ec38f0c..91d979b63 100644 --- a/resources/global_settings.py +++ b/resources/global_settings.py @@ -31,7 +31,12 @@ class GlobalEnviromentSettings: """ if Path(self.global_settings_plist).exists(): - plist = plistlib.load(Path(self.global_settings_plist).open("rb")) + try: + plist = plistlib.load(Path(self.global_settings_plist).open("rb")) + except Exception as e: + logging.error("Error: Unable to read global settings file") + logging.error(e) + return None if property_name in plist: return plist[property_name] return None @@ -43,7 +48,12 @@ class GlobalEnviromentSettings: """ if Path(self.global_settings_plist).exists(): - plist = plistlib.load(Path(self.global_settings_plist).open("rb")) + try: + plist = plistlib.load(Path(self.global_settings_plist).open("rb")) + except Exception as e: + logging.error("Error: Unable to read global settings file") + logging.error(e) + return plist[property_name] = property_value try: plistlib.dump(plist, Path(self.global_settings_plist).open("wb")) @@ -69,9 +79,14 @@ class GlobalEnviromentSettings: defaults_path = Path(defaults_path).expanduser() if Path(defaults_path).exists(): - defaults_plist = plistlib.load(Path(defaults_path).open("rb")) # merge defaults with global settings - global_settings_plist = plistlib.load(Path(self.global_settings_plist).open("rb")) + try: + defaults_plist = plistlib.load(Path(defaults_path).open("rb")) + global_settings_plist = plistlib.load(Path(self.global_settings_plist).open("rb")) + except Exception as e: + logging.error("Error: Unable to read global settings file") + logging.error(e) + return global_settings_plist.update(defaults_plist) try: plistlib.dump(global_settings_plist, Path(self.global_settings_plist).open("wb")) diff --git a/resources/macos_installer_handler.py b/resources/macos_installer_handler.py index ae661631b..360256805 100644 --- a/resources/macos_installer_handler.py +++ b/resources/macos_installer_handler.py @@ -234,7 +234,7 @@ class RemoteInstallerCatalog: Parses Apple's Software Update catalog and finds all macOS installers. """ - def __init__(self, seed_override: SeedType = SeedType.PublicRelease, os_override: int = os_data.os_data.ventura) -> None: + def __init__(self, seed_override: SeedType = SeedType.PublicRelease, os_override: int = os_data.os_data.sonoma) -> None: self.catalog_url: str = self._construct_catalog_url(seed_override, os_override) @@ -425,8 +425,7 @@ class RemoteInstallerCatalog: return {} newest_apps: dict = self.available_apps.copy() - supported_versions = ["10.13", "10.14", "10.15", "11", "12", "13"] - + supported_versions = ["10.13", "10.14", "10.15", "11", "12", "13", "14"] for version in supported_versions: remote_version_minor = 0 @@ -493,11 +492,6 @@ class RemoteInstallerCatalog: newest_apps.pop(ia) break - # Remove unsupported versions (namely 14) - for ia in list(newest_apps): - if newest_apps[ia]["Version"].split(".")[0] not in supported_versions: - newest_apps.pop(ia) - return newest_apps diff --git a/resources/reroute_payloads.py b/resources/reroute_payloads.py index 2272b5fd7..3ffe7959c 100644 --- a/resources/reroute_payloads.py +++ b/resources/reroute_payloads.py @@ -28,7 +28,7 @@ class RoutePayloadDiskImage: """ if self.constants.wxpython_variant is True and not self.constants.launcher_script: - logging.info("Running in Binary GUI mode, switching to tmp directory") + logging.info("Running in compiled binary, switching to tmp directory") self.temp_dir = tempfile.TemporaryDirectory() logging.info(f"New payloads location: {self.temp_dir.name}") logging.info("Creating payloads directory") @@ -71,7 +71,7 @@ class RoutePayloadDiskImage: dmg_info = plistlib.loads(dmg_info.stdout) - for variant in ["Universal-Binaries.dmg", "payloads.dmg"]: + for variant in ["DortaniaInternalResources.dmg", "Universal-Binaries.dmg", "payloads.dmg"]: for image in dmg_info["images"]: if image["image-path"].endswith(variant): if unmount_all_active is False: diff --git a/resources/sys_patch/sys_patch.py b/resources/sys_patch/sys_patch.py index 4f7741aa0..b957dd871 100644 --- a/resources/sys_patch/sys_patch.py +++ b/resources/sys_patch/sys_patch.py @@ -32,12 +32,13 @@ # This is because Apple removed on-disk binaries (ref: https://github.com/dortania/OpenCore-Legacy-Patcher/issues/998) # 'sudo ditto /Library/Developer/KDKs//System /System/Volumes/Update/mnt1/System' +import logging import plistlib -import shutil import subprocess +import applescript + from pathlib import Path from datetime import datetime -import logging from resources import constants, utilities, kdk_handler from resources.sys_patch import sys_patch_detect, sys_patch_auto, sys_patch_helpers, sys_patch_generate @@ -867,6 +868,75 @@ class PatchSysVolume: return False logging.info("- Mounted Universal-Binaries.dmg") + if self.constants.cli_mode is False and Path(self.constants.overlay_psp_path_dmg).exists() and Path("~/.dortania_developer").expanduser().exists(): + icon_path = str(self.constants.app_icon_path).replace("/", ":")[1:] + msg = "Welcome to the DortaniaInternal Program, please provided the decryption key to access internal resources. Press cancel to skip." + password = Path("~/.dortania_developer_key").expanduser().read_text().strip() if Path("~/.dortania_developer_key").expanduser().exists() else "" + for i in range(3): + try: + if password == "": + password = applescript.AppleScript( + f""" + set theResult to display dialog "{msg}" default answer "" with hidden answer with title "OpenCore Legacy Patcher" with icon file "{icon_path}" + + return the text returned of theResult + """ + ).run() + + result = subprocess.run( + [ + "hdiutil", "attach", "-noverify", f"{self.constants.overlay_psp_path_dmg}", + "-mountpoint", Path(self.constants.payload_path / Path("DortaniaInternal")), + "-nobrowse", + "-passphrase", password + ], + stdout=subprocess.PIPE, stderr=subprocess.STDOUT + ) + if result.returncode == 0: + logging.info("- Mounted DortaniaInternal resources") + result = subprocess.run( + [ + "ditto", f"{self.constants.payload_path / Path('DortaniaInternal')}", f"{self.constants.payload_path / Path('Universal-Binaries')}" + ], + stdout=subprocess.PIPE, stderr=subprocess.STDOUT + ) + if result.returncode == 0: + return True + + logging.info("- Failed to merge DortaniaInternal resources") + logging.info(f"Output: {result.stdout.decode()}") + logging.info(f"Return Code: {result.returncode}") + return False + + logging.info("- Failed to mount DortaniaInternal resources") + logging.info(f"Output: {result.stdout.decode()}") + logging.info(f"Return Code: {result.returncode}") + + if "Authentication error" not in result.stdout.decode(): + try: + # Display that the disk image might be corrupted + applescript.AppleScript( + f""" + display dialog "Failed to mount DortaniaInternal resources, please file an internal radar:\n\n{result.stdout.decode()}" with title "OpenCore Legacy Patcher" with icon file "{icon_path}" + """ + ).run() + return False + except Exception as e: + pass + break + msg = f"Decryption failed, please try again. {2 - i} attempts remaining. " + password = "" + + if i == 2: + applescript.AppleScript( + f""" + display dialog "Failed to mount DortaniaInternal resources, too many incorrect passwords. If this continues with the correct decryption key, please file an internal radar." with title "OpenCore Legacy Patcher" with icon file "{icon_path}" + """ + ).run() + return False + except Exception as e: + break + return True logging.info("- PatcherSupportPkg resources missing, Patcher likely corrupted!!!") diff --git a/resources/sys_patch/sys_patch_auto.py b/resources/sys_patch/sys_patch_auto.py index e1cdca83e..0c275919a 100644 --- a/resources/sys_patch/sys_patch_auto.py +++ b/resources/sys_patch/sys_patch_auto.py @@ -83,7 +83,6 @@ class AutomaticSysPatch: if patches[patch] is True and not patch.startswith("Settings") and not patch.startswith("Validation"): patch_string += f"- {patch}\n" - logging.info("- No new binaries found on Github, proceeding with patching") logging.info("- No new binaries found on Github, proceeding with patching") if self.constants.launcher_script is None: args_string = f"'{self.constants.launcher_binary}' --gui_patch" diff --git a/resources/sys_patch/sys_patch_detect.py b/resources/sys_patch/sys_patch_detect.py index c78bd18b1..947296423 100644 --- a/resources/sys_patch/sys_patch_detect.py +++ b/resources/sys_patch/sys_patch_detect.py @@ -40,6 +40,7 @@ class DetectRootPatch: self.broadwell_gpu = False self.skylake_gpu = False self.legacy_gcn = False + self.legacy_gcn_v2 = False self.legacy_polaris = False self.legacy_vega = False @@ -47,9 +48,11 @@ class DetectRootPatch: self.brightness_legacy = False self.legacy_audio = False self.legacy_wifi = False + self.modern_wifi = False self.legacy_gmux = False self.legacy_keyboard_backlight = False self.legacy_uhci_ohci = False + self.legacy_pcie_webcam = False # Patch Requirements self.amfi_must_disable = False @@ -156,12 +159,20 @@ class DetectRootPatch: # full compatibility (namely power states, etc) # Reference: https://github.com/dortania/bugtracker/issues/292 # TODO: Probe framebuffer families further - if self.model != "MacBookPro13,3": + # Sonoma note: MacBookPro14,3 has the same issue... + # iMac18,2/3 is partially affected, however currently it seems the generic framebuffer + # is sufficient. Only MacBookPro14,3 needs this for dGPU handling + if self.model not in ["MacBookPro13,3", "MacBookPro14,3"]: if "AVX2" in self.constants.computer.cpu.leafs: continue self.legacy_polaris = True else: - self.legacy_gcn = True + if self.model == "MacBookPro13,3": + self.legacy_gcn = True + elif self.model == "MacBookPro14,3": + if self.constants.detected_os < os_data.os_data.sonoma: + continue + self.legacy_gcn_v2 = True else: self.legacy_gcn = True self.supports_metal = True @@ -217,6 +228,9 @@ class DetectRootPatch: self.skylake_gpu = True self.amfi_must_disable = True self.supports_metal = True + + + if self.supports_metal is True: # Avoid patching Metal and non-Metal GPUs if both present, prioritize Metal GPU # Main concerns are for iMac12,x with Sandy iGPU and Kepler dGPU @@ -228,7 +242,7 @@ class DetectRootPatch: self.sandy_gpu = False self.legacy_keyboard_backlight = False - if self.legacy_gcn is True: + if self.legacy_gcn is True or self.legacy_gcn_v2 is True: # We can only support one or the other due to the nature of relying # on portions of the native AMD stack for Polaris and Vega # Thus we'll prioritize legacy GCN due to being the internal card @@ -243,7 +257,6 @@ class DetectRootPatch: if self.requires_root_kc is True: self.missing_kdk = not self._check_kdk() - self._check_networking_support() def _check_networking_support(self): @@ -257,9 +270,10 @@ class DetectRootPatch: On subsequent runs, we'll require networking to be enabled. """ - if self.constants.detected_os < os_data.os_data.ventura: + # 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): return - if self.legacy_wifi is False: + if self.legacy_wifi is False and self.modern_wifi is False: return if self.requires_root_kc is False: return @@ -273,7 +287,7 @@ class DetectRootPatch: oclp_patch_path = "/System/Library/CoreServices/OpenCore-Legacy-Patcher.plist" if Path(oclp_patch_path).exists(): 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 # Due to the reliance of KDKs for most older patches, we'll allow KDK-less @@ -289,6 +303,7 @@ class DetectRootPatch: self.iron_gpu = False self.sandy_gpu = False self.legacy_gcn = False + self.legacy_gcn_v2 = False self.legacy_polaris = False self.legacy_vega = False self.brightness_legacy = False @@ -296,6 +311,14 @@ class DetectRootPatch: self.legacy_gmux = 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): """ @@ -417,7 +440,7 @@ class DetectRootPatch: Base check to ensure patcher is compatible with host OS """ min_os = os_data.os_data.big_sur - max_os = os_data.os_data.ventura + max_os = os_data.os_data.sonoma if self.constants.detected_os < min_os or self.constants.detected_os > max_os: return False return True @@ -493,11 +516,11 @@ class DetectRootPatch: return False # If we're on a Mac, check for Penryn or older - # This is due to Apple implementing an internal USB hub on post-Penryn (excluding MacPro4,1 and MacPro5,1) + # This is due to Apple implementing an internal USB hub on post-Penryn (excluding MacPro4,1, MacPro5,1 and Xserve3,1) # Ref: https://techcommunity.microsoft.com/t5/microsoft-usb-blog/reasons-to-avoid-companion-controllers/ba-p/270710 if ( smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.CPUGen.penryn.value or \ - self.model in ["MacPro4,1", "MacPro5,1"] + self.model in ["MacPro4,1", "MacPro5,1", "Xserve3,1"] ): return True @@ -515,6 +538,8 @@ class DetectRootPatch: self.has_network = network_handler.NetworkUtilities().verify_network_connection() + self.legacy_pcie_webcam = self.constants.computer.pcie_webcam + if self._check_uhci_ohci() is True: self.legacy_uhci_ohci = True self.requires_root_kc = True @@ -538,6 +563,20 @@ class DetectRootPatch: if self.constants.detected_os >= os_data.os_data.ventura: # Due to extracted frameworks for IO80211.framework and co, check library validation self.amfi_must_disable = True + if self.constants.detected_os > os_data.os_data.ventura: + self.amfi_shim_bins = True + + if ( + isinstance(self.constants.computer.wifi, device_probe.Broadcom) + and self.constants.computer.wifi.chipset in [ + device_probe.Broadcom.Chipsets.AirPortBrcm4360, + device_probe.Broadcom.Chipsets.AirportBrcmNIC, + # We don't officially support this chipset, however we'll throw a bone to hackintosh users + device_probe.Broadcom.Chipsets.AirPortBrcmNICThirdParty, + ]): + if self.constants.detected_os > os_data.os_data.ventura: + self.modern_wifi = True + self.amfi_shim_bins = True # if self.model in ["MacBookPro5,1", "MacBookPro5,2", "MacBookPro5,3", "MacBookPro8,2", "MacBookPro8,3"]: if self.model in ["MacBookPro8,2", "MacBookPro8,3"]: @@ -554,6 +593,9 @@ class DetectRootPatch: self.legacy_gmux = True self._detect_gpus() + # This must be performed last, as it may override previous decisions + # Namely, whether we allow patches requiring KDKs + self._check_networking_support() self.root_patch_dict = { "Graphics: Nvidia Tesla": self.nvidia_tesla, @@ -562,6 +604,7 @@ class DetectRootPatch: "Graphics: AMD TeraScale 1": self.amd_ts1, "Graphics: AMD TeraScale 2": self.amd_ts2, "Graphics: AMD Legacy GCN": self.legacy_gcn, + "Graphics: AMD Legacy GCN (2017)": self.legacy_gcn_v2, "Graphics: AMD Legacy Polaris": self.legacy_polaris, "Graphics: AMD Legacy Vega": self.legacy_vega, "Graphics: Intel Ironlake": self.iron_gpu, @@ -573,9 +616,11 @@ class DetectRootPatch: "Brightness: Legacy Backlight Control": self.brightness_legacy, "Audio: Legacy Realtek": self.legacy_audio, "Networking: Legacy Wireless": self.legacy_wifi, + "Networking: Modern Wireless": self.modern_wifi, "Miscellaneous: Legacy GMUX": self.legacy_gmux, "Miscellaneous: Legacy Keyboard Backlight": self.legacy_keyboard_backlight, "Miscellaneous: Legacy USB 1.1": self.legacy_uhci_ohci, + "Miscellaneous: PCIe FaceTime Camera": self.legacy_pcie_webcam, "Settings: Requires AMFI exemption": self.amfi_must_disable, "Settings: Supports Auxiliary Cache": not self.requires_root_kc, "Settings: Kernel Debug Kit missing": self.missing_kdk if self.constants.detected_os >= os_data.os_data.ventura.value else False, diff --git a/resources/sys_patch/sys_patch_generate.py b/resources/sys_patch/sys_patch_generate.py index 27619cbea..e97418c09 100644 --- a/resources/sys_patch/sys_patch_generate.py +++ b/resources/sys_patch/sys_patch_generate.py @@ -139,6 +139,8 @@ class GenerateRootPatchSets: required_patches.update({"Revert GVA Downgrade": all_hardware_patchset["Graphics"]["Revert GVA Downgrade"]}) if "AVX2" not in self.constants.computer.cpu.leafs: required_patches.update({"AMD OpenCL": all_hardware_patchset["Graphics"]["AMD OpenCL"]}) + if self.hardware_details["Graphics: AMD Legacy GCN (2017)"] is True: + required_patches.update({"AMD Legacy GCN v2": all_hardware_patchset["Graphics"]["AMD Legacy GCN v2"]}) if self.hardware_details["Graphics: AMD Legacy Vega"] is True: required_patches.update({"Monterey GVA": all_hardware_patchset["Graphics"]["Monterey GVA"]}) @@ -163,6 +165,9 @@ class GenerateRootPatchSets: required_patches.update({"Legacy Wireless": all_hardware_patchset["Networking"]["Legacy Wireless"]}) required_patches.update({"Legacy Wireless Extended": all_hardware_patchset["Networking"]["Legacy Wireless Extended"]}) + if self.hardware_details["Networking: Modern Wireless"] is True: + required_patches.update({"Legacy Wireless": all_hardware_patchset["Networking"]["Modern Wireless"]}) + if self.hardware_details["Miscellaneous: Legacy GMUX"] is True: required_patches.update({"Legacy GMUX": all_hardware_patchset["Miscellaneous"]["Legacy GMUX"]}) @@ -172,6 +177,9 @@ class GenerateRootPatchSets: if self.hardware_details["Miscellaneous: Legacy USB 1.1"] is True: required_patches.update({"Legacy USB 1.1": all_hardware_patchset["Miscellaneous"]["Legacy USB 1.1"]}) + if self.hardware_details["Miscellaneous: PCIe FaceTime Camera"] is True: + required_patches.update({"PCIe FaceTime Camera": all_hardware_patchset["Miscellaneous"]["PCIe FaceTime Camera"]}) + if required_patches: host_os_float = float(f"{self.constants.detected_os}.{self.constants.detected_os_minor}") diff --git a/resources/sys_patch/sys_patch_helpers.py b/resources/sys_patch/sys_patch_helpers.py index 816dfb855..0e4828ece 100644 --- a/resources/sys_patch/sys_patch_helpers.py +++ b/resources/sys_patch/sys_patch_helpers.py @@ -234,15 +234,16 @@ class SysPatchHelpers: - opencl-c.h - lib (entire directory) + Note: With macOS Sonoma, 32023 compiler is used instead and so this patch is not needed + Parameters: mount_point: The mount point of the target volume """ - if self.constants.detected_os < os_data.os_data.ventura: + if self.constants.detected_os != os_data.os_data.ventura: + return + if self.constants.detected_os_minor < 4: return - if self.constants.detected_os == os_data.os_data.ventura: - if self.constants.detected_os_minor < 4: - return LIBRARY_DIR = f"{mount_point}/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang" GPU_VERSION = "31001.669" diff --git a/resources/validation.py b/resources/validation.py index 4d9ff59de..9adbd6595 100644 --- a/resources/validation.py +++ b/resources/validation.py @@ -162,7 +162,7 @@ class PatcherValidation: logging.info("Mounted Universal-Binaries.dmg") - for supported_os in [os_data.os_data.big_sur, os_data.os_data.monterey, os_data.os_data.ventura]: + for supported_os in [os_data.os_data.big_sur, os_data.os_data.monterey, os_data.os_data.ventura, os_data.os_data.sonoma]: for i in range(0, 10): self._validate_root_patch_files(supported_os, i) logging.info("Validating SNB Board ID patcher") @@ -205,7 +205,6 @@ class PatcherValidation: # Second run, flip all settings self.constants.verbose_debug = True self.constants.opencore_debug = True - self.constants.opencore_build = "DEBUG" self.constants.kext_debug = True self.constants.kext_variant = "DEBUG" self.constants.kext_debug = True diff --git a/resources/wx_gui/gui_macos_installer_download.py b/resources/wx_gui/gui_macos_installer_download.py index 6448fa2f8..81e30aa45 100644 --- a/resources/wx_gui/gui_macos_installer_download.py +++ b/resources/wx_gui/gui_macos_installer_download.py @@ -178,7 +178,6 @@ class macOSInstallerDownloadFrame(wx.Frame): self.list.SetItemImage(index, self._macos_version_to_icon(int(installers[item]['Build'][:2]))) self.list.SetItem(index, 1, utilities.human_fmt(installers[item]['Size'])) self.list.SetItem(index, 2, installers[item]['Date'].strftime("%x")) - else: logging.error("No installers found on SUCatalog") wx.MessageDialog(self.frame_modal, "Failed to download Installer Catalog from Apple", "Error", wx.OK | wx.ICON_ERROR).ShowModal() diff --git a/resources/wx_gui/gui_settings.py b/resources/wx_gui/gui_settings.py index 75e0c28b1..0cad46cfc 100644 --- a/resources/wx_gui/gui_settings.py +++ b/resources/wx_gui/gui_settings.py @@ -277,14 +277,6 @@ class SettingsFrame(wx.Frame): "wrap_around 2": { "type": "wrap_around", }, - "Content Caching": { - "type": "checkbox", - "value": self.constants.set_content_caching, - "variable": "set_content_caching", - "description": [ - # "Enable Content Caching.", - ], - }, "APFS Trim": { "type": "checkbox", "value": self.constants.apfs_trim_timeout, diff --git a/resources/wx_gui/gui_sys_patch_start.py b/resources/wx_gui/gui_sys_patch_start.py index 45958e418..57cb16a03 100644 --- a/resources/wx_gui/gui_sys_patch_start.py +++ b/resources/wx_gui/gui_sys_patch_start.py @@ -13,7 +13,6 @@ from pathlib import Path from resources import ( constants, kdk_handler, - global_settings, ) from resources.sys_patch import ( sys_patch, diff --git a/resources/wx_gui/gui_update.py b/resources/wx_gui/gui_update.py index a1a775924..14c0d2cef 100644 --- a/resources/wx_gui/gui_update.py +++ b/resources/wx_gui/gui_update.py @@ -178,7 +178,6 @@ class UpdateFrame(wx.Frame): sys.exit(0) - def _extract_update(self) -> None: """ Extracts the update