mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-13 20:28:21 +10:00
Add Apple RAID Card support
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
- Fix Wifi Password prompt in Monterey on legacy wifi
|
||||
- Applicable for Atheros, BCM94328, BCM94322
|
||||
- Fix OpenCL Acceleration on Ivy Bridge and Kepler
|
||||
- Add Apple RAID Card support
|
||||
|
||||
## 0.3.1
|
||||
- Increment Binaries:
|
||||
|
||||
@@ -1119,7 +1119,7 @@
|
||||
<key>BundlePath</key>
|
||||
<string>LegacyUSBVideoSupport.kext</string>
|
||||
<key>Comment</key>
|
||||
<string>Legayc iSight support</string>
|
||||
<string>Legacy iSight support</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>ExecutablePath</key>
|
||||
@@ -1131,6 +1131,24 @@
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
<key>BundlePath</key>
|
||||
<string>AppleRAIDCard.kext</string>
|
||||
<key>Comment</key>
|
||||
<string>RAID Card Support</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>ExecutablePath</key>
|
||||
<string>Contents/MacOS/AppleRAIDCard</string>
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string>19.0.0</string>
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>Block</key>
|
||||
<array/>
|
||||
|
||||
BIN
payloads/Kexts/Misc/AppleRAIDCard-v1.0.0.zip
Normal file
BIN
payloads/Kexts/Misc/AppleRAIDCard-v1.0.0.zip
Normal file
Binary file not shown.
@@ -718,6 +718,19 @@ class BuildOpenCore:
|
||||
print("- Adding SATA Hibernation Patch")
|
||||
self.config["Kernel"]["Quirks"]["ThirdPartyDrives"] = True
|
||||
break
|
||||
|
||||
# Apple RAID Card check
|
||||
if not self.constants.custom_model:
|
||||
if self.computer.storage:
|
||||
for storage_controller in self.computer.storage:
|
||||
if storage_controller.vendor_id == 0x106b and storage_controller.device_id == 0x008A:
|
||||
# AppleRAIDCard.kext only supports pci106b,8a
|
||||
self.enable_kext("AppleRAIDCard.kext", self.constants.apple_raid_version, self.constants.apple_raid_path)
|
||||
break
|
||||
elif self.model.startswith("XServe"):
|
||||
# For XServes, assume RAID is present
|
||||
# Namely due to Xserve2,1 being limited to 10.7, thus no hardware detection
|
||||
self.enable_kext("AppleRAIDCard.kext", self.constants.apple_raid_version, self.constants.apple_raid_path)
|
||||
|
||||
# DEBUG Settings
|
||||
if self.constants.verbose_debug is True:
|
||||
|
||||
@@ -47,7 +47,8 @@ class Constants:
|
||||
self.piixata_version = "1.0.1" # AppleIntelPIIXATA
|
||||
self.fw_kext = "1.0.1" # IOFireWireFamily
|
||||
self.apple_trackpad = "1.0.1" # AppleUSBTrackpad
|
||||
self.apple_isight_version = "1.0.0" # AppleISight
|
||||
self.apple_isight_version = "1.0.0" # AppleiSight
|
||||
self.apple_raid_version = "1.0.0" # AppleRAIDCard
|
||||
|
||||
## Apple - Dortania Modified
|
||||
self.bcm570_version = "1.0.2" # CatalinaBCM5701Ethernet
|
||||
@@ -349,6 +350,10 @@ class Constants:
|
||||
@property
|
||||
def apple_isight_path(self):
|
||||
return self.payload_kexts_path / Path(f"Misc/LegacyUSBVideoSupport-v{self.apple_isight_version}.zip")
|
||||
|
||||
@property
|
||||
def apple_raid_path(self):
|
||||
return self.payload_kexts_path / Path(f"Misc/AppleRAIDCard-v{self.apple_raid_version}.zip")
|
||||
|
||||
@property
|
||||
def plist_folder_path(self):
|
||||
|
||||
@@ -154,6 +154,10 @@ class NVMeController(PCIDevice):
|
||||
class SATAController(PCIDevice):
|
||||
CLASS_CODE: ClassVar[int] = 0x010601
|
||||
|
||||
@dataclass
|
||||
class SASController(PCIDevice):
|
||||
CLASS_CODE: ClassVar[int] = 0x010400
|
||||
|
||||
|
||||
@dataclass
|
||||
class NVIDIA(GPU):
|
||||
@@ -417,6 +421,14 @@ class Computer:
|
||||
None,
|
||||
)[1]
|
||||
)
|
||||
sas_controllers = ioreg.ioiterator_to_list(
|
||||
ioreg.IOServiceGetMatchingServices(
|
||||
ioreg.kIOMasterPortDefault,
|
||||
{"IOProviderClass": "IOPCIDevice", "IOPropertyMatch": [{"class-code": binascii.a2b_hex(utilities.hexswap(hex(SASController.CLASS_CODE)[2:].zfill(8)))}]},
|
||||
None,
|
||||
)[1]
|
||||
)
|
||||
|
||||
nvme_controllers = ioreg.ioiterator_to_list(
|
||||
ioreg.IOServiceGetMatchingServices(
|
||||
ioreg.kIOMasterPortDefault, {"IOProviderClass": "IONVMeController", "IOParentMatch": {"IOProviderClass": "IOPCIDevice"}, "IOPropertyMatch": {"IOClass": "IONVMeController"}}, None
|
||||
@@ -425,6 +437,11 @@ class Computer:
|
||||
for device in sata_controllers:
|
||||
self.storage.append(SATAController.from_ioregistry(device))
|
||||
ioreg.IOObjectRelease(device)
|
||||
|
||||
for device in sas_controllers:
|
||||
self.storage.append(SASController.from_ioregistry(device))
|
||||
ioreg.IOObjectRelease(device)
|
||||
|
||||
for device in nvme_controllers:
|
||||
parent = ioreg.IORegistryEntryGetParentEntry(device, "IOService".encode(), None)[1]
|
||||
ioreg.IOObjectRelease(device)
|
||||
|
||||
Reference in New Issue
Block a user