Compare commits

...

9 Commits

Author SHA1 Message Date
Mykola Grymalyuk
fe107d271c Add HW_BID injection to fix boot.efi error
Closes https://github.com/dortania/Opencore-Legacy-Patcher/issues/83
2021-03-08 16:35:36 -07:00
Mykola Grymalyuk
90274eef33 Fix ThirdPartyDrives model detection
Reference: https://github.com/dortania/Opencore-Legacy-Patcher/issues/83
2021-03-07 12:43:12 -07:00
Mykola Grymalyuk
65cb3cf7f0 Use patcher_version variable for .app 2021-03-07 10:39:15 -07:00
Mykola Grymalyuk
bcf86801db Clarify SIP usage 2021-03-06 19:22:47 -07:00
Mykola Grymalyuk
8d6ba46c6f Add PanicNoKextDump for cleaner kernel panics 2021-03-06 19:21:11 -07:00
Mykola Grymalyuk
c556d4dd15 Add user-configurable Wifi and GPU patches 2021-03-06 19:01:27 -07:00
Mykola Grymalyuk
90b7ae4898 Add user-configurable OpenCore DEBUG builds 2021-03-06 17:57:30 -07:00
Mykola Grymalyuk
0a8f018332 Reduce OpenCanopy Resources size to 1/3 2021-03-06 17:35:38 -07:00
Mykola Grymalyuk
43b55435ba Increment build version 2021-03-06 17:29:21 -07:00
11 changed files with 143 additions and 47 deletions

View File

@@ -1,5 +1,11 @@
# OpenCore Legacy Patcher changelog # OpenCore Legacy Patcher changelog
## 0.0.15
- Add user-configurable OpenCore DEBUG builds
- Add user-configurable Wifi and GPU patches
- Fix ThirdPartyDrives model detection
- Add HW_BID injection to fix boot.efi error
## 0.0.14 ## 0.0.14
- Enable ThirdPartyDrives to aid with hibernation on 3rd party SATA drives - Enable ThirdPartyDrives to aid with hibernation on 3rd party SATA drives
- Increment OpenCore 7bb41aa (0.6.8 rolling, 2021-03-06) - Increment OpenCore 7bb41aa (0.6.8 rolling, 2021-03-06)

View File

