Compare commits

..

24 Commits

Author SHA1 Message Date
Jazzzny
dba48072fd unblock tahoe 2025-12-03 20:21:08 -05:00
Jazzzny
b4e6688203 Merge remote-tracking branch 'origin/main' into macos-next
# Conflicts:
#	CHANGELOG.md
#	opencore_legacy_patcher/constants.py
2025-11-30 23:01:38 -05:00
Jazzzny
a71086935d minor ui refresh 2025-11-30 22:47:34 -05:00
Jazzzny
2cd692ed9b Add remaining provisional T2 SMBIOS 2025-07-21 13:19:51 -04:00
Jazzzny
13115072a9 Add iMac19,x SMBIOS 2025-07-21 13:12:38 -04:00
Jazzzny
75302a1ec2 Add check for Solarium enablement 2025-07-16 20:03:36 -04:00
Jazzzny
decf6a9676 Inject legacy USB map on USB 1.1 Macs 2025-07-14 17:10:07 -04:00
Jazzzny
c3f8b47cec Fix SDK patch 2025-07-09 23:39:39 -04:00
Jazzzny
9f35856b39 Enable Solarium on Nightly builds, adjust Liquid Glass icon 2025-07-09 23:13:45 -04:00
Jazzzny
5c8d0d967d Add preliminary macOS 26 app icon 2025-07-09 22:21:10 -04:00
Jazzzny
6d68399483 Add Tahoe icon, do now show multiple betas on latest installers listing 2025-07-07 23:47:24 -04:00
Jazzzny
31572c86b9 Revert root patcher maximum 2025-07-01 13:57:24 -04:00
Jazzzny
a024bfc117 Do not patch AppleHDA on macOS 26 B1 2025-07-01 13:20:43 -04:00
Jazzzny
4976c5148e Allow root patcher on macOS 26 2025-07-01 13:17:15 -04:00
Jazzzny
e3c064d2c1 Add Modern Audio patch set foundation for macOS 26. Note that this requires PSPKG update, which needs to be done in PSPKG. 2025-07-01 13:13:30 -04:00
Jazzzny
0bfe09c3ef Disable EnableJumpstart for APFS driver 2025-07-01 12:52:32 -04:00
Jazzzny
689f423625 Add MaxKernel for previous USB Map 2025-07-01 12:12:10 -04:00
Jazzzny
cd3f3fb039 Update OpenCorePkg to rolling 2025-06-30 09:22:53 -04:00
Jazzzny
8872a18bfe Update CHANGELOG 2025-06-30 09:13:54 -04:00
Jazzzny
feca197ade Add USB mappings for macOS 26 2025-06-30 09:10:40 -04:00
Jazzzny
9be3dc8d58 Add apfs_aligned.efi driver 2025-06-30 08:28:16 -04:00
Jazzzny
90412f1354 Increment version 2025-06-30 08:13:28 -04:00
Jazzzny
1cf7335ec4 Implement macOS 26 constants for SUCatalog logic 2025-06-30 07:51:24 -04:00
Jazzzny
453ef78dda Add macOS 26 constant 2025-06-30 07:46:55 -04:00
44 changed files with 11029 additions and 183 deletions

View File

@@ -1,17 +1,11 @@
# OpenCore Legacy Patcher changelog
## 2.5.0
- Disable repatching a dirty root volume
- Prevents issues if existing patches are partially overwritten
- Thanks @crystall1nedev!
- Add slimmed down patchset for Modern Wireless for macOS Sequoia
- Move JavaScriptCore patch for pre-AVX Macs to RestrictEvents
- Additionally fixes machines without WiFi cards on Sonoma+ as the patch was not applied before
- Increment binaries:
- OpenCorePkg 1.0.4 - release
- Lilu 1.7.1 - release
- RestrictEvents 1.1.7 - (rolling - b70aaa4)
- PatcherSupportPkg 1.9.6 - release
## 3.0.0
- Restore support for FileVault 2 on macOS 26
- Add USB mappings for macOS 26
- Adopt Liquid Glass-conformant app icon
- Increment Binaries:
- OpenCorePkg 1.0.5 - rolling (f03819e)
## 2.4.1
- Switch installer source to AppleDB

View File

@@ -83,4 +83,5 @@ app = BUNDLE(coll,
"Build Date": time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()),
"BuildMachineOSBuild": subprocess.run(["/usr/bin/sw_vers", "-buildVersion"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode().strip(),
"NSPrincipalClass": "NSApplication",
"CFBundleIconName": "oclp",
})

View File

