mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-22 19:10:15 +10:00
Add basic plist editing
This commit is contained in:
197
README.md
197
README.md
@@ -1,5 +1,19 @@
|
|||||||
# OpenCore Legacy Patcher
|
# OpenCore Legacy Patcher
|
||||||
|
|
||||||
|
A python script for building and booting OpenCore on legacy Macs, see [Supported SMBIOS](#supported-smbios) on whether your model is supported.
|
||||||
|
|
||||||
|
Current TO-DO's with this patcher:
|
||||||
|
|
||||||
|
* [x] Create OpenCore EFI
|
||||||
|
* [ ] Create macOS Installer
|
||||||
|
* [ ] Install OpenCore to USB
|
||||||
|
* [ ] Install OpenCore to internal drive
|
||||||
|
* [ ] USB mapping
|
||||||
|
* [ ] Legacy GPU patches
|
||||||
|
* ie. 2011 and older
|
||||||
|
* [ ] Audio patches
|
||||||
|
* ie. 2011 and older
|
||||||
|
|
||||||
## Supported SMBIOS
|
## Supported SMBIOS
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -65,186 +79,3 @@ Xserve3,1
|
|||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Hardware Patches
|
|
||||||
|
|
||||||
#### MacBook
|
|
||||||
|
|
||||||
```
|
|
||||||
MacBook5,1
|
|
||||||
MacBook5,2
|
|
||||||
Wifi Patch - BCM4322
|
|
||||||
AppleHDA Patch
|
|
||||||
SSE4.1 Patch
|
|
||||||
Ethernet Patch - Nvidia MCP79
|
|
||||||
GPU Patch
|
|
||||||
MacBook6,1
|
|
||||||
MacBook7,1
|
|
||||||
Wifi Patch - BCM43224
|
|
||||||
AppleHDA Patch
|
|
||||||
SSE4.1 Patch
|
|
||||||
Ethernet Patch - Nvidia MCP79
|
|
||||||
GPU Patch
|
|
||||||
```
|
|
||||||
|
|
||||||
#### MacBook Air
|
|
||||||
|
|
||||||
```
|
|
||||||
MacBookAir2,1
|
|
||||||
MacBookAir3,1
|
|
||||||
MacBookAir3,2
|
|
||||||
Wifi Patch - BCM4322
|
|
||||||
AppleHDA Patch
|
|
||||||
SSE4.1 Patch
|
|
||||||
GPU Patch
|
|
||||||
MacBookAir4,1
|
|
||||||
MacBookAir4,2
|
|
||||||
Wifi Patch - BCM4322
|
|
||||||
AppleHDA Patch
|
|
||||||
GPU Patch
|
|
||||||
MacBookAir5,1
|
|
||||||
MacBookAir5,2
|
|
||||||
Wifi Patch - BCM4322
|
|
||||||
```
|
|
||||||
|
|
||||||
#### MacBook Pro
|
|
||||||
|
|
||||||
```
|
|
||||||
MacBookPro3,1
|
|
||||||
Wifi Patch - AR5418
|
|
||||||
Ethernet Patch - Marvell
|
|
||||||
AppleHDA Patch
|
|
||||||
SSE4.1 Patch
|
|
||||||
GPU Patch
|
|
||||||
MacBookPro4,1
|
|
||||||
Wifi Patch - BCM4328
|
|
||||||
Ethernet Patch - Marvell
|
|
||||||
AppleHDA Patch
|
|
||||||
SSE4.1 Patch
|
|
||||||
GPU Patch
|
|
||||||
MacBookPro5,1
|
|
||||||
MacBookPro5,2
|
|
||||||
MacBookPro5,3
|
|
||||||
MacBookPro5,4
|
|
||||||
MacBookPro5,5
|
|
||||||
Wifi Patch - BCM4322
|
|
||||||
Ethernet Patch - Nvidia
|
|
||||||
AppleHDA Patch
|
|
||||||
SSE4.1 Patch
|
|
||||||
GPU Patch
|
|
||||||
MacBookPro6,1
|
|
||||||
MacBookPro6,2
|
|
||||||
Wifi Patch - BCM43224
|
|
||||||
Ethernet Patch - Broadcom
|
|
||||||
AppleHDA Patch
|
|
||||||
GPU Patch
|
|
||||||
MacBookPro7,1
|
|
||||||
Wifi Patch - BCM4322
|
|
||||||
Ethernet Patch - Nvidia
|
|
||||||
AppleHDA Patch
|
|
||||||
SSE4.1 Patch
|
|
||||||
GPU Patch
|
|
||||||
MacBookPro8,1
|
|
||||||
MacBookPro8,2
|
|
||||||
MacBookPro8,3
|
|
||||||
Wifi Patch - BCM4331
|
|
||||||
Ethernet Patch - Broadcom
|
|
||||||
AppleHDA Patch
|
|
||||||
GPU Patch
|
|
||||||
MacBookPro9,1
|
|
||||||
MacBookPro9,2
|
|
||||||
Wifi Patch - BCM4331
|
|
||||||
MacBookPro10,1
|
|
||||||
MacBookPro10,2
|
|
||||||
Wifi Patch - BCM4331
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Mac Mini
|
|
||||||
|
|
||||||
```
|
|
||||||
Macmini3,1
|
|
||||||
Macmini4,1
|
|
||||||
Wifi Patch - BCM43224
|
|
||||||
Ethernet Patch - Nvidia
|
|
||||||
AppleHDA Patch
|
|
||||||
SSE4.1 Patch
|
|
||||||
GPU Patch
|
|
||||||
Macmini5,1
|
|
||||||
Macmini5,2
|
|
||||||
Macmini5,3
|
|
||||||
Wifi Patch - BCM4331
|
|
||||||
Ethernet Patch - Broadcom
|
|
||||||
AppleHDA Patch
|
|
||||||
GPU Patch
|
|
||||||
Macmini6,1
|
|
||||||
Macmini6,2
|
|
||||||
Wifi Patch - BCM4331
|
|
||||||
```
|
|
||||||
|
|
||||||
#### iMac
|
|
||||||
|
|
||||||
```
|
|
||||||
iMac7,1
|
|
||||||
iMac8,1
|
|
||||||
Wifi Patch - BCM4328
|
|
||||||
Ethernet Patch - Nvidia
|
|
||||||
AppleHDA Patch
|
|
||||||
SSE4.1 Patch
|
|
||||||
GPU Patch
|
|
||||||
iMac9,1
|
|
||||||
Wifi Patch - BCM4322
|
|
||||||
Ethernet Patch - Nvidia
|
|
||||||
AppleHDA Patch
|
|
||||||
SSE4.1 Patch
|
|
||||||
GPU Patch
|
|
||||||
iMac10,1
|
|
||||||
Wifi Patch - Atheros
|
|
||||||
Ethernet Patch - Nvidia
|
|
||||||
AppleHDA Patch
|
|
||||||
SSE4.1 Patch
|
|
||||||
GPU Patch
|
|
||||||
iMac11,1
|
|
||||||
iMac11,2
|
|
||||||
iMac11,3
|
|
||||||
Wifi Patch - Atheros
|
|
||||||
Ethernet Patch - Broadcom
|
|
||||||
AppleHDA Patch
|
|
||||||
GPU Patch
|
|
||||||
CPBG SSDT
|
|
||||||
iMac12,1
|
|
||||||
iMac12,2
|
|
||||||
Wifi Patch - Atheros
|
|
||||||
Ethernet Patch - Broadcom
|
|
||||||
AppleHDA Patch
|
|
||||||
GPU Patch
|
|
||||||
iMac13,1
|
|
||||||
iMac13,2
|
|
||||||
Wifi Patch - BCM4331
|
|
||||||
iMac14,1
|
|
||||||
iMac14,2
|
|
||||||
iMac14,3
|
|
||||||
None
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Mac Pro
|
|
||||||
|
|
||||||
```
|
|
||||||
MacPro3,1
|
|
||||||
Wifi Patch - Atheros
|
|
||||||
AppleHDA Patch
|
|
||||||
SSE4.1 Patch
|
|
||||||
AppleMCEReporterDisabler for Dual Socket
|
|
||||||
MacPro4,1
|
|
||||||
Wifi Patch - Atheros
|
|
||||||
AppleMCEReporterDisabler for Dual Socket
|
|
||||||
MacPro5,1
|
|
||||||
Wifi patch - BCM4322
|
|
||||||
AppleMCEReporterDisabler for Dual Socket
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Xserve
|
|
||||||
|
|
||||||
```
|
|
||||||
Xserve3,1
|
|
||||||
AppleMCEReporterDisabler for Dual Socket
|
|
||||||
|
|
||||||
```
|
|
||||||
174
main.py
174
main.py
@@ -307,12 +307,41 @@ LegacyGPU = [
|
|||||||
"iMac12,2"
|
"iMac12,2"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
LegacyHID = [
|
||||||
|
"MacBook5,1",
|
||||||
|
"MacBook5,2",
|
||||||
|
"MacBook6,1",
|
||||||
|
"MacBook7,1",
|
||||||
|
"MacBookAir2,1",
|
||||||
|
"MacBookAir3,1",
|
||||||
|
"MacBookPro3,1",
|
||||||
|
"MacBookPro4,1",
|
||||||
|
"MacBookPro5,1",
|
||||||
|
"MacBookPro5,2",
|
||||||
|
"MacBookPro5,3",
|
||||||
|
"MacBookPro5,4",
|
||||||
|
"MacBookPro5,5",
|
||||||
|
"MacBookPro7,1",
|
||||||
|
"Macmini3,1",
|
||||||
|
"Macmini4,1",
|
||||||
|
"iMac7,1",
|
||||||
|
"iMac8,1",
|
||||||
|
"iMac9,1",
|
||||||
|
"iMac10,1",
|
||||||
|
]
|
||||||
|
|
||||||
|
NVMePatch = [
|
||||||
|
"MacPro3,1"
|
||||||
|
"MacPro4,1"
|
||||||
|
"Xserve3,1"
|
||||||
|
]
|
||||||
|
|
||||||
# List build versions
|
# List build versions
|
||||||
patcher_version = "0.0.1"
|
patcher_version = "0.0.1"
|
||||||
opencore_version = "0.6.3"
|
opencore_version = "0.6.3"
|
||||||
lilu_version = "1.4.9"
|
lilu_version = "1.4.9"
|
||||||
whatevergreen_version = "1.4.4"
|
whatevergreen_version = "1.4.4"
|
||||||
airportbcrmfixup_path = "2.1.1"
|
airportbcrmfixup_version = "2.1.1"
|
||||||
bcm570_version = "1.0.0"
|
bcm570_version = "1.0.0"
|
||||||
marvel_version = "1.0.0"
|
marvel_version = "1.0.0"
|
||||||
nforce_version = "1.0.0"
|
nforce_version = "1.0.0"
|
||||||
@@ -328,6 +357,13 @@ current_path = os.getcwd()
|
|||||||
# Payload Location
|
# Payload Location
|
||||||
# OpenCore
|
# OpenCore
|
||||||
opencore_path = os.path.join(current_path, "payloads/OpenCore/" "OpenCore-v%s.zip" % opencore_version)
|
opencore_path = os.path.join(current_path, "payloads/OpenCore/" "OpenCore-v%s.zip" % opencore_version)
|
||||||
|
plist_path = os.path.join(current_path, "payloads/Config/v%s/" "config.plist" % opencore_version)
|
||||||
|
|
||||||
|
# ACPI
|
||||||
|
pci_ssdt_path = os.path.join(current_path, "payloads/ACPI/" "SSDT-CPBG.aml")
|
||||||
|
|
||||||
|
# Drivers
|
||||||
|
nvme_driver_path = os.path.join(current_path, "payloads/Drivers/" "NvmExpressDxe.efi")
|
||||||
|
|
||||||
# Kexts
|
# Kexts
|
||||||
lilu_path = os.path.join(current_path, "payloads/Kexts/Acidanthera/" "Lilu-v%s.zip" % lilu_version)
|
lilu_path = os.path.join(current_path, "payloads/Kexts/Acidanthera/" "Lilu-v%s.zip" % lilu_version)
|
||||||
@@ -342,12 +378,12 @@ telemetrap_path = os.path.join(current_path, "payloads/Kexts/SSE/" "telemetrap-v
|
|||||||
io80211high_sierra_path = os.path.join(current_path, "payloads/Kexts/Wifi/" "IO80211HighSierra-v%s.zip" % io80211high_sierra_version)
|
io80211high_sierra_path = os.path.join(current_path, "payloads/Kexts/Wifi/" "IO80211HighSierra-v%s.zip" % io80211high_sierra_version)
|
||||||
io80211mojave_path = os.path.join(current_path, "payloads/Kexts/Wifi/" "IO80211Mojave-v%s.zip" % io80211mojave_version)
|
io80211mojave_path = os.path.join(current_path, "payloads/Kexts/Wifi/" "IO80211Mojave-v%s.zip" % io80211mojave_version)
|
||||||
|
|
||||||
# ACPI
|
|
||||||
pci_ssdt_path = os.path.join(current_path, "payloads/ACPI/" "SSDT-CPBG.aml")
|
|
||||||
|
|
||||||
# Build Location
|
# Build Location
|
||||||
opencore_path_build = os.path.join(current_path, "Build-Folder/" "OpenCore-v%s.zip" % opencore_version)
|
opencore_path_build = os.path.join(current_path, "Build-Folder/" "OpenCore-v%s.zip" % opencore_version)
|
||||||
|
plist_path_build = os.path.join(current_path, "Build-Folder/" "OpenCore-v%s/EFI/OC/" % opencore_version)
|
||||||
|
plist_path_build_full = os.path.join(current_path, "Build-Folder/" "OpenCore-v%s/EFI/OC/config.plist" % opencore_version)
|
||||||
acpi_path_build = os.path.join(current_path, "Build-Folder/" "OpenCore-v%s/EFI/OC/ACPI" % opencore_version)
|
acpi_path_build = os.path.join(current_path, "Build-Folder/" "OpenCore-v%s/EFI/OC/ACPI" % opencore_version)
|
||||||
|
drivers_path_build = os.path.join(current_path, "Build-Folder/" "OpenCore-v%s/EFI/OC/Drivers" % opencore_version)
|
||||||
kext_path_build = os.path.join(current_path, "Build-Folder/" "OpenCore-v%s/EFI/OC/Kexts" % opencore_version)
|
kext_path_build = os.path.join(current_path, "Build-Folder/" "OpenCore-v%s/EFI/OC/Kexts" % opencore_version)
|
||||||
opencore_path_done = os.path.join(current_path, "Build-Folder/" "OpenCore-v%s" % opencore_version)
|
opencore_path_done = os.path.join(current_path, "Build-Folder/" "OpenCore-v%s" % opencore_version)
|
||||||
|
|
||||||
@@ -365,22 +401,27 @@ MainMenu=True
|
|||||||
while MainMenu:
|
while MainMenu:
|
||||||
os.system('clear')
|
os.system('clear')
|
||||||
|
|
||||||
print("#######################################################")
|
print("###################################################")
|
||||||
print(" OpenCore Legacy patcher v%s" % patcher_version)
|
print(" OpenCore Legacy patcher v%s" % patcher_version)
|
||||||
print(" Current Model: %s" % current_model)
|
print(" Current Model: %s" % current_model)
|
||||||
print("#######################################################")
|
print("###################################################")
|
||||||
print("")
|
print("")
|
||||||
if current_model not in SupportedSMBIOS:
|
if current_model not in SupportedSMBIOS:
|
||||||
print(" Your model is not supported by this patcher!")
|
print(" Your model is not supported by this patcher!")
|
||||||
print("")
|
print("")
|
||||||
print(" If you plan to create the USB for another machine,")
|
print(" If you plan to create the USB for another machine,")
|
||||||
print(" please select option 5")
|
print(" please select option 5")
|
||||||
print("-------------------------------------------------------")
|
print("---------------------------------------------------")
|
||||||
|
print("")
|
||||||
|
elif current_model in ("MacPro3,1", "iMac7,1"):
|
||||||
|
print(" This model is supported")
|
||||||
|
print(" However please ensure the CPU have been upgraded")
|
||||||
|
print(" to support SSE4.1+")
|
||||||
|
print("---------------------------------------------------")
|
||||||
print("")
|
print("")
|
||||||
else:
|
else:
|
||||||
pass
|
|
||||||
print(" This model is supported")
|
print(" This model is supported")
|
||||||
print("-------------------------------------------------------")
|
print("---------------------------------------------------")
|
||||||
print("")
|
print("")
|
||||||
print(" 1. Build OpenCore")
|
print(" 1. Build OpenCore")
|
||||||
print(" 2. Create macOS Installer - Not yet implemented")
|
print(" 2. Create macOS Installer - Not yet implemented")
|
||||||
@@ -436,9 +477,16 @@ while MainMenu:
|
|||||||
print("Deleting old copy of OpenCore folder")
|
print("Deleting old copy of OpenCore folder")
|
||||||
rmtree(opencore_path_done)
|
rmtree(opencore_path_done)
|
||||||
print("")
|
print("")
|
||||||
print("- Adding OpenCore to build folder")
|
print("- Adding OpenCore v%s" % opencore_version)
|
||||||
copy(opencore_path, build_path)
|
copy(opencore_path, build_path)
|
||||||
zipfile.ZipFile(opencore_path_build).extractall(build_path)
|
zipfile.ZipFile(opencore_path_build).extractall(build_path)
|
||||||
|
|
||||||
|
print("- Adding config.plist v%s" % opencore_version)
|
||||||
|
# Setup config.plist for editing
|
||||||
|
copy(plist_path, plist_path_build)
|
||||||
|
with open(plist_path_build_full, 'r') as file :
|
||||||
|
plist_data = file.read()
|
||||||
|
|
||||||
print("- Adding Lilu %s" % lilu_version)
|
print("- Adding Lilu %s" % lilu_version)
|
||||||
copy(lilu_path, kext_path_build)
|
copy(lilu_path, kext_path_build)
|
||||||
print("- Adding WhateverGreen %s" % whatevergreen_version)
|
print("- Adding WhateverGreen %s" % whatevergreen_version)
|
||||||
@@ -449,50 +497,141 @@ while MainMenu:
|
|||||||
if current_model in DualSocket:
|
if current_model in DualSocket:
|
||||||
print("- Adding AppleMCEReporterDisabler v%s" % mce_version)
|
print("- Adding AppleMCEReporterDisabler v%s" % mce_version)
|
||||||
copy(mce_path, kext_path_build)
|
copy(mce_path, kext_path_build)
|
||||||
|
plist_data = plist_data.replace(
|
||||||
|
"<false/><!--AppleMCEReporterDisabler-->",
|
||||||
|
"<true/><!--AppleMCEReporterDisabler-->"
|
||||||
|
)
|
||||||
|
|
||||||
if current_model in SSEEmulator:
|
if current_model in SSEEmulator:
|
||||||
print("- Adding AAAMouSSE v%s" % mousse_version)
|
print("- Adding AAAMouSSE v%s" % mousse_version)
|
||||||
copy(mousse_version, kext_path_build)
|
copy(mousse_version, kext_path_build)
|
||||||
|
plist_data = plist_data.replace(
|
||||||
|
"<false/><!--AAAMouSSE-->",
|
||||||
|
"<true/><!--AAAMouSSE-->"
|
||||||
|
)
|
||||||
if current_model in MissingSSE42:
|
if current_model in MissingSSE42:
|
||||||
print("- Adding Teletrap %s" % telemetrap_version)
|
print("- Adding telemetrap %s" % telemetrap_version)
|
||||||
copy(telemetrap_path, kext_path_build)
|
copy(telemetrap_path, kext_path_build)
|
||||||
|
plist_data = plist_data.replace(
|
||||||
|
"<false/><!--telemetrap-->",
|
||||||
|
"<true/><!--telemetrap-->"
|
||||||
|
)
|
||||||
|
|
||||||
# Ethernet Patches
|
# Ethernet Patches
|
||||||
|
|
||||||
if current_model in EthernetNvidia:
|
if current_model in EthernetNvidia:
|
||||||
print("- Adding nForceEthernet v%s" % nforce_version)
|
print("- Adding nForceEthernet v%s" % nforce_version)
|
||||||
copy(nforce_path, kext_path_build)
|
copy(nforce_path, kext_path_build)
|
||||||
|
plist_data = plist_data.replace(
|
||||||
|
"<false/><!--nForceEthernet-->",
|
||||||
|
"<true/><!--nForceEthernet-->"
|
||||||
|
)
|
||||||
if current_model in EthernetMarvell:
|
if current_model in EthernetMarvell:
|
||||||
print("- Adding MarvelYukonEthernet v%s" % marvel_version)
|
print("- Adding MarvelYukonEthernet v%s" % marvel_version)
|
||||||
copy(marvel_path, kext_path_build)
|
copy(marvel_path, kext_path_build)
|
||||||
|
plist_data = plist_data.replace(
|
||||||
|
"<false/><!--MarvelYukonEthernet-->",
|
||||||
|
"<true/><!--MarvelYukonEthernet-->"
|
||||||
|
)
|
||||||
if current_model in EthernetBroadcom:
|
if current_model in EthernetBroadcom:
|
||||||
print("- Adding CatalinaBCM5701Ethernet %s" % bcm570_version)
|
print("- Adding CatalinaBCM5701Ethernet %s" % bcm570_version)
|
||||||
copy(bcm570_path, kext_path_build)
|
copy(bcm570_path, kext_path_build)
|
||||||
|
plist_data = plist_data.replace(
|
||||||
|
"<false/><!--CatalinaBCM5701Ethernet-->",
|
||||||
|
"<true/><!--CatalinaBCM5701Ethernet-->"
|
||||||
|
)
|
||||||
|
|
||||||
# Wifi Patches
|
# Wifi Patches
|
||||||
|
|
||||||
if current_model in WifiAtheros:
|
if current_model in WifiAtheros:
|
||||||
print("- Adding IO80211HighSierra v%s" % io80211high_sierra_version)
|
print("- Adding IO80211HighSierra v%s" % io80211high_sierra_version)
|
||||||
copy(io80211high_sierra_path, kext_path_build)
|
copy(io80211high_sierra_path, kext_path_build)
|
||||||
|
plist_data = plist_data.replace(
|
||||||
|
"<false/><!--IO80211HighSierra-->",
|
||||||
|
"<true/><!--IO80211HighSierra-->"
|
||||||
|
)
|
||||||
|
plist_data = plist_data.replace(
|
||||||
|
"<false/><!--AirPortAtheros40-->",
|
||||||
|
"<true/><!--AirPortAtheros40-->"
|
||||||
|
)
|
||||||
if current_model in WifiBCM94328:
|
if current_model in WifiBCM94328:
|
||||||
print("- Wifi patches currently unsupported")
|
print("- Wifi patches currently unsupported")
|
||||||
# TO-DO: Add El Capitan's IO80211
|
# TO-DO: Add El Capitan's IO80211
|
||||||
if current_model in WifiBCM94322:
|
if current_model in WifiBCM94322:
|
||||||
print("- Adding IO80211Mojave %s" % io80211mojave_version)
|
print("- Adding IO80211Mojave %s" % io80211mojave_version)
|
||||||
copy(io80211mojave_path, kext_path_build)
|
copy(io80211mojave_path, kext_path_build)
|
||||||
|
plist_data = plist_data.replace(
|
||||||
|
"<false/><!--IO80211Mojave-->",
|
||||||
|
"<true/><!--IO80211Mojave-->"
|
||||||
|
)
|
||||||
|
plist_data = plist_data.replace(
|
||||||
|
"<false/><!--AirPortBrcm4331-->",
|
||||||
|
"<true/><!--AirPortBrcm4331-->"
|
||||||
|
)
|
||||||
if current_model in WifiBCM943224:
|
if current_model in WifiBCM943224:
|
||||||
print("- Adding IO80211Mojave %s" % io80211mojave_version)
|
print("- Adding IO80211Mojave %s" % io80211mojave_version)
|
||||||
copy(io80211mojave_path, kext_path_build)
|
copy(io80211mojave_path, kext_path_build)
|
||||||
|
plist_data = plist_data.replace(
|
||||||
|
"<false/><!--IO80211Mojave-->",
|
||||||
|
"<true/><!--IO80211Mojave-->"
|
||||||
|
)
|
||||||
|
plist_data = plist_data.replace(
|
||||||
|
"<false/><!--AirPortBrcm4331-->",
|
||||||
|
"<true/><!--AirPortBrcm4331-->"
|
||||||
|
)
|
||||||
if current_model in WifiBCM94331:
|
if current_model in WifiBCM94331:
|
||||||
print("- Wifi patches currently unsupported")
|
print("- Adding AirportBrcmFixup and appling fake ID")
|
||||||
# TO-DO: Add Fake ID and AirportBrcmFixup for native support
|
copy(airportbcrmfixup_path, kext_path_build)
|
||||||
|
plist_data = plist_data.replace(
|
||||||
|
"<false/><!--AirportBrcmFixup-->",
|
||||||
|
"<true/><!--AirportBrcmFixup-->"
|
||||||
|
)
|
||||||
|
plist_data = plist_data.replace(
|
||||||
|
"<false/><!--AirPortBrcmNIC_Injector-->",
|
||||||
|
"<true/><!--AirPortBrcmNIC_Injector-->"
|
||||||
|
)
|
||||||
|
if current_model in ("iMac13,1", "iMac13,2"):
|
||||||
|
plist_data = plist_data.replace(
|
||||||
|
"#PciRoot(0x0)/Pci(0x1C,0x1)Pci(0x0,0x0)",
|
||||||
|
"PciRoot(0x0)/Pci(0x1C,0x3)Pci(0x0,0x0)"
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
plist_data = plist_data.replace(
|
||||||
|
"#PciRoot(0x0)/Pci(0x1C,0x1)Pci(0x0,0x0)",
|
||||||
|
"PciRoot(0x0)/Pci(0x1C,0x1)Pci(0x0,0x0)"
|
||||||
|
)
|
||||||
|
|
||||||
# Checks for ACPI
|
# Checks for ACPI
|
||||||
# Add SSDTs
|
# Add SSDTs
|
||||||
if current_model in pciSSDT:
|
if current_model in pciSSDT:
|
||||||
print("- SSDT-CPBG.aml")
|
print("- Adding SSDT-CPBG.aml")
|
||||||
copy(pci_ssdt_path, acpi_path_build)
|
copy(pci_ssdt_path, acpi_path_build)
|
||||||
|
plist_data = plist_data.replace(
|
||||||
|
"<false/><!--SSDT-CPBG-->",
|
||||||
|
"<true/><!--SSDT-CPBG-->"
|
||||||
|
)
|
||||||
|
|
||||||
# Add Config.plist
|
# Check for Kernel Patches
|
||||||
|
if current_model in LegacyHID:
|
||||||
|
print("- Adding IOHIDFamily Patch")
|
||||||
|
copy(pci_ssdt_path, acpi_path_build)
|
||||||
|
plist_data = plist_data.replace(
|
||||||
|
"<false/><!--IOHIDFamily-->",
|
||||||
|
"<true/><!--IOHIDFamily-->"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Check for EFI Drivers
|
||||||
|
if current_model in NVMePatch:
|
||||||
|
print("- Adding NVMe support")
|
||||||
|
copy(nvme_driver_path, drivers_path_build)
|
||||||
|
plist_data = plist_data.replace(
|
||||||
|
"<string>#NvmExpressDxe.efi</string>",
|
||||||
|
"<string>NvmExpressDxe.efi</string>"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Save config.plist changes in memory
|
||||||
|
with open(plist_path_build_full, 'w') as file:
|
||||||
|
file.write(plist_data)
|
||||||
|
|
||||||
# Clean up Build Folder
|
# Clean up Build Folder
|
||||||
print("")
|
print("")
|
||||||
@@ -514,6 +653,7 @@ while MainMenu:
|
|||||||
print("")
|
print("")
|
||||||
print("Your OpenCore EFI has been built at:")
|
print("Your OpenCore EFI has been built at:")
|
||||||
print(" %s" % opencore_path_done)
|
print(" %s" % opencore_path_done)
|
||||||
|
print("")
|
||||||
AutoBuilderMenu = raw_input("Press any key to return to previous menu: ")
|
AutoBuilderMenu = raw_input("Press any key to return to previous menu: ")
|
||||||
if AutoBuilderMenu=="1":
|
if AutoBuilderMenu=="1":
|
||||||
print("Returning to previous menu...")
|
print("Returning to previous menu...")
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<array>
|
<array>
|
||||||
<dict>
|
<dict>
|
||||||
<key>Enabled</key>
|
<key>Enabled</key>
|
||||||
<false/>
|
<false/><!--SSDT-CPBG-->
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
<string>Patch CPBG for Arrendale, Lynnfield and Clarkdale</string>
|
<string>Patch CPBG for Arrendale, Lynnfield and Clarkdale</string>
|
||||||
<key>Path</key>
|
<key>Path</key>
|
||||||
@@ -21,11 +21,11 @@
|
|||||||
<array>
|
<array>
|
||||||
<dict>
|
<dict>
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
<string>XHC1 to SHCI</string>
|
<string>XHC1 to SHC1</string>
|
||||||
<key>Count</key>
|
<key>Count</key>
|
||||||
<integer>0</integer>
|
<integer>0</integer>
|
||||||
<key>Enabled</key>
|
<key>Enabled</key>
|
||||||
<false/>
|
<true/>
|
||||||
<key>Find</key>
|
<key>Find</key>
|
||||||
<data>WEhDMQ==</data>
|
<data>WEhDMQ==</data>
|
||||||
<key>Limit</key>
|
<key>Limit</key>
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
<key>OemTableId</key>
|
<key>OemTableId</key>
|
||||||
<data></data>
|
<data></data>
|
||||||
<key>Replace</key>
|
<key>Replace</key>
|
||||||
<data>U0hDSQ==</data>
|
<data>U0hDMQ==</data>
|
||||||
<key>ReplaceMask</key>
|
<key>ReplaceMask</key>
|
||||||
<data></data>
|
<data></data>
|
||||||
<key>Skip</key>
|
<key>Skip</key>
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
<key>Count</key>
|
<key>Count</key>
|
||||||
<integer>0</integer>
|
<integer>0</integer>
|
||||||
<key>Enabled</key>
|
<key>Enabled</key>
|
||||||
<false/>
|
<true/>
|
||||||
<key>Find</key>
|
<key>Find</key>
|
||||||
<data>RUhDMQ==</data>
|
<data>RUhDMQ==</data>
|
||||||
<key>Limit</key>
|
<key>Limit</key>
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
<key>Count</key>
|
<key>Count</key>
|
||||||
<integer>0</integer>
|
<integer>0</integer>
|
||||||
<key>Enabled</key>
|
<key>Enabled</key>
|
||||||
<false/>
|
<true/>
|
||||||
<key>Find</key>
|
<key>Find</key>
|
||||||
<data>RUhDMg==</data>
|
<data>RUhDMg==</data>
|
||||||
<key>Limit</key>
|
<key>Limit</key>
|
||||||
@@ -158,10 +158,12 @@
|
|||||||
<dict>
|
<dict>
|
||||||
<key>Add</key>
|
<key>Add</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>PciRoot(0x0)/Pci(0x1b,0x0)</key>
|
<key>#PciRoot(0x0)/Pci(0x1C,0x1)Pci(0x0,0x0)</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>layout-id</key>
|
<key>device-id</key>
|
||||||
<data>AQAAAA==</data>
|
<data>ukMAAA==</data>
|
||||||
|
<key>compatible</key>
|
||||||
|
<string>pci14e4,43ba</string>
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
<key>Delete</key>
|
<key>Delete</key>
|
||||||
@@ -175,7 +177,7 @@
|
|||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
<string>Patching Engine</string>
|
<string>Patching Engine</string>
|
||||||
<key>Enabled</key>
|
<key>Enabled</key>
|
||||||
<true/>
|
<true/><!--Lilu-->
|
||||||
<key>MaxKernel</key>
|
<key>MaxKernel</key>
|
||||||
<string></string>
|
<string></string>
|
||||||
<key>MinKernel</key>
|
<key>MinKernel</key>
|
||||||
@@ -191,7 +193,7 @@
|
|||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
<string>GPU Patching</string>
|
<string>GPU Patching</string>
|
||||||
<key>Enabled</key>
|
<key>Enabled</key>
|
||||||
<true/>
|
<true/><!--WEG-->
|
||||||
<key>MaxKernel</key>
|
<key>MaxKernel</key>
|
||||||
<string></string>
|
<string></string>
|
||||||
<key>MinKernel</key>
|
<key>MinKernel</key>
|
||||||
@@ -207,7 +209,7 @@
|
|||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
<string>SSE Emulator</string>
|
<string>SSE Emulator</string>
|
||||||
<key>Enabled</key>
|
<key>Enabled</key>
|
||||||
<false/>
|
<false/><!--AAAMouSSE-->
|
||||||
<key>MaxKernel</key>
|
<key>MaxKernel</key>
|
||||||
<string></string>
|
<string></string>
|
||||||
<key>MinKernel</key>
|
<key>MinKernel</key>
|
||||||
@@ -223,7 +225,7 @@
|
|||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
<string>SSE Patcher</string>
|
<string>SSE Patcher</string>
|
||||||
<key>Enabled</key>
|
<key>Enabled</key>
|
||||||
<false/>
|
<false/><!--telemetrap-->
|
||||||
<key>MaxKernel</key>
|
<key>MaxKernel</key>
|
||||||
<string></string>
|
<string></string>
|
||||||
<key>MinKernel</key>
|
<key>MinKernel</key>
|
||||||
@@ -239,7 +241,7 @@
|
|||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
<string>4331 Wifi Patch</string>
|
<string>4331 Wifi Patch</string>
|
||||||
<key>Enabled</key>
|
<key>Enabled</key>
|
||||||
<false/>
|
<false/><!--AirportBrcmFixup-->
|
||||||
<key>MaxKernel</key>
|
<key>MaxKernel</key>
|
||||||
<string></string>
|
<string></string>
|
||||||
<key>MinKernel</key>
|
<key>MinKernel</key>
|
||||||
@@ -255,7 +257,7 @@
|
|||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
<string>4331 Wifi Patch</string>
|
<string>4331 Wifi Patch</string>
|
||||||
<key>Enabled</key>
|
<key>Enabled</key>
|
||||||
<false/>
|
<false/><!--AirPortBrcmNIC_Injector-->
|
||||||
<key>MaxKernel</key>
|
<key>MaxKernel</key>
|
||||||
<string></string>
|
<string></string>
|
||||||
<key>MinKernel</key>
|
<key>MinKernel</key>
|
||||||
@@ -271,7 +273,7 @@
|
|||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
<string>Dual Socket Patch</string>
|
<string>Dual Socket Patch</string>
|
||||||
<key>Enabled</key>
|
<key>Enabled</key>
|
||||||
<false/>
|
<false/><!--AppleMCEReporterDisabler-->
|
||||||
<key>MaxKernel</key>
|
<key>MaxKernel</key>
|
||||||
<string></string>
|
<string></string>
|
||||||
<key>MinKernel</key>
|
<key>MinKernel</key>
|
||||||
@@ -287,7 +289,7 @@
|
|||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
<string>BCM Ethernet patch</string>
|
<string>BCM Ethernet patch</string>
|
||||||
<key>Enabled</key>
|
<key>Enabled</key>
|
||||||
<false/>
|
<false/><!--CatalinaBCM5701Ethernet-->
|
||||||
<key>MaxKernel</key>
|
<key>MaxKernel</key>
|
||||||
<string></string>
|
<string></string>
|
||||||
<key>MinKernel</key>
|
<key>MinKernel</key>
|
||||||
@@ -303,7 +305,7 @@
|
|||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
<string>Atheros Wifi Patch</string>
|
<string>Atheros Wifi Patch</string>
|
||||||
<key>Enabled</key>
|
<key>Enabled</key>
|
||||||
<false/>
|
<false/><!--IO80211HighSierra-->
|
||||||
<key>MaxKernel</key>
|
<key>MaxKernel</key>
|
||||||
<string></string>
|
<string></string>
|
||||||
<key>MinKernel</key>
|
<key>MinKernel</key>
|
||||||
@@ -319,7 +321,7 @@
|
|||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
<string>Atheros Wifi Patch</string>
|
<string>Atheros Wifi Patch</string>
|
||||||
<key>Enabled</key>
|
<key>Enabled</key>
|
||||||
<false/>
|
<false/><!--AirPortAtheros40-->
|
||||||
<key>MaxKernel</key>
|
<key>MaxKernel</key>
|
||||||
<string></string>
|
<string></string>
|
||||||
<key>MinKernel</key>
|
<key>MinKernel</key>
|
||||||
@@ -335,7 +337,7 @@
|
|||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
<string>Broadcom Wifi Patch</string>
|
<string>Broadcom Wifi Patch</string>
|
||||||
<key>Enabled</key>
|
<key>Enabled</key>
|
||||||
<false/>
|
<false/><!--IO80211Mojave-->
|
||||||
<key>MaxKernel</key>
|
<key>MaxKernel</key>
|
||||||
<string></string>
|
<string></string>
|
||||||
<key>MinKernel</key>
|
<key>MinKernel</key>
|
||||||
@@ -351,7 +353,7 @@
|
|||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
<string>Broadcom Wifi Patch</string>
|
<string>Broadcom Wifi Patch</string>
|
||||||
<key>Enabled</key>
|
<key>Enabled</key>
|
||||||
<false/>
|
<false/><!--AirPortBrcm4331-->
|
||||||
<key>MaxKernel</key>
|
<key>MaxKernel</key>
|
||||||
<string></string>
|
<string></string>
|
||||||
<key>MinKernel</key>
|
<key>MinKernel</key>
|
||||||
@@ -367,7 +369,7 @@
|
|||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
<string>Marvel Ethernet Patch</string>
|
<string>Marvel Ethernet Patch</string>
|
||||||
<key>Enabled</key>
|
<key>Enabled</key>
|
||||||
<false/>
|
<false/><!--MarvelYukonEthernet-->
|
||||||
<key>MaxKernel</key>
|
<key>MaxKernel</key>
|
||||||
<string></string>
|
<string></string>
|
||||||
<key>MinKernel</key>
|
<key>MinKernel</key>
|
||||||
@@ -383,7 +385,7 @@
|
|||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
<string>Nvidia Ethernet Patch</string>
|
<string>Nvidia Ethernet Patch</string>
|
||||||
<key>Enabled</key>
|
<key>Enabled</key>
|
||||||
<false/>
|
<false/><!--nForceEthernet-->
|
||||||
<key>MaxKernel</key>
|
<key>MaxKernel</key>
|
||||||
<string></string>
|
<string></string>
|
||||||
<key>MinKernel</key>
|
<key>MinKernel</key>
|
||||||
@@ -425,7 +427,7 @@
|
|||||||
<key>Count</key>
|
<key>Count</key>
|
||||||
<integer>1</integer>
|
<integer>1</integer>
|
||||||
<key>Enabled</key>
|
<key>Enabled</key>
|
||||||
<false/>
|
<false/><!--IOHIDFamily-->
|
||||||
<key>Find</key>
|
<key>Find</key>
|
||||||
<data></data>
|
<data></data>
|
||||||
<key>Identifier</key>
|
<key>Identifier</key>
|
||||||
@@ -757,7 +759,7 @@
|
|||||||
<true/>
|
<true/>
|
||||||
<key>Drivers</key>
|
<key>Drivers</key>
|
||||||
<array>
|
<array>
|
||||||
<string>NvmExpressDxe.efi</string>
|
<string>#NvmExpressDxe.efi</string>
|
||||||
<string>OpenCanopy.efi</string>
|
<string>OpenCanopy.efi</string>
|
||||||
<string>OpenRuntime.efi</string>
|
<string>OpenRuntime.efi</string>
|
||||||
</array>
|
</array>
|
||||||
Binary file not shown.
Reference in New Issue
Block a user