@@ -35,8 +35,10 @@ system_profiler SPHardwareDataType | grep 'Model Identifier'
""") """)
self.constants.custom_model = input("Please enter the model identifier of the target machine: ").strip() self.constants.custom_model = input("Please enter the model identifier of the target machine: ").strip()
if self.constants.custom_model not in ModelArray.SupportedSMBIOS: if self.constants.custom_model not in ModelArray.SupportedSMBIOS:
print(f"{self.constants.custom_model} is not a valid SMBIOS Identifier!") print(f"""
print_models = input("Print list of valid options? (y/n)") {self.constants.custom_model} is not a valid SMBIOS Identifier for macOS {self.constants.os_support}!
""")
print_models = input(f"Print list of valid options for macOS {self.constants.os_support}? (y/n)")
if print_models in {"y", "Y", "yes", "Yes"}: if print_models in {"y", "Y", "yes", "Yes"}:
print("\n".join(ModelArray.SupportedSMBIOS)) print("\n".join(ModelArray.SupportedSMBIOS))
input("Press any key to continue...") input("Press any key to continue...")
@@ -54,6 +56,10 @@ Current target:\t{self.constants.os_support}
print("Unsupported entry") print("Unsupported entry")
else: else:
self.constants.os_support = temp_os_support self.constants.os_support = temp_os_support
if temp_os_support == 11.0:
ModelArray.SupportedSMBIOS = ModelArray.SupportedSMBIOS11
elif temp_os_support == 12.0:
ModelArray.SupportedSMBIOS = ModelArray.SupportedSMBIOS12
def change_verbose(self): def change_verbose(self):
utilities.cls() utilities.cls()
@@ -72,8 +78,10 @@ Current target:\t{self.constants.os_support}
change_oc_menu = input("Enable OpenCore DEBUG mode(y/n): ") change_oc_menu = input("Enable OpenCore DEBUG mode(y/n): ")
if change_oc_menu in {"y", "Y", "yes", "Yes"}: if change_oc_menu in {"y", "Y", "yes", "Yes"}:
self.constants.opencore_debug = True self.constants.opencore_debug = True
self.constants.opencore_build = "DEBUG"
elif change_oc_menu in {"n", "N", "no", "No"}: elif change_oc_menu in {"n", "N", "no", "No"}:
self.constants.opencore_debug = False self.constants.opencore_debug = False
self.constants.opencore_build = "RELEASE"
else: else:
print("Invalid option") print("Invalid option")
def change_kext(self): def change_kext(self):
@@ -87,6 +95,39 @@ Current target:\t{self.constants.os_support}
else: else:
print("Invalid option") print("Invalid option")
def change_metal(self):
utilities.cls()
utilities.header(["Assume Metal GPU Always in iMac"])
print("""This is for iMacs that have upgraded Metal GPUs, otherwise
Patcher assumes based on stock configuration (ie. iMac10,x-12,x)
Note: Patcher will detect whether hardware has been upgraded regardless, this
option is for those patching on a different machine.
""")
change_kext_menu = input("Enable Metal GPU build algorithm?(y/n): ")
if change_kext_menu in {"y", "Y", "yes", "Yes"}:
self.constants.metal_build = True
elif change_kext_menu in {"n", "N", "no", "No"}:
self.constants.metal_build = False
else:
print("Invalid option")
def change_wifi(self):
utilities.cls()
utilities.header(["Assume Upgraded Wifi Always"])
print("""This is for Macs with upgraded wifi cards(ie. BCM94360/2)
Note: Patcher will detect whether hardware has been upgraded regardless, this
option is for those patching on a different machine.
""")
change_kext_menu = input("Enable Upgraded Wifi build algorithm?(y/n): ")
if change_kext_menu in {"y", "Y", "yes", "Yes"}:
self.constants.wifi_build = True
elif change_kext_menu in {"n", "N", "no", "No"}:
self.constants.wifi_build = False
else:
print("Invalid option")
def patcher_settings(self): def patcher_settings(self):
response = None response = None
while not (response and response == -1): while not (response and response == -1):
@@ -96,11 +137,12 @@ Current target:\t{self.constants.os_support}
menu = utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True) menu = utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True)
options = [ options = [
# TODO: Enable setting OS target when more OSes become supported by the patcher # TODO: Enable setting OS target when more OSes become supported by the patcher
#[f"Change OS version:\t\tCurrently macOS {self.constants.os_support}", self.change_os], #[f"Change OS version:\t\t\tCurrently macOS {self.constants.os_support}", self.change_os],
[f"Enable Verbose Mode:\tCurrently {self.constants.verbose_debug}", self.change_verbose], [f"Enable Verbose Mode:\t\tCurrently {self.constants.verbose_debug}", self.change_verbose],
# TODO: Enable setting OC DEBUG when path handling for DEBUg files is resolved [f"Enable OpenCore DEBUG:\t\tCurrently {self.constants.opencore_debug}", self.change_oc],
#[f"Enable OpenCore DEBUG:\tCurrently {self.constants.opencore_debug}", self.change_oc], [f"Enable Kext DEBUG:\t\t\tCurrently {self.constants.kext_debug}", self.change_kext],
[f"Enable Kext DEBUG:\t\tCurrently {self.constants.kext_debug}", self.change_kext] [f"Assume Metal GPU Always:\t\tCurrently {self.constants.kext_debug}", self.change_metal],
[f"Assume Upgraded Wifi Always:\tCurrently {self.constants.kext_debug}", self.change_wifi],
] ]
for option in options: for option in options:
@@ -124,10 +166,12 @@ Current target:\t{self.constants.os_support}
def main_menu(self): def main_menu(self):
response = None response = None
ModelArray.SupportedSMBIOS = ModelArray.SupportedSMBIOS11
while not (response and response == -1): while not (response and response == -1):
title = [ title = [
f"OpenCore Legacy Patcher v{self.constants.patcher_version}", f"OpenCore Legacy Patcher v{self.constants.patcher_version}",
f"Selected Model: {self.constants.custom_model or self.current_model}" f"Selected Model: {self.constants.custom_model or self.current_model}",
f"Target OS: macOS {self.constants.os_support}"
] ]
if (self.constants.custom_model or self.current_model) not in ModelArray.SupportedSMBIOS: if (self.constants.custom_model or self.current_model) not in ModelArray.SupportedSMBIOS:

View File

