mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-20 02:34:33 +10:00
Allow Legacy Acceleration Patches on Mac Pros and Xserves
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
- Note ATI/AMD TeraScale 2 unsupported (HD 5/6000)
|
- Note ATI/AMD TeraScale 2 unsupported (HD 5/6000)
|
||||||
- Add better kmutil crash handling
|
- Add better kmutil crash handling
|
||||||
- Fix build crashing when no wifi card is present
|
- Fix build crashing when no wifi card is present
|
||||||
|
- Allow Legacy Acceleration Patches on Mac Pros and Xserves
|
||||||
|
|
||||||
## 0.1.0
|
## 0.1.0
|
||||||
- Fix crash on iMacs with Metal GPUs
|
- Fix crash on iMacs with Metal GPUs
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ system_profiler SPHardwareDataType | grep 'Model Identifier'
|
|||||||
[f"DRM Preferences:\t\t\tCurrently {self.constants.drm_support}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).drm_setting],
|
[f"DRM Preferences:\t\t\tCurrently {self.constants.drm_support}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).drm_setting],
|
||||||
[f"Set Generic Bootstrap:\t\t{self.constants.boot_efi}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).bootstrap_setting],
|
[f"Set Generic Bootstrap:\t\t{self.constants.boot_efi}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).bootstrap_setting],
|
||||||
[f"Set Accleration Patches:\t\t{self.constants.legacy_acceleration_patch}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).accel_setting],
|
[f"Set Accleration Patches:\t\t{self.constants.legacy_acceleration_patch}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).accel_setting],
|
||||||
|
[f"Assume Legacy GPU:\t\t\t{self.constants.assume_legacy}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).force_accel_setting],
|
||||||
]
|
]
|
||||||
|
|
||||||
for option in options:
|
for option in options:
|
||||||
|
|||||||
@@ -295,3 +295,20 @@ important data backed up in case of emergencies
|
|||||||
self.constants.legacy_acceleration_patch = False
|
self.constants.legacy_acceleration_patch = False
|
||||||
else:
|
else:
|
||||||
print("Invalid option")
|
print("Invalid option")
|
||||||
|
|
||||||
|
|
||||||
|
def force_accel_setting(self):
|
||||||
|
Utilities.cls()
|
||||||
|
Utilities.header(["Assume Legacy GPU"])
|
||||||
|
print("""Allows any model to force install Legacy Acceleration
|
||||||
|
patches. Only required for Mac Pro and Xserve users.
|
||||||
|
|
||||||
|
DO NOT RUN IF METAL GPU IS INSTALLED
|
||||||
|
""")
|
||||||
|
change_menu = input("Enable Beta Acceleration Patches(y/n): ")
|
||||||
|
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||||
|
self.constants.assume_legacy = True
|
||||||
|
elif change_menu in {"n", "N", "no", "No"}:
|
||||||
|
self.constants.assume_legacy = False
|
||||||
|
else:
|
||||||
|
print("Invalid option")
|
||||||
@@ -71,6 +71,7 @@ class Constants:
|
|||||||
self.boot_efi = False
|
self.boot_efi = False
|
||||||
self.drm_support = False
|
self.drm_support = False
|
||||||
self.legacy_acceleration_patch = False
|
self.legacy_acceleration_patch = False
|
||||||
|
self.assume_legacy = False
|
||||||
|
|
||||||
# OS Versions
|
# OS Versions
|
||||||
self.tiger = 8
|
self.tiger = 8
|
||||||
|
|||||||
@@ -205,7 +205,7 @@ class PatchSysVolume:
|
|||||||
print("- Preparing Files")
|
print("- Preparing Files")
|
||||||
subprocess.run(f"sudo find {self.constants.payload_apple_root_path} -name '.DS_Store' -delete".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
subprocess.run(f"sudo find {self.constants.payload_apple_root_path} -name '.DS_Store' -delete".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||||
|
|
||||||
if self.model in ModelArray.LegacyGPU:
|
if self.model in ModelArray.LegacyGPU or self.constants.assume_legacy is True:
|
||||||
self.check_pciid()
|
self.check_pciid()
|
||||||
if self.dgpu_devices and self.dgpu_vendor == self.constants.pci_amd_ati and self.dgpu_device in ModelArray.AMDMXMGPUs:
|
if self.dgpu_devices and self.dgpu_vendor == self.constants.pci_amd_ati and self.dgpu_device in ModelArray.AMDMXMGPUs:
|
||||||
print("- Detected Metal-based AMD GPU, skipping legacy patches")
|
print("- Detected Metal-based AMD GPU, skipping legacy patches")
|
||||||
@@ -351,7 +351,7 @@ class PatchSysVolume:
|
|||||||
# Check SIP
|
# Check SIP
|
||||||
if self.constants.custom_model is not None:
|
if self.constants.custom_model is not None:
|
||||||
print("Root Patching must be done on target machine!")
|
print("Root Patching must be done on target machine!")
|
||||||
elif self.model in ModelArray.NoRootPatch11:
|
elif self.model in ModelArray.NoRootPatch11 and self.constants.assume_legacy is False:
|
||||||
print("Root Patching not required for this machine!")
|
print("Root Patching not required for this machine!")
|
||||||
elif self.model not in ModelArray.SupportedSMBIOS:
|
elif self.model not in ModelArray.SupportedSMBIOS:
|
||||||
print("Cannot run on this machine, model is unsupported!")
|
print("Cannot run on this machine, model is unsupported!")
|
||||||
|
|||||||
Reference in New Issue
Block a user