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
+2
View File
@@ -8,6 +8,8 @@
- Drops Rosetta requirement on Apple Silicon Macs - Drops Rosetta requirement on Apple Silicon Macs
- Note building from source will require Python 3.11 or newer and up-to-date Python modules - 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 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: - Increment Binaries:
- OpenCorePkg 0.9.3 - release - OpenCorePkg 0.9.3 - release
- Lilu 1.6.6 - release - Lilu 1.6.6 - release
+18
View File
@@ -1761,6 +1761,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>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> </array>
<key>Block</key> <key>Block</key>
<array> <array>
Binary file not shown.
+14
View File
@@ -33,6 +33,20 @@ class BuildWiredNetworking:
else: else:
self._prebuilt_assumption() 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: def _on_model(self) -> None:
""" """
+5
View File
@@ -92,6 +92,7 @@ class Constants:
self.mce_version: str = "1.0.0" # AppleMCEReporterDisabler self.mce_version: str = "1.0.0" # AppleMCEReporterDisabler
self.btspoof_version: str = "1.0.0" # Bluetooth-Spoof self.btspoof_version: str = "1.0.0" # Bluetooth-Spoof
self.aspp_override_version: str = "1.0.1" # ACPI_SMC_PlatformPlugin Override 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.rsrhelper_version: str = "1.0.0" # RSRHelper
self.amfipass_version: str = "1.3.1" # AMFIPass self.amfipass_version: str = "1.3.1" # AMFIPass
self.amfipass_compatibility_version: str = "1.2.1" # Minimum AMFIPass version required self.amfipass_compatibility_version: str = "1.2.1" # Minimum AMFIPass version required
@@ -502,6 +503,10 @@ class Constants:
def aspp_override_path(self): def aspp_override_path(self):
return self.payload_kexts_path / Path(f"Misc/ASPP-Override-v{self.aspp_override_version}.zip") 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 @property
def nvmefix_path(self): def nvmefix_path(self):
return self.payload_kexts_path / Path(f"Acidanthera/NVMeFix-v{self.nvmefix_version}-{self.kext_variant}.zip") return self.payload_kexts_path / Path(f"Acidanthera/NVMeFix-v{self.nvmefix_version}-{self.kext_variant}.zip")