mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-20 14:10:51 +10:00
sys_patch: Add PCIe Webcam support
This commit is contained in:
+1
-1
@@ -27,7 +27,7 @@
|
|||||||
- utilities.py:
|
- utilities.py:
|
||||||
- Fix indexing error on Device Paths (thx [@Ausdauersportler](https://github.com/Ausdauersportler))
|
- Fix indexing error on Device Paths (thx [@Ausdauersportler](https://github.com/Ausdauersportler))
|
||||||
- Increment Binaries:
|
- Increment Binaries:
|
||||||
- PatcherSupportPkg 1.1.6 - release
|
- PatcherSupportPkg 1.1.7 - release
|
||||||
|
|
||||||
## 0.6.7
|
## 0.6.7
|
||||||
- Resolve partition buttons overlapping in Install OpenCore UI
|
- Resolve partition buttons overlapping in Install OpenCore UI
|
||||||
|
|||||||
+22
-1
@@ -1290,6 +1290,27 @@ class SystemPatchDictionary():
|
|||||||
"IOUSBHostFamily.kext": "12.6.2",
|
"IOUSBHostFamily.kext": "12.6.2",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
|
"PCIe Web Camera": {
|
||||||
|
"Display Name": "Miscellaneous: PCIe Web Camera",
|
||||||
|
"OS Support": {
|
||||||
|
"Minimum OS Support": {
|
||||||
|
"OS Major": os_data.os_data.sonoma,
|
||||||
|
"OS Minor": 0
|
||||||
|
},
|
||||||
|
"Maximum OS Support": {
|
||||||
|
"OS Major": os_data.os_data.max_os,
|
||||||
|
"OS Minor": 99
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"Install Non-Root": {
|
||||||
|
"/Library/CoreMediaIO/Plug-Ins": {
|
||||||
|
"AppleCamera.plugin": "14.0 Beta 1"
|
||||||
|
},
|
||||||
|
"/Library/LaunchDaemons": {
|
||||||
|
"com.apple.cmio.AppleCameraAssistant.plist": "14.0 Beta 1"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@@ -1671,6 +1671,24 @@
|
|||||||
<key>PlistPath</key>
|
<key>PlistPath</key>
|
||||||
<string>Contents/Info.plist</string>
|
<string>Contents/Info.plist</string>
|
||||||
</dict>
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>Arch</key>
|
||||||
|
<string>x86_64</string>
|
||||||
|
<key>Comment</key>
|
||||||
|
<string>PCIe Camera</string>
|
||||||
|
<key>Enabled</key>
|
||||||
|
<false/>
|
||||||
|
<key>MaxKernel</key>
|
||||||
|
<string></string>
|
||||||
|
<key>MinKernel</key>
|
||||||
|
<string>23.0.0</string>
|
||||||
|
<key>BundlePath</key>
|
||||||
|
<string>AppleCameraInterface.kext</string>
|
||||||
|
<key>ExecutablePath</key>
|
||||||
|
<string>Contents/MacOS/AppleCameraInterface</string>
|
||||||
|
<key>PlistPath</key>
|
||||||
|
<string>Contents/Info.plist</string>
|
||||||
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
<key>Block</key>
|
<key>Block</key>
|
||||||
<array>
|
<array>
|
||||||
|
|||||||
Binary file not shown.
+11
-3
@@ -237,10 +237,18 @@ class BuildMiscellaneous:
|
|||||||
"""
|
"""
|
||||||
iSight Handler
|
iSight Handler
|
||||||
"""
|
"""
|
||||||
|
if self.model in smbios_data.smbios_dictionary:
|
||||||
|
if "Legacy iSight" in smbios_data.smbios_dictionary[self.model]:
|
||||||
|
if smbios_data.smbios_dictionary[self.model]["Legacy iSight"] is True:
|
||||||
|
support.BuildSupport(self.model, self.constants, self.config).enable_kext("LegacyUSBVideoSupport.kext", self.constants.apple_isight_version, self.constants.apple_isight_path)
|
||||||
|
|
||||||
if "Legacy iSight" in smbios_data.smbios_dictionary[self.model]:
|
if not self.constants.custom_model:
|
||||||
if smbios_data.smbios_dictionary[self.model]["Legacy iSight"] is True:
|
if self.constants.computer.pcie_webcam is True:
|
||||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("LegacyUSBVideoSupport.kext", self.constants.apple_isight_version, self.constants.apple_isight_path)
|
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleCameraInterface.kext", self.constants.apple_camera_version, self.constants.apple_camera_path)
|
||||||
|
else:
|
||||||
|
if self.model.startswith("MacBook") and self.model in smbios_data.smbios_dictionary:
|
||||||
|
if cpu_data.CPUGen.haswell <= smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.CPUGen.kaby_lake:
|
||||||
|
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleCameraInterface.kext", self.constants.apple_camera_version, self.constants.apple_camera_path)
|
||||||
|
|
||||||
|
|
||||||
def _usb_handling(self) -> None:
|
def _usb_handling(self) -> None:
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ class Constants:
|
|||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
# Patcher Versioning
|
# Patcher Versioning
|
||||||
self.patcher_version: str = "0.6.8" # OpenCore-Legacy-Patcher
|
self.patcher_version: str = "0.6.8" # OpenCore-Legacy-Patcher
|
||||||
self.patcher_support_pkg_version: str = "1.1.6" # PatcherSupportPkg
|
self.patcher_support_pkg_version: str = "1.1.7" # PatcherSupportPkg
|
||||||
self.copyright_date: str = "Copyright © 2020-2023 Dortania"
|
self.copyright_date: str = "Copyright © 2020-2023 Dortania"
|
||||||
self.patcher_name: str = "OpenCore Legacy Patcher"
|
self.patcher_name: str = "OpenCore Legacy Patcher"
|
||||||
|
|
||||||
@@ -65,6 +65,7 @@ class Constants:
|
|||||||
self.apple_usb_11_injector: str = "1.0.0" # AppleUSBUHCI/OHCI
|
self.apple_usb_11_injector: str = "1.0.0" # AppleUSBUHCI/OHCI
|
||||||
self.aicpupm_version: str = "1.0.0" # AppleIntelCPUPowerManagement/Client
|
self.aicpupm_version: str = "1.0.0" # AppleIntelCPUPowerManagement/Client
|
||||||
self.s3x_nvme_version: str = "1.0.0" # IONVMeFamily (14.0 Beta 1, S1X and S3X classes)
|
self.s3x_nvme_version: str = "1.0.0" # IONVMeFamily (14.0 Beta 1, S1X and S3X classes)
|
||||||
|
self.apple_camera_version: str = "1.0.0" # AppleCameraInterface (14.0 Beta 1)
|
||||||
|
|
||||||
## Apple - Dortania Modified
|
## Apple - Dortania Modified
|
||||||
self.bcm570_version: str = "1.0.2" # CatalinaBCM5701Ethernet
|
self.bcm570_version: str = "1.0.2" # CatalinaBCM5701Ethernet
|
||||||
@@ -539,6 +540,10 @@ class Constants:
|
|||||||
def s3x_nvme_path(self):
|
def s3x_nvme_path(self):
|
||||||
return self.payload_kexts_path / Path(f"Misc/IOS3XeFamily-v{self.s3x_nvme_version}.zip")
|
return self.payload_kexts_path / Path(f"Misc/IOS3XeFamily-v{self.s3x_nvme_version}.zip")
|
||||||
|
|
||||||
|
@property
|
||||||
|
def apple_camera_path(self):
|
||||||
|
return self.payload_kexts_path / Path(f"Misc/AppleCameraInterface-v{self.apple_camera_version}.zip")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def plist_folder_path(self):
|
def plist_folder_path(self):
|
||||||
return self.payload_kexts_path / Path("Plists")
|
return self.payload_kexts_path / Path("Plists")
|
||||||
|
|||||||
@@ -630,6 +630,7 @@ class Computer:
|
|||||||
trackpad_type: Optional[str] = None
|
trackpad_type: Optional[str] = None
|
||||||
ambient_light_sensor: Optional[bool] = False
|
ambient_light_sensor: Optional[bool] = False
|
||||||
third_party_sata_ssd: Optional[bool] = False
|
third_party_sata_ssd: Optional[bool] = False
|
||||||
|
pcie_webcam: Optional[bool] = False
|
||||||
secure_boot_model: Optional[str] = None
|
secure_boot_model: Optional[str] = None
|
||||||
secure_boot_policy: Optional[int] = None
|
secure_boot_policy: Optional[int] = None
|
||||||
oclp_sys_version: Optional[str] = None
|
oclp_sys_version: Optional[str] = None
|
||||||
@@ -655,6 +656,7 @@ class Computer:
|
|||||||
computer.bluetooth_probe()
|
computer.bluetooth_probe()
|
||||||
computer.topcase_probe()
|
computer.topcase_probe()
|
||||||
computer.ambient_light_sensor_probe()
|
computer.ambient_light_sensor_probe()
|
||||||
|
computer.pcie_webcam_probe()
|
||||||
computer.sata_disk_probe()
|
computer.sata_disk_probe()
|
||||||
computer.oclp_sys_patch_probe()
|
computer.oclp_sys_patch_probe()
|
||||||
computer.check_rosetta()
|
computer.check_rosetta()
|
||||||
@@ -733,6 +735,13 @@ class Computer:
|
|||||||
self.ambient_light_sensor = True
|
self.ambient_light_sensor = True
|
||||||
ioreg.IOObjectRelease(device)
|
ioreg.IOObjectRelease(device)
|
||||||
|
|
||||||
|
def pcie_webcam_probe(self):
|
||||||
|
# CMRA/14E4:1570
|
||||||
|
device = next(ioreg.ioiterator_to_list(ioreg.IOServiceGetMatchingServices(ioreg.kIOMasterPortDefault, ioreg.IOServiceNameMatching("CMRA".encode()), None)[1]), None)
|
||||||
|
if device:
|
||||||
|
self.pcie_webcam = True
|
||||||
|
ioreg.IOObjectRelease(device)
|
||||||
|
|
||||||
def sdxc_controller_probe(self):
|
def sdxc_controller_probe(self):
|
||||||
sdxc_controllers = ioreg.ioiterator_to_list(
|
sdxc_controllers = ioreg.ioiterator_to_list(
|
||||||
ioreg.IOServiceGetMatchingServices(
|
ioreg.IOServiceGetMatchingServices(
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ class DetectRootPatch:
|
|||||||
self.legacy_gmux = False
|
self.legacy_gmux = False
|
||||||
self.legacy_keyboard_backlight = False
|
self.legacy_keyboard_backlight = False
|
||||||
self.legacy_uhci_ohci = False
|
self.legacy_uhci_ohci = False
|
||||||
|
self.legacy_pcie_webcam = False
|
||||||
|
|
||||||
# Patch Requirements
|
# Patch Requirements
|
||||||
self.amfi_must_disable = False
|
self.amfi_must_disable = False
|
||||||
@@ -519,6 +520,8 @@ class DetectRootPatch:
|
|||||||
|
|
||||||
self.has_network = network_handler.NetworkUtilities().verify_network_connection()
|
self.has_network = network_handler.NetworkUtilities().verify_network_connection()
|
||||||
|
|
||||||
|
self.legacy_pcie_webcam = self.constants.computer.pcie_webcam
|
||||||
|
|
||||||
if self._check_uhci_ohci() is True:
|
if self._check_uhci_ohci() is True:
|
||||||
self.legacy_uhci_ohci = True
|
self.legacy_uhci_ohci = True
|
||||||
self.requires_root_kc = True
|
self.requires_root_kc = True
|
||||||
@@ -591,6 +594,7 @@ class DetectRootPatch:
|
|||||||
"Miscellaneous: Legacy GMUX": self.legacy_gmux,
|
"Miscellaneous: Legacy GMUX": self.legacy_gmux,
|
||||||
"Miscellaneous: Legacy Keyboard Backlight": self.legacy_keyboard_backlight,
|
"Miscellaneous: Legacy Keyboard Backlight": self.legacy_keyboard_backlight,
|
||||||
"Miscellaneous: Legacy USB 1.1": self.legacy_uhci_ohci,
|
"Miscellaneous: Legacy USB 1.1": self.legacy_uhci_ohci,
|
||||||
|
"Miscellaneous: PCIe Web Camera": self.legacy_pcie_webcam,
|
||||||
"Settings: Requires AMFI exemption": self.amfi_must_disable,
|
"Settings: Requires AMFI exemption": self.amfi_must_disable,
|
||||||
"Settings: Supports Auxiliary Cache": not self.requires_root_kc,
|
"Settings: Supports Auxiliary Cache": not self.requires_root_kc,
|
||||||
"Settings: Kernel Debug Kit missing": self.missing_kdk if self.constants.detected_os >= os_data.os_data.ventura.value else False,
|
"Settings: Kernel Debug Kit missing": self.missing_kdk if self.constants.detected_os >= os_data.os_data.ventura.value else False,
|
||||||
|
|||||||
@@ -187,6 +187,9 @@ class GenerateRootPatchSets:
|
|||||||
if self.hardware_details["Miscellaneous: Legacy USB 1.1"] is True:
|
if self.hardware_details["Miscellaneous: Legacy USB 1.1"] is True:
|
||||||
required_patches.update({"Legacy USB 1.1": all_hardware_patchset["Miscellaneous"]["Legacy USB 1.1"]})
|
required_patches.update({"Legacy USB 1.1": all_hardware_patchset["Miscellaneous"]["Legacy USB 1.1"]})
|
||||||
|
|
||||||
|
if self.hardware_details["Miscellaneous: PCIe Web Camera"] is True:
|
||||||
|
required_patches.update({"PCIe Web Camera": all_hardware_patchset["Miscellaneous"]["PCIe Web Camera"]})
|
||||||
|
|
||||||
if required_patches:
|
if required_patches:
|
||||||
host_os_float = float(f"{self.constants.detected_os}.{self.constants.detected_os_minor}")
|
host_os_float = float(f"{self.constants.detected_os}.{self.constants.detected_os_minor}")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user