build.py: Add ECM-Override

This commit is contained in:
Mykola Grymalyuk
2023-09-17 18:26:41 -06:00
parent 35722875ee
commit 9317e11009
5 changed files with 40 additions and 1 deletions

View File

@@ -8,6 +8,8 @@
- Drops Rosetta requirement on Apple Silicon Macs
- Note building from source will require Python 3.11 or newer and up-to-date Python modules
- Resolve dGPU support for MacBookPro14,3 in macOS Sonoma
- Resolve USB ethernet support in macOS Sonoma
- For Ethernet dongles based on ECM protocol (ex. Realtek)
- Increment Binaries:
- OpenCorePkg 0.9.3 - release
- Lilu 1.6.6 - release

View File

@@ -1761,6 +1761,24 @@
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>USB Ethernet - ECM</string>
<key>Enabled</key>
<false/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>23.0.0</string>
<key>BundlePath</key>
<string>ECM-Override.kext</string>
<key>ExecutablePath</key>
<string></string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
</array>
<key>Block</key>
<array>

Binary file not shown.

View File

@@ -33,6 +33,20 @@ class BuildWiredNetworking:
else:
self._prebuilt_assumption()
# Always enable due to chance of hot-plugging
self._usb_ecm_dongles()
def _usb_ecm_dongles(self) -> None:
"""
USB ECM Dongle Handling
"""
# With Sonoma, our WiFi patches require downgrading IOSkywalk
# Unfortunately Apple's DriverKit stack uses IOSkywalk for ECM dongles, so we'll need force load
# the kernel driver to prevent a kernel panic
# - DriverKit: com.apple.DriverKit.AppleUserECM.dext
# - Kext: AppleUSBECM.kext
support.BuildSupport(self.model, self.constants, self.config).enable_kext("ECM-Override.kext", self.constants.ecm_override_version, self.constants.ecm_override_path)
def _on_model(self) -> None:
"""
@@ -63,7 +77,7 @@ class BuildWiredNetworking:
support.BuildSupport(self.model, self.constants, self.config).enable_kext("nForceEthernet.kext", self.constants.nforce_version, self.constants.nforce_path)
elif isinstance(controller, device_probe.Marvell) or isinstance(controller, device_probe.SysKonnect):
support.BuildSupport(self.model, self.constants, self.config).enable_kext("MarvelYukonEthernet.kext", self.constants.marvel_version, self.constants.marvel_path)
# Pre-Ivy Bridge Aquantia Ethernet Patch
if isinstance(controller, device_probe.Aquantia) and controller.chipset == device_probe.Aquantia.Chipsets.AppleEthernetAquantiaAqtion:
if not self.model in smbios_data.smbios_dictionary:

View File

@@ -92,6 +92,7 @@ class Constants:
self.mce_version: str = "1.0.0" # AppleMCEReporterDisabler
self.btspoof_version: str = "1.0.0" # Bluetooth-Spoof
self.aspp_override_version: str = "1.0.1" # ACPI_SMC_PlatformPlugin Override
self.ecm_override_version: str = "1.0.0" # AppleUSBECM Override
self.rsrhelper_version: str = "1.0.0" # RSRHelper
self.amfipass_version: str = "1.3.1" # AMFIPass
self.amfipass_compatibility_version: str = "1.2.1" # Minimum AMFIPass version required
@@ -502,6 +503,10 @@ class Constants:
def aspp_override_path(self):
return self.payload_kexts_path / Path(f"Misc/ASPP-Override-v{self.aspp_override_version}.zip")
@property
def ecm_override_path(self):
return self.payload_kexts_path / Path(f"Misc/ECM-Override-v{self.ecm_override_version}.zip")
@property
def nvmefix_path(self):
return self.payload_kexts_path / Path(f"Acidanthera/NVMeFix-v{self.nvmefix_version}-{self.kext_variant}.zip")