mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-24 20:10:14 +10:00
build: Add AMD GOP injection
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -2505,6 +2505,18 @@
|
||||
<key>LoadEarly</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Comment</key>
|
||||
<string></string>
|
||||
<key>Path</key>
|
||||
<string>AMDGOP.efi</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>Arguments</key>
|
||||
<string></string>
|
||||
<key>LoadEarly</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</array>
|
||||
<key>Input</key>
|
||||
<dict>
|
||||
|
||||
BIN
payloads/Drivers/AMDGOP.efi
Normal file
BIN
payloads/Drivers/AMDGOP.efi
Normal file
Binary file not shown.
@@ -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
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user