mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-13 20:28:21 +10:00
Add ThirdPartyDrives quirk configurability
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/822
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
- Resolves certain Samsung NVMe drives appearing as external on Mac Pros
|
||||
- Add FeatureUnlock configurability
|
||||
- Add NVRAM WriteFlash configurability for degarded/fragile systems
|
||||
- Add `ThirdPartyDrives` quirk configurability
|
||||
|
||||
## 0.3.3
|
||||
- Disable Asset Caching support with spoofless approach
|
||||
|
||||
@@ -771,17 +771,18 @@ class BuildOpenCore:
|
||||
pass
|
||||
|
||||
# ThirdPartDrives Check
|
||||
for drive in ["SATA 2.5", "SATA 3.5", "mSATA"]:
|
||||
if drive in smbios_data.smbios_dictionary[self.model]["Stock Storage"]:
|
||||
if not self.constants.custom_model:
|
||||
if self.computer.third_party_sata_ssd is True:
|
||||
if self.constants.allow_3rd_party_drives is True:
|
||||
for drive in ["SATA 2.5", "SATA 3.5", "mSATA"]:
|
||||
if drive in smbios_data.smbios_dictionary[self.model]["Stock Storage"]:
|
||||
if not self.constants.custom_model:
|
||||
if self.computer.third_party_sata_ssd is True:
|
||||
print("- Adding SATA Hibernation Patch")
|
||||
self.config["Kernel"]["Quirks"]["ThirdPartyDrives"] = True
|
||||
break
|
||||
else:
|
||||
print("- Adding SATA Hibernation Patch")
|
||||
self.config["Kernel"]["Quirks"]["ThirdPartyDrives"] = True
|
||||
break
|
||||
else:
|
||||
print("- Adding SATA Hibernation Patch")
|
||||
self.config["Kernel"]["Quirks"]["ThirdPartyDrives"] = True
|
||||
break
|
||||
|
||||
# Apple RAID Card check
|
||||
if not self.constants.custom_model:
|
||||
|
||||
@@ -696,6 +696,29 @@ for Windows may prefer to only work with the dGPU and eGPU active.
|
||||
else:
|
||||
self.dGPU_switch_support()
|
||||
|
||||
def set_3rd_party_drices(self):
|
||||
utilities.cls()
|
||||
utilities.header(["Set enhanced 3rd Party SSD Support"])
|
||||
print(
|
||||
"""
|
||||
On SATA-based Macs, Apple restricts enhanced OS support to native
|
||||
drives. Namely hibernation and TRIM.
|
||||
|
||||
This option allows you to disable enhanced support in situations where
|
||||
TRIM is not ideal.
|
||||
"""
|
||||
)
|
||||
|
||||
change_menu = input("Set enhanced 3rd Party SSD Support?(y/n/q): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.allow_3rd_party_drives = True
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.allow_3rd_party_drives = False
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
self.set_3rd_party_drices()
|
||||
|
||||
def set_software_demux(self):
|
||||
utilities.cls()
|
||||
utilities.header(["Set Software Demux"])
|
||||
@@ -1112,6 +1135,7 @@ system_profiler SPHardwareDataType | grep 'Model Identifier'
|
||||
[f"Set Hibernation Workaround:\tCurrently {self.constants.disable_connectdrivers}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_hibernation_workaround],
|
||||
[f"Disable Battery Throttling:\tCurrently {self.constants.disable_msr_power_ctl}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_battery_throttle],
|
||||
[f"Set Software Demux:\tCurrently {self.constants.software_demux}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_software_demux],
|
||||
[f"Set 3rd Party SSD Support:\tCurrently {self.constants.allow_3rd_party_drives}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_3rd_party_drices],
|
||||
[f"Set FeatureUnlock: \tCurrently {self.constants.fu_status}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_fu_settings],
|
||||
[f"Set NVRAM Write:\t\tCurrently {self.constants.nvram_write}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_nvram_write],
|
||||
]
|
||||
|
||||
@@ -175,6 +175,7 @@ class Constants:
|
||||
self.custom_sip_value = None # Set custom SIP value
|
||||
self.walkthrough = False # Enable Walkthrough
|
||||
self.disable_connectdrivers = False # Disable ConnectDrivers (hibernation)
|
||||
self.allow_3rd_party_drives = True # Allow ThridPartyDrives quirk
|
||||
|
||||
self.legacy_accel_support = [
|
||||
os_data.os_data.mojave,
|
||||
|
||||
Reference in New Issue
Block a user