diff --git a/Resources/Build.py b/Resources/Build.py index 58a659980..21f3fde62 100644 --- a/Resources/Build.py +++ b/Resources/Build.py @@ -596,7 +596,7 @@ class BuildOpenCore: # device_id = Utilities.hexswap(binascii.hexlify(devices[0]["device-id"]).decode()[:4]) # print("- Found XHCI Controller, adding Boot Support") # shutil.copy(self.constants.xhci_driver_path, self.constants.drivers_path) - # self.config["UEFI"]["Drivers"] += ["XhciDxe.efi"] + # self.get_efi_binary_by_path("XhciDxe.efi", "UEFI", "Drivers")["Enabled"] = True # except ValueError: # print("- No XHCI Controller Found (V)") # except IndexError: @@ -605,18 +605,20 @@ class BuildOpenCore: if self.constants.nvme_boot is True: print("- Enabling NVMe boot support") shutil.copy(self.constants.nvme_driver_path, self.constants.drivers_path) - self.config["UEFI"]["Drivers"] += ["NvmExpressDxe.efi"] + self.get_efi_binary_by_path("NvmExpressDxe.efi", "UEFI", "Drivers")["Enabled"] = True # Add OpenCanopy print("- Adding OpenCanopy GUI") shutil.rmtree(self.constants.resources_path, onerror=rmtree_handler) shutil.copy(self.constants.gui_path, self.constants.oc_folder) - self.config["UEFI"]["Drivers"] += ["OpenCanopy.efi", "OpenRuntime.efi"] + self.get_efi_binary_by_path("OpenCanopy.efi", "UEFI", "Drivers")["Enabled"] = True + self.get_efi_binary_by_path("OpenRuntime.efi", "UEFI", "Drivers")["Enabled"] = True + self.get_efi_binary_by_path("OpenLinuxBoot.efi", "UEFI", "Drivers")["Enabled"] = True # Exfat check if self.model in ModelArray.NoExFat: print("- Adding ExFatDxeLegacy.efi") shutil.copy(self.constants.exfat_legacy_driver_path, self.constants.drivers_path) - self.config["UEFI"]["Drivers"] += ["ExFatDxeLegacy.efi"] + self.get_efi_binary_by_path("ExFatDxeLegacy.efi", "UEFI", "Drivers")["Enabled"] = True # Add UGA to GOP layer if self.model in ModelArray.UGAtoGOP: @@ -651,7 +653,7 @@ class BuildOpenCore: if self.constants.vault is True: print("- Setting Vault configuration") self.config["Misc"]["Security"]["Vault"] = "Secure" - self.get_tool_by__path("OpenShell.efi")["Enabled"] = False + self.get_efi_binary_by_path("OpenShell.efi", "Misc", "Tools")["Enabled"] = False if self.constants.sip_status is False: print("- Disabling SIP") self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["csr-active-config"] = binascii.unhexlify("EF0F0000") @@ -831,12 +833,13 @@ class BuildOpenCore: raise IndexError return kext - def get_tool_by__path(self, bundle_path): - tool = self.get_item_by_kv(self.config["Misc"]["Tools"], "Path", bundle_path) - if not tool: - print(f"- Could not find Tool {bundle_path}!") + def get_efi_binary_by_path(self, bundle_path, entry_location, efi_type): + efi_binary = self.get_item_by_kv(self.config[entry_location][efi_type], "Path", bundle_path) + if not efi_binary: + print(f"- Could not find {efi_type}: {bundle_path}!") raise IndexError - return tool + return efi_binary + def enable_kext(self, kext_name, kext_version, kext_path, check=False): kext = self.get_kext_by_bundle_path(kext_name) @@ -852,6 +855,7 @@ class BuildOpenCore: def cleanup(self): print("- Cleaning up files") # Remove unused entries + # TODO: Consolidate into a single for loop for entry in list(self.config["ACPI"]["Add"]): if not entry["Enabled"]: self.config["ACPI"]["Add"].remove(entry) @@ -864,6 +868,12 @@ class BuildOpenCore: for entry in list(self.config["Kernel"]["Patch"]): if not entry["Enabled"]: self.config["Kernel"]["Patch"].remove(entry) + for entry in list(self.config["Misc"]["Tools"]): + if not entry["Enabled"]: + self.config["Misc"]["Tools"].remove(entry) + for entry in list(self.config["UEFI"]["Drivers"]): + if not entry["Enabled"]: + self.config["UEFI"]["Drivers"].remove(entry) plistlib.dump(self.config, Path(self.constants.plist_path).open("wb"), sort_keys=True) for kext in self.constants.kexts_path.rglob("*.zip"): diff --git a/Resources/Constants.py b/Resources/Constants.py index 1e1504cee..58ebb0c2b 100644 --- a/Resources/Constants.py +++ b/Resources/Constants.py @@ -13,10 +13,10 @@ from Resources import device_probe class Constants: def __init__(self): self.patcher_version = "0.2.5" - self.opencore_commit = "ff5ad67 - 08-02-2021" - self.opencore_version = "0.7.2" - self.lilu_version = "1.5.5" - self.whatevergreen_version = "1.5.2" + self.opencore_commit = "ff4b099 - 09-06-2021" + self.opencore_version = "0.7.3" + self.lilu_version = "1.5.6" + self.whatevergreen_version = "1.5.3" self.airportbcrmfixup_version = "2.1.3" self.bcm570_version = "1.0.1" self.marvel_version = "1.0.0" @@ -38,7 +38,7 @@ class Constants: self.smcspoof_version = "1.0.0" self.nvmefix_version = "1.0.9" self.featureunlock_version = "1.0.3" - self.debugenhancer_version = "1.0.3" + self.debugenhancer_version = "1.0.4" self.innie_version = "1.3.0" self.fw_kext = "1.0.0" self.latebloom_version = "0.19" diff --git a/payloads/Config/config.plist b/payloads/Config/config.plist index 5caf8233c..81c960596 100644 --- a/payloads/Config/config.plist +++ b/payloads/Config/config.plist @@ -1073,8 +1073,7 @@ Misc BlessOverride - - + Boot ConsoleAttributes @@ -1457,7 +1456,56 @@ ConnectDrivers Drivers - + + + Path + OpenRuntime.efi + Enabled + + Arguments + + + + Path + OpenCanopy.efi + Enabled + + Arguments + + + + Path + NvmExpressDxe.efi + Enabled + + Arguments + + + + Path + ExFatDxeLegacy.efi + Enabled + + Arguments + + + + Path + XhciDxe.efi + Enabled + + Arguments + + + + Path + OpenLinuxBoot.efi + Enabled + + Arguments + + + Input KeyFiltering @@ -1555,6 +1603,8 @@ ExitBootServicesDelay 0 + ForceOcWriteFlash + ForgeUefiSupport IgnoreInvalidFlexRatio diff --git a/payloads/Kexts/Acidanthera/DebugEnhancer-v1.0.3.zip b/payloads/Kexts/Acidanthera/DebugEnhancer-v1.0.3.zip deleted file mode 100644 index d8e125d8f..000000000 Binary files a/payloads/Kexts/Acidanthera/DebugEnhancer-v1.0.3.zip and /dev/null differ diff --git a/payloads/Kexts/Acidanthera/DebugEnhancer-v1.0.4.zip b/payloads/Kexts/Acidanthera/DebugEnhancer-v1.0.4.zip new file mode 100644 index 000000000..3eabe1149 Binary files /dev/null and b/payloads/Kexts/Acidanthera/DebugEnhancer-v1.0.4.zip differ diff --git a/payloads/Kexts/Acidanthera/Lilu-v1.5.5.zip b/payloads/Kexts/Acidanthera/Lilu-v1.5.5.zip deleted file mode 100644 index bf2510b43..000000000 Binary files a/payloads/Kexts/Acidanthera/Lilu-v1.5.5.zip and /dev/null differ diff --git a/payloads/Kexts/Acidanthera/Lilu-v1.5.6.zip b/payloads/Kexts/Acidanthera/Lilu-v1.5.6.zip new file mode 100644 index 000000000..1579a3f90 Binary files /dev/null and b/payloads/Kexts/Acidanthera/Lilu-v1.5.6.zip differ diff --git a/payloads/Kexts/Acidanthera/WhateverGreen-v1.5.2.zip b/payloads/Kexts/Acidanthera/WhateverGreen-v1.5.2.zip deleted file mode 100644 index bb2e7534a..000000000 Binary files a/payloads/Kexts/Acidanthera/WhateverGreen-v1.5.2.zip and /dev/null differ diff --git a/payloads/Kexts/Acidanthera/WhateverGreen-v1.5.3.zip b/payloads/Kexts/Acidanthera/WhateverGreen-v1.5.3.zip new file mode 100644 index 000000000..d1412b19a Binary files /dev/null and b/payloads/Kexts/Acidanthera/WhateverGreen-v1.5.3.zip differ diff --git a/payloads/OpenCore/OpenCore-DEBUG.zip b/payloads/OpenCore/OpenCore-DEBUG.zip index 1d823508f..a5c70cc49 100644 Binary files a/payloads/OpenCore/OpenCore-DEBUG.zip and b/payloads/OpenCore/OpenCore-DEBUG.zip differ diff --git a/payloads/OpenCore/OpenCore-RELEASE.zip b/payloads/OpenCore/OpenCore-RELEASE.zip index 81e82263f..2876b53dd 100644 Binary files a/payloads/OpenCore/OpenCore-RELEASE.zip and b/payloads/OpenCore/OpenCore-RELEASE.zip differ diff --git a/payloads/OpenCore/clean.py b/payloads/OpenCore/clean.py index 36bb71d09..dfaf208dd 100755 --- a/payloads/OpenCore/clean.py +++ b/payloads/OpenCore/clean.py @@ -5,12 +5,10 @@ # - 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) +# - Rename folders to appropriate versions (ie. OpenCore-Build) # - 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 @@ -69,7 +67,7 @@ for version in build_types: else: print(f"- Unable to find {delete_tools}, skipping") - print("Renaming folder to OpenCore-Build and zipping") + print("- Renaming folder to OpenCore-Build and zipping") subprocess.run(f"mv ./OpenCore-{version} ./OpenCore-Build".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode() subprocess.run(f"zip -r ./OpenCore-{version}.zip ./OpenCore-Build".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode() - subprocess.run(f"rm -rf ./OpenCore-Build".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode() \ No newline at end of file + subprocess.run(f"rm -rf ./OpenCore-Build".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode() diff --git a/payloads/Tools/ocvalidate b/payloads/Tools/ocvalidate index f9c2d5e5c..d6a7c75e6 100755 Binary files a/payloads/Tools/ocvalidate and b/payloads/Tools/ocvalidate differ