mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-23 03:20:16 +10:00
Fix misc typos
This commit is contained in:
@@ -46,7 +46,6 @@ class BuildOpenCore:
|
|||||||
def check_pciid(self, print_status):
|
def check_pciid(self, print_status):
|
||||||
try:
|
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 = 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_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])
|
self.constants.igpu_device = self.hexswap(binascii.hexlify(self.constants.igpu_devices[0]["device-id"]).decode()[:4])
|
||||||
if print_status is True:
|
if print_status is True:
|
||||||
@@ -58,7 +57,6 @@ class BuildOpenCore:
|
|||||||
|
|
||||||
try:
|
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 = 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_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])
|
self.constants.dgpu_device = self.hexswap(binascii.hexlify(self.constants.dgpu_devices[0]["device-id"]).decode()[:4])
|
||||||
if print_status is True:
|
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.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
|
self.get_kext_by_bundle_path("AirportBrcmFixup.kext/Contents/PlugIns/AirPortBrcmNIC_Injector.kext")["Enabled"] = True
|
||||||
if not self.constants.custom_model:
|
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()
|
arpt_path: str = subprocess.run([self.constants.gfxutil_path] + f"-v".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
|
||||||
try:
|
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]
|
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]
|
||||||
|
|||||||
@@ -282,7 +282,7 @@ Currently the following are supported:
|
|||||||
- AMD/ATI: TeraScale 1 (2000-4000)
|
- AMD/ATI: TeraScale 1 (2000-4000)
|
||||||
- Intel: Ironlake and Sandy Bridge
|
- 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
|
older via Dosdude1's patchers
|
||||||
|
|
||||||
Note: These patches may break Big Sur booting, please have any
|
Note: These patches may break Big Sur booting, please have any
|
||||||
|
|||||||
@@ -2,9 +2,8 @@
|
|||||||
# Copyright (C) 2020-2021, Dhinak G, Mykola Grymalyuk
|
# Copyright (C) 2020-2021, Dhinak G, Mykola Grymalyuk
|
||||||
# Missing Features:
|
# Missing Features:
|
||||||
# - Full System/Library Snapshotting (need to research how Apple achieves this)
|
# - 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/)
|
# - 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
|
from __future__ import print_function
|
||||||
|
|
||||||
import binascii
|
import binascii
|
||||||
@@ -79,7 +78,7 @@ class PatchSysVolume:
|
|||||||
print("- Mounting drive as writable")
|
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()
|
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():
|
if Path(self.mount_extensions).exists():
|
||||||
print("- Sucessfully mounted the Root Volume")
|
print("- Successfully mounted the Root Volume")
|
||||||
if patch is True:
|
if patch is True:
|
||||||
self.patch_root_vol()
|
self.patch_root_vol()
|
||||||
else:
|
else:
|
||||||
@@ -216,7 +215,7 @@ class PatchSysVolume:
|
|||||||
print(f"- Detecting patches for {self.model}")
|
print(f"- Detecting patches for {self.model}")
|
||||||
rebuild_required = False
|
rebuild_required = False
|
||||||
# TODO: Create Backup of S*/L*/Extensions, Frameworks and PrivateFramework to easily revert changes
|
# 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
|
# Perhaps a basic py2 script to run in recovery to restore
|
||||||
# Ensures no .DS_Stores got in
|
# Ensures no .DS_Stores got in
|
||||||
print("- Preparing Files")
|
print("- Preparing Files")
|
||||||
@@ -237,8 +236,6 @@ class PatchSysVolume:
|
|||||||
self.rebuild_snapshot()
|
self.rebuild_snapshot()
|
||||||
|
|
||||||
def unpatch_root_vol(self):
|
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")
|
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()
|
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("")
|
print("")
|
||||||
else:
|
else:
|
||||||
self.sucess_status = True
|
self.sucess_status = True
|
||||||
print("- Sucessfully built new kernel cache")
|
print("- Successfully built new kernel cache")
|
||||||
if self.constants.gui_mode is False:
|
if self.constants.gui_mode is False:
|
||||||
input("Press [ENTER] to continue with snapshotting")
|
input("Press [ENTER] to continue with snapshotting")
|
||||||
print("- Creating new APFS snapshot")
|
print("- Creating new APFS snapshot")
|
||||||
|
|||||||
Reference in New Issue
Block a user