diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d6dc36b1..f4862ed82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # OpenCore Legacy Patcher changelog ## 0.1.7 +- Add FireWire Boot Support for Catalina and newer +- Add NVMe firmware support for older models (ie. MacPro3,1) + - OpenCore must be stored on a bootable volume (ie. USB or SATA) ## 0.1.6 - Add XHCI UEFI Driver for 3rd Party USB 3.0 Controllers diff --git a/OpenCore-Patcher.command b/OpenCore-Patcher.command index fb4c79816..7996d1787 100755 --- a/OpenCore-Patcher.command +++ b/OpenCore-Patcher.command @@ -100,6 +100,8 @@ system_profiler SPHardwareDataType | grep 'Model Identifier' [f"Enable Kext DEBUG:\t\t\tCurrently {self.constants.kext_debug}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).change_kext], [f"Set ShowPicker Mode:\t\tCurrently {self.constants.showpicker}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).change_showpicker], [f"Set Vault Mode:\t\t\tCurrently {self.constants.vault}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).change_vault], + [f"Allow FireWire Boot:\t\tCurrently {self.constants.firewire_boot}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).allow_firewire], + [f"Allow NVMe Boot:\t\t\tCurrently {self.constants.nvme_boot}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).allow_nvme], [f"Set SIP and SecureBootModel:\tSIP: {self.constants.sip_status} SBM: {self.constants.secure_status}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).change_sip], [f"Allow OpenCore on native Models:\tCurrently {self.constants.allow_oc_everywhere}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).allow_native_models], [f"Advanced Patch Settings, for developers only", self.advanced_patcher_settings], diff --git a/Resources/Build.py b/Resources/Build.py index 105bc282b..d3457bfe3 100644 --- a/Resources/Build.py +++ b/Resources/Build.py @@ -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) diff --git a/Resources/CliMenu.py b/Resources/CliMenu.py index 69c0839be..02abfe08f 100644 --- a/Resources/CliMenu.py +++ b/Resources/CliMenu.py @@ -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") \ No newline at end of file diff --git a/Resources/Constants.py b/Resources/Constants.py index 1f89fd05f..8e1de34b8 100644 --- a/Resources/Constants.py +++ b/Resources/Constants.py @@ -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 diff --git a/Resources/ModelArray.py b/Resources/ModelArray.py index 3d7629c68..330f818b2 100644 --- a/Resources/ModelArray.py +++ b/Resources/ModelArray.py @@ -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", diff --git a/payloads/Config/config.plist b/payloads/Config/config.plist index 25c5e1391..46f6eb42e 100644 --- a/payloads/Config/config.plist +++ b/payloads/Config/config.plist @@ -860,6 +860,78 @@ PlistPath Contents/Info.plist + + BundlePath + IOFireWireFamily.kext + Comment + + Enabled + + ExecutablePath + Contents/MacOS/IOFireWireFamily + Arch + Any + MaxKernel + + MinKernel + 19.0.0 + PlistPath + Contents/Info.plist + + + BundlePath + IOFireWireFamily.kext/Contents/PlugIns/AppleFWOHCI.kext + Comment + + Enabled + + ExecutablePath + Contents/MacOS/AppleFWOHCI + Arch + Any + MaxKernel + + MinKernel + 19.0.0 + PlistPath + Contents/Info.plist + + + BundlePath + IOFireWireSBP2.kext + Comment + + Enabled + + ExecutablePath + Contents/MacOS/IOFireWireSBP2 + Arch + Any + MaxKernel + + MinKernel + 19.0.0 + PlistPath + Contents/Info.plist + + + BundlePath + IOFireWireSerialBusProtocolTransport.kext + Comment + + Enabled + + ExecutablePath + Contents/MacOS/IOFireWireSerialBusProtocolTransport + Arch + Any + MaxKernel + + MinKernel + 19.0.0 + PlistPath + Contents/Info.plist + Block diff --git a/payloads/Kexts/FireWire/IOFireWireFamily-v1.0.0.zip b/payloads/Kexts/FireWire/IOFireWireFamily-v1.0.0.zip new file mode 100644 index 000000000..b1aa11e37 Binary files /dev/null and b/payloads/Kexts/FireWire/IOFireWireFamily-v1.0.0.zip differ diff --git a/payloads/Kexts/FireWire/IOFireWireSBP2-v1.0.0.zip b/payloads/Kexts/FireWire/IOFireWireSBP2-v1.0.0.zip new file mode 100644 index 000000000..27be5441b Binary files /dev/null and b/payloads/Kexts/FireWire/IOFireWireSBP2-v1.0.0.zip differ diff --git a/payloads/Kexts/FireWire/IOFireWireSerialBusProtocolTransport-v1.0.0.zip b/payloads/Kexts/FireWire/IOFireWireSerialBusProtocolTransport-v1.0.0.zip new file mode 100644 index 000000000..905aa4551 Binary files /dev/null and b/payloads/Kexts/FireWire/IOFireWireSerialBusProtocolTransport-v1.0.0.zip differ