Increment OpenCore

This commit is contained in:
Mykola Grymalyuk
2021-03-27 13:12:18 -06:00
parent c32a3d89e9
commit 19e43d2850
7 changed files with 77 additions and 2 deletions

View File

@@ -6,7 +6,7 @@
- AppleHDA Patch for 2011 and older (Excluding MacPro4,1+) - AppleHDA Patch for 2011 and older (Excluding MacPro4,1+)
- Fix CPU Speed reporting - Fix CPU Speed reporting
- Increment binaries - Increment binaries
- OpenCore c92bcb7 (0.6.8 rolling - 2021-03-20) - OpenCore 9cd61bb (0.6.8 rolling - 2021-03-27)
- Add Mavericks and newer .app support - Add Mavericks and newer .app support
- Refactor USB map building, fixes USB 3.0 displaying as USB 2.0 - Refactor USB map building, fixes USB 3.0 displaying as USB 2.0
- Fix blackscreen on MacBookPro9,1 - Fix blackscreen on MacBookPro9,1

View File

@@ -10,7 +10,7 @@ from pathlib import Path
class Constants: class Constants:
def __init__(self): def __init__(self):
self.patcher_version = "0.0.19" self.patcher_version = "0.0.19"
self.opencore_commit = "c92bcb7 - 2021-03-20" self.opencore_commit = "9cd61bb - 2021-03-27"
self.opencore_version = "0.6.8" self.opencore_version = "0.6.8"
self.lilu_version = "1.5.1" self.lilu_version = "1.5.1"
self.whatevergreen_version = "1.4.8" self.whatevergreen_version = "1.4.8"

View File

@@ -152,6 +152,7 @@ class BuildOpenCore:
if self.model in ModelArray.pciSSDT: if self.model in ModelArray.pciSSDT:
print("- Adding SSDT-CPBG.aml") print("- Adding SSDT-CPBG.aml")
self.get_item_by_kv(self.config["ACPI"]["Add"], "Path", "SSDT-CPBG.aml")["Enabled"] = True self.get_item_by_kv(self.config["ACPI"]["Add"], "Path", "SSDT-CPBG.aml")["Enabled"] = True
shutil.copy(self.constants.pci_ssdt_path, self.constants.acpi_path)
# USB Map # USB Map
usb_map_path = Path(self.constants.current_path) / Path(f"payloads/Kexts/Plists/AppleUSBMaps/Info.plist") usb_map_path = Path(self.constants.current_path) / Path(f"payloads/Kexts/Plists/AppleUSBMaps/Info.plist")

Binary file not shown.

74
payloads/OpenCore/clean.py Executable file
View File

@@ -0,0 +1,74 @@
#!/usr/bin/env python3
# Simple script to delete unnessary files from OpenCore and move into place
# To use, simply :
# - Download an OpenCore build
# - Place the X64 folder in the /payloads/OpenCore folder
# - Rename to OpenCore-VERSION (ie. DEBUG or RELEASE)
# - Run script
# - Rename folders to appropriate versions (ie. OpenCore-v0.6.8)
# - Zip folders
# TODO:
# - Import OC version from Constants.py
# - Download latest builds from dortania.github.io
# - Automatically rename and zip folders
from __future__ import print_function
import subprocess
from pathlib import Path
build_types = [
"DEBUG",
"RELEASE",
]
bad_drivers = [
"AudioDxe.efi",
"CrScreenshotDxe.efi",
"HiiDatabase.efi",
"NvmExpressDxe.efi",
"OpenHfsPlus.efi",
"OpenPartitionDxe.efi",
"OpenUsbKbDxe.efi",
"Ps2KeyboardDxe.efi",
"Ps2MouseDxe.efi",
"UsbMouseDxe.efi",
"XhciDxe.efi",
]
bad_tools = [
"ChipTune.efi",
"CleanNvram.efi",
"ControlMsrE2.efi",
"GopStop.efi",
"KeyTester.efi",
"MmapDump.efi",
"OpenControl.efi",
"ResetSystem.efi",
"RtcRw.efi",
]
for version in build_types:
print("- Creating S/L/C")
subprocess.run(f"mkdir -p ./OpenCore-{version}/System/Library/CoreServices".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
print("- Creating boot.efi Bootstrap")
subprocess.run(f"cp ./OpenCore-{version}/EFI/BOOT/BOOTx64.efi ./OpenCore-{version}/System/Library/CoreServices/boot.efi".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
print("- Deleting old BOOTx64.efi")
subprocess.run(f"rm -R ./OpenCore-{version}/EFI/BOOT/".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
for delete_drivers in bad_drivers:
if Path(f"./OpenCore-{version}/EFI/OC/Drivers/{delete_drivers}").exists():
print(f"- Deleting {delete_drivers}")
subprocess.run(f"rm ./OpenCore-{version}/EFI/OC/Drivers/{delete_drivers}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
else:
print(f"- Unable to find {delete_drivers}, skipping")
for delete_tools in bad_tools:
if Path(f".//OpenCore-{version}/EFI/OC/Tools/{delete_tools}").exists():
print(f"- Deleting {delete_tools}")
subprocess.run(f"rm ./OpenCore-{version}/EFI/OC/Tools/{delete_tools}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
else:
print(f"- Unable to find {delete_tools}, skipping")