mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-15 13:18:56 +10:00
Compare commits
46 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c41ffaafc2 | ||
|
|
741eda5fd8 | ||
|
|
1678005ceb | ||
|
|
df029110c7 | ||
|
|
59f43e0ea0 | ||
|
|
9bdc5148c4 | ||
|
|
3283cf514b | ||
|
|
991e449d26 | ||
|
|
f880751539 | ||
|
|
8eade66017 | ||
|
|
bb09b0432f | ||
|
|
eca98c65d3 | ||
|
|
3af8687f42 | ||
|
|
0af93e7936 | ||
|
|
b8904387f3 | ||
|
|
91b2a8b673 | ||
|
|
96748952d3 | ||
|
|
5eddcadaac | ||
|
|
43131150a4 | ||
|
|
5fefc7185e | ||
|
|
ff00e2683e | ||
|
|
e94264f039 | ||
|
|
7fc36ac098 | ||
|
|
8711b4069a | ||
|
|
70cb12413a | ||
|
|
a6dc58a81d | ||
|
|
f8da16bf0a | ||
|
|
e43fecb4bc | ||
|
|
d6ed03eb8a | ||
|
|
49e1fb1ad2 | ||
|
|
ab1dab7fe5 | ||
|
|
6c44472e00 | ||
|
|
d1f545e356 | ||
|
|
e61544dcb9 | ||
|
|
889293ca8a | ||
|
|
a280e22cdb | ||
|
|
bb26a5a5d8 | ||
|
|
ba543ca5cf | ||
|
|
592b0a707f | ||
|
|
8da87aea28 | ||
|
|
4842028516 | ||
|
|
8b6bcd47d2 | ||
|
|
081bb56dd0 | ||
|
|
418de07f84 | ||
|
|
18e3fa37ff | ||
|
|
c36296f2a0 |
4
.github/workflows/build-app.yml
vendored
4
.github/workflows/build-app.yml
vendored
@@ -9,7 +9,7 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
name: Build TUI
|
||||
runs-on: self-hosted
|
||||
runs-on: x86_64
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
@@ -18,7 +18,7 @@ jobs:
|
||||
|
||||
- run: pyinstaller OpenCore-Patcher.spec
|
||||
- run: ./after_pyinstaller.sh
|
||||
- run: 'codesign -s "Developer ID Application: Mykola Grymalyuk (S74BDJXQMD)" -v --deep --timestamp --entitlements entitlements.plist -o runtime "dist/OpenCore-Patcher.app"'
|
||||
- run: 'codesign -s "Developer ID Application: Mykola Grymalyuk (S74BDJXQMD)" -v --force --deep --timestamp --entitlements entitlements.plist -o runtime "dist/OpenCore-Patcher.app"'
|
||||
- run: cd dist; zip -r ../OpenCore-Patcher-TUI.app.zip OpenCore-Patcher.app
|
||||
- run: ./../sign-tui.sh
|
||||
- name: Upload App to Artifacts
|
||||
|
||||
2
.github/workflows/build-gui.yml
vendored
2
.github/workflows/build-gui.yml
vendored
@@ -9,7 +9,7 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
name: Build GUI
|
||||
runs-on: self-hosted
|
||||
runs-on: x86_64
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install Python Dependencies
|
||||
|
||||
11
CHANGELOG.md
11
CHANGELOG.md
@@ -1,5 +1,16 @@
|
||||
# OpenCore Legacy Patcher changelog
|
||||
|
||||
## 0.2.4
|
||||
|
||||
- Fix BlessOverride typo
|
||||
- Fix Wake on WLAN typo
|
||||
- Fix Catalyst App crashing in macOS 11.5 (ie. Messages.app)
|
||||
- Increment Binaries
|
||||
- PatcherSupportPkg 0.0.15 release
|
||||
- Implement Latebloom.kext support (v0.19)
|
||||
- Work around macOS 11.3+ race condition on pre-Sandy Bridge Macs
|
||||
- Disable USB Map injection when unneeded
|
||||
|
||||
## 0.2.3
|
||||
|
||||
- Fix more IORegistry issues
|
||||
|
||||
@@ -9,7 +9,7 @@ import platform
|
||||
import argparse
|
||||
from pathlib import Path
|
||||
|
||||
from Resources import Build, ModelArray, Constants, SysPatch, device_probe, Utilities
|
||||
from Resources import Build, ModelArray, Constants, SysPatch, device_probe, Utilities, ModelExample
|
||||
|
||||
|
||||
class OpenCoreLegacyPatcher:
|
||||
@@ -62,6 +62,8 @@ class OpenCoreLegacyPatcher:
|
||||
parser.add_argument("--terascale_2", help="Enable TeraScale 2 Acceleration", action="store_true", required=False)
|
||||
#parser.add_argument("--patch_disk", action="store", help="Specifies disk to root patch", required=False)
|
||||
|
||||
parser.add_argument("--validate", help="Validate", action="store_true", required=False)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
self.constants.gui_mode = True
|
||||
@@ -76,6 +78,8 @@ class OpenCoreLegacyPatcher:
|
||||
if args.disk:
|
||||
print(f"- Install Disk set: {args.disk}")
|
||||
self.constants.disk = args.disk
|
||||
if args.validate:
|
||||
self.validate()
|
||||
#if args.patch_disk:
|
||||
# print(f"- Patch Disk set: {args.patch_disk}")
|
||||
# self.constants.patch_disk = args.patch_disk
|
||||
@@ -194,6 +198,8 @@ If you plan to create the USB for another machine, please select the "Change Mod
|
||||
# MacBook8,1 has an odd bug where it cannot install Monterey with Minimal spoofing
|
||||
self.constants.serial_settings == "Moderate"
|
||||
|
||||
self.constants.latebloom_delay, self.constants.latebloom_range, self.constants.latebloom_debug = Utilities.latebloom_detection(model)
|
||||
|
||||
def patch_vol(self):
|
||||
SysPatch.PatchSysVolume(self.constants.custom_model or self.constants.computer.real_model, self.constants).start_patch()
|
||||
|
||||
@@ -205,6 +211,49 @@ If you plan to create the USB for another machine, please select the "Change Mod
|
||||
|
||||
def install_opencore(self):
|
||||
Build.BuildOpenCore(self.constants.custom_model or self.constants.computer.real_model, self.constants).copy_efi()
|
||||
|
||||
def validate(self):
|
||||
# Runs through ocvalidate to check for errors
|
||||
|
||||
valid_dumps = [
|
||||
ModelExample.MacBookPro.MacBookPro92_Stock,
|
||||
#ModelExample.MacBookPro.MacBookPro171_Stock,
|
||||
#ModelExample.Macmini.Macmini91_Stock,
|
||||
ModelExample.iMac.iMac81_Stock,
|
||||
ModelExample.iMac.iMac112_Stock,
|
||||
ModelExample.iMac.iMac122_Upgraded,
|
||||
ModelExample.MacPro.MacPro31_Stock,
|
||||
ModelExample.MacPro.MacPro31_Upgrade,
|
||||
ModelExample.MacPro.MacPro31_Modern_AMD,
|
||||
ModelExample.MacPro.MacPro31_Modern_Kepler,
|
||||
]
|
||||
self.constants.validate = True
|
||||
|
||||
for model in ModelArray.SupportedSMBIOS:
|
||||
print(f"Validating predefined model: {model}")
|
||||
self.constants.custom_model = model
|
||||
self.build_opencore()
|
||||
result = subprocess.run([self.constants.ocvalidate_path, f"{self.constants.opencore_release_folder}/EFI/OC/config.plist"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
if result.returncode != 0:
|
||||
print("Error on build!")
|
||||
print(result.stdout.decode())
|
||||
raise Exception(f"Validation failed for predefined model: {model}")
|
||||
else:
|
||||
print(f"Validation succeeded for predefined model: {model}")
|
||||
|
||||
for model in valid_dumps:
|
||||
self.constants.computer = model
|
||||
self.computer = self.constants.computer
|
||||
self.constants.custom_model = ""
|
||||
print(f"Validating dumped model: {self.computer.real_model}")
|
||||
self.build_opencore()
|
||||
result = subprocess.run([self.constants.ocvalidate_path, f"{self.constants.opencore_release_folder}/EFI/OC/config.plist"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
if result.returncode != 0:
|
||||
print("Error on build!")
|
||||
print(result.stdout.decode())
|
||||
raise Exception(f"Validation failed for predefined model: {self.computer.real_model}")
|
||||
else:
|
||||
print(f"Validation succeeded for predefined model: {self.computer.real_model}")
|
||||
|
||||
|
||||
OpenCoreLegacyPatcher()
|
||||
|
||||
@@ -17,20 +17,9 @@ class OpenCoreLegacyPatcher:
|
||||
self.constants.computer = device_probe.Computer.probe()
|
||||
self.computer = self.constants.computer
|
||||
self.constants.detected_os = int(platform.uname().release.partition(".")[0])
|
||||
self.constants.detected_os_minor = int(platform.uname().release.partition(".")[2].partition(".")[0])
|
||||
self.set_defaults(self.computer.real_model, True)
|
||||
|
||||
custom_cpu_model_value = Utilities.get_nvram("revcpuname", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=True)
|
||||
if custom_cpu_model_value is not None:
|
||||
# TODO: Fix to not use two separate variables
|
||||
self.constants.custom_cpu_model = 1
|
||||
self.constants.custom_cpu_model_value = custom_cpu_model_value.split("%00")[0]
|
||||
|
||||
if "-v" in (Utilities.get_nvram("boot-args") or ""):
|
||||
self.constants.verbose_debug = True
|
||||
|
||||
# Check if running in RecoveryOS
|
||||
self.constants.recovery_status = Utilities.check_recovery()
|
||||
|
||||
def set_defaults(self, model, host_is_target):
|
||||
# Defaults
|
||||
self.constants.sip_status = True
|
||||
@@ -70,7 +59,24 @@ class OpenCoreLegacyPatcher:
|
||||
# self.constants.disable_amfi = False # Signed bundles, Don't need to explicitly set currently
|
||||
if model == "MacBook8,1":
|
||||
# MacBook8,1 has an odd bug where it cannot install Monterey with Minimal spoofing
|
||||
self.constants.serial_settings == "Moderate"
|
||||
self.constants.serial_settings = "Moderate"
|
||||
|
||||
custom_cpu_model_value = Utilities.get_nvram("revcpuname", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=True)
|
||||
if custom_cpu_model_value is not None:
|
||||
# TODO: Fix to not use two separate variables
|
||||
self.constants.custom_cpu_model = 1
|
||||
self.constants.custom_cpu_model_value = custom_cpu_model_value.split("%00")[0]
|
||||
|
||||
if "-v" in (Utilities.get_nvram("boot-args") or ""):
|
||||
self.constants.verbose_debug = True
|
||||
|
||||
if Utilities.amfi_status() is False:
|
||||
self.constants.disable_amfi = True
|
||||
|
||||
self.constants.latebloom_delay, self.constants.latebloom_range, self.constants.latebloom_debug = Utilities.latebloom_detection(model)
|
||||
|
||||
# Check if running in RecoveryOS
|
||||
self.constants.recovery_status = Utilities.check_recovery()
|
||||
|
||||
def build_opencore(self):
|
||||
Build.BuildOpenCore(self.constants.custom_model or self.constants.computer.real_model, self.constants).build_opencore()
|
||||
@@ -126,6 +132,10 @@ system_profiler SPHardwareDataType | grep 'Model Identifier'
|
||||
f"Allow OpenCore on native Models:\tCurrently {self.constants.allow_oc_everywhere}",
|
||||
CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).allow_native_models,
|
||||
],
|
||||
[
|
||||
f"Latebloom settings:\t\tDelay {self.constants.latebloom_delay}, Range {self.constants.latebloom_range}, Debug {self.constants.latebloom_debug}",
|
||||
CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).latebloom_settings,
|
||||
],
|
||||
["Advanced Patch Settings, for developers only", self.advanced_patcher_settings],
|
||||
]
|
||||
|
||||
@@ -218,6 +228,20 @@ Supported Options:
|
||||
2. Unpatch System Volume (Experimental)
|
||||
B. Exit
|
||||
"""
|
||||
mojave_catalina = """Patches Root volume to fix misc issues such as:
|
||||
- Graphics Acceleration
|
||||
- Nvidia: Tesla - Fermi (8000-500 series)
|
||||
- Intel: Ironlake - Sandy Bridge
|
||||
- AMD: TeraScale 1 and 2 (2000-6000 series)
|
||||
- Audio support for iMac7,1 and iMac8,1
|
||||
WARNING: Root Volume Patching is still in active development, please
|
||||
have all important user data backed up. Note when the system volume
|
||||
is patched, you can no longer have Delta updates or have FileVault
|
||||
enabled.
|
||||
Supported Options:
|
||||
1. Patch System Volume
|
||||
B. Exit
|
||||
"""
|
||||
|
||||
default = """
|
||||
This OS has no root patches available to apply, please ensure you're patching a booted
|
||||
@@ -232,13 +256,15 @@ B. Exit
|
||||
print(monterey)
|
||||
elif self.constants.detected_os == self.constants.big_sur:
|
||||
print(big_sur)
|
||||
elif self.constants.detected_os in [self.constants.mojave, self.constants.catalina] and self.constants.moj_cat_accel == True:
|
||||
print(mojave_catalina)
|
||||
else:
|
||||
print(default)
|
||||
no_patch = True
|
||||
change_menu = input("Patch System Volume?: ")
|
||||
if no_patch is not True and change_menu == "1":
|
||||
SysPatch.PatchSysVolume(self.constants.custom_model or self.computer.real_model, self.constants).start_patch()
|
||||
elif no_patch is not True and change_menu == "2":
|
||||
elif no_patch is not True and change_menu == "2" and self.constants.detected_os > self.constants.catalina:
|
||||
SysPatch.PatchSysVolume(self.constants.custom_model or self.computer.real_model, self.constants).start_unpatch()
|
||||
else:
|
||||
print("Returning to main menu")
|
||||
|
||||
@@ -17,14 +17,6 @@ from datetime import date
|
||||
from Resources import Constants, ModelArray, Utilities, device_probe
|
||||
|
||||
|
||||
def human_fmt(num):
|
||||
for unit in ["B", "KB", "MB", "GB", "TB", "PB"]:
|
||||
if abs(num) < 1000.0:
|
||||
return "%3.1f %s" % (num, unit)
|
||||
num /= 1000.0
|
||||
return "%.1f %s" % (num, "EB")
|
||||
|
||||
|
||||
def rmtree_handler(func, path, exc_info):
|
||||
if exc_info[0] == FileNotFoundError:
|
||||
return
|
||||
@@ -40,48 +32,36 @@ class BuildOpenCore:
|
||||
|
||||
self.gfx0_path = None
|
||||
|
||||
def smbios_set(self):
|
||||
def smbios_set(self, model):
|
||||
print("- Setting macOS Monterey Supported SMBIOS")
|
||||
if self.model in ModelArray.MacBookAir61:
|
||||
print("- Spoofing to MacBookAir7,1")
|
||||
if model in ModelArray.MacBookAir_11:
|
||||
return "MacBookAir7,1"
|
||||
elif self.model in ModelArray.MacBookAir62:
|
||||
print("- Spoofing to MacBookAir7,2")
|
||||
elif model in ModelArray.MacBookAir_13:
|
||||
return "MacBookAir7,2"
|
||||
elif self.model in ModelArray.MacBook81:
|
||||
print("- Spoofing to MacBook9,1")
|
||||
elif model in ModelArray.MacBook_12:
|
||||
return "MacBook9,1"
|
||||
elif self.model in ModelArray.MacBookPro111:
|
||||
print("- Spoofing to MacBookPro12,1")
|
||||
elif model in ModelArray.MacBookPro_13:
|
||||
return "MacBookPro12,1"
|
||||
elif self.model in ModelArray.MacBookPro112:
|
||||
print("- Spoofing to MacBookPro11,4")
|
||||
elif model in ModelArray.MacBookPro_15_iGPU:
|
||||
return "MacBookPro11,4"
|
||||
elif self.model in ModelArray.MacBookPro113:
|
||||
print("- Spoofing to MacBookPro11,5")
|
||||
elif model in ModelArray.MacBookPro_15_dGPU:
|
||||
return "MacBookPro11,5"
|
||||
elif self.model in ModelArray.Macmini71:
|
||||
print("- Spoofing to Macmini7,1")
|
||||
elif model in ModelArray.Macmini:
|
||||
return "Macmini7,1"
|
||||
elif self.model in ModelArray.iMacPro11:
|
||||
print("- Spoofing to iMacPro1,1")
|
||||
elif model in ModelArray.iMac_iGPUless:
|
||||
return "iMacPro1,1"
|
||||
elif self.model in ModelArray.iMac151:
|
||||
elif model in ModelArray.iMac_dGPU:
|
||||
# Check for upgraded GPUs on iMacs
|
||||
if self.constants.drm_support is True:
|
||||
print("- Spoofing to iMacPro1,1")
|
||||
return "iMacPro1,1"
|
||||
else:
|
||||
print("- Spoofing to iMac17,1")
|
||||
return "iMac17,1"
|
||||
elif self.model in ModelArray.iMac144:
|
||||
print("- Spoofing to iMac16,1")
|
||||
elif model in ModelArray.iMac_iGPU:
|
||||
return "iMac16,1"
|
||||
elif self.model in ModelArray.MacPro71:
|
||||
print("- Spoofing to MacPro7,1")
|
||||
elif model in ModelArray.MacPro:
|
||||
return "MacPro7,1"
|
||||
else:
|
||||
return self.model
|
||||
return model
|
||||
|
||||
def fw_feature_detect(self, model):
|
||||
# Values based off OpenCorePkg's Firmwarefeatures and FirmwarefeaturesMask
|
||||
@@ -165,7 +145,8 @@ class BuildOpenCore:
|
||||
# Essential kexts
|
||||
("Lilu.kext", self.constants.lilu_version, self.constants.lilu_path, lambda: True),
|
||||
("WhateverGreen.kext", self.constants.whatevergreen_version, self.constants.whatevergreen_path, lambda: self.constants.allow_oc_everywhere is False),
|
||||
("RestrictEvents.kext", self.constants.restrictevents_version, self.constants.restrictevents_path, lambda: self.model in ModelArray.MacPro71),
|
||||
("RestrictEvents.kext", self.constants.restrictevents_version, self.constants.restrictevents_path, lambda: self.model in ModelArray.MacPro),
|
||||
# Modded RestrictEvents with displaypolicyd blocked to fix dGPU switching
|
||||
("RestrictEvents.kext", self.constants.restrictevents_mbp_version, self.constants.restrictevents_mbp_path, lambda: self.model in ["MacBookPro6,1", "MacBookPro6,2", "MacBookPro9,1"]),
|
||||
("SMC-Spoof.kext", self.constants.smcspoof_version, self.constants.smcspoof_path, lambda: self.constants.allow_oc_everywhere is False),
|
||||
# CPU patches
|
||||
@@ -176,26 +157,33 @@ class BuildOpenCore:
|
||||
"CPUFriend.kext",
|
||||
self.constants.cpufriend_version,
|
||||
self.constants.cpufriend_path,
|
||||
lambda: self.model not in ["iMac7,1", "Xserve2,1"] and self.constants.allow_oc_everywhere is False and self.constants.disallow_cpufriend is False,
|
||||
lambda: self.model not in ["iMac7,1", "Xserve2,1", "Dortania1,1"] and self.constants.allow_oc_everywhere is False and self.constants.disallow_cpufriend is False,
|
||||
),
|
||||
# Ethernet patches
|
||||
("nForceEthernet.kext", self.constants.nforce_version, self.constants.nforce_path, lambda: self.model in ModelArray.EthernetNvidia),
|
||||
("MarvelYukonEthernet.kext", self.constants.marvel_version, self.constants.marvel_path, lambda: self.model in ModelArray.EthernetMarvell),
|
||||
("CatalinaBCM5701Ethernet.kext", self.constants.bcm570_version, self.constants.bcm570_path, lambda: self.model in ModelArray.EthernetBroadcom),
|
||||
# Legacy audio
|
||||
("AppleALC.kext", self.constants.applealc_version, self.constants.applealc_path, lambda: self.model in ModelArray.LegacyAudio or self.model in ModelArray.MacPro71),
|
||||
("AppleALC.kext", self.constants.applealc_version, self.constants.applealc_path, lambda: self.model in ModelArray.LegacyAudio or self.model in ModelArray.MacPro),
|
||||
# IDE patch
|
||||
("AppleIntelPIIXATA.kext", self.constants.piixata_version, self.constants.piixata_path, lambda: self.model in ModelArray.IDEPatch),
|
||||
# Misc
|
||||
("FeatureUnlock.kext", self.constants.featureunlock_version, self.constants.featureunlock_path, lambda: self.model in ModelArray.SidecarPatch),
|
||||
("DebugEnhancer.kext", self.constants.debugenhancer_version, self.constants.debugenhancer_path, lambda: self.constants.kext_debug is True),
|
||||
("latebloom.kext", self.constants.latebloom_version, self.constants.latebloom_path, lambda: self.model in ModelArray.PCIRaceCondition),
|
||||
]:
|
||||
self.enable_kext(name, version, path, check)
|
||||
|
||||
if self.constants.allow_oc_everywhere is False:
|
||||
self.get_item_by_kv(self.config["Kernel"]["Patch"], "Identifier", "com.apple.driver.AppleSMC")["Enabled"] = True
|
||||
|
||||
if not self.constants.custom_model and (self.constants.allow_oc_everywhere is True or self.model in ModelArray.MacPro71):
|
||||
if self.get_kext_by_bundle_path("latebloom.kext")["Enabled"] is True:
|
||||
print(f"- Setting latebloom delay of {self.constants.latebloom_delay}ms, range {self.constants.latebloom_range}ms, debug {bool(self.constants.latebloom_debug)}")
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"][
|
||||
"boot-args"
|
||||
] += f" latebloom={self.constants.latebloom_delay}, lb_range={self.constants.latebloom_range}, lb_debug={self.constants.latebloom_debug}"
|
||||
|
||||
if not self.constants.custom_model and (self.constants.allow_oc_everywhere is True or self.model in ModelArray.MacPro):
|
||||
# Use Innie's same logic:
|
||||
# https://github.com/cdf/Innie/blob/v1.3.0/Innie/Innie.cpp#L90-L97
|
||||
for i, controller in enumerate(self.computer.storage):
|
||||
@@ -255,12 +243,12 @@ class BuildOpenCore:
|
||||
arpt_path = "PciRoot(0x0)/Pci(0x1C,0x1)/Pci(0x0,0x0)"
|
||||
print(f"- Using known DevicePath {arpt_path}")
|
||||
self.config["DeviceProperties"]["Add"][arpt_path] = {"device-id": binascii.unhexlify("ba430000"), "compatible": "pci14e4,43ba"}
|
||||
if not self.constants.custom_model and self.computer.wifi and self.computer.wifi.country_code:
|
||||
if not self.constants.custom_model and self.computer.wifi and self.constants.validate is False and self.computer.wifi.country_code:
|
||||
print(f"- Applying fake ID for WiFi, setting Country Code: {self.computer.wifi.country_code}")
|
||||
self.config["DeviceProperties"]["Add"][arpt_path].update({"brcmfx-country": self.computer.wifi.country_code})
|
||||
if self.constants.enable_wake_on_wlan is True:
|
||||
print("- Enabling Wake on WLAN support")
|
||||
self.config["DeviceProperties"]["Add"][arpt_path].update({"brcmfxwowl": binascii.unhexlify("01000000")})
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += f" -brcmfxwowl"
|
||||
|
||||
# WiFi patches
|
||||
# TODO: -a is not supported in Lion and older, need to add proper fix
|
||||
@@ -276,21 +264,18 @@ class BuildOpenCore:
|
||||
elif not self.constants.custom_model and self.computer.wifi:
|
||||
if isinstance(self.computer.wifi, device_probe.Broadcom):
|
||||
# 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.computer.wifi.country_code:
|
||||
if self.computer.wifi.chipset == device_probe.Broadcom.Chipsets.AirportBrcmNIC and self.constants.validate is False and self.computer.wifi.country_code:
|
||||
self.enable_kext("AirportBrcmFixup.kext", self.constants.airportbcrmfixup_version, self.constants.airportbcrmfixup_path)
|
||||
print(f"- Setting Wireless Card's Country Code: {self.computer.wifi.country_code}")
|
||||
if self.computer.wifi.pci_path:
|
||||
arpt_path = self.computer.wifi.pci_path
|
||||
print(f"- Found ARPT device at {arpt_path}")
|
||||
self.config["DeviceProperties"]["Add"][arpt_path] = {"brcmfx-country": self.computer.wifi.country_code}
|
||||
if self.constants.enable_wake_on_wlan is True:
|
||||
print("- Enabling Wake on WLAN support")
|
||||
self.config["DeviceProperties"]["Add"][arpt_path].update({"brcmfxwowl": binascii.unhexlify("01000000")})
|
||||
else:
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += f" brcmfx-country={self.computer.wifi.country_code}"
|
||||
if self.constants.enable_wake_on_wlan is True:
|
||||
print("- Enabling Wake on WLAN support")
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += f" -brcmfxwowl"
|
||||
if self.constants.enable_wake_on_wlan is True:
|
||||
print("- Enabling Wake on WLAN support")
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += f" -brcmfxwowl"
|
||||
elif self.computer.wifi.chipset == device_probe.Broadcom.Chipsets.AirPortBrcm4360:
|
||||
wifi_fake_id(self)
|
||||
elif self.computer.wifi.chipset == device_probe.Broadcom.Chipsets.AirPortBrcm4331:
|
||||
@@ -326,7 +311,7 @@ class BuildOpenCore:
|
||||
|
||||
# CPUFriend
|
||||
pp_map_path = Path(self.constants.platform_plugin_plist_path) / Path(f"{self.model}/Info.plist")
|
||||
if self.model not in ["iMac7,1", "Xserve2,1"] and self.constants.allow_oc_everywhere is False:
|
||||
if self.model not in ["iMac7,1", "Xserve2,1", "Dortania1,1"] and self.constants.allow_oc_everywhere is False:
|
||||
Path(self.constants.pp_kext_folder).mkdir()
|
||||
Path(self.constants.pp_contents_folder).mkdir()
|
||||
shutil.copy(pp_map_path, self.constants.pp_contents_folder)
|
||||
@@ -353,7 +338,12 @@ class BuildOpenCore:
|
||||
# USB Map
|
||||
usb_map_path = Path(self.constants.plist_folder_path) / Path("AppleUSBMaps/Info.plist")
|
||||
# iMac7,1 kernel panics with USB map installed, remove for time being until properly debugged
|
||||
if usb_map_path.exists() and self.constants.allow_oc_everywhere is False and self.model not in ["iMac7,1", "Xserve2,1"]:
|
||||
if (
|
||||
usb_map_path.exists()
|
||||
and self.constants.allow_oc_everywhere is False
|
||||
and self.model not in ["iMac7,1", "Xserve2,1", "Dortania1,1"]
|
||||
and (self.model in ModelArray.Missing_USB_Map or self.constants.serial_settings in ["Moderate", "Advanced"])
|
||||
):
|
||||
print("- Adding USB-Map.kext")
|
||||
Path(self.constants.map_kext_folder).mkdir()
|
||||
Path(self.constants.map_contents_folder).mkdir()
|
||||
@@ -543,7 +533,7 @@ class BuildOpenCore:
|
||||
elif self.computer.dgpu.arch == device_probe.NVIDIA.Archs.Kepler:
|
||||
backlight_path_detection(self)
|
||||
nvidia_patch(self, self.gfx0_path)
|
||||
if self.model in ModelArray.MacPro71:
|
||||
if self.model in ModelArray.MacPro:
|
||||
if not self.constants.custom_model:
|
||||
for i, device in enumerate(self.computer.gpus):
|
||||
print(f"- Found dGPU ({i + 1}): {Utilities.friendly_hex(device.vendor_id)}:{Utilities.friendly_hex(device.device_id)}")
|
||||
@@ -585,6 +575,8 @@ class BuildOpenCore:
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " shikigva=128 unfairgva=1 -wegtree"
|
||||
|
||||
# Add XhciDxe if firmware doesn't have XHCI controller support and XCHI controller detected
|
||||
# TODO: Fix XhciDxe to work on pre UEFI 2.0 Macs
|
||||
# Ref: https://github.com/acidanthera/bugtracker/issues/1663
|
||||
# if self.model not in ModelArray.XhciSupport and not self.constants.custom_model:
|
||||
# devices = plistlib.loads(subprocess.run("ioreg -c IOPCIDevice -r -d2 -a".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
||||
# try:
|
||||
@@ -632,6 +624,8 @@ class BuildOpenCore:
|
||||
if self.constants.kext_debug is True:
|
||||
print("- Enabling DEBUG Kexts")
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " -liludbgall"
|
||||
# Disabled due to macOS Monterey crashing shortly after kernel init
|
||||
# Use DebugEnhancer.kext instead
|
||||
# self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " msgbuf=1048576"
|
||||
if self.constants.opencore_debug is True:
|
||||
print("- Enabling DEBUG OpenCore")
|
||||
@@ -676,11 +670,15 @@ class BuildOpenCore:
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " -no_compat_check"
|
||||
if self.constants.disk != "":
|
||||
self.disk_type()
|
||||
if self.constants.validate is False:
|
||||
print("- Adding bootmgfw.efi BlessOverride")
|
||||
self.config["Misc"]["BlessOverride"] += ["\\EFI\\Microsoft\\Boot\\bootmgfw.efi"]
|
||||
|
||||
def set_smbios(self):
|
||||
spoofed_model = self.model
|
||||
if self.constants.override_smbios == "Default":
|
||||
spoofed_model = self.smbios_set()
|
||||
spoofed_model = self.smbios_set(self.model)
|
||||
print(f"- Spoofing to {spoofed_model}")
|
||||
else:
|
||||
spoofed_model = self.constants.override_smbios
|
||||
try:
|
||||
@@ -756,7 +754,11 @@ class BuildOpenCore:
|
||||
self.config["PlatformInfo"]["CustomMemory"] = True
|
||||
|
||||
# USB Map and CPUFriend Patching
|
||||
if self.constants.allow_oc_everywhere is False and self.model not in ["iMac7,1", "Xserve2,1"]:
|
||||
if (
|
||||
self.constants.allow_oc_everywhere is False
|
||||
and self.model not in ["iMac7,1", "Xserve2,1", "Dortania1,1"]
|
||||
and (self.model in ModelArray.Missing_USB_Map 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
|
||||
@@ -776,7 +778,7 @@ class BuildOpenCore:
|
||||
except KeyError:
|
||||
continue
|
||||
plistlib.dump(map_config, Path(new_map_ls).open("wb"), sort_keys=True)
|
||||
if self.constants.allow_oc_everywhere is False and self.model not in ["iMac7,1", "Xserve2,1"] and self.constants.disallow_cpufriend is False:
|
||||
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:
|
||||
# Adjust CPU Friend Data to correct SMBIOS
|
||||
new_cpu_ls = Path(self.constants.pp_contents_folder) / Path("Info.plist")
|
||||
cpu_config = plistlib.load(Path(new_cpu_ls).open("rb"))
|
||||
@@ -941,7 +943,7 @@ Please build OpenCore first!"""
|
||||
for disk in all_disks:
|
||||
if not any(all_disks[disk]["partitions"][partition]["fs"] in ("msdos", "EFI") for partition in all_disks[disk]["partitions"]):
|
||||
continue
|
||||
menu.add_menu_option(f"{disk}: {all_disks[disk]['name']} ({human_fmt(all_disks[disk]['size'])})", key=disk[4:])
|
||||
menu.add_menu_option(f"{disk}: {all_disks[disk]['name']} ({Utilities.human_fmt(all_disks[disk]['size'])})", key=disk[4:])
|
||||
|
||||
response = menu.start()
|
||||
|
||||
@@ -961,7 +963,7 @@ Please build OpenCore first!"""
|
||||
for partition in selected_disk["partitions"]:
|
||||
if selected_disk["partitions"][partition]["fs"] not in ("msdos", "EFI"):
|
||||
continue
|
||||
text = f"{partition}: {selected_disk['partitions'][partition]['name']} ({human_fmt(selected_disk['partitions'][partition]['size'])})"
|
||||
text = f"{partition}: {selected_disk['partitions'][partition]['name']} ({Utilities.human_fmt(selected_disk['partitions'][partition]['size'])})"
|
||||
if selected_disk["partitions"][partition]["type"] == "EFI" or (
|
||||
selected_disk["partitions"][partition]["type"] == "Microsoft Basic Data" and selected_disk["partitions"][partition]["size"] < 1024 * 1024 * 512
|
||||
): # 512 megabytes:
|
||||
|
||||
@@ -328,9 +328,9 @@ hardware
|
||||
"""
|
||||
)
|
||||
change_menu = input("Disable CPU Friend?(y/n): ")
|
||||
if change_menu == "y":
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.disallow_cpufriend = True
|
||||
elif change_menu == "n":
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.disallow_cpufriend = False
|
||||
else:
|
||||
print("Invalid option")
|
||||
@@ -420,9 +420,9 @@ Note: MacBook5,x-7,1 don't support FireWire boot
|
||||
)
|
||||
|
||||
change_menu = input("Enable FireWire Boot support?(y/n): ")
|
||||
if change_menu == "y":
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.firewire_boot = True
|
||||
elif change_menu == "n":
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.firewire_boot = False
|
||||
else:
|
||||
print("Invalid option")
|
||||
@@ -445,9 +445,9 @@ OpenCore will enable NVMe support in it's picker
|
||||
)
|
||||
|
||||
change_menu = input("Enable NVMe Boot support?(y/n): ")
|
||||
if change_menu == "y":
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.nvme_boot = True
|
||||
elif change_menu == "n":
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.nvme_boot = False
|
||||
else:
|
||||
print("Invalid option")
|
||||
@@ -471,9 +471,9 @@ Note: Acceleration only applies to macOS Big Sur
|
||||
)
|
||||
|
||||
change_menu = input("Enable TS2 Acceleration?(y/n): ")
|
||||
if change_menu == "y":
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.terascale_2_patch = True
|
||||
elif change_menu == "n":
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.terascale_2_patch = False
|
||||
else:
|
||||
print("Invalid option")
|
||||
@@ -493,9 +493,9 @@ be prepared if enabling.
|
||||
)
|
||||
|
||||
change_menu = input("Allow Wake on WLAN?(y/n): ")
|
||||
if change_menu == "y":
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.enable_wake_on_wlan = True
|
||||
elif change_menu == "n":
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.enable_wake_on_wlan = False
|
||||
else:
|
||||
print("Invalid option")
|
||||
@@ -519,9 +519,49 @@ Note 2: This setting only affects iMac13,x with dGPUs
|
||||
)
|
||||
|
||||
change_menu = input("Allow Ivy iMac iGPU?(y/n): ")
|
||||
if change_menu == "y":
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.allow_ivy_igpu = True
|
||||
elif change_menu == "n":
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.allow_ivy_igpu = False
|
||||
else:
|
||||
print("Invalid option")
|
||||
|
||||
def latebloom_settings(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Set latebloom properties"])
|
||||
print(
|
||||
f"""
|
||||
Set latebloom properties, useful for debugging boot stalls on
|
||||
pre-Sandy Bridge Macs.
|
||||
|
||||
Valid options:
|
||||
|
||||
1. Set delay (currently: {self.constants.latebloom_delay}ms)
|
||||
2. Set range (currently: {self.constants.latebloom_range}ms)
|
||||
3. Set debug (currently: {bool(self.constants.latebloom_debug)})
|
||||
"""
|
||||
)
|
||||
|
||||
change_menu = input("Select latebloom property(1/2/3): ")
|
||||
if change_menu == "1":
|
||||
try:
|
||||
self.constants.latebloom_delay = int(input("Set delay: "))
|
||||
except ValueError:
|
||||
input("Invalid value, press [ENTER] to continue")
|
||||
elif change_menu == "2":
|
||||
try:
|
||||
self.constants.latebloom_range = int(input("Set range: "))
|
||||
except ValueError:
|
||||
input("Invalid value, press [ENTER] to continue")
|
||||
elif change_menu == "3":
|
||||
try:
|
||||
print("Currently supports either 0(False) or 1(True)")
|
||||
latebloom_debug = int(input("Set debug(0/1): "))
|
||||
if latebloom_debug not in [0, 1]:
|
||||
input("Invalid value, press [ENTER] to continue")
|
||||
else:
|
||||
self.constants.latebloom_debug = latebloom_debug
|
||||
except ValueError:
|
||||
input("Invalid value, press [ENTER] to continue")
|
||||
else:
|
||||
print("Invalid option")
|
||||
|
||||
@@ -12,9 +12,9 @@ from Resources import device_probe
|
||||
|
||||
class Constants:
|
||||
def __init__(self):
|
||||
self.patcher_version = "0.2.3"
|
||||
self.opencore_commit = "4e0ff2d - 05-23-2021"
|
||||
self.opencore_version = "0.7.0"
|
||||
self.patcher_version = "0.2.4"
|
||||
self.opencore_commit = "be2d9fe - 07-2-2021"
|
||||
self.opencore_version = "0.7.1"
|
||||
self.lilu_version = "1.5.4"
|
||||
self.whatevergreen_version = "1.5.1"
|
||||
self.airportbcrmfixup_version = "2.1.3"
|
||||
@@ -42,9 +42,10 @@ class Constants:
|
||||
self.debugenhancer_version = "1.0.3"
|
||||
self.innie_version = "1.3.0"
|
||||
self.fw_kext = "1.0.0"
|
||||
self.latebloom_version = "0.19"
|
||||
self.disk = ""
|
||||
self.patch_disk = ""
|
||||
self.patcher_support_pkg_version = "0.0.13" # PatcherSupportPkg
|
||||
self.patcher_support_pkg_version = "0.0.15" # PatcherSupportPkg
|
||||
|
||||
# Get resource path
|
||||
self.current_path = Path(__file__).parent.parent.resolve()
|
||||
@@ -72,6 +73,7 @@ class Constants:
|
||||
self.sip_status = True
|
||||
self.secure_status = False
|
||||
self.detected_os = 0
|
||||
self.detected_os_minor = 0
|
||||
self.boot_efi = False
|
||||
self.drm_support = False
|
||||
self.allow_oc_everywhere = False
|
||||
@@ -90,6 +92,11 @@ class Constants:
|
||||
self.enable_wake_on_wlan = False
|
||||
self.allow_ivy_igpu = False
|
||||
self.moj_cat_accel = False
|
||||
self.latebloom_status = False
|
||||
self.latebloom_delay = 0
|
||||
self.latebloom_range = 0
|
||||
self.latebloom_debug = 0
|
||||
self.validate = False
|
||||
|
||||
# OS Versions
|
||||
self.tiger = 8
|
||||
@@ -285,6 +292,10 @@ class Constants:
|
||||
def innie_path(self):
|
||||
return self.payload_kexts_path / Path(f"Misc/Innie-v{self.innie_version}.zip")
|
||||
|
||||
@property
|
||||
def latebloom_path(self):
|
||||
return self.payload_kexts_path / Path(f"Misc/latebloom-v{self.latebloom_version}.zip")
|
||||
|
||||
@property
|
||||
def plist_folder_path(self):
|
||||
return self.payload_kexts_path / Path("Plists")
|
||||
@@ -395,6 +406,10 @@ class Constants:
|
||||
def vault_path(self):
|
||||
return self.payload_path / Path("Tools/CreateVault/sign.command")
|
||||
|
||||
@property
|
||||
def ocvalidate_path(self):
|
||||
return self.payload_path / Path("Tools/ocvalidate")
|
||||
|
||||
# Icons
|
||||
@property
|
||||
def app_icon_path(self):
|
||||
@@ -526,18 +541,21 @@ class Constants:
|
||||
return self.payload_apple_kexts_path / Path("Brightness-Control")
|
||||
|
||||
csr_values = {
|
||||
"CSR_ALLOW_UNTRUSTED_KEXTS": False, # 0x1 - Allows Unsigned Kexts - Introduced in El Capitan # noqa: E241
|
||||
"CSR_ALLOW_UNRESTRICTED_FS": False, # 0x2 - File System Access - Introduced in El Capitan # noqa: E241
|
||||
"CSR_ALLOW_TASK_FOR_PID": False, # 0x4 - Unrestricted Debugging - Introduced in El Capitan # noqa: E241
|
||||
"CSR_ALLOW_KERNEL_DEBUGGER": False, # 0x8 - Allow Kernel Debugger - Introduced in El Capitan # noqa: E241
|
||||
"CSR_ALLOW_APPLE_INTERNAL": False, # 0x10 - Set AppleInternal Features - Introduced in El Capitan # noqa: E241
|
||||
"CSR_ALLOW_UNRESTRICTED_DTRACE": False, # 0x20 - Unrestricted DTrace usage - Introduced in El Capitan # noqa: E241
|
||||
"CSR_ALLOW_UNRESTRICTED_NVRAM": False, # 0x40 - Unrestricted NVRAM write - Introduced in El Capitan # noqa: E241
|
||||
"CSR_ALLOW_DEVICE_CONFIGURATION": False, # 0x80 - Allow Device Configuration(?) - Introduced in El Capitan # noqa: E241
|
||||
"CSR_ALLOW_ANY_RECOVERY_OS": False, # 0x100 - Disable BaseSystem Verification - Introduced in Sierra # noqa: E241
|
||||
"CSR_ALLOW_UNAPPROVED_KEXTS": False, # 0x200 - Allow Unapproved Kexts - Introduced in High Sierra # noqa: E241
|
||||
# Source: macOS 11.4 (XNU's csr.h)
|
||||
# https://opensource.apple.com/source/xnu/xnu-7195.121.3/bsd/sys/csr.h.auto.html
|
||||
"CSR_ALLOW_UNTRUSTED_KEXTS": False, # 0x1 - Allows Unsigned Kexts - Introduced in El Capitan # noqa: E241
|
||||
"CSR_ALLOW_UNRESTRICTED_FS": False, # 0x2 - File System Access - Introduced in El Capitan # noqa: E241
|
||||
"CSR_ALLOW_TASK_FOR_PID": False, # 0x4 - Unrestricted task_for_pid() - Introduced in El Capitan # noqa: E241
|
||||
"CSR_ALLOW_KERNEL_DEBUGGER": False, # 0x8 - Allow Kernel Debugger - Introduced in El Capitan # noqa: E241
|
||||
"CSR_ALLOW_APPLE_INTERNAL": False, # 0x10 - Set AppleInternal Features - Introduced in El Capitan # noqa: E241
|
||||
# "CSR_ALLOW_DESTRUCTIVE_DTRACE": False, # 0x20 - Allow destructive DTrace - Deprecated # noqa: E241
|
||||
"CSR_ALLOW_UNRESTRICTED_DTRACE": False, # 0x20 - Unrestricted DTrace usage - Introduced in El Capitan # noqa: E241
|
||||
"CSR_ALLOW_UNRESTRICTED_NVRAM": False, # 0x40 - Unrestricted NVRAM write - Introduced in El Capitan # noqa: E241
|
||||
"CSR_ALLOW_DEVICE_CONFIGURATION": False, # 0x80 - Allow custom DeviceTree (iOS) - Introduced in El Capitan # noqa: E241
|
||||
"CSR_ALLOW_ANY_RECOVERY_OS": False, # 0x100 - Skip BaseSystem Verification - Introduced in Sierra # noqa: E241
|
||||
"CSR_ALLOW_UNAPPROVED_KEXTS": False, # 0x200 - Allow Unnotarized Kexts - Introduced in High Sierra # noqa: E241
|
||||
"CSR_ALLOW_EXECUTABLE_POLICY_OVERRIDE": False, # 0x400 - Override Executable Policy - Introduced in Mojave # noqa: E241
|
||||
"CSR_ALLOW_UNAUTHENTICATED_ROOT": False, # 0x800 - Allow Root Volume Mounting - Introduced in Big Sur # noqa: E241
|
||||
"CSR_ALLOW_UNAUTHENTICATED_ROOT": False, # 0x800 - Allow Root Volume Mounting - Introduced in Big Sur # noqa: E241
|
||||
}
|
||||
|
||||
root_patch_sip_mojave = [
|
||||
@@ -558,31 +576,31 @@ class Constants:
|
||||
]
|
||||
|
||||
sbm_values = [
|
||||
"j137",
|
||||
"j680",
|
||||
"j132",
|
||||
"j174",
|
||||
"j140k",
|
||||
"j780",
|
||||
"j213",
|
||||
"j140a",
|
||||
"j152f",
|
||||
"j160",
|
||||
"j230k",
|
||||
"j214k",
|
||||
"j223",
|
||||
"j215",
|
||||
"j185",
|
||||
"j185f",
|
||||
"j137", # iMacPro1,1
|
||||
"j680", # MacBookPro15,1
|
||||
"j132", # MacBookPro15,2
|
||||
"j174", # Macmini8,1
|
||||
"j140k", # MacBookAir8,1
|
||||
"j780", # MacBookPro15,3
|
||||
"j213", # MacBookPro15,4
|
||||
"j140a", # MacBookAir8,2
|
||||
"j152f", # MacBookPro16,1
|
||||
"j160", # MacPro7,1
|
||||
"j230k", # MacBookAir9,1
|
||||
"j214k", # MacBookPro16,2
|
||||
"j223", # MacBookPro16,3
|
||||
"j215", # MacBookPro16,4
|
||||
"j185", # iMac20,1
|
||||
"j185f", # iMac20,2
|
||||
]
|
||||
|
||||
sandy_board_id = [
|
||||
"Mac-E43C1C25D4880AD6",
|
||||
"Mac-06F11F11946D27C5",
|
||||
"Mac-9F18E312C5C2BF0B",
|
||||
"Mac-937CB26E2E02BB01",
|
||||
"Mac-35C5E08120C7EEAF",
|
||||
"Mac-7BA5B2D9E42DDD94",
|
||||
"Mac-E43C1C25D4880AD6", # MacBookPro12,1
|
||||
"Mac-06F11F11946D27C5", # MacBookPro11,5
|
||||
"Mac-9F18E312C5C2BF0B", # MacBookAir7,1
|
||||
"Mac-937CB26E2E02BB01", # MacBookAir7,2
|
||||
"Mac-35C5E08120C7EEAF", # Macmini7,1
|
||||
"Mac-7BA5B2D9E42DDD94", # iMacPro1,1
|
||||
]
|
||||
|
||||
board_id = {
|
||||
|
||||
@@ -563,7 +563,7 @@ HiDPIpicker = ["MacBook8,1", "MacBookPro10,1", "MacBookPro10,2", "MacBookPro11,1
|
||||
IDEPatch = ["MacBook4,1", "MacBookPro4,1", "iMac7,1", "iMac8,1", "MacPro3,1", "Xserve2,1", "Dortania1,1"]
|
||||
|
||||
# 11" Air
|
||||
MacBookAir61 = [
|
||||
MacBookAir_11 = [
|
||||
"MacBookAir3,1",
|
||||
"MacBookAir4,1",
|
||||
"MacBookAir5,1",
|
||||
@@ -571,7 +571,7 @@ MacBookAir61 = [
|
||||
]
|
||||
|
||||
# Classic MacBook and 13" Air
|
||||
MacBookAir62 = [
|
||||
MacBookAir_13 = [
|
||||
"MacBook4,1",
|
||||
"MacBook5,1",
|
||||
"MacBook5,2",
|
||||
@@ -585,13 +585,13 @@ MacBookAir62 = [
|
||||
]
|
||||
|
||||
# Retina MacBook
|
||||
MacBook81 = [
|
||||
MacBook_12 = [
|
||||
"MacBook8,1",
|
||||
]
|
||||
|
||||
# MacBook Pro 13"
|
||||
|
||||
MacBookPro111 = [
|
||||
MacBookPro_13 = [
|
||||
"MacBookPro5,5",
|
||||
"MacBookPro7,1",
|
||||
"MacBookPro8,1",
|
||||
@@ -602,11 +602,11 @@ MacBookPro111 = [
|
||||
|
||||
# MacBook Pro 15" (iGPU)
|
||||
|
||||
MacBookPro112 = ["MacBookPro11,2"]
|
||||
MacBookPro_15_iGPU = ["MacBookPro11,2"]
|
||||
|
||||
# MacBook Pro 15" and 17" (dGPU)
|
||||
|
||||
MacBookPro113 = [
|
||||
MacBookPro_15_dGPU = [
|
||||
"MacBookPro4,1",
|
||||
"MacBookPro5,1",
|
||||
"MacBookPro5,2",
|
||||
@@ -623,9 +623,9 @@ MacBookPro113 = [
|
||||
|
||||
# Mac Mini
|
||||
|
||||
Macmini71 = ["Macmini3,1", "Macmini4,1", "Macmini5,1", "Macmini5,2", "Macmini5,3", "Macmini6,1", "Macmini6,2"]
|
||||
Macmini = ["Macmini3,1", "Macmini4,1", "Macmini5,1", "Macmini5,2", "Macmini5,3", "Macmini6,1", "Macmini6,2"]
|
||||
# iMacPro = dGPU only iMacs
|
||||
iMacPro11 = [
|
||||
iMac_iGPUless = [
|
||||
"iMac7,1",
|
||||
"iMac8,1",
|
||||
"iMac9,1",
|
||||
@@ -638,17 +638,17 @@ iMacPro11 = [
|
||||
]
|
||||
|
||||
# iMac = AMD and Nvidia GPU with iGPU
|
||||
iMac151 = [
|
||||
iMac_dGPU = [
|
||||
"iMac13,2",
|
||||
"iMac14,2",
|
||||
"iMac14,3",
|
||||
"iMac15,1",
|
||||
]
|
||||
# iMac = Intel iGPU
|
||||
iMac144 = ["iMac13,1", "iMac14,1", "iMac14,4"]
|
||||
iMac_iGPU = ["iMac13,1", "iMac13,3", "iMac14,1", "iMac14,4"]
|
||||
|
||||
# Mac Pro and Xserve
|
||||
MacPro71 = ["MacPro3,1", "MacPro4,1", "MacPro5,1", "Xserve2,1", "Xserve3,1", "Dortania1,1"]
|
||||
MacPro = ["MacPro3,1", "MacPro4,1", "MacPro5,1", "Xserve2,1", "Xserve3,1", "Dortania1,1"]
|
||||
|
||||
XXerve = [
|
||||
"Xserve3,1",
|
||||
@@ -953,7 +953,7 @@ windows_audio = [
|
||||
"iMac13,3",
|
||||
]
|
||||
|
||||
NoAGPMSupport = ["MacBook4,1", "MacBookPro4,1", "iMac7,1", "iMac8,1", "MacPro3,1", "Xserve2,1"]
|
||||
NoAGPMSupport = ["MacBook4,1", "MacBookPro4,1", "iMac7,1", "iMac8,1", "MacPro3,1", "Xserve2,1", "Dortania1,1"]
|
||||
|
||||
AGDPSupport = [
|
||||
"MacBookPro9,1",
|
||||
@@ -994,4 +994,158 @@ NoFireWireSupport = [
|
||||
"MacBookAir3,2",
|
||||
]
|
||||
|
||||
RecoveryIgnore = ["Update", "VM", "Recovery", "Preboot"]
|
||||
PCIRaceCondition = [
|
||||
"MacBook4,1",
|
||||
"MacBook5,1",
|
||||
"MacBook5,2",
|
||||
"MacBook6,1",
|
||||
"MacBook7,1",
|
||||
"MacBookAir2,1",
|
||||
"MacBookAir3,1",
|
||||
"MacBookAir3,2",
|
||||
"MacBookPro4,1",
|
||||
"MacBookPro5,1",
|
||||
"MacBookPro5,2",
|
||||
"MacBookPro5,3",
|
||||
"MacBookPro5,4",
|
||||
"MacBookPro5,5",
|
||||
"MacBookPro6,1",
|
||||
"MacBookPro6,2",
|
||||
"MacBookPro7,1",
|
||||
"Macmini3,1",
|
||||
"Macmini4,1",
|
||||
"iMac7,1",
|
||||
"iMac8,1",
|
||||
"iMac9,1",
|
||||
"iMac10,1",
|
||||
"iMac11,1",
|
||||
"iMac11,2",
|
||||
"iMac11,3",
|
||||
"MacPro3,1",
|
||||
"MacPro4,1",
|
||||
"MacPro5,1",
|
||||
"Dortania1,1",
|
||||
]
|
||||
|
||||
# Thunderbolt 1 Macs
|
||||
Thunderbolt_1 = [
|
||||
"MacBookAir4,1",
|
||||
"MacBookAir4,2",
|
||||
"MacBookAir5,1",
|
||||
"MacBookAir5,2",
|
||||
"MacBookAir6,1",
|
||||
"MacBookAir6,2",
|
||||
"MacBookPro8,1",
|
||||
"MacBookPro8,2",
|
||||
"MacBookPro8,3",
|
||||
"MacBookPro9,1",
|
||||
"MacBookPro9,2",
|
||||
"MacBookPro10,1",
|
||||
"MacBookPro10,2",
|
||||
"Macmini5,1",
|
||||
"Macmini5,2",
|
||||
"Macmini5,3",
|
||||
"Macmini6,1",
|
||||
"Macmini6,2",
|
||||
"iMac12,1",
|
||||
"iMac12,2",
|
||||
"iMac13,1",
|
||||
"iMac13,2",
|
||||
"iMac13,3",
|
||||
"iMac14,1",
|
||||
"iMac14,2",
|
||||
"iMac14,3",
|
||||
"iMac14,4",
|
||||
"Dortania1,1",
|
||||
]
|
||||
|
||||
# Thunderbolt 2 Macs
|
||||
Thunderbolt_2 = [
|
||||
"MacBookAir7,1",
|
||||
"MacBookAir7,2",
|
||||
"MacBookPro11,1",
|
||||
"MacBookPro11,2",
|
||||
"MacBookPro11,3",
|
||||
"MacBookPro11,4",
|
||||
"MacBookPro11,5",
|
||||
"MacBookPro12,1",
|
||||
"Macmini7,1",
|
||||
"iMac15,1",
|
||||
"iMac16,1",
|
||||
"iMac16,2",
|
||||
"MacPro6,1",
|
||||
]
|
||||
|
||||
# Thunderbolt 3 Macs
|
||||
Thunderbolt_3 = [
|
||||
"MacBookAir8,1",
|
||||
"MacBookAir8,2",
|
||||
"MacBookAir9,1",
|
||||
"MacBookPro13,1",
|
||||
"MacBookPro13,2",
|
||||
"MacBookPro13,3",
|
||||
"MacBookPro14,1",
|
||||
"MacBookPro14,2",
|
||||
"MacBookPro14,3",
|
||||
"MacBookPro15,1",
|
||||
"MacBookPro15,2",
|
||||
"MacBookPro15,3",
|
||||
"MacBookPro15,4",
|
||||
"MacBookPro16,1",
|
||||
"MacBookPro16,2",
|
||||
"MacBookPro16,3",
|
||||
"MacBookPro16,4",
|
||||
"Macmini8,1",
|
||||
"iMac17,1",
|
||||
"iMac18,1",
|
||||
"iMac18,2",
|
||||
"iMac18,3",
|
||||
"iMac19,1",
|
||||
"iMac19,2",
|
||||
"iMac20,1",
|
||||
"iMac20,2",
|
||||
"MacPro7,1",
|
||||
]
|
||||
|
||||
Missing_USB_Map = [
|
||||
"MacBook4,1",
|
||||
"MacBook5,1",
|
||||
"MacBook5,2",
|
||||
"MacBook6,1",
|
||||
"MacBook7,1",
|
||||
"MacBookAir2,1",
|
||||
"MacBookAir3,1",
|
||||
"MacBookAir3,2",
|
||||
"MacBookAir4,1",
|
||||
"MacBookAir4,2",
|
||||
"MacBookPro4,1",
|
||||
"MacBookPro5,1",
|
||||
"MacBookPro5,2",
|
||||
"MacBookPro5,3",
|
||||
"MacBookPro5,4",
|
||||
"MacBookPro5,5",
|
||||
"MacBookPro6,1",
|
||||
"MacBookPro6,2",
|
||||
"MacBookPro7,1",
|
||||
"MacBookPro8,1",
|
||||
"MacBookPro8,2",
|
||||
"MacBookPro8,3",
|
||||
"Macmini3,1",
|
||||
"Macmini4,1",
|
||||
"Macmini5,1",
|
||||
"Macmini5,2",
|
||||
"Macmini5,3",
|
||||
"iMac7,1",
|
||||
"iMac8,1",
|
||||
"iMac9,1",
|
||||
"iMac10,1",
|
||||
"iMac11,1",
|
||||
"iMac11,2",
|
||||
"iMac11,3",
|
||||
"iMac12,1",
|
||||
"iMac12,2",
|
||||
"MacPro3,1",
|
||||
"MacPro4,1",
|
||||
"XServer2,1",
|
||||
"XServer3,1",
|
||||
]
|
||||
|
||||
260
Resources/ModelExample.py
Normal file
260
Resources/ModelExample.py
Normal file
@@ -0,0 +1,260 @@
|
||||
# Example Hardware probe of multiple models
|
||||
# To be used when running validation tests
|
||||
from Resources import device_probe
|
||||
|
||||
class MacBook:
|
||||
|
||||
MacBook71 = device_probe.Computer(
|
||||
real_model="MacBook7,1",
|
||||
real_board_id="Mac-F22C89C8",
|
||||
reported_model="MacBook7,1",
|
||||
reported_board_id="Mac-F22C89C8",
|
||||
gpus=[
|
||||
device_probe.NVIDIA(vendor_id=4318, device_id=2208, class_code=196608, name="IGPU", model="NVIDIA GeForce 320M", pci_path="PciRoot(0x0)/Pci(0x2,0x0)"),
|
||||
],
|
||||
igpu=device_probe.NVIDIA(vendor_id=4318, device_id=2208, class_code=196608, name="IGPU", model="NVIDIA GeForce 320M", pci_path="PciRoot(0x0)/Pci(0x2,0x0)"),
|
||||
dgpu=None,
|
||||
storage=[
|
||||
device_probe.SATAController(vendor_id=4318, device_id=3464, class_code=67073, name="SATA", model=None, pci_path="PciRoot(0x0)/Pci(0xa,0x0)"),
|
||||
],
|
||||
wifi=device_probe.Broadcom(vendor_id=5348, device_id=17235, class_code=163840, name="ARPT", model=None, pci_path="PciRoot(0x0)/Pci(0x15,0x0)/Pci(0x0,0x0)"),
|
||||
cpu=device_probe.CPU(
|
||||
name="Intel(R) Core(TM)2 Duo CPU P8600 @ 2.40GHz",
|
||||
flags=["FPU", "VME", "DE", "PSE", "TSC", "MSR", "PAE", "MCE", "CX8", "APIC", "SEP", "MTRR", "PGE", "MCA", "CMOV", "PAT", "PSE36", "CLFSH", "DS", "ACPI", "MMX", "FXSR", "SSE", "SSE2", "SS", "HTT", "TM", "PBE", "SSE3", "DTES64", "MON", "DSCPL", "VMX", "SMX", "EST", "TM2", "SSSE3", "CX16", "TPR", "PDCM", "SSE4.1"],
|
||||
),
|
||||
oclp_version=None,
|
||||
opencore_version=None,
|
||||
)
|
||||
|
||||
class MacBookPro:
|
||||
|
||||
MacBookPro92_Stock = device_probe.Computer(
|
||||
real_model="MacBookPro9,2",
|
||||
real_board_id="Mac-6F01561E16C75D06",
|
||||
reported_model="MacBookPro9,2",
|
||||
reported_board_id="Mac-6F01561E16C75D06",
|
||||
gpus=[
|
||||
device_probe.Intel(vendor_id=32902, device_id=358, class_code=196608, name="IGPU", model="Intel HD Graphics 4000", pci_path="PciRoot(0x0)/Pci(0x2,0x0)")
|
||||
],
|
||||
igpu=device_probe.Intel(vendor_id=32902, device_id=358, class_code=196608, name="IGPU", model="Intel HD Graphics 4000", pci_path="PciRoot(0x0)/Pci(0x2,0x0)"),
|
||||
dgpu=None,
|
||||
storage=[device_probe.SATAController(vendor_id=32902, device_id=7683, class_code=67073, name="SATA", model=None, pci_path="PciRoot(0x0)/Pci(0x1f,0x2)")],
|
||||
wifi=device_probe.Broadcom(vendor_id=5348, device_id=17201, class_code=163840, name="ARPT", model=None, pci_path="PciRoot(0x0)/Pci(0x1c,0x1)/Pci(0x0,0x0)"),
|
||||
cpu=device_probe.CPU(
|
||||
name='Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz',
|
||||
flags=['FPU', 'VME', 'DE', 'PSE', 'TSC', 'MSR', 'PAE', 'MCE', 'CX8', 'APIC', 'SEP', 'MTRR', 'PGE', 'MCA', 'CMOV', 'PAT', 'PSE36', 'CLFSH', 'DS', 'ACPI', 'MMX', 'FXSR', 'SSE', 'SSE2', 'SS', 'HTT', 'TM', 'PBE', 'SSE3', 'PCLMULQDQ', 'DTES64', 'MON', 'DSCPL', 'VMX', 'EST', 'TM2', 'SSSE3', 'CX16', 'TPR', 'PDCM', 'SSE4.1', 'SSE4.2', 'x2APIC', 'POPCNT', 'AES', 'PCID', 'XSAVE', 'OSXSAVE', 'TSCTMR', 'AVX1.0', 'RDRAND', 'F16C']
|
||||
),
|
||||
oclp_version=None,
|
||||
opencore_version=None,
|
||||
)
|
||||
|
||||
MacBookPro171_Stock = device_probe.Computer(
|
||||
# Run under Rosetta
|
||||
real_model="MacBookPro17,1",
|
||||
real_board_id="J293",
|
||||
reported_model="MacBookPro17,1",
|
||||
reported_board_id="J293",
|
||||
gpus=[device_probe.AMD(vendor_id=4098, device_id=26640, class_code=196608, name="display", model="Unknown Unknown", pci_path="")],
|
||||
igpu=None,
|
||||
dgpu=None,
|
||||
storage=[],
|
||||
wifi=device_probe.Broadcom(vendor_id=5348, device_id=17445, class_code=163840, name="wlan", model=None, pci_path=""),
|
||||
cpu=device_probe.CPU(
|
||||
name="Apple M1",
|
||||
flags=["FPU", "VME", "DE", "PSE", "TSC", "MSR", "PAE", "MCE", "CX8", "APIC", "SEP", "MTRR", "PGE", "MCA", "CMOV", "PAT", "PSE36", "CLFSH", "DS", "ACPI", "MMX", "FXSR", "SSE", "SSE2", "SS", "HTT", "TM", "PBE", "SSE3", "PCLMULQDQ", "DTSE64", "MON", "DSCPL", "VMX", "EST", "TM2", "SSSE3", "CX16", "TPR", "PDCM", "SSE4.1", "SSE4.2", "AES", "SEGLIM64"],
|
||||
),
|
||||
oclp_version=None,
|
||||
opencore_version=None,
|
||||
)
|
||||
|
||||
class Macmini:
|
||||
|
||||
Macmini91_Stock = device_probe.Computer(
|
||||
# Run under Rosetta
|
||||
real_model="Macmini9,1",
|
||||
real_board_id="J274",
|
||||
reported_model="Macmini9,1",
|
||||
reported_board_id="J274",
|
||||
gpus=[
|
||||
device_probe.AMD(vendor_id=4098, device_id=26640, class_code=196608, name="display", model="Unknown Unknown", pci_path="", )
|
||||
],
|
||||
igpu=None,
|
||||
dgpu=None,
|
||||
storage=[],
|
||||
wifi=device_probe.Broadcom(vendor_id=5348, device_id=17445, class_code=163840, name="wlan", model=None, pci_path=""),
|
||||
cpu=device_probe.CPU(
|
||||
name="Apple M1",
|
||||
flags=["FPU", "VME", "DE", "PSE", "TSC", "MSR", "PAE", "MCE", "CX8", "APIC", "SEP", "MTRR", "PGE", "MCA", "CMOV", "PAT", "PSE36", "CLFSH", "DS", "ACPI", "MMX", "FXSR", "SSE", "SSE2", "SS", "HTT", "TM", "PBE", "SSE3", "PCLMULQDQ", "DTSE64", "MON", "DSCPL", "VMX", "EST", "TM2", "SSSE3", "CX16", "TPR", "PDCM", "SSE4.1", "SSE4.2", "AES", "SEGLIM64"]
|
||||
),
|
||||
oclp_version=None,
|
||||
opencore_version=None
|
||||
)
|
||||
|
||||
class iMac:
|
||||
|
||||
iMac81_Stock = device_probe.Computer(
|
||||
# Stock Model
|
||||
real_model="iMac8,1",
|
||||
real_board_id="Mac-F226BEC8",
|
||||
reported_model="iMac8,1",
|
||||
reported_board_id="Mac-F226BEC8",
|
||||
gpus=[
|
||||
device_probe.AMD(vendor_id=4098, device_id=38088, class_code=196608, name="GFX0", model="ATI Radeon HD 2400", pci_path="PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)")
|
||||
],
|
||||
igpu=None,
|
||||
dgpu=device_probe.AMD(vendor_id=4098, device_id=38088, class_code=196608, name="GFX0", model="ATI Radeon HD 2400", pci_path="PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)"),
|
||||
storage=[
|
||||
device_probe.SATAController(vendor_id=32902, device_id=10281, class_code=67073, name="SATA", model=None, pci_path="PciRoot(0x0)/Pci(0x1f,0x2)")
|
||||
],
|
||||
wifi=device_probe.Broadcom(vendor_id=5348, device_id=17192, class_code=163840, name="ARPT", model=None, pci_path="PciRoot(0x0)/Pci(0x1c,0x4)/Pci(0x0,0x0)"),
|
||||
cpu=device_probe.CPU(
|
||||
name="Intel(R) Core(TM)2 Duo CPU E8135 @ 2.40GHz",
|
||||
flags=["FPU", "VME", "DE", "PSE", "TSC", "MSR", "PAE", "MCE", "CX8", "APIC", "SEP", "MTRR", "PGE", "MCA", "CMOV", "PAT", "PSE36", "CLFSH", "DS", "ACPI", "MMX", "FXSR", "SSE", "SSE2", "SS", "HTT", "TM", "PBE", "SSE3", "DTES64", "MON", "DSCPL", "VMX", "EST", "TM2", "SSSE3", "CX16", "TPR", "PDCM", "SSE4.1"]
|
||||
),
|
||||
oclp_version=None,
|
||||
opencore_version=None,
|
||||
)
|
||||
|
||||
iMac112_Stock = device_probe.Computer(
|
||||
# Stock Model
|
||||
real_model="iMac11,2",
|
||||
real_board_id="Mac-F2238AC8",
|
||||
reported_model="iMac11,2",
|
||||
reported_board_id="Mac-F2238AC8",
|
||||
gpus=[
|
||||
device_probe.AMD(vendor_id=4098, device_id=38024, class_code=196608, name="GFX0", model="ATI Radeon HD 4670", pci_path="PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)")
|
||||
],
|
||||
igpu=None,
|
||||
dgpu=device_probe.AMD(vendor_id=4098, device_id=38024, class_code=196608, name="GFX0", model="ATI Radeon HD 4670", pci_path="PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)"),
|
||||
storage=[
|
||||
device_probe.SATAController(vendor_id=32902, device_id=15138, class_code=67073, name="SATA", model=None, pci_path="PciRoot(0x0)/Pci(0x1f,0x2)")
|
||||
],
|
||||
wifi=device_probe.Atheros(vendor_id=5772, device_id=42, class_code=163840, name="ARPT", model=None, pci_path="PciRoot(0x0)/Pci(0x1c,0x1)/Pci(0x0,0x0)"),
|
||||
cpu=device_probe.CPU(
|
||||
name="Intel(R) Core(TM) i3 CPU 540 @ 3.07GHz",
|
||||
flags=["FPU", "VME", "DE", "PSE", "TSC", "MSR", "PAE", "MCE", "CX8", "APIC", "SEP", "MTRR", "PGE", "MCA", "CMOV", "PAT", "PSE36", "CLFSH", "DS", "ACPI", "MMX", "FXSR", "SSE", "SSE2", "SS", "HTT", "TM", "PBE", "SSE3", "DTES64", "MON", "DSCPL", "VMX", "EST", "TM2", "SSSE3", "CX16", "TPR", "PDCM", "SSE4.1", "SSE4.2", "POPCNT", "PCID"]
|
||||
),
|
||||
oclp_version=None,
|
||||
opencore_version=None,
|
||||
)
|
||||
|
||||
iMac122_Upgraded = device_probe.Computer(
|
||||
real_model="iMac12,2",
|
||||
real_board_id="Mac-942B59F58194171B",
|
||||
reported_model="iMac12,2",
|
||||
reported_board_id="Mac-942B59F58194171B",
|
||||
gpus=[
|
||||
device_probe.Intel(vendor_id=32902, device_id=258, class_code=196608, name="HD Graphics 3000", model=None, pci_path="PciRoot(0x0)/Pci(0x2,0x0)"),
|
||||
device_probe.AMD(vendor_id=4098, device_id=26600, class_code=196608, name="GFX0", model="Radeon Pro WX4130", pci_path="PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)"),
|
||||
],
|
||||
igpu=device_probe.Intel(vendor_id=32902, device_id=258, class_code=196608, name="HD Graphics 3000", model=None, pci_path="PciRoot(0x0)/Pci(0x2,0x0)"),
|
||||
dgpu=device_probe.AMD(vendor_id=4098, device_id=26600, class_code=196608, name="GFX0", model="Radeon Pro WX4130", pci_path="PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)"),
|
||||
storage=[
|
||||
device_probe.SATAController(vendor_id=32902, device_id=7170, class_code=67073, name="SATA", model=None, pci_path="PciRoot(0x0)/Pci(0x1f,0x2)")
|
||||
],
|
||||
wifi=device_probe.Broadcom(vendor_id=5348, device_id=17338, class_code=163840, name="ARPT", model=None, pci_path="PciRoot(0x0)/Pci(0x1c,0x1)/Pci(0x0,0x0)"),
|
||||
cpu=device_probe.CPU(
|
||||
name="Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz",
|
||||
flags=["FPU", "VME", "DE", "PSE", "TSC", "MSR", "PAE", "MCE", "CX8", "APIC", "SEP", "MTRR", "PGE", "MCA", "CMOV", "PAT", "PSE36", "CLFSH", "DS", "ACPI", "MMX", "FXSR", "SSE", "SSE2", "SS", "HTT", "TM", "PBE", "SSE3", "PCLMULQDQ", "DTES64", "MON", "DSCPL", "VMX", "SMX", "EST", "TM2", "SSSE3", "CX16", "TPR", "PDCM", "SSE4.1", "SSE4.2", "xAPIC", "POPCNT", "AES", "PCID", "XSAVE", "OSXSAVE", "TSCTMR", "AVX1.0"]
|
||||
),
|
||||
oclp_version=None,
|
||||
opencore_version=None,
|
||||
)
|
||||
|
||||
class MacPro:
|
||||
|
||||
MacPro31_Stock = device_probe.Computer(
|
||||
# Stock Model, stock TS1 GPU and no Wifi card
|
||||
real_model="MacPro3,1",
|
||||
real_board_id="Mac-F42C88C8",
|
||||
reported_model="MacPro3,1",
|
||||
reported_board_id="Mac-F42C88C8",
|
||||
gpus=[
|
||||
device_probe.AMD(vendor_id=4098, device_id=38272, class_code=196608, name="GFX0", model="ATI Radeon HD 2600", pci_path="PciRoot(0x0)/Pci(0x5,0x0)/Pci(0x0,0x0)")
|
||||
],
|
||||
igpu=None,
|
||||
dgpu=device_probe.AMD(vendor_id=4098, device_id=38272, class_code=196608, name="GFX0", model="ATI Radeon HD 2600", pci_path="PciRoot(0x0)/Pci(0x5,0x0)/Pci(0x0,0x0)"),
|
||||
storage=[
|
||||
device_probe.SATAController(vendor_id=32902, device_id=9857, class_code=67073, name="SATA", model=None, pci_path="PciRoot(0x0)/Pci(0x1f,0x2)")
|
||||
],
|
||||
wifi=None,
|
||||
cpu=device_probe.CPU(
|
||||
name="Intel(R) Xeon(R) CPU X5482 @ 3.20GHz",
|
||||
flags=["FPU", "VME", "DE", "PSE", "TSC", "MSR", "PAE", "MCE", "CX8", "APIC", "SEP", "MTRR", "PGE", "MCA", "CMOV", "PAT", "PSE36", "CLFSH", "DS", "ACPI", "MMX", "FXSR", "SSE", "SSE2", "SS", "HTT", "TM", "PBE", "SSE3", "DTES64", "MON", "DSCPL", "VMX", "EST", "TM2", "SSSE3", "CX16", "TPR", "PDCM", "SSE4.1"],
|
||||
),
|
||||
oclp_version=None,
|
||||
opencore_version=None,
|
||||
)
|
||||
|
||||
MacPro31_Upgrade = device_probe.Computer(
|
||||
# Upgraded Model, TS2 GPU and El-Capitan era Wifi card
|
||||
real_model="MacPro3,1",
|
||||
real_board_id="Mac-F42C88C8",
|
||||
reported_model="MacPro3,1",
|
||||
reported_board_id="Mac-F42C88C8",
|
||||
gpus=[
|
||||
device_probe.AMD(vendor_id=4098, device_id=26808, class_code=196608, name="GFX0", model="ATI Radeon HD 5770", pci_path="PciRoot(0x0)/Pci(0x5,0x0)/Pci(0x0,0x0)")
|
||||
],
|
||||
igpu=None,
|
||||
dgpu=device_probe.AMD(vendor_id=4098, device_id=26808, class_code=196608, name="GFX0", model="ATI Radeon HD 5770", pci_path="PciRoot(0x0)/Pci(0x5,0x0)/Pci(0x0,0x0)"),
|
||||
storage=[
|
||||
device_probe.SATAController(vendor_id=32902, device_id=9857, class_code=67073, name="SATA", model=None, pci_path="PciRoot(0x0)/Pci(0x1f,0x2)")
|
||||
],
|
||||
wifi=device_probe.Broadcom(
|
||||
vendor_id=5348, device_id=17192, class_code=163840, name="ARPT", model=None, pci_path="PciRoot(0x0)/Pci(0x1c,0x3)/Pci(0x0,0x0)"
|
||||
),
|
||||
cpu=device_probe.CPU(
|
||||
name="Intel(R) Xeon(R) CPU X5482 @ 3.20GHz",
|
||||
flags=["FPU", "VME", "DE", "PSE", "TSC", "MSR", "PAE", "MCE", "CX8", "APIC", "SEP", "MTRR", "PGE", "MCA", "CMOV", "PAT", "PSE36", "CLFSH", "DS", "ACPI", "MMX", "FXSR", "SSE", "SSE2", "SS", "HTT", "TM", "PBE", "SSE3", "DTES64", "MON", "DSCPL", "VMX", "EST", "TM2", "SSSE3", "CX16", "TPR", "PDCM", "SSE4.1"],
|
||||
),
|
||||
oclp_version=None,
|
||||
opencore_version=None,
|
||||
)
|
||||
|
||||
MacPro31_Modern_AMD = device_probe.Computer(
|
||||
# Upgraded Model, Polaris GPU and BCM94360CD
|
||||
real_model="MacPro3,1",
|
||||
real_board_id="Mac-F42C88C8",
|
||||
reported_model="MacPro3,1",
|
||||
reported_board_id="Mac-F42C88C8",
|
||||
gpus=[
|
||||
device_probe.AMD(vendor_id=4098, device_id=26591, class_code=196608, name="GFX0", model="Radeon RX 470/570", pci_path="PciRoot(0x0)/Pci(0x5,0x0)/Pci(0x0,0x0)")
|
||||
],
|
||||
igpu=None,
|
||||
dgpu=device_probe.AMD(vendor_id=4098, device_id=26591, class_code=196608, name="GFX0", model="Radeon RX 470/570", pci_path="PciRoot(0x0)/Pci(0x5,0x0)/Pci(0x0,0x0)"),
|
||||
storage=[
|
||||
device_probe.SATAController(vendor_id=32902, device_id=9857, class_code=67073, name="SATA", model=None, pci_path="PciRoot(0x0)/Pci(0x1f,0x2)")
|
||||
],
|
||||
wifi=device_probe.Broadcom(
|
||||
vendor_id=5348, device_id=17312, class_code=163840, name="ARPT", model=None, pci_path="PciRoot(0x0)/Pci(0x1c,0x3)/Pci(0x0,0x0)"
|
||||
),
|
||||
cpu=device_probe.CPU(
|
||||
name="Intel(R) Xeon(R) CPU X5482 @ 3.20GHz",
|
||||
flags=["FPU", "VME", "DE", "PSE", "TSC", "MSR", "PAE", "MCE", "CX8", "APIC", "SEP", "MTRR", "PGE", "MCA", "CMOV", "PAT", "PSE36", "CLFSH", "DS", "ACPI", "MMX", "FXSR", "SSE", "SSE2", "SS", "HTT", "TM", "PBE", "SSE3", "DTES64", "MON", "DSCPL", "VMX", "EST", "TM2", "SSSE3", "CX16", "TPR", "PDCM", "SSE4.1"],
|
||||
),
|
||||
oclp_version=None,
|
||||
opencore_version=None,
|
||||
)
|
||||
|
||||
MacPro31_Modern_Kepler = device_probe.Computer(
|
||||
# Upgraded Model, Kepler GPU and BCM94360CD
|
||||
real_model="MacPro3,1",
|
||||
real_board_id="Mac-F42C88C8",
|
||||
reported_model="MacPro3,1",
|
||||
reported_board_id="Mac-F42C88C8",
|
||||
gpus=[device_probe.NVIDIA(vendor_id=4318, device_id=4737, class_code=196608, name="GFX0", model="NVIDIA GeForce GT 710", pci_path="PciRoot(0x0)/Pci(0x5,0x0)/Pci(0x0,0x0)")],
|
||||
igpu=None,
|
||||
dgpu=device_probe.NVIDIA(vendor_id=4318, device_id=4737, class_code=196608, name="GFX0", model="NVIDIA GeForce GT 710", pci_path="PciRoot(0x0)/Pci(0x5,0x0)/Pci(0x0,0x0)"),
|
||||
storage=[
|
||||
device_probe.SATAController(vendor_id=32902, device_id=9857, class_code=67073, name="SATA", model=None, pci_path="PciRoot(0x0)/Pci(0x1f,0x2)")
|
||||
],
|
||||
wifi=device_probe.Broadcom(
|
||||
vendor_id=5348, device_id=17312, class_code=163840, name="ARPT", model=None, pci_path="PciRoot(0x0)/Pci(0x1c,0x3)/Pci(0x0,0x0)"
|
||||
),
|
||||
cpu=device_probe.CPU(
|
||||
name="Intel(R) Xeon(R) CPU X5482 @ 3.20GHz",
|
||||
flags=["FPU", "VME", "DE", "PSE", "TSC", "MSR", "PAE", "MCE", "CX8", "APIC", "SEP", "MTRR", "PGE", "MCA", "CMOV", "PAT", "PSE36", "CLFSH", "DS", "ACPI", "MMX", "FXSR", "SSE", "SSE2", "SS", "HTT", "TM", "PBE", "SSE3", "DTES64", "MON", "DSCPL", "VMX", "EST", "TM2", "SSSE3", "CX16", "TPR", "PDCM", "SSE4.1"],
|
||||
),
|
||||
oclp_version=None,
|
||||
opencore_version=None,
|
||||
)
|
||||
@@ -92,8 +92,20 @@ class PatchSysVolume:
|
||||
input("- Press [ENTER] to exit: ")
|
||||
|
||||
def unpatch_root_vol(self):
|
||||
print("- Reverting to last signed APFS snapshot")
|
||||
self.elevated(["bless", "--mount", self.mount_location, "--bootefi", "--last-sealed-snapshot"], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
if self.constants.detected_os > self.constants.catalina:
|
||||
print("- Reverting to last signed APFS snapshot")
|
||||
result = self.elevated(["bless", "--mount", self.mount_location, "--bootefi", "--last-sealed-snapshot"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
if result.returncode != 0:
|
||||
print("- Unable to revert root volume patches")
|
||||
print("Reason for unpatch Failure:")
|
||||
print(result.stdout.decode())
|
||||
# print("- Failed to revert snapshot via bless, falling back on manual restoration")
|
||||
# self.undo_root_patch()
|
||||
else:
|
||||
print("- Unpatching complete")
|
||||
print("\nPlease reboot the machine for patches to take effect")
|
||||
# else:
|
||||
# self.undo_root_patch()
|
||||
|
||||
def rebuild_snapshot(self):
|
||||
if self.constants.gui_mode is False:
|
||||
@@ -106,7 +118,7 @@ class PatchSysVolume:
|
||||
|
||||
# kextcache always returns 0, even if it fails
|
||||
# Check the output for 'KernelCache ID' to see if the cache was successfully rebuilt
|
||||
if result.returncode != 0 or (self.constants.detected_os < self.constants.catalina and "KernelCache ID" not in result):
|
||||
if result.returncode != 0 or (self.constants.detected_os < self.constants.catalina and "KernelCache ID" not in result.stdout.decode()):
|
||||
self.success_status = False
|
||||
print("- Unable to build new kernel cache")
|
||||
print("\nPlease report this to Github")
|
||||
@@ -129,10 +141,11 @@ class PatchSysVolume:
|
||||
self.elevated(["bless", "--folder", f"{self.mount_location}/System/Library/CoreServices", "--bootefi", "--create-snapshot"], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
self.unmount_drive()
|
||||
else:
|
||||
print("Merging kernel cache")
|
||||
self.elevated(["kcditto"], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
print("Merging dyld cache")
|
||||
self.elevated(["update_dyld_shared_cache", "-root", f"{self.mount_location}/"]).stdout.decode().strip().encode()
|
||||
if self.constants.detected_os == self.constants.catalina:
|
||||
print("- Merging kernel cache")
|
||||
Utilities.process_status(self.elevated(["kcditto"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
print("- Merging dyld cache")
|
||||
Utilities.process_status(self.elevated(["update_dyld_shared_cache", "-root", f"{self.mount_location}/"]))
|
||||
print("- Patching complete")
|
||||
print("\nPlease reboot the machine for patches to take effect")
|
||||
if self.amd_ts2 is True:
|
||||
@@ -154,7 +167,7 @@ set million colour before rebooting"""
|
||||
delete_path = Path(self.mount_extensions) / Path(delete_current_kext)
|
||||
if Path(delete_path).exists():
|
||||
print(f"- Deleting {delete_current_kext}")
|
||||
self.elevated(["rm", "-R", delete_path], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
Utilities.process_status(self.elevated(["rm", "-R", delete_path], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
else:
|
||||
print(f"- Couldn't find {delete_current_kext}, skipping")
|
||||
|
||||
@@ -163,20 +176,20 @@ set million colour before rebooting"""
|
||||
existing_path = Path(self.mount_extensions) / Path(add_current_kext)
|
||||
if Path(existing_path).exists():
|
||||
print(f"- Found conflicting kext, Deleting Root Volume's {add_current_kext}")
|
||||
self.elevated(["rm", "-R", existing_path], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
Utilities.process_status(self.elevated(["rm", "-R", existing_path], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
print(f"- Adding {add_current_kext}")
|
||||
self.elevated(["cp", "-R", f"{vendor_location}/{add_current_kext}", self.mount_extensions], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
self.elevated(["chmod", "-Rf", "755", f"{self.mount_extensions}/{add_current_kext}"], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
self.elevated(["chown", "-Rf", "root:wheel", f"{self.mount_extensions}/{add_current_kext}"], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
Utilities.process_status(self.elevated(["cp", "-R", f"{vendor_location}/{add_current_kext}", self.mount_extensions], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
Utilities.process_status(self.elevated(["chmod", "-Rf", "755", f"{self.mount_extensions}/{add_current_kext}"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
Utilities.process_status(self.elevated(["chown", "-Rf", "root:wheel", f"{self.mount_extensions}/{add_current_kext}"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
|
||||
def add_brightness_patch(self):
|
||||
self.delete_old_binaries(SysPatchArray.DeleteBrightness)
|
||||
self.add_new_binaries(SysPatchArray.AddBrightness, self.constants.legacy_brightness)
|
||||
self.elevated(
|
||||
["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_private_frameworks_path_brightness}/", self.mount_private_frameworks], stdout=subprocess.PIPE
|
||||
).stdout.decode().strip().encode()
|
||||
self.elevated(["chmod", "-Rf", "755", f"{self.mount_private_frameworks}/DisplayServices.framework"], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
self.elevated(["chown", "-Rf", "root:wheel", f"{self.mount_private_frameworks}/DisplayServices.framework"], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
Utilities.process_status(
|
||||
self.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_private_frameworks_path_brightness}/", self.mount_private_frameworks], stdout=subprocess.PIPE)
|
||||
)
|
||||
Utilities.process_status(self.elevated(["chmod", "-Rf", "755", f"{self.mount_private_frameworks}/DisplayServices.framework"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
Utilities.process_status(self.elevated(["chown", "-Rf", "root:wheel", f"{self.mount_private_frameworks}/DisplayServices.framework"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
|
||||
def add_audio_patch(self):
|
||||
self.delete_old_binaries(SysPatchArray.DeleteVolumeControl)
|
||||
@@ -272,38 +285,45 @@ set million colour before rebooting"""
|
||||
print("- Installing IvyBridge Acceleration Kext patches for Monterey")
|
||||
self.add_new_binaries(SysPatchArray.AddIntelGen3Accel, self.constants.legacy_intel_gen3_path)
|
||||
print("- Fixing Acceleration in CoreMedia")
|
||||
subprocess.run(["defaults", "write", "com.apple.coremedia", "hardwareVideoDecoder", "-string", "enable"], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
Utilities.process_status(subprocess.run(["defaults", "write", "com.apple.coremedia", "hardwareVideoDecoder", "-string", "enable"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
print("- Merging Ivy Bridge Frameworks")
|
||||
self.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_frameworks_path_accel_ivy}/", self.mount_frameworks], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
Utilities.process_status(
|
||||
self.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_frameworks_path_accel_ivy}/", self.mount_frameworks], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
)
|
||||
print("- Merging Ivy Bridge PrivateFrameworks")
|
||||
self.elevated(
|
||||
["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_private_frameworks_path_accel_ivy}/", self.mount_private_frameworks], stdout=subprocess.PIPE
|
||||
).stdout.decode().strip().encode()
|
||||
Utilities.process_status(
|
||||
self.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_private_frameworks_path_accel_ivy}/", self.mount_private_frameworks], stdout=subprocess.PIPE)
|
||||
)
|
||||
else:
|
||||
print("- Installing basic Ivy Bridge Kext patches for generic OS")
|
||||
self.add_new_binaries(SysPatchArray.AddIntelGen3Accel, self.constants.legacy_intel_gen3_path)
|
||||
|
||||
def gpu_accel_legacy_extended(self):
|
||||
print("- Merging general legacy Frameworks")
|
||||
self.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_frameworks_path_accel}/", self.mount_frameworks], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
Utilities.process_status(
|
||||
self.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_frameworks_path_accel}/", self.mount_frameworks], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
)
|
||||
print("- Merging general legacy PrivateFrameworks")
|
||||
self.elevated(
|
||||
["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_private_frameworks_path_accel}/", self.mount_private_frameworks], stdout=subprocess.PIPE
|
||||
).stdout.decode().strip().encode()
|
||||
print("- Adding IOHID-Fixup.plist")
|
||||
self.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_lauchd_path_accel}/", self.mount_lauchd], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
self.elevated(["chmod", "755", f"{self.mount_lauchd}/IOHID-Fixup.plist"], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
self.elevated(["chown", "root:wheel", f"{self.mount_lauchd}/IOHID-Fixup.plist"], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
Utilities.process_status(self.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_private_frameworks_path_accel}/", self.mount_private_frameworks], stdout=subprocess.PIPE))
|
||||
if self.constants.detected_os > self.constants.catalina:
|
||||
print("- Adding IOHID-Fixup.plist")
|
||||
Utilities.process_status(
|
||||
self.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_lauchd_path_accel}/", self.mount_lauchd], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
)
|
||||
Utilities.process_status(self.elevated(["chmod", "755", f"{self.mount_lauchd}/IOHID-Fixup.plist"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
Utilities.process_status(self.elevated(["chown", "root:wheel", f"{self.mount_lauchd}/IOHID-Fixup.plist"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
|
||||
def gpu_accel_legacy_extended_ts2(self):
|
||||
print("- Merging TeraScale 2 legacy Frameworks")
|
||||
self.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_frameworks_path_accel_ts2}/", self.mount_frameworks], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
Utilities.process_status(
|
||||
self.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_frameworks_path_accel_ts2}/", self.mount_frameworks], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
)
|
||||
print("- Merging TeraScale 2 PrivateFrameworks")
|
||||
self.elevated(
|
||||
["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_private_frameworks_path_accel_ts2}/", self.mount_private_frameworks], stdout=subprocess.PIPE
|
||||
).stdout.decode().strip().encode()
|
||||
Utilities.process_status(
|
||||
self.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_private_frameworks_path_accel_ts2}/", self.mount_private_frameworks], stdout=subprocess.PIPE)
|
||||
)
|
||||
print("- Fixing Acceleration in CMIO")
|
||||
subprocess.run(["defaults", "write", "com.apple.cmio", "CMIO_Unit_Input_ASC.DoNotUseOpenCL", "-bool", "true"], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
Utilities.process_status(subprocess.run(["defaults", "write", "com.apple.cmio", "CMIO_Unit_Input_ASC.DoNotUseOpenCL", "-bool", "true"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
|
||||
def patch_root_vol(self):
|
||||
print(f"- Running patches for {self.model}")
|
||||
@@ -404,6 +424,8 @@ set million colour before rebooting"""
|
||||
os_ver = "10.15-Catalina"
|
||||
elif self.constants.detected_os == self.constants.mojave:
|
||||
os_ver = "10.14-Mojave"
|
||||
else:
|
||||
raise Exception(f"Unsupported OS: {self.constants.detected_os}")
|
||||
link = f"{self.constants.url_patcher_support_pkg}{self.constants.patcher_support_pkg_version}/{os_ver}.zip"
|
||||
|
||||
if Path(self.constants.payload_apple_root_path).exists():
|
||||
@@ -419,7 +441,7 @@ set million colour before rebooting"""
|
||||
print("- Download completed")
|
||||
print("- Unzipping download...")
|
||||
try:
|
||||
subprocess.run(["unzip", self.constants.payload_apple_root_path_zip], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=self.constants.payload_path).stdout.decode()
|
||||
Utilities.process_status(subprocess.run(["unzip", self.constants.payload_apple_root_path_zip], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=self.constants.payload_path))
|
||||
print("- Renaming folder")
|
||||
os.rename(self.constants.payload_path / Path(os_ver), self.constants.payload_apple_root_path)
|
||||
Path(self.constants.payload_apple_root_path_zip).unlink()
|
||||
@@ -525,7 +547,7 @@ set million colour before rebooting"""
|
||||
sip_value = (
|
||||
"For Hackintoshes, please set csr-active-config to '030A0000' (0xA03)\nFor non-OpenCore Macs, please run 'csrutil disable' and \n'csrutil authenticated-root disable' in RecoveryOS"
|
||||
)
|
||||
self.sip_enabled, self.sbm_enabled, self.amfi_enabled, self.fv_enabled = Utilities.patching_status(sip)
|
||||
self.sip_enabled, self.sbm_enabled, self.amfi_enabled, self.fv_enabled, self.dosdude_patched = Utilities.patching_status(sip)
|
||||
if self.sip_enabled is True:
|
||||
print("\nCannot patch! Please disable System Integrity Protection (SIP).")
|
||||
print("Disable SIP in Patcher Settings and Rebuild OpenCore\n")
|
||||
@@ -553,7 +575,13 @@ set million colour before rebooting"""
|
||||
print("\n".join(self.constants.sandy_board_id))
|
||||
self.bad_board_id = True
|
||||
|
||||
if any([self.sip_enabled, self.sbm_enabled, self.fv_enabled, self.amfi_enabled if self.amfi_must_disable else False, self.bad_board_id if self.check_board_id else False]):
|
||||
if self.dosdude_patched is True:
|
||||
print("\nCannot patch! Detected machine has already been patched by another patcher")
|
||||
print("Please ensure your install is either clean or patched with OpenCore Legacy Patcher")
|
||||
|
||||
if any(
|
||||
[self.sip_enabled, self.sbm_enabled, self.fv_enabled, self.dosdude_patched, self.amfi_enabled if self.amfi_must_disable else False, self.bad_board_id if self.check_board_id else False]
|
||||
):
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
|
||||
@@ -7,7 +7,8 @@ import os
|
||||
import plistlib
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
|
||||
import re
|
||||
import os
|
||||
import requests
|
||||
|
||||
from Resources import Constants, ioreg
|
||||
@@ -20,6 +21,21 @@ def hexswap(input_hex: str):
|
||||
return hex_str.upper()
|
||||
|
||||
|
||||
def process_status(process_result):
|
||||
if process_result.returncode != 0:
|
||||
print(f"Process failed with exit code {process_result.returncode}")
|
||||
print(f"Please file an issue on our Github")
|
||||
raise Exception(f"Process result: \n{process_result.stdout.decode()}")
|
||||
|
||||
|
||||
def human_fmt(num):
|
||||
for unit in ["B", "KB", "MB", "GB", "TB", "PB"]:
|
||||
if abs(num) < 1000.0:
|
||||
return "%3.1f %s" % (num, unit)
|
||||
num /= 1000.0
|
||||
return "%.1f %s" % (num, "EB")
|
||||
|
||||
|
||||
def header(lines):
|
||||
lines = [i for i in lines if i is not None]
|
||||
total_length = len(max(lines, key=len)) + 4
|
||||
@@ -49,6 +65,27 @@ def get_disk_path():
|
||||
return root_mount_path
|
||||
|
||||
|
||||
def latebloom_detection(model):
|
||||
if model in ["MacPro4,1", "MacPro5,1", "iMac7,1", "iMac8,1"]:
|
||||
# These machines are more likely to experience boot hangs, increase delays to accomodate
|
||||
lb_delay = "250"
|
||||
else:
|
||||
lb_delay = "100"
|
||||
lb_range = "1"
|
||||
lb_debug = "1"
|
||||
if get_nvram("boot-args", decode=False):
|
||||
if "latebloom=" in get_nvram("boot-args", decode=False):
|
||||
lb_delay = re.search(r"(?:[, ])latebloom=(\d+)", get_nvram("boot-args", decode=False))
|
||||
lb_delay = lb_delay[1]
|
||||
if "lb_range=" in get_nvram("boot-args", decode=False):
|
||||
lb_range = re.search(r"(?:[, ])lb_range=(\d+)", get_nvram("boot-args", decode=False))
|
||||
lb_range = lb_range[1]
|
||||
if "lb_debug=" in get_nvram("boot-args", decode=False):
|
||||
lb_debug = re.search(r"(?:[, ])lb_debug=(\d+)", get_nvram("boot-args", decode=False))
|
||||
lb_debug = lb_debug[1]
|
||||
return int(lb_delay), int(lb_range), int(lb_debug)
|
||||
|
||||
|
||||
def csr_decode(csr_active_config, os_sip):
|
||||
if csr_active_config is None:
|
||||
csr_active_config = b"\x00\x00\x00\x00"
|
||||
@@ -71,18 +108,27 @@ def friendly_hex(integer: int):
|
||||
return "{:02X}".format(integer)
|
||||
|
||||
|
||||
def amfi_status():
|
||||
amfi_1 = "amfi_get_out_of_my_way=0x1"
|
||||
amfi_2 = "amfi_get_out_of_my_way=1"
|
||||
if get_nvram("boot-args", decode=False) and (amfi_1 in get_nvram("boot-args", decode=False) or amfi_2 in get_nvram("boot-args", decode=False)):
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
def patching_status(os_sip):
|
||||
# Detection for Root Patching
|
||||
sip_enabled = True # System Integrity Protection
|
||||
sbm_enabled = True # Secure Boot Status (SecureBootModel)
|
||||
amfi_enabled = True # Apple Mobile File Integrity
|
||||
fv_enabled = True # FileVault
|
||||
dosdude_patched = True
|
||||
|
||||
amfi_1 = "amfi_get_out_of_my_way=0x1"
|
||||
amfi_2 = "amfi_get_out_of_my_way=1"
|
||||
gen6_kext = "/System/Library/Extension/AppleIntelHDGraphics.kext"
|
||||
gen7_kext = "/System/Library/Extension/AppleIntelHD3000Graphics.kext"
|
||||
|
||||
amfi_enabled = amfi_status()
|
||||
|
||||
if get_nvram("boot-args", decode=False) and (amfi_1 in get_nvram("boot-args", decode=False) or amfi_2 in get_nvram("boot-args", decode=False)):
|
||||
amfi_enabled = False
|
||||
if get_nvram("HardwareModel", "94B73556-2197-4702-82A8-3E1337DAFBFB", decode=False) not in Constants.Constants.sbm_values:
|
||||
sbm_enabled = False
|
||||
|
||||
@@ -93,7 +139,10 @@ def patching_status(os_sip):
|
||||
if fv_status.startswith("FileVault is Off"):
|
||||
fv_enabled = False
|
||||
|
||||
return sip_enabled, sbm_enabled, amfi_enabled, fv_enabled
|
||||
if not (Path(gen6_kext).exists() and Path(gen7_kext).exists()):
|
||||
dosdude_patched = False
|
||||
|
||||
return sip_enabled, sbm_enabled, amfi_enabled, fv_enabled, dosdude_patched
|
||||
|
||||
|
||||
clear = True
|
||||
|
||||
@@ -41,6 +41,18 @@ chmod +x tccplus
|
||||
./tccplus add Microphone com.hnc.Discord
|
||||
```
|
||||
|
||||
For those who may experience issues with `tccplus`, you can manually patch `com.apple.TCC` to add permissions:
|
||||
|
||||
```sh
|
||||
# get app id (Zoom.us used in example):
|
||||
$ osascript -e 'id of app "zoom.us"'
|
||||
# output: us.zoom.xos
|
||||
|
||||
$ sudo sqlite3 ~/Library/Application\ Support/com.apple.TCC/TCC.db "INSERT or REPLACE INTO access VALUES('kTCCServiceMicrophone','us.zoom.xos',0,2,0,1,NULL,NULL,NULL,'UNUSED',NULL,0,1541440109);"
|
||||
|
||||
$ sudo sqlite3 ~/Library/Application\ Support/com.apple.TCC/TCC.db "INSERT or REPLACE INTO access VALUES('kTCCServiceCamera','us.zoom.xos',0,2,0,1,NULL,NULL,NULL,'UNUSED',NULL,0,1541440109);"
|
||||
```
|
||||
|
||||
## Keyboard Backlight broken
|
||||
|
||||
Due to forcing `hidd` into spinning up with the fallback mode enabled, this can break the OS's recognition of backlight keyboards. Thankfully the drivers themselves still do operate so applications such as [LabTick](https://www.macupdate.com/app/mac/22151/lab-tick) are able to set the brightness manually.
|
||||
@@ -71,4 +83,4 @@ The best way to achieve this is to boot Recovery (or Single User Mode if the dGP
|
||||
nvram FA4CE28D-B62F-4C99-9CC3-6815686E30F9:gpu-power-prefs=%01%00%00%00
|
||||
```
|
||||
|
||||
This will disable the dGPU and allow graphics acceleration in Big Sur. Note that external display outputs are directly routed to the dGPU and therefore can no longer be used. Solutions such as a [DisplayLink Adapters](https://www.displaylink.com/products/usb-adapters) can work around this limitation.
|
||||
This will disable the dGPU and allow graphics acceleration in Big Sur. Note that external display outputs are directly routed to the dGPU and therefore can no longer be used. Solutions such as a [DisplayLink Adapters](https://www.displaylink.com/products/usb-adapters) can work around this limitation in theory. However, currently the proprietary DisplayLink driver refuses to function on legacy-patched systems, either resulting in a windowserver crash loop or no output at all.
|
||||
|
||||
@@ -14,7 +14,7 @@ With OpenCore Legacy Patcher we recommend users go through the below table to un
|
||||
| Supported OSes | <span style="color:#30BCD5">10.7-11</span> | <span style="color:red">10.15-11</span> |
|
||||
| Firmware Patching | <span style="color:#30BCD5">None required</span> | <span style="color:red">Required for models without native APFS support</span> |
|
||||
| BootCamp Switching | <span style="color:red">Requires EFI Conversion for Start Disk support, otherwise still supported</span> | <span style="color:#30BCD5">Native</span> |
|
||||
| Legacy GPU Acceleration | <span style="color:#30BCD5">In active development</span>, see Acceleration Progress Tracker: [Link](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108) | <span style="color:red">Currently not researching</span> |
|
||||
| Non-Metal GPU Acceleration | <span style="color:#30BCD5">In active development</span>, see Acceleration Progress Tracker: [Link](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108) | <span style="color:red">Currently not researching</span> |
|
||||
| El Capitan-era Wifi cards | <span style="color:#30BCD5">Supported</span> | <span style="colorred">Not supported</span> |
|
||||
| WPA Wireless Support | <span style="color:#30BCD5">Supported</span> | <span style="color:red">Minority may experience issues on early 2013 and older Models</span> |
|
||||
| Personal Hotspot Support | <span style="color:#30BCD5">Native</span> | <span style="color:red">Often requires extra steps to achieve on early 2013 and older Models</span> |
|
||||
|
||||
@@ -28,6 +28,7 @@ Below is a list of hardware that currently has issues with Monterey:
|
||||
### Metal GPUs
|
||||
|
||||
* Intel HD4000 iGPUs lost support
|
||||
* Re-introduced with OpenCore Legacy Patcher v0.1.7
|
||||
|
||||
By default these machines require root volume patches to gain graphics acceleration in Monterey. OpenCore Legacy Patcher supports readding support however SIP and FileVault can no longer be enabled due to root patching:
|
||||
|
||||
@@ -36,15 +37,6 @@ By default these machines require root volume patches to gain graphics accelerat
|
||||
* MacBookPro9,x
|
||||
* MacBookPro10,x
|
||||
|
||||
Note: Currently HD 4000 support in Monterey is not perfect, following are broken:
|
||||
|
||||
::: details HD 4000 Issues
|
||||
|
||||
* Hardware DRM Playback unsupported
|
||||
* Chrome uses Software DRM so has no such limitation in Monterey
|
||||
|
||||
:::
|
||||
|
||||
### Non-Metal GPUs
|
||||
|
||||
* Non-Metal GPUs no longer have working acceleration patches:
|
||||
@@ -113,4 +105,4 @@ The following models lost Bluetooth support in macOS Monterey due to their legac
|
||||
* MacBookPro7,1 and older
|
||||
* MacPro5,1 and older
|
||||
|
||||
Note: BCM943224, BCM94331, BCM94360 and BCM943602 are still fully support by OpenCore Legacy Patcher
|
||||
Note: BCM943224, BCM94331, BCM94360 and BCM943602 are still fully support by OpenCore Legacy Patcher
|
||||
|
||||
@@ -242,7 +242,7 @@
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string></string>
|
||||
<string>10.0.0</string>
|
||||
<key>BundlePath</key>
|
||||
<string>Lilu.kext</string>
|
||||
<key>ExecutablePath</key>
|
||||
@@ -278,7 +278,7 @@
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string></string>
|
||||
<string>10.0.0</string>
|
||||
<key>BundlePath</key>
|
||||
<string>WhateverGreen.kext</string>
|
||||
<key>ExecutablePath</key>
|
||||
@@ -296,7 +296,7 @@
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string></string>
|
||||
<string>12.0.0</string>
|
||||
<key>BundlePath</key>
|
||||
<string>RestrictEvents.kext</string>
|
||||
<key>ExecutablePath</key>
|
||||
@@ -314,7 +314,7 @@
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string></string>
|
||||
<string>16.0.0</string>
|
||||
<key>BundlePath</key>
|
||||
<string>AAAMouSSE.kext</string>
|
||||
<key>ExecutablePath</key>
|
||||
@@ -592,42 +592,6 @@
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
<key>Comment</key>
|
||||
<string>AppleBacklightFixup - Modded Nvidia GPUs</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string></string>
|
||||
<key>BundlePath</key>
|
||||
<string>AppleBacklightFixup.kext</string>
|
||||
<key>ExecutablePath</key>
|
||||
<string>Contents/MacOS/AppleBacklightFixup</string>
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
<key>Comment</key>
|
||||
<string>NightShiftEnabler</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string></string>
|
||||
<key>BundlePath</key>
|
||||
<string>NightShiftEnabler.kext</string>
|
||||
<key>ExecutablePath</key>
|
||||
<string>Contents/MacOS/NightShiftEnabler</string>
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
@@ -638,7 +602,7 @@
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string></string>
|
||||
<string>15.0.0</string>
|
||||
<key>BundlePath</key>
|
||||
<string>CPUFriend.kext</string>
|
||||
<key>ExecutablePath</key>
|
||||
@@ -656,7 +620,7 @@
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string></string>
|
||||
<string>15.0.0</string>
|
||||
<key>BundlePath</key>
|
||||
<string>CPUFriendDataProvider.kext</string>
|
||||
<key>ExecutablePath</key>
|
||||
@@ -764,7 +728,7 @@
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string></string>
|
||||
<string>12.0.0</string>
|
||||
<key>BundlePath</key>
|
||||
<string>CpuTscSync.kext</string>
|
||||
<key>ExecutablePath</key>
|
||||
@@ -782,7 +746,7 @@
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string></string>
|
||||
<string>14.0.0</string>
|
||||
<key>BundlePath</key>
|
||||
<string>HibernationFixup.kext</string>
|
||||
<key>ExecutablePath</key>
|
||||
@@ -800,7 +764,7 @@
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string></string>
|
||||
<string>18.0.0</string>
|
||||
<key>BundlePath</key>
|
||||
<string>NVMeFix.kext</string>
|
||||
<key>ExecutablePath</key>
|
||||
@@ -940,7 +904,7 @@
|
||||
<key>BundlePath</key>
|
||||
<string>DebugEnhancer.kext</string>
|
||||
<key>Comment</key>
|
||||
<string></string>
|
||||
<string>Enhance DEBUG output in system logs</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>ExecutablePath</key>
|
||||
@@ -948,7 +912,25 @@
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string>12.0.0</string>
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
<key>BundlePath</key>
|
||||
<string>latebloom.kext</string>
|
||||
<key>Comment</key>
|
||||
<string>Work-around PCI race condition</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>ExecutablePath</key>
|
||||
<string>Contents/MacOS/latebloom</string>
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string>20.4.0</string>
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
@@ -1091,7 +1073,8 @@
|
||||
<key>Misc</key>
|
||||
<dict>
|
||||
<key>BlessOverride</key>
|
||||
<array/>
|
||||
<array>
|
||||
</array>
|
||||
<key>Boot</key>
|
||||
<dict>
|
||||
<key>ConsoleAttributes</key>
|
||||
@@ -1141,9 +1124,7 @@
|
||||
<integer>3</integer>
|
||||
</dict>
|
||||
<key>Entries</key>
|
||||
<array>
|
||||
<string>\EFI\Microsoft\Boot\bootmgfw.efi</string>
|
||||
</array>
|
||||
<array/>
|
||||
<key>Security</key>
|
||||
<dict>
|
||||
<key>AllowNvramReset</key>
|
||||
|
||||
BIN
payloads/Kexts/Misc/latebloom-v0.19.zip
Normal file
BIN
payloads/Kexts/Misc/latebloom-v0.19.zip
Normal file
Binary file not shown.
BIN
payloads/Tools/ocvalidate
Executable file
BIN
payloads/Tools/ocvalidate
Executable file
Binary file not shown.
Reference in New Issue
Block a user