build: Add proper TS0128F/256F detection

This commit is contained in:
Mykola Grymalyuk
2022-12-24 12:13:19 -07:00
parent f55d3ba5b2
commit a8ef84acf9
2 changed files with 13 additions and 2 deletions

View File

@@ -9,6 +9,9 @@
- Resolve `/Library/Extensions` not being cleaned on KDK-less root patches
- Add AMD Vega Graphics support for pre-AVX2.0 systems on Ventura
- ex. AMD Vega 56 and 64, AMD Radeon VII
- Implement proper `APPLE SSD TS0128F/256F` detection
- Allows all Macs to utilize patch if required
- Avoids usage of patch when host lacks affected drive (ex. MacBookAir6,x with upgraded SSD)
- Increment Binaries:
- PatcherSupportPkg 0.7.3 - release

View File

@@ -24,8 +24,16 @@ class build_storage:
def ahci_handling(self):
# MacBookAir6,x ship with an AHCI over PCIe SSD model 'APPLE SSD TS0128F' and 'APPLE SSD TS0256F'
# This controller is not supported properly in macOS Ventura, instead populating itself as 'Media' with no partitions
# To work-around this, use Monterey's AppleAHCI driver to force
if self.model in ["MacBookAir6,1", "MacBookAir6,2"]:
# To work-around this, use Monterey's AppleAHCI driver to force support
if not self.constants.custom_model:
sata_devices = [i for i in self.computer.storage if isinstance(i, device_probe.SATAController)]
for controller in enumerate(sata_devices):
# https://linux-hardware.org/?id=pci:1179-010b-1b4b-9183
if controller.vendor_id == 0x1179 and controller.device_id == 0x010b:
print("- Enabling AHCI SSD patch")
support.build_support(self.model, self.constants, self.config).enable_kext("MonteAHCIPort.kext", self.constants.monterey_ahci_version, self.constants.monterey_ahci_path)
break
elif self.model in ["MacBookAir6,1", "MacBookAir6,2"]:
print("- Enabling AHCI SSD patch")
support.build_support(self.model, self.constants, self.config).enable_kext("MonteAHCIPort.kext", self.constants.monterey_ahci_version, self.constants.monterey_ahci_path)