diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d873c03a..4c94b2272 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ - Allows for easier identification of version when reporting issues - Drop usage of `HW_BID` rerouting in boot.efi - Patch out PlatformSupport.plist instead, allows for less maintenance overall +- Add support for AMD GOP injection (AMDGOP.efi) + - For MXM iMacs and Mac Pros with GPU VBIOS lacking GOP support (ie. no UEFI output even after OC loads) - Increment Binaries: - AirPortBrcmFixup 2.1.6 - release - AppleALC 1.7.6 - release diff --git a/gui/gui_main.py b/gui/gui_main.py index cdef089ad..ecb44129f 100644 --- a/gui/gui_main.py +++ b/gui/gui_main.py @@ -2480,13 +2480,24 @@ class wx_python_gui: self.timeout_spinner.Bind(wx.EVT_SPINCTRL, self.timeout_spinner_click) self.timeout_spinner.Centre(wx.HORIZONTAL) + # AMD GOP Injection + self.set_gop_injection = wx.CheckBox(self.frame_modal, label="AMD GOP Injection") + self.set_gop_injection.SetPosition(wx.Point( + 30, + self.timeout_spinner.GetPosition().y + self.timeout_spinner.GetSize().height + 5)) + self.set_gop_injection.SetValue(self.constants.gop_injection) + self.set_gop_injection.Bind(wx.EVT_CHECKBOX, self.gop_injection_checkbox_click) + models = ["iMac10,1", "iMac11,1", "iMac11,2", "iMac11,3", "iMac12,1", "iMac12,2", "MacPro3,1", "MacPro4,1", "MacPro5,1", "Xserve2,1", "Xserve3,1"] + if (not self.constants.custom_model and self.computer.real_model not in models) or (self.constants.custom_model and self.constants.custom_model not in models): + self.set_gop_injection.Disable() + # Disable Thunderbolt self.disable_thunderbolt_checkbox = wx.CheckBox(self.frame_modal, label="Disable Thunderbolt") self.disable_thunderbolt_checkbox.SetValue(self.constants.disable_tb) self.disable_thunderbolt_checkbox.Bind(wx.EVT_CHECKBOX, self.disable_tb_click) self.disable_thunderbolt_checkbox.SetPosition(wx.Point( - 30, - self.timeout_spinner.GetPosition().y + self.timeout_spinner.GetSize().height + 5)) + self.set_gop_injection.GetPosition().x, + self.set_gop_injection.GetPosition().y + self.set_gop_injection.GetSize().height)) self.disable_thunderbolt_checkbox.SetToolTip(wx.ToolTip("Disables Thunderbolt support on MacBookPro11,x\nMainly applicable for systems that cannot boot with Thunderbolt enabled")) if not self.constants.custom_model and not self.computer.real_model.startswith("MacBookPro11"): self.disable_thunderbolt_checkbox.Disable() @@ -2745,6 +2756,14 @@ class wx_python_gui: print("Content Caching Disabled") self.constants.set_content_caching = False + def gop_injection_checkbox_click(self, event=None): + if self.set_gop_injection.GetValue(): + print("GOP Injection Enabled") + self.constants.gop_injection = True + else: + print("GOP Injection Disabled") + self.constants.gop_injection = False + def disable_tb_click(self, event=None): if self.disable_thunderbolt_checkbox.GetValue(): print("Disable Thunderbolt Enabled") diff --git a/payloads/Config/config.plist b/payloads/Config/config.plist index bcd195a03..4119e1f94 100644 --- a/payloads/Config/config.plist +++ b/payloads/Config/config.plist @@ -2505,6 +2505,18 @@ LoadEarly + + Comment + + Path + AMDGOP.efi + Enabled + + Arguments + + LoadEarly + + Input diff --git a/payloads/Drivers/AMDGOP.efi b/payloads/Drivers/AMDGOP.efi new file mode 100644 index 000000000..b1bbcc282 Binary files /dev/null and b/payloads/Drivers/AMDGOP.efi differ diff --git a/resources/build/graphics_audio.py b/resources/build/graphics_audio.py index c50f4c960..250313cd7 100644 --- a/resources/build/graphics_audio.py +++ b/resources/build/graphics_audio.py @@ -277,6 +277,12 @@ class build_graphics_audio: self.config["UEFI"]["Quirks"]["ForgeUefiSupport"] = True self.config["UEFI"]["Quirks"]["ReloadOptionRoms"] = True + # AMD GOP VBIOS injection for AMD GCN 1-4 GPUs + if self.constants.gop_injection is True: + print("- Adding AMDGOP.efi") + shutil.copy(self.constants.amd_gop_driver_path, self.constants.drivers_path) + support.build_support(self.model, self.constants, self.config).get_efi_binary_by_path("AMDGOP.efi", "UEFI", "Drivers")["Enabled"] = True + def spoof_handling(self): if self.constants.serial_settings == "None": return diff --git a/resources/constants.py b/resources/constants.py index 30f9ccf1e..a999e21bd 100644 --- a/resources/constants.py +++ b/resources/constants.py @@ -177,6 +177,7 @@ class Constants: self.allow_ts2_accel = True # Set TeraScale 2 Acceleration support self.force_nv_web = False # Force Nvidia Web Drivers on Tesla and Kepler self.force_output_support = False # Force Output support for Mac Pros with PC VBIOS + self.gop_injection = False # Set GOP Injection support ## Miscellaneous self.disallow_cpufriend = False # Disable CPUFriend @@ -248,6 +249,10 @@ class Constants: def exfat_legacy_driver_path(self): return self.payload_path / Path("Drivers/ExFatDxeLegacy.efi") + @property + def amd_gop_driver_path(self): + return self.payload_path / Path("Drivers/AMDGOP.efi") + @property def xhci_driver_path(self): return self.payload_path / Path("Drivers/XhciDxe.efi")