mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-16 20:30:00 +10:00
Fix DeviceProperty and Root Volume detection
This commit is contained in:
@@ -287,6 +287,8 @@ class Constants:
|
||||
@property
|
||||
def payload_apple_frameworks_path_accel(self): return self.payload_apple_frameworks_path / Path("Graphics-Acceleration")
|
||||
@property
|
||||
def payload_apple_frameworks_path_accel_ts2(self): return self.payload_apple_frameworks_path / Path("Graphics-Acceleration-TS2")
|
||||
@property
|
||||
def payload_apple_lauchd_path(self): return self.payload_apple_root_path / Path("LaunchDaemons")
|
||||
@property
|
||||
def payload_apple_lauchd_path_accel(self): return self.payload_apple_lauchd_path / Path("Graphics-Acceleration")
|
||||
@@ -295,6 +297,8 @@ class Constants:
|
||||
@property
|
||||
def payload_apple_private_frameworks_path_accel(self): return self.payload_apple_private_frameworks_path / Path("Graphics-Acceleration")
|
||||
@property
|
||||
def payload_apple_private_frameworks_path_accel_ts2(self): return self.payload_apple_private_frameworks_path / Path("Graphics-Acceleration-TS2")
|
||||
@property
|
||||
def payload_apple_private_frameworks_path_brightness(self): return self.payload_apple_private_frameworks_path / Path("Brightness-Control")
|
||||
|
||||
# Apple Extensions
|
||||
@@ -306,12 +310,16 @@ class Constants:
|
||||
@property
|
||||
def legacy_graphics(self): return self.payload_apple_kexts_path / Path("Graphics-Acceleration")
|
||||
@property
|
||||
def legacy_graphics_ts2(self): return self.payload_apple_kexts_path / Path("Graphics-Acceleration-TS2")
|
||||
@property
|
||||
def legacy_nvidia_path(self): return self.legacy_graphics / Path("Nvidia-Tesla-Fermi")
|
||||
@property
|
||||
def legacy_nvidia_kepler_path(self): return self.legacy_graphics / Path("Nvidia-Kepler")
|
||||
@property
|
||||
def legacy_amd_path(self): return self.legacy_graphics / Path("AMD-ATI")
|
||||
@property
|
||||
def legacy_amd_path_ts2(self): return self.legacy_graphics / Path("ATI-TS2")
|
||||
@property
|
||||
def legacy_intel_gen1_path(self): return self.legacy_graphics / Path("Intel-Gen5-Ironlake")
|
||||
@property
|
||||
def legacy_intel_gen2_path(self): return self.legacy_graphics / Path("Intel-Gen6-SandyBridge")
|
||||
|
||||
@@ -41,7 +41,8 @@ class pci_probe:
|
||||
# IOACPIPlane:/_SB/PCI0@0/P0P2@10000 -> /PCI0@0/P0P2@1
|
||||
acpi_path = acpi_path_full.replace("IOACPIPlane:/_SB", "")
|
||||
acpi_path = acpi_path.replace("0000", "")
|
||||
acpi_path = acpi_path.replace("0001", "")
|
||||
for entry in ["1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"]:
|
||||
acpi_path = acpi_path.replace(f"000{entry}", f",{entry}")
|
||||
acpi_path = acpi_path.replace("ffff", "0")
|
||||
acpi_path = acpi_path.upper()
|
||||
return acpi_path
|
||||
|
||||
@@ -981,6 +981,10 @@ DeleteAMDAccel11 = [
|
||||
"IOGPUFamily.kext",
|
||||
]
|
||||
|
||||
DeleteAMDAccel11TS2 = [
|
||||
"AppleCameraInterface.kext",
|
||||
]
|
||||
|
||||
AddNvidiaAccel11 = [
|
||||
"GeForceGA.bundle",
|
||||
"GeForceTesla.kext",
|
||||
@@ -1017,7 +1021,7 @@ AddAMDAccel11 = [
|
||||
"AMDLegacySupport.kext",
|
||||
"AMDRadeonVADriver.bundle",
|
||||
"AMDRadeonVADriver2.bundle",
|
||||
#"AMDRadeonX3000.kext",
|
||||
"AMDRadeonX3000.kext",
|
||||
"AMDRadeonX3000GLDriver.bundle",
|
||||
"AMDShared.bundle",
|
||||
"AMDSupport.kext",
|
||||
@@ -1027,6 +1031,10 @@ AddAMDAccel11 = [
|
||||
"ATIRadeonX2000VADriver.bundle",
|
||||
]
|
||||
|
||||
AddAMDAccel11TS2 = [
|
||||
"IOSurface.kext",
|
||||
]
|
||||
|
||||
AddIntelGen1Accel = [
|
||||
"AppleIntelHDGraphics.kext",
|
||||
"AppleIntelHDGraphicsFB.kext",
|
||||
|
||||
@@ -160,12 +160,10 @@ class PatchSysVolume:
|
||||
print("- Creating mnt1 folder")
|
||||
Path(self.constants.payload_mnt1_path).mkdir()
|
||||
else:
|
||||
root_partition_info = plistlib.loads(subprocess.run("diskutil info -plist /".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
||||
root_partition_info = plistlib.loads(subprocess.run("diskutil info -plist /System/Volumes/Update/mnt1".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
||||
self.root_mount_path = root_partition_info["DeviceIdentifier"]
|
||||
|
||||
if self.root_mount_path.startswith("disk"):
|
||||
if self.constants.recovery_status is False:
|
||||
self.root_mount_path = self.root_mount_path[:-2] if self.root_mount_path.count("s") > 1 else self.root_mount_path
|
||||
print(f"- Found Root Volume at: {self.root_mount_path}")
|
||||
if Path(self.mount_extensions).exists():
|
||||
print("- Root Volume is already mounted")
|
||||
@@ -196,8 +194,11 @@ class PatchSysVolume:
|
||||
return True
|
||||
else:
|
||||
print("- Failed to mount the Root Volume")
|
||||
print("- Recommend rebooting the machine and trying to patch again")
|
||||
input("- Press [ENTER] to exit")
|
||||
else:
|
||||
print("- Could not find root volume")
|
||||
input("- Press [ENTER] to exit")
|
||||
|
||||
def delete_old_binaries(self, vendor_patch):
|
||||
for delete_current_kext in vendor_patch:
|
||||
|
||||
Reference in New Issue
Block a user