@@ -131,6 +131,26 @@ class GenerateApplication:
f.write(data)
def _patch_sdk_version(self) -> None:
"""
Patch LC_BUILD_VERSION in Load Command to report the macOS 26 SDK
This will enable the Solarium refresh when running on macOS 26
Minor visual anomalies and padding issues exist, disable if not addressed before release
"""
_file = self._application_output / "Contents" / "MacOS" / "OpenCore-Patcher"
_find = b'\x00\x01\x0C\x00'
_replace = b'\x00\x00\x1A\x00'
print("Patching LC_BUILD_VERSION")
with open(_file, "rb") as f:
data = f.read()
data = data.replace(_find, _replace)
with open(_file, "wb") as f:
f.write(data)
def _embed_git_data(self) -> None:
"""
Embed git data
@@ -162,6 +182,11 @@ class GenerateApplication:
stdout=subprocess.PIPE, stderr=subprocess.PIPE
)
subprocess_wrapper.run_and_verify(
generate_copy_arguments("payloads/Icon/AppIcons/Assets.car", self._application_output / "Contents/Resources/"),
stdout=subprocess.PIPE, stderr=subprocess.PIPE
)
def generate(self) -> None:
"""
@@ -172,5 +197,6 @@ class GenerateApplication:
self._remove_analytics_key()
self._patch_load_command()
self._patch_sdk_version() if not self._git_branch or not self._git_branch.startswith('refs/tags') else None
self._embed_git_data()
self._embed_resources()

View File

@@ -44,6 +44,7 @@ class InstallerBackup:
os_data.os_data.ventura,
os_data.os_data.sonoma,
os_data.os_data.sequoia,
os_data.os_data.tahoe,
],
first_run: bool = False
) -> None:
@@ -59,6 +60,7 @@ class InstallerBackup:
os_data.os_data.ventura: Path(self._directory, "13 Ventura"),
os_data.os_data.sonoma: Path(self._directory, "14 Sonoma"),
os_data.os_data.sequoia: Path(self._directory, "15 Sequoia"),
os_data.os_data.tahoe: Path(self._directory, "26 Tahoe"),
}
for os_version in self._supported_oses:

View File

@@ -1,10 +0,0 @@
This page has moved.
* [Application troubleshooting](./TROUBLESHOOT-APP.md)
* [Booting, installer and other troubleshooting](./TROUBLESHOOT-MISC.md)
* [Non-Metal troubleshooting](./TROUBLESHOOT-NONMETAL.md)
* [Hardware troubleshooting](./TROUBLESHOOT-HARDWARE.md)

View File

