mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-18 21:30:00 +10:00
Add XHCI UEFI Driver
This commit is contained in:
@@ -476,6 +476,21 @@ class BuildOpenCore:
|
||||
print("- Adding Mac Pro, Xserve DRM patches")
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " shikigva=128 unfairgva=1 -wegtree"
|
||||
|
||||
# Add XhciDxe if firmware doesn't have XHCI controller support and XCHI controller detected
|
||||
if self.model not in ModelArray.XhciSupport and not self.constants.custom_model:
|
||||
devices = plistlib.loads(subprocess.run("ioreg -c IOPCIDevice -r -d2 -a".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
||||
try:
|
||||
devices = [i for i in devices if i["class-code"] == binascii.unhexlify(self.constants.classcode_xhci)]
|
||||
vendor_id = self.hexswap(binascii.hexlify(devices[0]["vendor-id"]).decode()[:4])
|
||||
device_id = self.hexswap(binascii.hexlify(devices[0]["device-id"]).decode()[:4])
|
||||
print("- Found XHCI Controller, adding Boot Support")
|
||||
shutil.copy(self.constants.xhci_driver_path, self.constants.drivers_path)
|
||||
self.config["UEFI"]["Drivers"] += ["XhciDxe.efi"]
|
||||
except ValueError:
|
||||
print("- No XHCI Controller Found (V)")
|
||||
except IndexError:
|
||||
print("- No XHCI Controller Found (I)")
|
||||
|
||||
# Add OpenCanopy
|
||||
print("- Adding OpenCanopy GUI")
|
||||
shutil.rmtree(self.constants.resources_path, onerror=rmtree_handler)
|
||||
|
||||
Reference in New Issue
Block a user