mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-20 14:10:51 +10:00
Add WLAN patch
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/353
This commit is contained in:
@@ -9,6 +9,14 @@
|
|||||||
- Fix NightShift support for macOS Monterey
|
- Fix NightShift support for macOS Monterey
|
||||||
- Add UniversalControl support
|
- Add UniversalControl support
|
||||||
- Currently not enabled by Apple in macOS Monterey Beta 2/iOS 15 Beta 2
|
- Currently not enabled by Apple in macOS Monterey Beta 2/iOS 15 Beta 2
|
||||||
|
- Add optional Wake in WLAN setting
|
||||||
|
- Note: enabling may create network instability
|
||||||
|
- Increment Binaries
|
||||||
|
- OpenCore 0.7.1 release (07-05-2021)
|
||||||
|
- SidecarFixup 1.0.2 release (07-05-2021)
|
||||||
|
- Lilu 1.5.4 release (07-05-2021)
|
||||||
|
- AppleALC 1.6.2 release
|
||||||
|
- WhateverGreen 1.6.2 release
|
||||||
|
|
||||||
## 0.2.2
|
## 0.2.2
|
||||||
|
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ class OpenCoreLegacyPatcher:
|
|||||||
parser.add_argument("--support_all", help="Allow OpenCore on natively supported Models", action="store_true", required=False)
|
parser.add_argument("--support_all", help="Allow OpenCore on natively supported Models", action="store_true", required=False)
|
||||||
parser.add_argument("--firewire", help="Enable FireWire Booting", action="store_true", required=False)
|
parser.add_argument("--firewire", help="Enable FireWire Booting", action="store_true", required=False)
|
||||||
parser.add_argument("--nvme", help="Enable NVMe Booting", action="store_true", required=False)
|
parser.add_argument("--nvme", help="Enable NVMe Booting", action="store_true", required=False)
|
||||||
|
parser.add_argument("--wlan", help="Enable Wake on WLAN support", action="store_true", required=False)
|
||||||
parser.add_argument("--disable_amfi", help="Disable AMFI", action="store_true", required=False)
|
parser.add_argument("--disable_amfi", help="Disable AMFI", action="store_true", required=False)
|
||||||
parser.add_argument("--moderate_smbios", help="Moderate SMBIOS Patching", action="store_true", required=False)
|
parser.add_argument("--moderate_smbios", help="Moderate SMBIOS Patching", action="store_true", required=False)
|
||||||
|
|
||||||
@@ -109,6 +110,9 @@ class OpenCoreLegacyPatcher:
|
|||||||
if args.disable_amfi:
|
if args.disable_amfi:
|
||||||
print("- Set Disable AMFI configuration")
|
print("- Set Disable AMFI configuration")
|
||||||
self.constants.disable_amfi = True
|
self.constants.disable_amfi = True
|
||||||
|
if args.wlan:
|
||||||
|
print("- Set Wake on WLAN configuration")
|
||||||
|
self.constants.enable_wake_on_wlan = True
|
||||||
if args.moderate_smbios:
|
if args.moderate_smbios:
|
||||||
print("- Set Moderate SMBIOS Patching configuration")
|
print("- Set Moderate SMBIOS Patching configuration")
|
||||||
self.constants.serial_settings = "Moderate"
|
self.constants.serial_settings = "Moderate"
|
||||||
|
|||||||
@@ -115,6 +115,7 @@ system_profiler SPHardwareDataType | grep 'Model Identifier'
|
|||||||
[f"Set Vault Mode:\t\t\tCurrently {self.constants.vault}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_vault],
|
[f"Set Vault Mode:\t\t\tCurrently {self.constants.vault}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_vault],
|
||||||
[f"Allow FireWire Boot:\t\tCurrently {self.constants.firewire_boot}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).allow_firewire],
|
[f"Allow FireWire Boot:\t\tCurrently {self.constants.firewire_boot}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).allow_firewire],
|
||||||
[f"Allow NVMe Boot:\t\t\tCurrently {self.constants.nvme_boot}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).allow_nvme],
|
[f"Allow NVMe Boot:\t\t\tCurrently {self.constants.nvme_boot}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).allow_nvme],
|
||||||
|
[f"Allow Wake on WLAN:\t\t\tCurrently {self.constants.enable_wake_on_wlan}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).allow_wowl],
|
||||||
[f"Disable AMFI:\t\t\tCurrently {self.constants.disable_amfi}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).set_amfi],
|
[f"Disable AMFI:\t\t\tCurrently {self.constants.disable_amfi}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).set_amfi],
|
||||||
[
|
[
|
||||||
f"Set SIP and SecureBootModel:\tSIP: {self.constants.sip_status} SBM: {self.constants.secure_status}",
|
f"Set SIP and SecureBootModel:\tSIP: {self.constants.sip_status} SBM: {self.constants.secure_status}",
|
||||||
|
|||||||
@@ -260,6 +260,9 @@ class BuildOpenCore:
|
|||||||
self.config["DeviceProperties"]["Add"][arpt_path] = {"device-id": binascii.unhexlify("ba430000"), "compatible": "pci14e4,43ba"}
|
self.config["DeviceProperties"]["Add"][arpt_path] = {"device-id": binascii.unhexlify("ba430000"), "compatible": "pci14e4,43ba"}
|
||||||
if not self.constants.custom_model and self.computer.wifi and self.computer.wifi.country_code:
|
if not self.constants.custom_model and self.computer.wifi and self.computer.wifi.country_code:
|
||||||
self.config["DeviceProperties"]["Add"][arpt_path].update({"brcmfx-country": self.computer.wifi.country_code})
|
self.config["DeviceProperties"]["Add"][arpt_path].update({"brcmfx-country": self.computer.wifi.country_code})
|
||||||
|
if self.constants.enable_wake_on_wlan is True:
|
||||||
|
print("- Enabling Wake on WLAN support")
|
||||||
|
self.config["DeviceProperties"]["Add"][arpt_path].update({"brcmfxwowl": binascii.unhexlify("01000000")})
|
||||||
|
|
||||||
# WiFi patches
|
# WiFi patches
|
||||||
# TODO: -a is not supported in Lion and older, need to add proper fix
|
# TODO: -a is not supported in Lion and older, need to add proper fix
|
||||||
@@ -282,8 +285,14 @@ class BuildOpenCore:
|
|||||||
arpt_path = self.computer.wifi.pci_path
|
arpt_path = self.computer.wifi.pci_path
|
||||||
print(f"- Found ARPT device at {arpt_path}")
|
print(f"- Found ARPT device at {arpt_path}")
|
||||||
self.config["DeviceProperties"]["Add"][arpt_path] = {"brcmfx-country": self.computer.wifi.country_code}
|
self.config["DeviceProperties"]["Add"][arpt_path] = {"brcmfx-country": self.computer.wifi.country_code}
|
||||||
|
if self.constants.enable_wake_on_wlan is True:
|
||||||
|
print("- Enabling Wake on WLAN support")
|
||||||
|
self.config["DeviceProperties"]["Add"][arpt_path].update({"brcmfxwowl": binascii.unhexlify("01000000")})
|
||||||
else:
|
else:
|
||||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += f" brcmfx-country={self.computer.wifi.country_code}"
|
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += f" brcmfx-country={self.computer.wifi.country_code}"
|
||||||
|
if self.constants.enable_wake_on_wlan is True:
|
||||||
|
print("- Enabling Wake on WLAN support")
|
||||||
|
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += f" -brcmfxwowl"
|
||||||
elif self.computer.wifi.chipset == device_probe.Broadcom.Chipsets.AirPortBrcm4360:
|
elif self.computer.wifi.chipset == device_probe.Broadcom.Chipsets.AirPortBrcm4360:
|
||||||
wifi_fake_id(self)
|
wifi_fake_id(self)
|
||||||
elif self.computer.wifi.chipset == device_probe.Broadcom.Chipsets.AirPortBrcm4331:
|
elif self.computer.wifi.chipset == device_probe.Broadcom.Chipsets.AirPortBrcm4331:
|
||||||
@@ -313,6 +322,9 @@ class BuildOpenCore:
|
|||||||
self.enable_kext("AirportBrcmFixup.kext", self.constants.airportbcrmfixup_version, self.constants.airportbcrmfixup_path)
|
self.enable_kext("AirportBrcmFixup.kext", self.constants.airportbcrmfixup_version, self.constants.airportbcrmfixup_path)
|
||||||
# print(f"- Setting Wireless Card's Country Code: {self.computer.wifi.country_code}")
|
# print(f"- Setting Wireless Card's Country Code: {self.computer.wifi.country_code}")
|
||||||
# self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += f" brcmfx-country={self.computer.wifi.country_code}"
|
# self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += f" brcmfx-country={self.computer.wifi.country_code}"
|
||||||
|
if self.constants.enable_wake_on_wlan is True:
|
||||||
|
print("- Enabling Wake on WLAN support")
|
||||||
|
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += f" -brcmfxwowl"
|
||||||
|
|
||||||
# CPUFriend
|
# CPUFriend
|
||||||
pp_map_path = Path(self.constants.platform_plugin_plist_path) / Path(f"{self.model}/Info.plist")
|
pp_map_path = Path(self.constants.platform_plugin_plist_path) / Path(f"{self.model}/Info.plist")
|
||||||
|
|||||||
@@ -477,3 +477,25 @@ Note: Acceleration only applies to macOS Big Sur
|
|||||||
self.constants.terascale_2_patch = False
|
self.constants.terascale_2_patch = False
|
||||||
else:
|
else:
|
||||||
print("Invalid option")
|
print("Invalid option")
|
||||||
|
|
||||||
|
def allow_wowl(self):
|
||||||
|
Utilities.cls()
|
||||||
|
Utilities.header(["Allow Wake on WLAN"])
|
||||||
|
print(
|
||||||
|
"""
|
||||||
|
Due to an unfortunate bug in macOS Big Sur+, Wake on WLAN is
|
||||||
|
disabled by default for BCM943224, BCM94331 and BCM94360/2 chipsets.
|
||||||
|
|
||||||
|
This is due to Wake on WLAN creating network instability and in other cases
|
||||||
|
halving network speeds. This issue is not replicable across machines however
|
||||||
|
be prepared if enabling.
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
change_menu = input("Allow Wake on WLAN?(y/n): ")
|
||||||
|
if change_menu == "y":
|
||||||
|
self.constants.enable_wake_on_wlan = True
|
||||||
|
elif change_menu == "n":
|
||||||
|
self.constants.enable_wake_on_wlan = False
|
||||||
|
else:
|
||||||
|
print("Invalid option")
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ class Constants:
|
|||||||
self.nvme_boot = False
|
self.nvme_boot = False
|
||||||
self.disable_amfi = False
|
self.disable_amfi = False
|
||||||
self.terascale_2_patch = False
|
self.terascale_2_patch = False
|
||||||
|
self.enable_wake_on_wlan = False
|
||||||
|
|
||||||
# OS Versions
|
# OS Versions
|
||||||
self.tiger = 8
|
self.tiger = 8
|
||||||
|
|||||||
@@ -376,7 +376,6 @@ class PatchSysVolume:
|
|||||||
if self.constants.detected_os > self.constants.catalina:
|
if self.constants.detected_os > self.constants.catalina:
|
||||||
self.amd_ts1 = True
|
self.amd_ts1 = True
|
||||||
self.amfi_must_disable = True
|
self.amfi_must_disable = True
|
||||||
# TODO: Enable TS2 support
|
|
||||||
elif dgpu.arch == device_probe.AMD.Archs.TeraScale_2:
|
elif dgpu.arch == device_probe.AMD.Archs.TeraScale_2:
|
||||||
# Requires manual permission from user to avoid medical issues
|
# Requires manual permission from user to avoid medical issues
|
||||||
if self.constants.detected_os > self.constants.catalina:
|
if self.constants.detected_os > self.constants.catalina:
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user