Correct condition to avoid XHCI-unsupported kext on AMD systems

This commit is contained in:
Hoang Hong Quan
2024-12-31 13:54:32 +07:00
parent 6045068c40
commit 1b14d26ff9

View File

@@ -1,7 +1,6 @@
from Scripts.datasets import cpu_data
from Scripts.datasets import kext_data
from Scripts.datasets import mac_model_data
from Scripts.datasets import os_data
from Scripts.datasets import pci_data
from Scripts.datasets import codec_layouts
@@ -245,8 +244,9 @@ class KextMaestro:
device_id = controller_props.get("Device ID")
if device_id in pci_data.UnsupportedUSBControllerIDs:
idx = pci_data.UnsupportedUSBControllerIDs.index(device_id)
if idx == 0 and "Laptop" in hardware_report.get("Motherboard").get("Platform"):
selected_kexts.append("GenericUSBXHCI")
if idx == 0:
if "Laptop" in hardware_report.get("Motherboard").get("Platform"):
selected_kexts.append("GenericUSBXHCI")
else:
selected_kexts.append("XHCI-unsupported")
@@ -319,7 +319,7 @@ class KextMaestro:
for bundle_identifier, bundle_version in bundle_info.get("OSBundleLibraries", {}).items()
}
}
def modify_kexts(self, plist_path, hardware_report, macos_version):
try:
bundle_info = self.utils.read_file(plist_path)