@@ -93,7 +93,7 @@ When installing macOS Sonoma or newer on a T1 system (2016-2017), full disk wipe
<img src="./images/wipe-volume.png" alt="WipeVolume" width="800" />
</div>
[More info here](https://dortania.github.io/OpenCore-Legacy-Patcher/TROUBLESHOOT-HARDWARE.html#no-t1-functionality-after-installing-sonoma-or-newer)
[More info here](https://dortania.github.io/OpenCore-Legacy-Patcher/TROUBLESHOOTING.html#no-t1-functionality-after-installing-sonoma-or-newer)
:::

View File

@@ -14,7 +14,7 @@ The below page is for users experiencing issues with their overall usage of macO
## Broken Firefox and Thunderbird (HD 3000)
Firefox and Thunderbird are now broken on HD 3000 [due to removal of HD 3000 support by Mozilla in v145.](https://hg-edge.mozilla.org/releases/mozilla-release/rev/32d4368e5a2a869bdc1f4556f020c1a6bea2a9c0) This may lead to system freezes and other erratic behavior on systems with this GPU, which is found in Mac models from 2011. As a workaround, hardware acceleration has to be disabled. If your system is locking up in normal mode, boot into Safe Mode by holding `Shift` on boot and disable hardware acceleration for Firefox and Thunderbird wherever applicable.
[Due to removal of HD 3000 support workarounds](https://hg-edge.mozilla.org/releases/mozilla-release/rev/32d4368e5a2a869bdc1f4556f020c1a6bea2a9c0) in Firefox/Thunderbird v145, Firefox and Thunderbird on HD 3000 are now broken. This may lead to system freezes and other erratic behavior on systems with this GPU, which is found in Mac models from 2011. As a workaround, hardware acceleration has to be disabled. If your system is locking up in normal mode, boot into Safe Mode by holding `Shift` on boot and disable hardware acceleration for Firefox and Thunderbird wherever applicable.
::: details Affected Mac models (click to expand)

View File

@@ -1,6 +0,0 @@
This page has moved.
- [Application troubleshooting](./TROUBLESHOOT-APP.md)
- [Booting, installer and other troubleshooting](./TROUBLESHOOT-MISC.md)
- [Non-Metal troubleshooting](./TROUBLESHOOT-NONMETAL.md)
- [Hardware troubleshooting](./TROUBLESHOOT-HARDWARE.md)

View File

@@ -4,16 +4,12 @@ This guide tells you different ways to uninstall OCLP and/or patches.
## Delete everything and revert back to native macOS
1. Create a USB drive with the latest officially supported macOS installer or alternatively [on most Macs](https://apple.stackexchange.com/questions/383985/which-macs-support-macos-internet-recovery) use Internet Recovery.
* Hold `cmd` + `Option (Alt)` + `R` for Internet Recovery.
* If doing Internet Recovery, skip step 2.
* Caution: Internet Recovery may not always install the latest officially supported OS version.
3. Restart and boot the computer using the installer USB drive by holding `Option (Alt)`.
1. Create a USB drive with the latest officially supported macOS installer.
2. Restart the computer and [Reset NVRAM.](https://support.apple.com/HT204063)
3. Boot the computer using the installer USB drive.
4. Go to Disk Utility and choose View -> Show All Devices.
5. Wipe the full disk by choosing the top disk option on the left sidebar and selecting "Erase".
6. Start macOS installation.
7. Once finished, restart once more and [Reset NVRAM](https://support.apple.com/HT204063) to ensure a fully clean and stock system.
## Manual methods

Binary file not shown.

Before

Width:  |  Height:  |  Size: 270 KiB

After

Width:  |  Height:  |  Size: 639 KiB

View File

@@ -13,8 +13,8 @@ from .detections import device_probe
class Constants:
def __init__(self) -> None:
# Patcher Versioning
self.patcher_version: str = "2.5.0" # OpenCore-Legacy-Patcher
self.patcher_support_pkg_version: str = "1.9.6" # PatcherSupportPkg
self.patcher_version: str = "3.0.0" # OpenCore-Legacy-Patcher
self.patcher_support_pkg_version: str = "1.9.5" # PatcherSupportPkg
self.copyright_date: str = "Copyright © 2020-2025 Dortania"
self.patcher_name: str = "OpenCore Legacy Patcher"
@@ -28,18 +28,18 @@ class Constants:
# OpenCore Versioning
# https://github.com/acidanthera/OpenCorePkg
self.opencore_version: str = "1.0.4"
self.opencore_version: str = "1.0.5"
# Kext Versioning
## Acidanthera
## https://github.com/acidanthera
self.lilu_version: str = "1.7.1" # Lilu
self.lilu_version: str = "1.7.0" # Lilu
self.whatevergreen_version: str = "1.6.9" # WhateverGreen
self.whatevergreen_navi_version: str = "1.6.9-Navi" # WhateverGreen (Navi Patch)
self.airportbcrmfixup_version: str = "2.1.9" # AirPortBrcmFixup
self.nvmefix_version: str = "1.1.2" # NVMeFix
self.applealc_version: str = "1.6.3" # AppleALC
self.restrictevents_version: str = "1.1.7" # RestrictEvents
self.restrictevents_version: str = "1.1.5" # RestrictEvents
self.featureunlock_version: str = "1.1.7" # FeatureUnlock
self.debugenhancer_version: str = "1.1.0" # DebugEnhancer
self.cpufriend_version: str = "1.2.9" # CPUFriend
@@ -322,6 +322,10 @@ class Constants:
return self.payload_path / Path("ACPI/SSDT-DGPU.aml")
# Drivers
@property
def sequoia_apfs_driver_path(self):
return self.payload_path / Path("Drivers/apfs_aligned.efi")
@property
def nvme_driver_path(self):
return self.payload_path / Path("Drivers/NvmExpressDxe.efi")
@@ -685,10 +689,18 @@ class Constants:
def map_kext_folder(self):
return self.kexts_path / Path("USB-Map.kext")
@property
def map_kext_folder_tahoe(self):
return self.kexts_path / Path("USB-Map-Tahoe.kext")
@property
def map_contents_folder(self):
return self.map_kext_folder / Path("Contents")
@property
def map_contents_folder_tahoe(self):
return self.map_kext_folder_tahoe / Path("Contents")
@property
def pp_kext_folder(self):
return self.kexts_path / Path("CPUFriendDataProvider.kext")
@@ -794,6 +806,10 @@ class Constants:
def icon_path_macos_sequoia(self):
return self.icns_resource_path / Path("Sequoia.icns")
@property
def icon_path_macos_tahoe(self):
return self.icns_resource_path / Path("Tahoe.icns")
@property
def gui_path(self):
return self.payload_path / Path("Icon/Resources.zip")
@@ -828,6 +844,7 @@ class Constants:
str(self.icon_path_macos_ventura),
str(self.icon_path_macos_sonoma),
str(self.icon_path_macos_sequoia),
str(self.icon_path_macos_tahoe),
]
sbm_values = [

View File

@@ -26,6 +26,7 @@ SupportedSMBIOS = [
"MacBookAir7,2",
# "MacBookAir8,1",
# "MacBookAir8,2",
# "MacBookAir9,1",
# MacBook Pro
"MacBookPro4,1",
"MacBookPro5,1",
@@ -55,6 +56,11 @@ SupportedSMBIOS = [
"MacBookPro14,1",
"MacBookPro14,2",
"MacBookPro14,3",
# "MacBookPro15,1",
# "MacBookPro15,2",
# "MacBookPro15,3",
# "MacBookPro15,4",
# "MacBookPro16,3",
# Mac Mini
"Macmini3,1",
"Macmini4,1",
@@ -64,6 +70,7 @@ SupportedSMBIOS = [
"Macmini6,1",
"Macmini6,2",
"Macmini7,1",
# "Macmini8,1",
# iMac
"iMac7,1",
"iMac8,1",
@@ -88,6 +95,8 @@ SupportedSMBIOS = [
"iMac18,1",
"iMac18,2",
"iMac18,3",
"iMac19,1",
"iMac19,2",
# Mac Pro
"MacPro3,1",
"MacPro4,1",
@@ -96,6 +105,8 @@ SupportedSMBIOS = [
# Xserve
"Xserve2,1",
"Xserve3,1",
# iMac Pro
# "iMacPro1,1",
]
# Audio

View File

@@ -216,6 +216,14 @@ class BuildFirmware:
if not "CPU Generation" in smbios_data.smbios_dictionary[self.model]:
return
# APFS check
# The macOS 26 APFS EFI driver's FileVault 2 implementation is broken, and
# must be replaced with the macOS 15 APFS EFI driver.
logging.info("- Enabling macOS 26 FileVault 2 support")
self.config["UEFI"]["APFS"]["EnableJumpstart"] = False
shutil.copy(self.constants.sequoia_apfs_driver_path, self.constants.drivers_path)
support.BuildSupport(self.model, self.constants, self.config).get_efi_binary_by_path("apfs_aligned.efi", "UEFI", "Drivers")["Enabled"] = True
# Exfat check
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.CPUGen.sandy_bridge.value:
# Sandy Bridge and newer Macs natively support ExFat

View File

@@ -155,11 +155,6 @@ xw
logging.info("- Fixing CoreGraphics support on Ivy Bridge")
re_patch_args.append("f16c")
# Patch AVX hardcoding in JavaScriptCore
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.CPUGen.sandy_bridge.value:
logging.info("- Fixing AVX hardcoding in JavaScriptCore")
re_patch_args.append("jsc")
return re_patch_args
@@ -290,19 +285,26 @@ xw
# USB Map
usb_map_path = Path(self.constants.plist_folder_path) / Path("AppleUSBMaps/Info.plist")
usb_map_tahoe_path = Path(self.constants.plist_folder_path) / Path("AppleUSBMaps/Info-Tahoe.plist")
if (
usb_map_path.exists()
and usb_map_tahoe_path.exists()
and (self.constants.allow_oc_everywhere is False or self.constants.allow_native_spoofs is True)
and self.model not in ["Xserve2,1", "Dortania1,1"]
and (
(self.model in model_array.Missing_USB_Map or self.model in model_array.Missing_USB_Map_Ventura)
or self.constants.serial_settings in ["Moderate", "Advanced"])
):
logging.info("- Adding USB-Map.kext")
logging.info("- Adding USB-Map.kext and USB-Map-Tahoe.kext")
Path(self.constants.map_kext_folder).mkdir()
Path(self.constants.map_kext_folder_tahoe).mkdir()
Path(self.constants.map_contents_folder).mkdir()
Path(self.constants.map_contents_folder_tahoe).mkdir()
shutil.copy(usb_map_path, self.constants.map_contents_folder)
# for the tahoe, need to copy but rename to Info.plist
shutil.copy(usb_map_tahoe_path, self.constants.map_contents_folder_tahoe / Path("Info.plist"))
support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("USB-Map.kext")["Enabled"] = True
support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("USB-Map-Tahoe.kext")["Enabled"] = True
if self.model in model_array.Missing_USB_Map_Ventura and self.constants.serial_settings not in ["Moderate", "Advanced"]:
support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("USB-Map.kext")["MinKernel"] = "22.0.0"
@@ -329,6 +331,9 @@ xw
support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("USB1.1-Injector.kext/Contents/PlugIns/AppleUSBUHCI.kext")["Enabled"] = True
support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("USB1.1-Injector.kext/Contents/PlugIns/AppleUSBUHCIPCI.kext")["Enabled"] = True
# Also remove MaxKernel from the USB-Map.kext, as USB stack will be downgraded after root patching
support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("USB-Map.kext")["MaxKernel"] = ""
def _debug_handling(self) -> None:
"""

View File

@@ -67,6 +67,24 @@ class BuildSMBIOS:
logging.info("- Adding -no_compat_check")
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " -no_compat_check"
def _strip_usb_map(self, map_path, model, spoofed_model, serial_settings):
config = plistlib.load(Path(map_path).open("rb"))
for entry in list(config["IOKitPersonalities_x86_64"]):
if not entry.startswith(model):
config["IOKitPersonalities_x86_64"].pop(entry)
else:
try:
config["IOKitPersonalities_x86_64"][entry]["model"] = spoofed_model
if serial_settings in ["Minimal", "None"]:
if config["IOKitPersonalities_x86_64"][entry]["IONameMatch"] == "EH01":
config["IOKitPersonalities_x86_64"][entry]["IONameMatch"] = "EHC1"
if config["IOKitPersonalities_x86_64"][entry]["IONameMatch"] == "EH02":
config["IOKitPersonalities_x86_64"][entry]["IONameMatch"] = "EHC2"
if config["IOKitPersonalities_x86_64"][entry]["IONameMatch"] == "SHC1":
config["IOKitPersonalities_x86_64"][entry]["IONameMatch"] = "XHC1"
except KeyError:
continue
plistlib.dump(config, Path(map_path).open("wb"), sort_keys=True)
def set_smbios(self) -> None:
"""
@@ -142,24 +160,10 @@ class BuildSMBIOS:
and ((self.model in model_array.Missing_USB_Map or self.model in model_array.Missing_USB_Map_Ventura) or self.constants.serial_settings in ["Moderate", "Advanced"])
):
new_map_ls = Path(self.constants.map_contents_folder) / Path("Info.plist")
map_config = plistlib.load(Path(new_map_ls).open("rb"))
# Strip unused USB maps
for entry in list(map_config["IOKitPersonalities_x86_64"]):
if not entry.startswith(self.model):
map_config["IOKitPersonalities_x86_64"].pop(entry)
else:
try:
map_config["IOKitPersonalities_x86_64"][entry]["model"] = self.spoofed_model
if self.constants.serial_settings in ["Minimal", "None"]:
if map_config["IOKitPersonalities_x86_64"][entry]["IONameMatch"] == "EH01":
map_config["IOKitPersonalities_x86_64"][entry]["IONameMatch"] = "EHC1"
if map_config["IOKitPersonalities_x86_64"][entry]["IONameMatch"] == "EH02":
map_config["IOKitPersonalities_x86_64"][entry]["IONameMatch"] = "EHC2"
if map_config["IOKitPersonalities_x86_64"][entry]["IONameMatch"] == "SHC1":
map_config["IOKitPersonalities_x86_64"][entry]["IONameMatch"] = "XHC1"
except KeyError:
continue
plistlib.dump(map_config, Path(new_map_ls).open("wb"), sort_keys=True)
new_map_ls_tahoe = Path(self.constants.map_contents_folder_tahoe) / Path("Info.plist")
self._strip_usb_map(new_map_ls, self.model, self.spoofed_model, self.constants.serial_settings)
self._strip_usb_map(new_map_ls_tahoe, self.model, self.spoofed_model, self.constants.serial_settings)
if self.constants.allow_oc_everywhere is False and self.model not in ["iMac7,1", "Xserve2,1", "Dortania1,1"] and self.constants.disallow_cpufriend is False and self.constants.serial_settings != "None":
# Adjust CPU Friend Data to correct SMBIOS
new_cpu_ls = Path(self.constants.pp_contents_folder) / Path("Info.plist")

View File

@@ -29,7 +29,7 @@ class CatalogProducts:
catalog: dict,
install_assistants_only: bool = True,
only_vmm_install_assistants: bool = True,
max_install_assistant_version: CatalogVersion = CatalogVersion.SEQUOIA
max_install_assistant_version: CatalogVersion = CatalogVersion.TAHOE
) -> None:
self.catalog: dict = catalog
self.ia_only: bool = install_assistants_only
@@ -251,6 +251,17 @@ class CatalogProducts:
if installer in products_copy:
products_copy.pop(products_copy.index(installer))
# Remove duplicates of the same version (i.e. multiple betas still in catalog), keep only latest
version_map = {}
for installer in products_copy:
version = installer.get("Version")
post_date = installer.get("PostDate")
if version is None:
continue
if version not in version_map or post_date > version_map[version].get("PostDate", ""):
version_map[version] = installer
products_copy = list(version_map.values())
# Remove EOL versions (older than n-3)
for installer in products:

View File

@@ -28,7 +28,7 @@ class AppleDBProducts:
def __init__(
self,
global_constants: constants.Constants,
max_install_assistant_version: os_data = os_data.sequoia,
max_install_assistant_version: os_data = os_data.tahoe,
) -> None:
self.constants: constants.Constants = global_constants

View File

@@ -29,7 +29,7 @@ class CatalogURL:
extension (CatalogExtension): Extension for the catalog URL
"""
def __init__(self,
version: CatalogVersion = CatalogVersion.SEQUOIA,
version: CatalogVersion = CatalogVersion.TAHOE,
seed: SeedType = SeedType.PublicRelease,
extension: CatalogExtension = CatalogExtension.PLIST
) -> None:

View File

@@ -41,9 +41,11 @@ from .hardware.misc import (
gmux,
keyboard_backlight,
legacy_audio,
modern_audio,
pcie_webcam,
t1_security,
usb11,
cpu_missing_avx,
)
from ... import constants
@@ -88,7 +90,6 @@ class HardwarePatchsetValidation(StrEnum):
NVDA_DRV_MISSING = "Validation: nvda_drv(_vrl) variable missing"
PATCHING_NOT_POSSIBLE = "Validation: Patching not possible"
UNPATCHING_NOT_POSSIBLE = "Validation: Unpatching not possible"
REPATCHING_NOT_SUPPORTED = "Validation: Root volume dirty, unpatch to continue"
class HardwarePatchsetDetection:
@@ -127,13 +128,16 @@ class HardwarePatchsetDetection:
legacy_wireless.LegacyWireless,
modern_wireless.ModernWireless,
legacy_audio.LegacyAudio,
modern_audio.ModernAudio,
display_backlight.DisplayBacklight,
gmux.GraphicsMultiplexer,
keyboard_backlight.KeyboardBacklight,
legacy_audio.LegacyAudio,
pcie_webcam.PCIeFaceTimeCamera,
t1_security.T1SecurityChip,
usb11.USB11Controller,
cpu_missing_avx.CPUMissingAVX,
]
self.device_properties = None
@@ -183,42 +187,6 @@ class HardwarePatchsetDetection:
return "FileVault is Off" not in subprocess.run(["/usr/bin/fdesetup", "status"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
def _validation_check_repatching_is_possible(self) -> bool:
"""
Determine if repatching is not allowed
"""
oclp_patch_path = "/System/Library/CoreServices/OpenCore-Legacy-Patcher.plist"
if not Path(oclp_patch_path).exists():
return self._is_root_volume_dirty()
oclp_plist = plistlib.load(open(oclp_patch_path, "rb"))
if self._constants.computer.oclp_sys_url != self._constants.commit_info[2]:
logging.error("Installed patches are from different commit, unpatching is required")
return True
wireless_keys = {"Legacy Wireless", "Modern Wireless Common"}
# Keep in sync with generate_patchset_plist
metadata_keys = {
"OpenCore Legacy Patcher",
"PatcherSupportPkg",
"Time Patched",
"Commit URL",
"Kernel Debug Kit Used",
"Metal Library Used",
"OS Version",
"Custom Signature",
}
existing_patches = set(oclp_plist) - wireless_keys - metadata_keys
if existing_patches:
logging.error(f"Patch(es) already installed: {', '.join(existing_patches)}, unpatching is required")
return True
return False
def _validation_check_system_integrity_protection_enabled(self, configs: list[str]) -> bool:
"""
@@ -342,28 +310,6 @@ class HardwarePatchsetDetection:
"""
return metallib_handler.MetalLibraryObject(self._constants, self._os_build, self._os_version).metallib_already_installed
def _is_root_volume_dirty(self) -> bool:
"""
Determine if system volume is not sealed
"""
# macOS 11.0 introduced sealed system volumes
if self._xnu_major < os_data.big_sur.value:
return False
try:
content = plistlib.loads(subprocess.run(["/usr/sbin/diskutil", "info", "-plist", "/"], capture_output=True).stdout)
except plistlib.InvalidFileException:
raise RuntimeError("Failed to parse diskutil output.")
seal = content["Sealed"]
if "Broken" in seal:
logging.error(f"System volume is tainted, unpatching is required")
return True
return False
def _can_patch(self, requirements: dict, ignore_keys: list[str] = []) -> bool:
"""
@@ -557,7 +503,6 @@ class HardwarePatchsetDetection:
HardwarePatchsetValidation.SIP_ENABLED: self._validation_check_system_integrity_protection_enabled(required_sip_configs),
HardwarePatchsetValidation.SECURE_BOOT_MODEL_ENABLED: self._validation_check_secure_boot_model_enabled(),
HardwarePatchsetValidation.AMFI_ENABLED: self._validation_check_amfi_enabled(highest_amfi_level),
HardwarePatchsetValidation.REPATCHING_NOT_SUPPORTED: self._validation_check_repatching_is_possible(),
HardwarePatchsetValidation.WHATEVERGREEN_MISSING: self._validation_check_whatevergreen_missing() if has_nvidia_web_drivers is True else False,
HardwarePatchsetValidation.FORCE_OPENGL_MISSING: self._validation_check_force_opengl_missing() if has_nvidia_web_drivers is True else False,
HardwarePatchsetValidation.FORCE_COMPAT_MISSING: self._validation_check_force_compat_missing() if has_nvidia_web_drivers is True else False,

View File

@@ -0,0 +1,86 @@
"""
cpu_missing_avx.py: Legacy CPUs (Lacking AVX) Detection
Note that this system is implemented only for macOS Ventura and
machines not using the legacy/modern wireless patches (AVX patch integrated into WiFi patches).
This commit implemented unconditional AVX usage, thus Safari 18.2 and later will crash:
https://github.com/WebKit/WebKit/commit/c15e741266db8ff9df309ce9971eda1cfd9021cc
"""
from ..base import BaseHardware, HardwareVariant
from ..networking.legacy_wireless import LegacyWireless
from ..networking.modern_wireless import ModernWireless
from ...base import PatchType
from .....constants import Constants
from .....datasets.os_data import os_data
class CPUMissingAVX(BaseHardware):
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
super().__init__(xnu_major, xnu_minor, os_build, global_constants)
def name(self) -> str:
"""
Display name for end users
"""
return f"{self.hardware_variant()}: Legacy CPUs (Lacking AVX)"
def present(self) -> bool:
"""
Targeting CPUs without AVX support
"""
if self._constants.computer.rosetta_active is True:
return False
if "AVX1.0" in self._constants.computer.cpu.flags:
return False
return True
def native_os(self) -> bool:
"""
Only install this patch on macOS Ventura.
This is because we integrated the patch into the WiFi patches which all Macs use in Sonoma+.
"""
if self._xnu_major != os_data.ventura.value:
return True
if LegacyWireless(self._xnu_major, self._xnu_minor, self._os_build, self._constants).present() is True:
return True
if ModernWireless(self._xnu_major, self._xnu_minor, self._os_build, self._constants).present() is True:
return True
return False
def hardware_variant(self) -> HardwareVariant:
"""
Type of hardware variant
"""
return HardwareVariant.MISCELLANEOUS
def patches(self) -> dict:
"""
Patches for Legacy CPUs (Lacking AVX)
"""
if self.native_os() is True:
return {}
return {
"CPU Missing AVX": {
PatchType.MERGE_SYSTEM_VOLUME: {
"/System/Library/PrivateFrameworks": {
"IO80211.framework": "13.7.2-22",
},
}
},
}

View File

@@ -0,0 +1,77 @@
"""
modern_audio.py: Modern Audio patch set for macOS 26
"""
from ..base import BaseHardware, HardwareVariant
from ...base import PatchType
from .....constants import Constants
from .....datasets.os_data import os_data
class ModernAudio(BaseHardware):
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
super().__init__(xnu_major, xnu_minor, os_build, global_constants)
def name(self) -> str:
"""
Display name for end users
"""
return f"{self.hardware_variant()}: Modern Audio"
def present(self) -> bool:
"""
AppleHDA was outright removed in macOS 26, so this patch set is always present if OS requires it
"""
return True
def native_os(self) -> bool:
"""
- Everything before macOS Tahoe 26 is considered native
"""
if self._xnu_major < os_data.tahoe.value:
return True
# Technically, macOS Tahoe Beta 1 is also native, so return True
if self._os_build == "25A5279m":
return True
return False
def hardware_variant(self) -> HardwareVariant:
"""
Type of hardware variant
"""
return HardwareVariant.MISCELLANEOUS
def _modern_audio_patches(self) -> dict:
"""
Patches for Modern Audio
"""
return {
"Modern Audio": {
PatchType.OVERWRITE_SYSTEM_VOLUME: {
"/System/Library/Extensions": {
"AppleHDA.kext": "26.0 Beta 1",
},
},
},
}
def patches(self) -> dict:
"""
Patches for modern audio
"""
if self.native_os() is True:
return {}
return self._modern_audio_patches()

View File

@@ -52,18 +52,23 @@ class ModernWireless(BaseHardware):
"""
return HardwareVariant.NETWORKING
def _patches_modern_wireless_common_extended(self) -> dict:
def patches(self) -> dict:
"""
Extended modern wireless patches
Patches for Modern Wireless
"""
if self._xnu_major > os_data.sonoma:
if self.native_os() is True:
return {}
return {
"Modern Wireless Extended": {
"Modern Wireless": {
PatchType.OVERWRITE_SYSTEM_VOLUME: {
"/usr/libexec": {
"airportd": f"13.7.2-{self._xnu_major}",
"wifip2pd": f"13.7.2-{self._xnu_major}",
},
"/System/Library/CoreServices": {
**({ "WiFiAgent.app": "14.7.2" } if self._xnu_major >= os_data.sequoia else {}),
},
},
PatchType.MERGE_SYSTEM_VOLUME: {
@@ -71,43 +76,10 @@ class ModernWireless(BaseHardware):
"CoreWLAN.framework": f"13.7.2-{self._xnu_major}",
},
"/System/Library/PrivateFrameworks": {
"CoreWiFi.framework": f"13.7.2-{self._xnu_major}",
},
},
},
}
def _patches_modern_wireless_common(self) -> dict:
"""
Common modern wireless patches
"""
return {
"Modern Wireless Common": {
PatchType.OVERWRITE_SYSTEM_VOLUME: {
"/usr/libexec": {
"wifip2pd": f"13.7.2-{self._xnu_major}",
},
},
PatchType.MERGE_SYSTEM_VOLUME: {
"/System/Library/PrivateFrameworks": {
"CoreWiFi.framework": f"13.7.2-{self._xnu_major}",
"IO80211.framework": f"13.7.2-{self._xnu_major}",
"WiFiPeerToPeer.framework": f"13.7.2-{self._xnu_major}",
},
},
}
},
}
def patches(self) -> dict:
"""
Dictionary of patches
"""
if self.native_os() is True:
return {}
return {
**self._patches_modern_wireless_common(),
**self._patches_modern_wireless_common_extended(),
}
return _base
}

View File

@@ -72,14 +72,22 @@ class MainFrame(wx.Frame):
- Text: Copyright
"""
# Logo
logo = wx.StaticBitmap(self, bitmap=wx.Bitmap(str(self.constants.icns_resource_path / "OC-Patcher.icns"), wx.BITMAP_TYPE_ICON), pos=(-1, 0), size=(128, 128))
logo.Centre(wx.HORIZONTAL)
# Title label: OpenCore Legacy Patcher v{X.Y.Z}
title_label = wx.StaticText(self, label=f"OpenCore Legacy Patcher {'' if self.constants.special_build else ''}{self.constants.patcher_version}{' (Nightly)' if not self.constants.commit_info[0].startswith('refs/tags') else ''}", pos=(-1, 10))
title_label.SetFont(gui_support.font_factory(19, wx.FONTWEIGHT_BOLD))
title_label = wx.StaticText(self, label=f"OpenCore Legacy Patcher", pos=(-1, 128))
title_label.SetFont(gui_support.font_factory(25, wx.FONTWEIGHT_BOLD))
title_label.Centre(wx.HORIZONTAL)
version_label = wx.StaticText(self, label=f"Version {self.constants.patcher_version}{' (Nightly)' if not self.constants.commit_info[0].startswith('refs/tags') else ''}", pos=(-1, title_label.GetPosition()[1] + 32))
version_label.SetFont(gui_support.font_factory(13, wx.FONTWEIGHT_NORMAL))
version_label.Centre(wx.HORIZONTAL)
version_label.SetForegroundColour(wx.Colour(128, 128, 128))
# Text: Model: {Build or Host Model}
model_label = wx.StaticText(self, label=f"Model: {self.constants.custom_model or self.constants.computer.real_model}", pos=(-1, title_label.GetPosition()[1] + 25
))
model_label = wx.StaticText(self, label=f"Model: {self.constants.custom_model or self.constants.computer.real_model}", pos=(-1, version_label.GetPosition()[1] + 30))
model_label.SetFont(gui_support.font_factory(13, wx.FONTWEIGHT_NORMAL))
model_label.Centre(wx.HORIZONTAL)
self.model_label = model_label

View File

@@ -169,6 +169,20 @@ class CheckProperties:
return True
def host_is_solarium(self) -> bool:
"""
Check if running on macOS 26, and if Solarium refresh is enabled
"""
if self.constants.detected_os < os_data.os_data.tahoe:
return False
# If we are a release build, we are not Solarium for now
if self.constants.commit_info[0].startswith('refs/tags'):
return False
return True
def host_has_cpu_gen(self, gen: int) -> bool:
"""

View File

@@ -229,7 +229,7 @@ class SysPatchDisplayFrame(wx.Frame):
start_button.Disable()
else:
self.available_patches = True
if patches[HardwarePatchsetValidation.PATCHING_NOT_POSSIBLE] is True or no_new_patches is True:
if patches[HardwarePatchsetValidation.PATCHING_NOT_POSSIBLE] is True:
start_button.Disable()
elif no_new_patches is False:
start_button.SetDefault()

View File

@@ -753,7 +753,7 @@
<key>Enabled</key>
<false/>
<key>MaxKernel</key>
<string></string>
<string>24.99.99</string>
<key>MinKernel</key>
<string></string>
<key>BundlePath</key>
@@ -763,6 +763,24 @@
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>USB Map for Tahoe</string>
<key>Enabled</key>
<false/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>25.0.0</string>
<key>BundlePath</key>
<string>USB-Map-Tahoe.kext</string>
<key>ExecutablePath</key>
<string></string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
@@ -2842,7 +2860,7 @@
<key>APFS</key>
<dict>
<key>EnableJumpstart</key>
<true/>
<false/>
<key>GlobalConnect</key>
<false/>
<key>HideVerbose</key>
@@ -2936,6 +2954,18 @@
<key>LoadEarly</key>
<false/>
</dict>
<dict>
<key>Comment</key>
<string></string>
<key>Path</key>
<string>apfs_aligned.efi</string>
<key>Enabled</key>
<false/>
<key>Arguments</key>
<string></string>
<key>LoadEarly</key>
<false/>
</dict>
<dict>
<key>Comment</key>
<string></string>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -60,13 +60,13 @@ UNUSED_DRIVERS = [
"RamDiskDxe.efi",
"Mtftp6Dxe.efi",
"OpenNetworkBoot.efi",
"VirtioSerialDxe.efi",
"VirtioBlkDxe.efi",
"VirtioPciDeviceDxe.efi",
"VirtioNetDxe.efi",
"VirtioGpuDxe.efi",
"VirtioScsiDxe.efi",
"Virtio10.efi",
"VirtioBlkDxe.efi",
"VirtioGpuDxe.efi",
"VirtioNetDxe.efi",
"VirtioPciDeviceDxe.efi",
"VirtioScsiDxe.efi",
"VirtioSerialDxe.efi"
]
UNUSED_TOOLS = [

Binary file not shown.

Binary file not shown.