mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-14 04:38:20 +10:00
Add better kmutil crash handling
This commit is contained in:
@@ -6,8 +6,9 @@
|
||||
- Fix iMac11,1 boot issues after PRAM reset
|
||||
- Fix DRM support on Nvidia-only configurations
|
||||
- Support optional setting between DRM and QuickSync support on iMacs13,x and iMac14,x
|
||||
- Add public beta support for Legacy GPU Acceleration
|
||||
- Add public beta support for Legacy GPU Acceleration (v0.0.3)
|
||||
- Note ATI/AMD TeraScale 2 unsupported (HD 5/6000)
|
||||
- Add better kmutil crash handling
|
||||
|
||||
## 0.1.0
|
||||
- Fix crash on iMacs with Metal GPUs
|
||||
|
||||
@@ -262,11 +262,22 @@ class PatchSysVolume:
|
||||
if self.constants.gui_mode is False:
|
||||
input("Press [ENTER] to continue with cache rebuild")
|
||||
print("- Rebuilding Kernel Cache (This may take some time)")
|
||||
subprocess.run(f"sudo kmutil install --volume-root {self.mount_location} --update-all".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
if self.constants.gui_mode is False:
|
||||
input("Press [ENTER] to continue with snapshotting")
|
||||
print("- Creating new APFS snapshot")
|
||||
subprocess.run(f"sudo bless --folder {self.mount_location}/System/Library/CoreServices --bootefi --create-snapshot".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
result = subprocess.run(f"sudo kmutil install --volume-root {self.mount_location} --update-all".split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
|
||||
if result.returncode != 0:
|
||||
self.sucess_status = False
|
||||
print("- Unable to build new kernel cache")
|
||||
print("\nPlease report this to Github")
|
||||
print("Reason for Patch Failure:")
|
||||
print(result)
|
||||
print("")
|
||||
else:
|
||||
self.sucess_status = True
|
||||
print("- Sucessfully built new kernel cache")
|
||||
if self.constants.gui_mode is False:
|
||||
input("Press [ENTER] to continue with snapshotting")
|
||||
print("- Creating new APFS snapshot")
|
||||
subprocess.run(f"sudo bless --folder {self.mount_location}/System/Library/CoreServices --bootefi --create-snapshot".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
|
||||
def unmount_drive(self):
|
||||
print("- Unmounting Root Volume (Don't worry if this fails)")
|
||||
@@ -358,7 +369,10 @@ class PatchSysVolume:
|
||||
self.find_mount_root_vol(True)
|
||||
self.unmount_drive()
|
||||
print("- Patching complete")
|
||||
print("\nPlease reboot the machine for patches to take effect")
|
||||
if self.sucess_status is True:
|
||||
print("\nPlease reboot the machine for patches to take effect")
|
||||
else:
|
||||
print("\nPlease reboot the machine to avoid pottential issues rerunning the patcher")
|
||||
if self.sip_patch_status is True:
|
||||
print("SIP set incorrectly, cannot patch on this machine!")
|
||||
print("Please disable SIP and SecureBootModel in Patcher Settings")
|
||||
|
||||
Reference in New Issue
Block a user