From 31e48c7d96bd7796cb0869044f122b3c4df084fe Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk <48863253+khronokernel@users.noreply.github.com> Date: Sun, 25 Apr 2021 00:25:54 -0600 Subject: [PATCH] Fix misc typos --- Resources/Build.py | 3 --- Resources/CliMenu.py | 2 +- Resources/SysPatch.py | 11 ++++------- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/Resources/Build.py b/Resources/Build.py index 43057e62f..40b4311c1 100644 --- a/Resources/Build.py +++ b/Resources/Build.py @@ -46,7 +46,6 @@ class BuildOpenCore: def check_pciid(self, print_status): try: self.constants.igpu_devices = plistlib.loads(subprocess.run("ioreg -r -n IGPU -a".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()) - #self.constants.igpu_devices = [i for i in self.constants.igpu_devices if i["class-code"] == binascii.unhexlify("00000300") or i["class-code"] == binascii.unhexlify("00800300")] self.constants.igpu_vendor = self.hexswap(binascii.hexlify(self.constants.igpu_devices[0]["vendor-id"]).decode()[:4]) self.constants.igpu_device = self.hexswap(binascii.hexlify(self.constants.igpu_devices[0]["device-id"]).decode()[:4]) if print_status is True: @@ -58,7 +57,6 @@ class BuildOpenCore: try: self.constants.dgpu_devices = plistlib.loads(subprocess.run("ioreg -r -n GFX0 -a".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()) - #self.constants.dgpu_devices = [i for i in self.constants.dgpu_devices if i["class-code"] == binascii.unhexlify("00000300") or i["class-code"] == binascii.unhexlify("00800300")] self.constants.dgpu_vendor = self.hexswap(binascii.hexlify(self.constants.dgpu_devices[0]["vendor-id"]).decode()[:4]) self.constants.dgpu_device = self.hexswap(binascii.hexlify(self.constants.dgpu_devices[0]["device-id"]).decode()[:4]) if print_status is True: @@ -129,7 +127,6 @@ class BuildOpenCore: self.enable_kext("AirportBrcmFixup.kext", self.constants.airportbcrmfixup_version, self.constants.airportbcrmfixup_path) self.get_kext_by_bundle_path("AirportBrcmFixup.kext/Contents/PlugIns/AirPortBrcmNIC_Injector.kext")["Enabled"] = True if not self.constants.custom_model: - # Try finding arpt_path: str = subprocess.run([self.constants.gfxutil_path] + f"-v".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode() try: arpt_path = [line.strip().split("= ", 1)[1] for line in arpt_path.split("\n") if f"{wifi_vendor}:{wifi_device}".lower() in line.strip()][0] diff --git a/Resources/CliMenu.py b/Resources/CliMenu.py index e447412eb..e5badad45 100644 --- a/Resources/CliMenu.py +++ b/Resources/CliMenu.py @@ -282,7 +282,7 @@ Currently the following are supported: - AMD/ATI: TeraScale 1 (2000-4000) - Intel: Ironlake and Sandy Bridge -For relaibaility, please consider running macOS Catalina or +For reliability, please consider running macOS Catalina or older via Dosdude1's patchers Note: These patches may break Big Sur booting, please have any diff --git a/Resources/SysPatch.py b/Resources/SysPatch.py index bccf34c01..2b9199e6d 100644 --- a/Resources/SysPatch.py +++ b/Resources/SysPatch.py @@ -2,9 +2,8 @@ # Copyright (C) 2020-2021, Dhinak G, Mykola Grymalyuk # Missing Features: # - Full System/Library Snapshotting (need to research how Apple achieves this) -# - Temorary Work-around: sudo bless --mount /System/Volumes/Update/mnt1 --bootefi --last-sealed-snapshot +# - Temporary Work-around: sudo bless --mount /System/Volumes/Update/mnt1 --bootefi --last-sealed-snapshot # - Work-around battery throttling on laptops with no battery (IOPlatformPluginFamily.kext/Contents/PlugIns/ACPI_SMC_PlatformPlugin.kext/Contents/Resources/) -# - Add kmutil error checking from __future__ import print_function import binascii @@ -79,7 +78,7 @@ class PatchSysVolume: print("- Mounting drive as writable") subprocess.run(f"sudo mount -o nobrowse -t apfs /dev/{self.root_mount_path} {self.mount_location}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode() if Path(self.mount_extensions).exists(): - print("- Sucessfully mounted the Root Volume") + print("- Successfully mounted the Root Volume") if patch is True: self.patch_root_vol() else: @@ -216,7 +215,7 @@ class PatchSysVolume: print(f"- Detecting patches for {self.model}") rebuild_required = False # TODO: Create Backup of S*/L*/Extensions, Frameworks and PrivateFramework to easily revert changes - # APFS snapshotting seems to ignore System Volume changes inconcistently, would like a backup to avoid total brick + # APFS snapshotting seems to ignore System Volume changes inconsistently, would like a backup to avoid total brick # Perhaps a basic py2 script to run in recovery to restore # Ensures no .DS_Stores got in print("- Preparing Files") @@ -237,8 +236,6 @@ class PatchSysVolume: self.rebuild_snapshot() def unpatch_root_vol(self): - print("- Creating backup snapshot of user data (This may take some time)") - subprocess.run("tmutil snapshot".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode() print("- Reverting to last signed APFS snapshot") subprocess.run(f"sudo bless --mount {self.mount_location} --bootefi --last-sealed-snapshot".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode() @@ -257,7 +254,7 @@ class PatchSysVolume: print("") else: self.sucess_status = True - print("- Sucessfully built new kernel cache") + print("- Successfully built new kernel cache") if self.constants.gui_mode is False: input("Press [ENTER] to continue with snapshotting") print("- Creating new APFS snapshot")