mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-20 18:54:30 +10:00
Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9caa39c50d | ||
|
|
48d714db61 | ||
|
|
59ac0c3fec | ||
|
|
dc7560b142 | ||
|
|
0f0ca7d4ec | ||
|
|
6f4bface55 | ||
|
|
ad5004d3e8 | ||
|
|
fff9c4b75d | ||
|
|
d6224db564 | ||
|
|
6b900d7aa8 | ||
|
|
217999a8e7 | ||
|
|
b25fa91962 | ||
|
|
627bc817d0 | ||
|
|
511ea4cf68 |
15
CHANGELOG.md
15
CHANGELOG.md
@@ -1,5 +1,20 @@
|
||||
# OpenCore Legacy Patcher changelog
|
||||
|
||||
## 0.0.7
|
||||
- Add MacPro3,1 to HID patch
|
||||
- Fix missing SSDT-CPBG patch
|
||||
- Fix BlacklistAppleUpdate
|
||||
- Add RestrictEvents kext
|
||||
|
||||
## 0.0.6
|
||||
- Fix macserial crashing
|
||||
|
||||
## 0.0.5
|
||||
- Enable hibernation support
|
||||
- Work around USB Map failing
|
||||
- Add checks whether booting with OpenCore
|
||||
- Fix MouSSE injection
|
||||
|
||||
## 0.0.4
|
||||
- Add basic audio support for legacy chipsets
|
||||
- Add patch for dual GPU machines
|
||||
|
||||
@@ -20,7 +20,7 @@ except NameError:
|
||||
pass
|
||||
|
||||
# List build versions
|
||||
patcher_version = "0.0.4"
|
||||
patcher_version = "0.0.7"
|
||||
|
||||
CustomSMBIOS=False
|
||||
MainMenu=True
|
||||
@@ -218,6 +218,7 @@ while MainMenu:
|
||||
print(" - DhinakG: Writing and maintaining this Patcher")
|
||||
print(" - Khronokernel: Writing and maintaining this Patcher")
|
||||
print(" - Syncretic: AAAMouSSE and telemetrap")
|
||||
print(" - Slice: VoodooHDA")
|
||||
print("")
|
||||
CreditMenu = input(" Press any key to exit: ")
|
||||
print("Returning to main menu...")
|
||||
|
||||
@@ -126,4 +126,8 @@ Once you've booted OpenCore at least once, your hardware should now auto boot it
|
||||
|
||||
At this time, the OpenCore Patcher won't install macOS onto the internal drive itself during installs. Instead, you'll need to either [manually transfer](https://dortania.github.io/OpenCore-Post-Install/universal/oc2hdd.html) OpenCore to the internal drive's EFI or run this patcher's Option 2 again but select your internal drive.
|
||||
|
||||
Reminder that once this is done, you'll need to select OpenCore in the boot picker again for your hardware to remenber this entry and auto boot from then on.
|
||||
Reminder that once this is done, you'll need to select OpenCore in the boot picker again for your hardware to remenber this entry and auto boot from then on.
|
||||
|
||||
### Cannot run OpenCore Legacy Patcher
|
||||
|
||||
If the release tab has permissions/Gatekeeper issues, please [download the main repo](https://github.com/dortania/Opencore-Legacy-Patcher/archive/main.zip) and run that instead.
|
||||
@@ -22,8 +22,17 @@ except NameError:
|
||||
pass
|
||||
|
||||
# Find SMBIOS of machine
|
||||
current_model = subprocess.Popen("system_profiler SPHardwareDataType".split(), stdout=subprocess.PIPE)
|
||||
current_model = [line.strip().split(": ", 1)[1] for line in current_model.stdout.read().split("\n") if line.strip().startswith("Model Identifier")][0]
|
||||
opencore_model = subprocess.Popen(["NVRAM", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:oem-product"], stdout=subprocess.PIPE).communicate()[0]
|
||||
if opencore_model not in ("NVRAM: Error getting variable - '4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:oem-product': (iokit/common) data was not found"):
|
||||
print("Detected OpenCore machine")
|
||||
opencore_model = subprocess.Popen("nvram 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:oem-product".split(), stdout=subprocess.PIPE)
|
||||
opencore_model = [line.strip().split(":oem-product ", 1)[1] for line in opencore_model.stdout.read().split("\n") if line.strip().startswith("4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:")][0]
|
||||
current_model = opencore_model
|
||||
else:
|
||||
print("No OpenCore detected")
|
||||
current_model = subprocess.Popen("system_profiler SPHardwareDataType".split(), stdout=subprocess.PIPE)
|
||||
current_model = [line.strip().split(": ", 1)[1] for line in current_model.stdout.read().split("\n") if line.strip().startswith("Model Identifier")][0]
|
||||
print("Current Model: %s" % current_model)
|
||||
|
||||
OCExist = False
|
||||
|
||||
@@ -52,12 +61,15 @@ def BuildEFI():
|
||||
copy(Versions.plist_path, Versions.plist_path_build)
|
||||
with open(Versions.plist_path_build_full, 'r') as file :
|
||||
Versions.plist_data = file.read()
|
||||
|
||||
print("- Adding Lilu %s" % Versions.lilu_version)
|
||||
# Adding must have kexts
|
||||
print("- Adding Lilu v%s" % Versions.lilu_version)
|
||||
copy(Versions.lilu_path, Versions.kext_path_build)
|
||||
|
||||
print("- Adding WhateverGreen %s" % Versions.whatevergreen_version)
|
||||
print("- Adding WhateverGreen v%s" % Versions.whatevergreen_version)
|
||||
copy(Versions.whatevergreen_path, Versions.kext_path_build)
|
||||
|
||||
print("- Adding RestrictEvents v%s" % Versions.restrictevents_version)
|
||||
copy(Versions.restrictevents_path, Versions.kext_path_build)
|
||||
|
||||
# Checks for kexts
|
||||
# CPU Kext Patches
|
||||
@@ -71,13 +83,13 @@ def BuildEFI():
|
||||
|
||||
if current_model in ModelArray.SSEEmulator:
|
||||
print("- Adding AAAMouSSE v%s" % Versions.mousse_version)
|
||||
copy(Versions.mousse_version, Versions.kext_path_build)
|
||||
copy(Versions.mousse_path, Versions.kext_path_build)
|
||||
Versions.plist_data = Versions.plist_data.replace(
|
||||
"<false/><!--AAAMouSSE-->",
|
||||
"<true/><!--AAAMouSSE-->"
|
||||
)
|
||||
if current_model in ModelArray.MissingSSE42:
|
||||
print("- Adding telemetrap %s" % Versions.telemetrap_version)
|
||||
print("- Adding telemetrap v%s" % Versions.telemetrap_version)
|
||||
copy(Versions.telemetrap_path, Versions.kext_path_build)
|
||||
Versions.plist_data = Versions.plist_data.replace(
|
||||
"<false/><!--telemetrap-->",
|
||||
@@ -101,7 +113,7 @@ def BuildEFI():
|
||||
"<true/><!--MarvelYukonEthernet-->"
|
||||
)
|
||||
if current_model in ModelArray.EthernetBroadcom:
|
||||
print("- Adding CatalinaBCM5701Ethernet %s" % Versions.bcm570_version)
|
||||
print("- Adding CatalinaBCM5701Ethernet v%s" % Versions.bcm570_version)
|
||||
copy(Versions.bcm570_path, Versions.kext_path_build)
|
||||
Versions.plist_data = Versions.plist_data.replace(
|
||||
"<false/><!--CatalinaBCM5701Ethernet-->",
|
||||
@@ -203,11 +215,23 @@ def BuildEFI():
|
||||
"<true/><!--VoodooHDA-->"
|
||||
)
|
||||
|
||||
if current_model in ModelArray.pciSSDT:
|
||||
print("- Adding SSDT-CPBG")
|
||||
copy(Versions.pci_ssdt_path, Versions.acpi_path_build)
|
||||
Versions.plist_data = Versions.plist_data.replace(
|
||||
"<false/><!--SSDT-CPBG-->",
|
||||
"<true/><!--SSDT-CPBG-->"
|
||||
)
|
||||
|
||||
usb_map_path = os.path.join(Versions.current_path, "payloads/Kexts/Maps/Zip/" "USB-Map-%s.zip" % current_model)
|
||||
if os.path.exists(usb_map_path):
|
||||
print("- Adding USB Map for %s" % current_model)
|
||||
copy(usb_map_path, Versions.kext_path_build)
|
||||
map_name = ("USB-Map-%s.kext" % current_model)
|
||||
Versions.plist_data = Versions.plist_data.replace(
|
||||
"<<false/><!--USBmap-->",
|
||||
"<true/><!--USBmap-->"
|
||||
)
|
||||
Versions.plist_data = Versions.plist_data.replace(
|
||||
"USB-Map-SMBIOS.kext",
|
||||
map_name
|
||||
@@ -259,6 +283,8 @@ def BuildSMBIOS():
|
||||
new_model = "MacPro7,1"
|
||||
|
||||
# Grab serials from macserial
|
||||
serialPatch = subprocess.Popen(["xattr", "-cr", "./payloads/tools/macserial"], stdout=subprocess.PIPE).communicate()[0]
|
||||
print(serialPatch)
|
||||
serialData = subprocess.Popen((r"./payloads/tools/macserial -g -m " + new_model + " -n 1").split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
serialData = serialData.stdout.read().strip().split(" | ")
|
||||
|
||||
@@ -268,16 +294,20 @@ def BuildSMBIOS():
|
||||
new_model
|
||||
)
|
||||
|
||||
# Patch Number Serial
|
||||
Versions.plist_data = Versions.plist_data.replace(
|
||||
"W00000000001",
|
||||
serialData[0]
|
||||
)
|
||||
# Patch MLB
|
||||
Versions.plist_data = Versions.plist_data.replace(
|
||||
"M0000000000000001",
|
||||
serialData[1]
|
||||
)
|
||||
if serialData == "['']":
|
||||
# Used as a backup for when macserial fails
|
||||
print("Failed to load macserial")
|
||||
else:
|
||||
# Patch Number Serial
|
||||
Versions.plist_data = Versions.plist_data.replace(
|
||||
"W00000000001",
|
||||
serialData[0]
|
||||
)
|
||||
# Patch MLB
|
||||
Versions.plist_data = Versions.plist_data.replace(
|
||||
"M0000000000000001",
|
||||
serialData[1]
|
||||
)
|
||||
|
||||
# Patch UUID
|
||||
uuidGen = subprocess.Popen(["uuidgen"], stdout=subprocess.PIPE).communicate()[0]
|
||||
|
||||
@@ -343,6 +343,7 @@ LegacyHID = [
|
||||
"iMac8,1",
|
||||
"iMac9,1",
|
||||
"iMac10,1",
|
||||
"MacPro3,1"
|
||||
]
|
||||
|
||||
NVMePatch = [
|
||||
|
||||
@@ -24,6 +24,7 @@ telemetrap_version = "1.0.0"
|
||||
io80211high_sierra_version = "1.0.0"
|
||||
io80211mojave_version = "1.0.0"
|
||||
voodoohda_version = "296"
|
||||
restrictevents_version = "1.0.0"
|
||||
|
||||
# List current location
|
||||
os.chdir(os.path.dirname(os.path.realpath(__file__)))
|
||||
@@ -45,6 +46,7 @@ nvme_driver_path = os.path.join(current_path, "payloads/Drivers/" "NvmExpressDxe
|
||||
lilu_path = os.path.join(current_path, "payloads/Kexts/Acidanthera/" "Lilu-v%s.zip" % lilu_version)
|
||||
whatevergreen_path = os.path.join(current_path, "payloads/Kexts/Acidanthera/" "WhateverGreen-v%s.zip" % whatevergreen_version)
|
||||
airportbcrmfixup_path = os.path.join(current_path, "payloads/Kexts/Acidanthera/" "AirportBrcmFixup-v%s.zip" % airportbcrmfixup_version)
|
||||
restrictevents_path = os.path.join(current_path, "payloads/Kexts/Acidanthera/" "RestrictEvents-v%s.zip" % restrictevents_version)
|
||||
bcm570_path = os.path.join(current_path, "payloads/Kexts/Ethernet/" "CatalinaBCM5701Ethernet-v%s.zip" % bcm570_version)
|
||||
marvel_path = os.path.join(current_path, "payloads/Kexts/Ethernet/" "MarvelYukonEthernet-v%s.zip" % marvel_version)
|
||||
nforce_path = os.path.join(current_path, "payloads/Kexts/Ethernet/" "nForceEthernet-v%s.zip" % nforce_version)
|
||||
|
||||
@@ -210,6 +210,24 @@
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
<key>Comment</key>
|
||||
<string>Process Blocker</string>
|
||||
<key>Enabled</key>
|
||||
<true/><!--RestrictEvents-->
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string></string>
|
||||
<key>BundlePath</key>
|
||||
<string>RestrictEvents.kext</string>
|
||||
<key>ExecutablePath</key>
|
||||
<string>Contents/MacOS/RestrictEvents</string>
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
@@ -448,7 +466,7 @@
|
||||
<key>Comment</key>
|
||||
<string>USB Map</string>
|
||||
<key>Enabled</key>
|
||||
<true/>
|
||||
<false/><!--USBmap-->
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
@@ -569,7 +587,7 @@
|
||||
<key>ConsoleAttributes</key>
|
||||
<integer>0</integer>
|
||||
<key>HibernateMode</key>
|
||||
<string>None</string>
|
||||
<string>Auto</string>
|
||||
<key>HideAuxiliary</key>
|
||||
<true/>
|
||||
<key>PickerAttributes</key>
|
||||
@@ -625,7 +643,7 @@
|
||||
<key>EnablePassword</key>
|
||||
<false/>
|
||||
<key>ExposeSensitiveData</key>
|
||||
<integer>6</integer>
|
||||
<integer>15</integer>
|
||||
<key>HaltLevel</key>
|
||||
<integer>2147483648</integer>
|
||||
<key>PasswordHash</key>
|
||||
|
||||
@@ -212,6 +212,24 @@
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
<key>Comment</key>
|
||||
<string>Process Blocker</string>
|
||||
<key>Enabled</key>
|
||||
<true/><!--RestrictEvents-->
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string></string>
|
||||
<key>BundlePath</key>
|
||||
<string>RestrictEvents.kext</string>
|
||||
<key>ExecutablePath</key>
|
||||
<string>Contents/MacOS/RestrictEvents</string>
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
@@ -450,7 +468,7 @@
|
||||
<key>Comment</key>
|
||||
<string>USB Map</string>
|
||||
<key>Enabled</key>
|
||||
<true/>
|
||||
<false/><!--USBmap-->
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
@@ -571,7 +589,7 @@
|
||||
<key>ConsoleAttributes</key>
|
||||
<integer>0</integer>
|
||||
<key>HibernateMode</key>
|
||||
<string>None</string>
|
||||
<string>Auto</string>
|
||||
<key>HideAuxiliary</key>
|
||||
<true/>
|
||||
<key>PickerAttributes</key>
|
||||
@@ -623,13 +641,13 @@
|
||||
<key>BootProtect</key>
|
||||
<string>Bootstrap</string>
|
||||
<key>BlacklistAppleUpdate</key>
|
||||
<false/>
|
||||
<true/>
|
||||
<key>DmgLoading</key>
|
||||
<string>Signed</string>
|
||||
<key>EnablePassword</key>
|
||||
<false/>
|
||||
<key>ExposeSensitiveData</key>
|
||||
<integer>6</integer>
|
||||
<integer>15</integer>
|
||||
<key>HaltLevel</key>
|
||||
<integer>2147483648</integer>
|
||||
<key>PasswordHash</key>
|
||||
|
||||
BIN
payloads/Kexts/Acidanthera/RestrictEvents-v1.0.0.zip
Normal file
BIN
payloads/Kexts/Acidanthera/RestrictEvents-v1.0.0.zip
Normal file
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user