@@ -1,5 +1,7 @@
# -*- mode: python ; coding: utf-8 -*- # -*- mode: python ; coding: utf-8 -*-
import sys, os
sys.path.append(os.path.abspath(os.getcwd()))
from Resources import Constants
block_cipher = None block_cipher = None
@@ -35,7 +37,7 @@ app = BUNDLE(exe,
icon="OC-Patcher.icns", icon="OC-Patcher.icns",
bundle_identifier=None, bundle_identifier=None,
info_plist={ info_plist={
"CFBundleShortVersionString": "0.0.12", "CFBundleShortVersionString": Constants.Constants().patcher_version,
"CFBundleExecutable": "MacOS/Launcher", "CFBundleExecutable": "MacOS/Launcher",
"NSHumanReadableCopyright": "Copyright 2020-2021 Dortania" "NSHumanReadableCopyright": "Copyright 2020-2021 Dortania"
}) })

View File

@@ -8,7 +8,7 @@ from pathlib import Path
class Constants: class Constants:
def __init__(self): def __init__(self):
self.patcher_version = "0.0.14" self.patcher_version = "0.0.15"
self.opencore_commit = "7bb41aa - 2021-03-06" self.opencore_commit = "7bb41aa - 2021-03-06"
self.opencore_version = "0.6.8" self.opencore_version = "0.6.8"
self.lilu_version = "1.5.1" self.lilu_version = "1.5.1"
@@ -40,16 +40,19 @@ class Constants:
# Patcher Settings # Patcher Settings
self.opencore_debug = False self.opencore_debug = False
self.opencore_build = "RELEASE"
self.kext_debug = False self.kext_debug = False
self.verbose_debug = True self.verbose_debug = True
self.os_support = 11.0 self.os_support = 11.0
self.min_os_support = 11.0 self.min_os_support = 11.0
self.max_os_support = 11.0 self.max_os_support = 11.0
self.metal_build = False
self.wifi_build = False
# Payload Location # Payload Location
# OpenCore # OpenCore
@property @property
def opencore_zip_source(self): return self.payload_path / Path(f"OpenCore/OpenCore-v{self.opencore_version}.zip") def opencore_zip_source(self): return self.payload_path / Path(f"OpenCore/OpenCore-{self.opencore_build}-v{self.opencore_version}.zip")
@property @property
def plist_template(self): return self.payload_path / Path(f"Config/v{self.opencore_version}/config.plist") def plist_template(self): return self.payload_path / Path(f"Config/v{self.opencore_version}/config.plist")
@@ -103,9 +106,9 @@ class Constants:
@property @property
def build_path(self): return self.current_path / Path("Build-Folder/") def build_path(self): return self.current_path / Path("Build-Folder/")
@property @property
def opencore_release_folder(self): return self.build_path / Path(f"OpenCore-v{self.opencore_version}") def opencore_release_folder(self): return self.build_path / Path(f"OpenCore-{self.opencore_build}-v{self.opencore_version}")
@property @property
def opencore_zip_copied(self): return self.build_path / Path(f"OpenCore-v{self.opencore_version}.zip") def opencore_zip_copied(self): return self.build_path / Path(f"OpenCore-{self.opencore_build}-v{self.opencore_version}.zip")
@property @property
def oc_folder(self): return self.opencore_release_folder / Path("EFI/OC/") def oc_folder(self): return self.opencore_release_folder / Path("EFI/OC/")

View File

