Merge branch 'main' into py3

This commit is contained in:
Dhinak G
2021-02-19 16:21:13 -05:00
15 changed files with 69 additions and 57 deletions

View File

@@ -1,5 +1,17 @@
# OpenCore Legacy Patcher changelog
## 0.0.11
- Re-add OpenCore GUI
## 0.0.10
- Increment binaries
- OpenCore 43f5339(0.6.6 release)
- Lilu d107554(1.5.1 release)
- WhateverGreen 9e53d8a(1.4.7 release)
- Add IDE support to MacPro3,1
- Set SecureBootModel to iMac Pro(should aid in booting older OSes with OpenCore)
- Update MacBookPro SMBIOS
## 0.0.9
- Resolve firmware install issues bricking Macs

View File

@@ -6,7 +6,7 @@ import subprocess
from Resources import build, ModelArray, Constants, utilities
PATCHER_VERSION = "0.0.9"
PATCHER_VERSION = "0.0.11"
class OpenCoreLegacyPatcher():
@@ -23,7 +23,7 @@ class OpenCoreLegacyPatcher():
self.current_model = [line.strip().split(": ", 1)[1] for line in self.current_model.stdout.decode().split("\n") if line.strip().startswith("Model Identifier")][0]
def build_opencore(self):
build.OpenCoreMenus(self.constants).build_opencore_menu(self.custom_model or self.current_model)
build.BuildOpenCore(self.custom_model or self.current_model, self.constants).build_opencore()
def install_opencore(self):
build.BuildOpenCore(self.custom_model or self.current_model, self.constants).copy_efi()
@@ -43,8 +43,8 @@ system_profiler SPHardwareDataType | grep 'Model Identifier'
["""Many thanks to the following:
- Acidanthera:\tOpenCore, kexts and other tools
- DhinakG:\t\tWriting and maintaining this patcher
- Khronokernel:\tWriting and maintaining this patcher
- DhinakG:\t\tWriting and maintaining this patcher
- Syncretic:\t\tAAAMouSSE and telemetrap
- Slice:\t\tVoodooHDA"""]).start()
@@ -67,7 +67,7 @@ system_profiler SPHardwareDataType | grep 'Model Identifier'
in_between = [
'Your model requires a CPU upgrade to a CPU supporting SSE4.1+ to be supported by this patcher!',
'',
'If you plan to create the USB for another machine, please select option 5'
f'If you plan to create the USB for another {self.current_model} with SSE4.1+, please select the "Change Model" option in the menu.'
]
elif self.custom_model in ("MacPro3,1", "iMac7,1"):
in_between = ["This model is supported",

View File

@@ -106,6 +106,8 @@ To remove OpenCore is actually quite simply:
* [See here for example how to mount](https://dortania.github.io/OpenCore-Post-Install/universal/oc2hdd.html)
2. Reset NVRAM
* [Reset NVRAM or PRAM on your Mac](https://support.apple.com/HT204063)
Know that if you are on Big Sur when you remove the EFI folder, your Mac will no longer boot and show the prohibited symbol. Be ready to install an older version of macOS before you uninstall Open Core.
## Troubleshooting

View File

@@ -8,11 +8,9 @@ from pathlib import Path
class Constants:
def __init__(self):
self.default_opencore_version = "0.6.6"
self.opencore_version = "0.6.6"
self.available_opencore_versions = ["0.6.6"]
self.lilu_version = "1.5.0"
self.whatevergreen_version = "1.4.6"
self.opencore_version = "0.6.7"
self.lilu_version = "1.5.1"
self.whatevergreen_version = "1.4.7"
self.airportbcrmfixup_version = "2.1.2"
self.bcm570_version = "1.0.0"
self.marvel_version = "1.0.0"
@@ -24,6 +22,7 @@ class Constants:
self.io80211mojave_version = "1.0.0"
self.voodoohda_version = "296"
self.restrictevents_version = "1.0.0"
self.piixata_version = "1.0.0"
# Get resource path
self.current_path = Path(__file__).parent.parent.resolve()
@@ -73,6 +72,8 @@ class Constants:
def io80211mojave_path(self): return self.payload_kexts_path / Path(f"Wifi/IO80211Mojave-v{self.io80211mojave_version}.zip")
@property
def voodoohda_path(self): return self.payload_kexts_path / Path(f"Audio/VoodooHDA-v{self.voodoohda_version}.zip")
@property
def piixata_path(self): return self.payload_kexts_path / Path(f"Misc/AppleIntelPIIXATA-v{self.piixata_version}.zip")
# Build Location
@property

View File

@@ -393,6 +393,10 @@ HiDPIpicker = [
"MacBookPro10,2",
]
IDEPatch = [
"MacPro3,1"
]
# 11" Air
MacBookAir61 = [
"MacBookAir3,1",
@@ -424,7 +428,7 @@ MacBookPro111 = [
# MacBook Pro 15" and 17"
MacBookPro112 = [
MacBookPro113 = [
"MacBookPro3,1",
"MacBookPro4,1",
"MacBookPro5,1",

View File

@@ -68,6 +68,8 @@ class BuildOpenCore:
("CatalinaBCM5701Ethernet.kext", self.constants.bcm570_version, self.constants.bcm570_path, lambda: self.model in ModelArray.EthernetBroadcom),
# Legacy audio
("VoodooHDA.kext", self.constants.voodoohda_version, self.constants.voodoohda_path, lambda: self.model in ModelArray.LegacyAudio),
# IDE patch
("AppleIntelPIIXATA.kext", self.constants.piixata_version, self.constants.piixata_path, lambda: self.model in ModelArray.IDEPatch),
]:
self.enable_kext(name, version, path, check)
@@ -145,9 +147,9 @@ class BuildOpenCore:
elif self.model in ModelArray.MacBookPro111:
print("- Spoofing to MacBookPro11,1")
spoofed_model = "MacBookPro11,1"
elif self.model in ModelArray.MacBookPro112:
print("- Spoofing to MacBookPro11,2")
spoofed_model = "MacBookPro11,2"
elif self.model in ModelArray.MacBookPro113:
print("- Spoofing to MacBookPro11,3")
spoofed_model = "MacBookPro11,3"
elif self.model in ModelArray.Macmini71:
print("- Spoofing to Macmini7,1")
spoofed_model = "Macmini7,1"
@@ -319,41 +321,3 @@ Please build OpenCore first!"""
input()
else:
utilities.TUIOnlyPrint(["Copying OpenCore"], "Press [Enter] to continue", ["EFI failed to mount!", "Please report this to the devs at GitHub."]).start()
class OpenCoreMenus:
def __init__(self, versions):
self.constants: Constants.Constants = versions
def change_opencore_version(self):
utilities.cls()
utilities.header(["Change OpenCore Version"])
print(f"\nCurrent OpenCore version: {self.constants.opencore_version}\nSupported versions: 0.6.6 (recommended)")
version = input("Please enter the desired OpenCore version (or press Enter to cancel): ").strip()
if not version:
return
while version not in self.constants.available_opencore_versions:
utilities.cls()
utilities.header(["Change OpenCore Version"])
print(f"\nCurrent OpenCore version: {self.constants.opencore_version}\nSupported versions: 0.6.6 (recommended)")
version = input(f"Invalid OpenCore version {version}!\nPlease enter the desired OpenCore version (or press Enter to cancel): ").strip()
if not version:
return
self.constants.opencore_version = version
def build_opencore_menu(self, model):
response = None
while not (response and response == -1):
title = [f"Build OpenCore v{self.constants.opencore_version} EFI", "Selected Model: " + model]
menu = utilities.TUIMenu(title, "Please select an option: ", auto_number=True)
options = [
["Build OpenCore", lambda: BuildOpenCore(model, self.constants).build_opencore()],
["Change OpenCore Version", self.change_opencore_version],
]
for option in options:
menu.add_menu_option(option[0], function=option[1])
response = menu.start()
# response = utilities.menu(title, "zoomer, Please select an option: ", options, auto_number=True, top_level=True)

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<!--OpenCore 0.6.6 config-->
<!--OpenCore 0.6.7 config-->
<dict>
<key>ACPI</key>
<dict>
@@ -117,6 +117,9 @@
<dict>
<key>MmioWhitelist</key>
<array/>
<key>Patch</key>
<array>
</array>
<key>Quirks</key>
<dict>
<key>AllowRelocationBlock</key>
@@ -462,6 +465,24 @@
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>AppleIntelPIIXATA</string>
<key>Enabled</key>
<false/><!--AppleIntelPIIXATA-->
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>20.0.0</string>
<key>BundlePath</key>
<string>AppleIntelPIIXATA.kext</string>
<key>ExecutablePath</key>
<string>Contents/MacOS/AppleIntelPIIXATA</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
@@ -565,6 +586,8 @@
<false/>
<key>PowerTimeoutKernelPanic</key>
<false/>
<key>SetApfsTrimTimeout</key>
<integer>-1</integer>
<key>ThirdPartyDrives</key>
<false/>
<key>XhciPortLimit</key>
@@ -592,14 +615,18 @@
<string>Auto</string>
<key>HideAuxiliary</key>
<true/>
<key>LauncherPath</key>
<string>Default</string>
<key>LauncherOption</key>
<string>Full</string>
<key>PickerAttributes</key>
<integer>1</integer>
<integer>17</integer>
<key>PickerAudioAssist</key>
<false/>
<key>PickerMode</key>
<string>External</string>
<key>PickerVariant</key>
<string>Auto</string>
<string>Modern</string>
<key>PollAppleHotKeys</key>
<false/>
<key>ShowPicker</key>
@@ -640,8 +667,6 @@
<integer>0</integer>
<key>AuthRestart</key>
<false/>
<key>BootProtect</key>
<string>Bootstrap</string>
<key>BlacklistAppleUpdate</key>
<true/>
<key>DmgLoading</key>
@@ -659,7 +684,7 @@
<key>ScanPolicy</key>
<integer>0</integer>
<key>SecureBootModel</key>
<string>x86legacy</string>
<string>j137</string>
<key>Vault</key>
<string>Optional</string>
</dict>
@@ -817,6 +842,8 @@
<true/>
<key>UpdateSMBIOSMode</key>
<string>Create</string>
<key>UseRawUuidEncoding</key>
<false/>
</dict>
<key>UEFI</key>
<dict>
@@ -951,6 +978,8 @@
</dict>
<key>Quirks</key>
<dict>
<key>DisableSecurityPolicy</key>
<false/>
<key>ExitBootServicesDelay</key>
<integer>0</integer>
<key>IgnoreInvalidFlexRatio</key>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.