mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-19 05:40:01 +10:00
Add NVMe and FireWire support
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/267
This commit is contained in:
@@ -395,6 +395,14 @@ class BuildOpenCore:
|
||||
else:
|
||||
self.config["DeviceProperties"]["Add"][hdef_path] = {"apple-layout-id": 90, "use-apple-layout-id": 1, "use-layout-id": 1, }
|
||||
|
||||
# Enable FireWire Boot Support
|
||||
if self.constants.firewire_boot is True and self.model not in ModelArray.NoFireWireSupport:
|
||||
print("- Enabling FireWire Boot Support")
|
||||
self.enable_kext("IOFireWireFamily.kext", self.constants.fw_kext, self.constants.fw_family_path)
|
||||
self.enable_kext("IOFireWireSBP2.kext", self.constants.fw_kext, self.constants.fw_sbp2_path)
|
||||
self.enable_kext("IOFireWireSerialBusProtocolTransport.kext", self.constants.fw_kext, self.constants.fw_bus_path)
|
||||
self.get_kext_by_bundle_path("IOFireWireFamily.kext/Contents/PlugIns/AppleFWOHCI.kext")["Enabled"] = True
|
||||
|
||||
def backlight_path_detection(self):
|
||||
if not self.constants.custom_model:
|
||||
dgpu_vendor,dgpu_device,dgpu_acpi = DeviceProbe.pci_probe().gpu_probe("GFX0")
|
||||
@@ -537,6 +545,11 @@ class BuildOpenCore:
|
||||
except IndexError:
|
||||
print("- No XHCI Controller Found (I)")
|
||||
|
||||
if self.constants.nvme_boot is True:
|
||||
print("- Enabling NVMe boot support")
|
||||
shutil.copy(self.constants.nvme_driver_path, self.constants.drivers_path)
|
||||
self.config["UEFI"]["Drivers"] += ["NvmExpressDxe.efi"]
|
||||
|
||||
# Add OpenCanopy
|
||||
print("- Adding OpenCanopy GUI")
|
||||
shutil.rmtree(self.constants.resources_path, onerror=rmtree_handler)
|
||||
|
||||
@@ -438,3 +438,49 @@ Valid options:
|
||||
self.constants.override_smbios = self.constants.custom_model or self.current_model
|
||||
else:
|
||||
print("Returning to main menu")
|
||||
|
||||
def allow_firewire(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Allow FireWire Boot Support"])
|
||||
print("""
|
||||
In macOS Catalina and newer, Apple restricted
|
||||
usage of FireWire devices to boot macOS for
|
||||
security concerns relating to DMA access.
|
||||
|
||||
If you are comfortable lowering the security,
|
||||
you can re-enable FireWire support for Catalina
|
||||
and newer.
|
||||
|
||||
Note: MacBook5,x-7,1 don't support FireWire boot
|
||||
""")
|
||||
|
||||
change_menu = input("Enable FireWire Boot support?(y/n): ")
|
||||
if change_menu == "y":
|
||||
self.constants.firewire_boot = True
|
||||
elif change_menu == "n":
|
||||
self.constants.firewire_boot = False
|
||||
else:
|
||||
print("Invalid option")
|
||||
|
||||
def allow_nvme(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Allow NVMe UEFI Support"])
|
||||
print("""
|
||||
For machines not natively supporting NVMe,
|
||||
this option allows you to see and boot NVMe
|
||||
drive in OpenCore's picker
|
||||
|
||||
Not required if your machine natively supports NVMe
|
||||
|
||||
Note: You must have OpenCore on a bootable volume
|
||||
first, ie. USB or SATA drive. Once loaded,
|
||||
OpenCore will enable NVMe support in it's picker
|
||||
""")
|
||||
|
||||
change_menu = input("Enable NVMe Boot support?(y/n): ")
|
||||
if change_menu == "y":
|
||||
self.constants.nvme_boot = True
|
||||
elif change_menu == "n":
|
||||
self.constants.nvme_boot = False
|
||||
else:
|
||||
print("Invalid option")
|
||||
@@ -39,6 +39,7 @@ class Constants:
|
||||
self.nvmefix_version = "1.0.7"
|
||||
self.sidecarfixup_version = "1.0.0"
|
||||
self.innie_version = "1.3.0"
|
||||
self.fw_kext = "1.0.0"
|
||||
self.payload_version = "0.0.8"
|
||||
|
||||
# Get resource path
|
||||
@@ -81,6 +82,8 @@ class Constants:
|
||||
self.recovery_status = False
|
||||
self.override_smbios = "Default"
|
||||
self.apecid_support = False
|
||||
self.firewire_boot = False
|
||||
self.nvme_boot = False
|
||||
|
||||
# OS Versions
|
||||
self.tiger = 8
|
||||
@@ -209,6 +212,12 @@ class Constants:
|
||||
def plist_folder_path(self): return self.payload_kexts_path / Path(f"Plists")
|
||||
@property
|
||||
def platform_plugin_plist_path(self): return self.plist_folder_path / Path(f"PlatformPlugin")
|
||||
@property
|
||||
def fw_family_path(self): return self.payload_kexts_path / Path(f"FireWire/IOFireWireFamily-v{self.fw_kext}.zip")
|
||||
@property
|
||||
def fw_sbp2_path(self): return self.payload_kexts_path / Path(f"FireWire/IOFireWireSBP2-v{self.fw_kext}.zip")
|
||||
@property
|
||||
def fw_bus_path(self): return self.payload_kexts_path / Path(f"FireWire/IOFireWireSerialBusProtocolTransport-v{self.fw_kext}.zip")
|
||||
|
||||
# Build Location
|
||||
@property
|
||||
|
||||
@@ -923,6 +923,16 @@ AMCSupport = [
|
||||
#"MacBookPro10,1"
|
||||
]
|
||||
|
||||
NoFireWireSupport = [
|
||||
"MacBook5,1",
|
||||
"MacBook6,1",
|
||||
"MacBook7,1",
|
||||
"MacBookAir1,1",
|
||||
"MacBookAir2,1",
|
||||
"MacBookAir3,1",
|
||||
"MacBookAir3,2",
|
||||
]
|
||||
|
||||
DeleteNvidiaAccel11 = [
|
||||
"AMDRadeonX4000.kext",
|
||||
"AMDRadeonX4000HWServices.kext",
|
||||
|
||||
Reference in New Issue
Block a user