@@ -1,6 +1,6 @@
# Lists all models and required patches # Lists all models and required patches
SupportedSMBIOS = [ SupportedSMBIOS11 = [
# MacBook # MacBook
"MacBook5,1", "MacBook5,1",
"MacBook5,2", "MacBook5,2",
@@ -60,7 +60,11 @@ SupportedSMBIOS = [
"MacPro5,1", "MacPro5,1",
# Xserve # Xserve
"Xserve3,1", "Xserve3,1",
"iMacProMax1,1" "Dortania1,1"
]
SupportedSMBIOS12 = [
] ]
## CPU patches ## CPU patches
@@ -87,12 +91,12 @@ MissingSSE42 = [
"iMac9,1", "iMac9,1",
"iMac10,1", "iMac10,1",
"MacPro3,1", "MacPro3,1",
"iMacProMax1,1" "Dortania1,1"
] ]
SSEEmulator = [ SSEEmulator = [
"MacPro3,1", "MacPro3,1",
"iMacProMax1,1" "Dortania1,1"
] ]
DualSocket = [ DualSocket = [
@@ -100,7 +104,7 @@ DualSocket = [
"MacPro4,1", "MacPro4,1",
"MacPro5,1", "MacPro5,1",
"Xserve3,1", "Xserve3,1",
"iMacProMax1,1" "Dortania1,1"
] ]
pciSSDT = [ pciSSDT = [
@@ -109,7 +113,7 @@ pciSSDT = [
"iMac11,1", "iMac11,1",
"iMac11,2", "iMac11,2",
"iMac11,3", "iMac11,3",
"iMacProMax1,1" "Dortania1,1"
] ]
## Ethernet patches ## Ethernet patches
@@ -129,13 +133,13 @@ EthernetNvidia = [
"Macmini4,1", "Macmini4,1",
"iMac9,1", "iMac9,1",
"iMac10,1", "iMac10,1",
"iMacProMax1,1" "Dortania1,1"
] ]
EthernetMarvell = [ EthernetMarvell = [
"MacBookPro4,1", "MacBookPro4,1",
"iMac7,1", "iMac7,1",
"iMac8,1", "iMac8,1",
"iMacProMax1,1" "Dortania1,1"
] ]
EthernetBroadcom = [ EthernetBroadcom = [
"MacBookPro6,1", "MacBookPro6,1",
@@ -151,7 +155,7 @@ EthernetBroadcom = [
"iMac11,3", "iMac11,3",
"iMac12,1", "iMac12,1",
"iMac12,2", "iMac12,2",
"iMacProMax1,1" "Dortania1,1"
] ]
## Wifi patches ## Wifi patches
@@ -165,7 +169,7 @@ WifiAtheros = [
"iMac12,2", "iMac12,2",
"MacPro3,1", "MacPro3,1",
"MacPro4,1", "MacPro4,1",
"iMacProMax1,1" "Dortania1,1"
] ]
WifiBCM94328 = [ WifiBCM94328 = [
@@ -173,7 +177,7 @@ WifiBCM94328 = [
"MacBookPro4,1", "MacBookPro4,1",
"iMac7,1", "iMac7,1",
"iMac8,1", "iMac8,1",
"iMacProMax1,1" "Dortania1,1"
] ]
WifiBCM94322 = [ WifiBCM94322 = [
@@ -191,7 +195,7 @@ WifiBCM94322 = [
"MacBookPro5,4", "MacBookPro5,4",
"MacBookPro5,5", "MacBookPro5,5",
"MacBookPro7,1", "MacBookPro7,1",
"iMacProMax1,1" "Dortania1,1"
] ]
WifiBCM943224 = [ WifiBCM943224 = [
@@ -201,7 +205,7 @@ WifiBCM943224 = [
"MacBookPro6,2", "MacBookPro6,2",
"Macmini3,1", "Macmini3,1",
"Macmini4,1", "Macmini4,1",
"iMacProMax1,1" "Dortania1,1"
] ]
WifiBCM94331 = [ WifiBCM94331 = [
@@ -241,7 +245,7 @@ WifiBCM94331 = [
"iMac13,1", # PciRoot(0x0)/Pci(0x1C,0x3)/Pci(0x0,0x0) "iMac13,1", # PciRoot(0x0)/Pci(0x1C,0x3)/Pci(0x0,0x0)
"iMac13,2", # PciRoot(0x0)/Pci(0x1C,0x3)/Pci(0x0,0x0) "iMac13,2", # PciRoot(0x0)/Pci(0x1C,0x3)/Pci(0x0,0x0)
"MacPro5,1", # PciRoot(0x0)/Pci(0x1C,0x5)/Pci(0x0,0x0) "MacPro5,1", # PciRoot(0x0)/Pci(0x1C,0x5)/Pci(0x0,0x0)
"iMacProMax1,1" "Dortania1,1"
] ]
## Audio ## Audio
@@ -283,7 +287,7 @@ LegacyAudio = [
"iMac12,1", "iMac12,1",
"iMac12,2", "iMac12,2",
"MacPro3,1", "MacPro3,1",
"iMacProMax1,1" "Dortania1,1"
] ]
## GPU ## GPU
@@ -324,7 +328,7 @@ LegacyGPU = [
"iMac11,3", "iMac11,3",
"iMac12,1", "iMac12,1",
"iMac12,2", "iMac12,2",
"iMacProMax1,1" "Dortania1,1"
] ]
LegacyHID = [ LegacyHID = [
@@ -348,14 +352,14 @@ LegacyHID = [
"iMac9,1", "iMac9,1",
"iMac10,1", "iMac10,1",
"MacPro3,1", "MacPro3,1",
"iMacProMax1,1" "Dortania1,1"
] ]
NVMePatch = [ NVMePatch = [
"MacPro3,1", "MacPro3,1",
"MacPro4,1", "MacPro4,1",
"Xserve3,1", "Xserve3,1",
"iMacProMax1,1" "Dortania1,1"
] ]
SidecarPatch = [ SidecarPatch = [
@@ -372,7 +376,7 @@ SidecarPatch = [
"iMac14,1", "iMac14,1",
"iMac14,2", "iMac14,2",
"iMac14,3", "iMac14,3",
"iMacProMax1,1" "Dortania1,1"
] ]
DualGPUPatch = [ DualGPUPatch = [
@@ -393,18 +397,18 @@ DualGPUPatch = [
"iMac13,2", "iMac13,2",
"iMac14,2", "iMac14,2",
"iMac14,3", "iMac14,3",
"iMacProMax1,1" "Dortania1,1"
] ]
HiDPIpicker = [ HiDPIpicker = [
"MacBookPro10,1", "MacBookPro10,1",
"MacBookPro10,2", "MacBookPro10,2",
"iMacProMax1,1" "Dortania1,1"
] ]
IDEPatch = [ IDEPatch = [
"MacPro3,1", "MacPro3,1",
"iMacProMax1,1" "Dortania1,1"
] ]
# 11" Air # 11" Air
@@ -491,7 +495,7 @@ MacPro71 = [
"MacPro4,1", "MacPro4,1",
"MacPro5,1", "MacPro5,1",
"Xserve3,1", "Xserve3,1",
"iMacProMax1,1" "Dortania1,1"
] ]
# Maps # Maps
@@ -724,7 +728,7 @@ upgradableMXMGPUs = [
"iMac12,1", "iMac12,1",
"iMac12,2", "iMac12,2",
"Xserve3,1", "Xserve3,1",
"iMacProMax1,1" "Dortania1,1"
] ]
# Reference: https://forums.macrumors.com/threads/2011-imac-graphics-card-upgrade.1596614/ # Reference: https://forums.macrumors.com/threads/2011-imac-graphics-card-upgrade.1596614/
@@ -798,3 +802,15 @@ NightShiftExclude = [
UGAtoGOP = [ UGAtoGOP = [
"MacPro3,1" "MacPro3,1"
] ]
NoSATAPatch = [
"MacBookAir5,1",
"MacBookAir5,2",
"MacBookPro10,1",
"MacBookPro10,2",
"iMac13,1",
"iMac13,2",
"iMac14,1",
"iMac14,2",
"iMac14,3",
]

View File

@@ -56,7 +56,7 @@ class BuildOpenCore:
shutil.rmtree(self.constants.opencore_release_folder, onerror=rmtree_handler) shutil.rmtree(self.constants.opencore_release_folder, onerror=rmtree_handler)
print() print()
print("- Adding OpenCore v" + self.constants.opencore_version) print(f"- Adding OpenCore v{self.constants.opencore_version} {self.constants.opencore_build}")
shutil.copy(self.constants.opencore_zip_source, self.constants.build_path) shutil.copy(self.constants.opencore_zip_source, self.constants.build_path)
zipfile.ZipFile(self.constants.opencore_zip_copied).extractall(self.constants.build_path) zipfile.ZipFile(self.constants.opencore_zip_copied).extractall(self.constants.build_path)
@@ -67,7 +67,7 @@ class BuildOpenCore:
# Set revision in config # Set revision in config
self.config["#Revision"]["Build-Version"] = f"{self.constants.patcher_version} - {date.today()}" self.config["#Revision"]["Build-Version"] = f"{self.constants.patcher_version} - {date.today()}"
self.config["#Revision"]["OpenCore-Version"] = f"{self.constants.opencore_version} - {self.constants.opencore_commit}" self.config["#Revision"]["OpenCore-Version"] = f"{self.constants.opencore_version} - {self.constants.opencore_build} - {self.constants.opencore_commit}"
self.config["#Revision"]["Original-Model"] = self.model self.config["#Revision"]["Original-Model"] = self.model
for name, version, path, check in [ for name, version, path, check in [
@@ -95,7 +95,9 @@ class BuildOpenCore:
# WiFi patches # WiFi patches
wifi_devices = plistlib.loads(subprocess.run("ioreg -c IOPCIDevice -r -d2 -a".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()) wifi_devices = plistlib.loads(subprocess.run("ioreg -c IOPCIDevice -r -d2 -a".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
wifi_devices = [i for i in wifi_devices if i["vendor-id"] == binascii.unhexlify("E4140000") and i["class-code"] == binascii.unhexlify("00800200")] wifi_devices = [i for i in wifi_devices if i["vendor-id"] == binascii.unhexlify("E4140000") and i["class-code"] == binascii.unhexlify("00800200")]
if not self.constants.custom_model and wifi_devices and self.hexswap(binascii.hexlify(wifi_devices[0]["device-id"]).decode()[:4]) in ModelArray.nativeWifi: if self.constants.wifi_build == True:
print("- Skipping Wifi patches on request")
elif not self.constants.custom_model and wifi_devices and self.hexswap(binascii.hexlify(wifi_devices[0]["device-id"]).decode()[:4]) in ModelArray.nativeWifi:
print("- Found supported WiFi card, skipping wifi patches") print("- Found supported WiFi card, skipping wifi patches")
else: else:
if self.model in ModelArray.WifiAtheros: if self.model in ModelArray.WifiAtheros:
@@ -161,7 +163,9 @@ class BuildOpenCore:
self.config["NVRAM"]["Add"]["4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14"]["UIScale"] = binascii.unhexlify("02") self.config["NVRAM"]["Add"]["4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14"]["UIScale"] = binascii.unhexlify("02")
# Check GPU Vendor # Check GPU Vendor
if self.constants.custom_model == "None": if self.constants.metal_build == True:
print("- Adding Metal GPU patches on request")
elif self.constants.custom_model == "None":
current_gpu: str = subprocess.run("system_profiler SPDisplaysDataType".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode() current_gpu: str = subprocess.run("system_profiler SPDisplaysDataType".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
self.constants.current_gpuv = [line.strip().split(": ", 1)[1] for line in current_gpu.split("\n") if line.strip().startswith(("Vendor"))][0] self.constants.current_gpuv = [line.strip().split(": ", 1)[1] for line in current_gpu.split("\n") if line.strip().startswith(("Vendor"))][0]
self.constants.current_gpud = [line.strip().split(": ", 1)[1] for line in current_gpu.split("\n") if line.strip().startswith(("Device ID"))][0] self.constants.current_gpud = [line.strip().split(": ", 1)[1] for line in current_gpu.split("\n") if line.strip().startswith(("Device ID"))][0]
@@ -198,9 +202,15 @@ class BuildOpenCore:
print("- Adding UGA to GOP Patch") print("- Adding UGA to GOP Patch")
self.config["UEFI"]["ProtocolOverrides"]["GopPassThrough"] = True self.config["UEFI"]["ProtocolOverrides"]["GopPassThrough"] = True
# ThridPartDrives Check
if self.model not in ModelArray.NoSATAPatch:
print("- Adding SATA Hibernation Patch")
self.config["Kernel"]["Quirks"]["ThirdPartyDrives"] = True
#DEBUG Settings #DEBUG Settings
if self.constants.verbose_debug == True: if self.constants.verbose_debug == True:
print("- Enabling Verbose boot") print("- Enabling Verbose boot")
self.config["Kernel"]["Quirks"]["PanicNoKextDump"] = True
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " -v" self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " -v"
if self.constants.kext_debug == True: if self.constants.kext_debug == True:
print("- Enabling DEBUG Kexts") print("- Enabling DEBUG Kexts")
@@ -235,7 +245,11 @@ class BuildOpenCore:
spoofed_board = "Mac-35C5E08120C7EEAF" spoofed_board = "Mac-35C5E08120C7EEAF"
elif self.model in ModelArray.iMac151: elif self.model in ModelArray.iMac151:
# Check for upgraded GPUs on iMacs # Check for upgraded GPUs on iMacs
if (self.constants.current_gpuv == "AMD (0x1002)") & (self.constants.current_gpud in ModelArray.AMDMXMGPUs) & (self.constants.custom_model == "None"): if self.constants.metal_build == True:
print("- Spoofing to iMacPro1,1")
spoofed_model = "iMacPro1,1"
spoofed_board = "Mac-7BA5B2D9E42DDD94"
elif (self.constants.current_gpuv == "AMD (0x1002)") & (self.constants.current_gpud in ModelArray.AMDMXMGPUs) & (self.constants.custom_model == "None"):
print("- Spoofing to iMacPro1,1") print("- Spoofing to iMacPro1,1")
spoofed_model = "iMacPro1,1" spoofed_model = "iMacPro1,1"
spoofed_board = "Mac-7BA5B2D9E42DDD94" spoofed_board = "Mac-7BA5B2D9E42DDD94"
@@ -268,7 +282,9 @@ class BuildOpenCore:
if smbios_mod in {"y", "Y", "yes", "Yes"}: if smbios_mod in {"y", "Y", "yes", "Yes"}:
spoofed_model = self.model spoofed_model = self.model
self.config["PlatformInfo"]["PlatformNVRAM"]["BID"] = spoofed_board
self.config["PlatformInfo"]["SMBIOS"]["BoardProduct"] = spoofed_board self.config["PlatformInfo"]["SMBIOS"]["BoardProduct"] = spoofed_board
self.config["PlatformInfo"]["UpdateNVRAM"] = True
elif smbios_mod in {"n", "N", "no", "No"}: elif smbios_mod in {"n", "N", "no", "No"}:
self.config["PlatformInfo"]["Automatic"] = True self.config["PlatformInfo"]["Automatic"] = True
self.config["PlatformInfo"]["UpdateDataHub"] = True self.config["PlatformInfo"]["UpdateDataHub"] = True

View File

@@ -6,6 +6,7 @@ Here are some common errors users may experience while using this patcher:
* [Cannot boot macOS without the USB](#cannot-boot-macos-without-the-usb) * [Cannot boot macOS without the USB](#cannot-boot-macos-without-the-usb)
* [Infinite Recovery OS Booting](#infinite-recovery-os-reboot) * [Infinite Recovery OS Booting](#infinite-recovery-os-reboot)
* [Reboot when entering Hibernation (`Sleep Wake Failure`)](#reboot-when-entering-hibernation-sleep-wake-failure) * [Reboot when entering Hibernation (`Sleep Wake Failure`)](#reboot-when-entering-hibernation-sleep-wake-failure)
* [Booting with a non-flashed GPU](#booting-with-a-non-flashed-gpu)
## Stuck on `This version of Mac OS X is not supported on this platform` ## Stuck on `This version of Mac OS X is not supported on this platform`
@@ -27,9 +28,17 @@ With OpenCore Legacy Patcher, we rely on Apple Secure Boot to ensure OS updates
## Reboot when entering Hibernation (`Sleep Wake Failure`) ## Reboot when entering Hibernation (`Sleep Wake Failure`)
Currently the patcher does not support hibernation for many machines, we recommend disabling hibernation for now: Resolved in OpenCore-Legacy-Patcher v0.0.14
## Booting with a non-flashed GPU
For Mac Pro, Xserve and iMac users with non-flashed GPUs, you can still easily boot OpenCore and view the entire boot process. To do so, make sure SIP is disabled(to allow NVRAM write access) and run the following:
```sh ```sh
sudo pmset -a hibernatemode 0 sudo bless --verbose --file /Volumes/VOLNAME/EFI/OC/OpenCore.efi --folder /Volumes/VOLNAME/EFI/OC --setBoot
``` ```
* Note you will need to replace `VOLNAME` with the Volume name of your USB or hard drive with OpenCore
* Note 2: Once done, you can re-enable SIP
Once you boot OpenCore for the first time, LauncherOption will install itself as the top boot priority making OpenCore always launch. Combined with `RequestBootVar`, all boot options must go through OpenCore ensuring seamless usage even with OS installation and updates.

View File

@@ -664,7 +664,7 @@
<key>SetApfsTrimTimeout</key> <key>SetApfsTrimTimeout</key>
<integer>-1</integer> <integer>-1</integer>
<key>ThirdPartyDrives</key> <key>ThirdPartyDrives</key>
<true/> <false/>
<key>XhciPortLimit</key> <key>XhciPortLimit</key>
<false/> <false/>
</dict> </dict>

Binary file not shown.

Binary file not shown.