diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5bbe6e11e..98be54fe1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,8 +2,12 @@
## 0.0.23
- Fix MacBookPro4,1 15" and 17" audio support
+- Fix iMac7,1 24" and iMac9,1 24" audio support
+- Fix Macmini4,1 audio support
- Increment binaries
- - AppleALC 2d096d6 (1.6.0 rolling - 04-10-2021)
+ - AppleALC 1a3e5cb (1.6.0 rolling - 04-10-2021)
+- Enhance Wifi model detection
+- Hide OpenShell.efi by default
## 0.0.22
- Add ExFat support for models missing driver
diff --git a/Resources/ModelArray.py b/Resources/ModelArray.py
index e166bcd65..7479cdf4d 100644
--- a/Resources/ModelArray.py
+++ b/Resources/ModelArray.py
@@ -708,10 +708,44 @@ AMDMXMGPUs = [
"0x67c0",#AMD WX 7100
]
-nativeWifi = [
- "ba430000",#BCM43602
- "a3430000",#BCM4350
- "a0430000",#BCM4360
+BCM4360Wifi = [
+ "43BA",#BCM43602
+ "43A3",#BCM4350
+ "43A0",#BCM4360
+]
+
+BCM94331Wifi = [
+ "4331",
+ "4353",
+]
+
+BCM94322Wifi = [
+ "4331",
+ "4353",
+ "432B",
+]
+
+BCM94328Wifi = [
+ "4311",
+ "4312",
+ "4313",
+ "4318",
+ "4319",
+ "431A",
+ "4320",
+ "4324",
+ "4325",
+ "4328",
+ "432C",
+ "432D",
+]
+
+AtherosWifi = [
+ "0030",
+ "002A",
+ "001C",
+ "0023",
+ "0024",
]
NightShiftExclude = [
diff --git a/Resources/build.py b/Resources/build.py
index c62d9a5d5..70e7b3c77 100644
--- a/Resources/build.py
+++ b/Resources/build.py
@@ -98,43 +98,68 @@ class BuildOpenCore:
]:
self.enable_kext(name, version, path, check)
+ def wifi_fake_id(self):
+ self.enable_kext("AirportBrcmFixup.kext", self.constants.airportbcrmfixup_version, self.constants.airportbcrmfixup_path)
+ self.get_kext_by_bundle_path("AirportBrcmFixup.kext/Contents/PlugIns/AirPortBrcmNIC_Injector.kext")["Enabled"] = True
+
+ if (self.model in ModelArray.EthernetNvidia) or self.model in ("MacBookAir2,1", "MacBookAir3,1", "MacBookAir3,2"):
+ # Nvidia chipsets all have the same path to ARPT
+ property_path = "PciRoot(0x0)/Pci(0x15,0x0)/Pci(0x0,0x0)"
+ elif self.model in ("iMac7,1", "iMac8,1", "MacPro3,1", "MacBookPro4,1"):
+ property_path = "PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x0)"
+ elif self.model in ("iMac13,1", "iMac13,2"):
+ property_path = "PciRoot(0x0)/Pci(0x1C,0x3)/Pci(0x0,0x0)"
+ elif self.model in ("MacPro4,1", "MacPro5,1"):
+ property_path = "PciRoot(0x0)/Pci(0x1C,0x5)/Pci(0x0,0x0)"
+ else:
+ # Assumes we have a laptop with Intel chipset
+ # iMac11,x-12,x also apply
+ property_path = "PciRoot(0x0)/Pci(0x1C,0x1)/Pci(0x0,0x0)"
+ print("- Applying fake ID for WiFi")
+ self.config["DeviceProperties"]["Add"][property_path] = {"device-id": binascii.unhexlify("ba430000"), "compatible": "pci14e4,43ba"}
+
# WiFi patches
# TODO: -a is not supported in Lion and older, need to add proper fix
if self.constants.detected_os > self.constants.lion:
- wifi_devices = plistlib.loads(subprocess.run("ioreg -c IOPCIDevice -r -d2 -a".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
- wifi_devices = [i for i in wifi_devices if i["vendor-id"] == binascii.unhexlify("E4140000") and i["class-code"] == binascii.unhexlify("00800200")]
+ try:
+ wifi_devices = plistlib.loads(subprocess.run("ioreg -r -n ARPT -a".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
+ except ValueError:
+ # Work-around Mac Pros where Wifi card is not named ARPT
+ wifi_devices = plistlib.loads(subprocess.run("ioreg -c IOPCIDevice -r -d2 -a".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
+ vendor_atheros = binascii.unhexlify("E4140000")
+ vendor_broadcom = binascii.unhexlify("8C160000")
+ wifi_devices = [i for i in wifi_devices if i["vendor-id"] == vendor_atheros or i["vendor-id"] == vendor_broadcom and i["class-code"] == binascii.unhexlify("00800200")]
+ wifi_vendor = self.hexswap(binascii.hexlify(wifi_devices[0]["vendor-id"]).decode()[:4])
+ wifi_device = self.hexswap(binascii.hexlify(wifi_devices[0]["device-id"]).decode()[:4])
+ if not self.constants.custom_model:
+ print(f"- Detected Wifi Card: {wifi_vendor}:{wifi_device}")
+
else:
wifi_devices = ""
print("- Can't run Wifi hardware detection on Snow Leopard and older")
if self.constants.wifi_build is True:
print("- Skipping Wifi patches on request")
- elif not self.constants.custom_model and wifi_devices and self.hexswap(binascii.hexlify(wifi_devices[0]["device-id"]).decode()[:4]) in ModelArray.nativeWifi:
+ elif not self.constants.custom_model and wifi_devices and wifi_vendor == "E414" and wifi_device in ModelArray.BCM4360Wifi:
print("- Found supported WiFi card, skipping wifi patches")
+ elif not self.constants.custom_model and wifi_devices and wifi_vendor == "E414" and wifi_device in ModelArray.BCM94331Wifi:
+ wifi_fake_id(self)
+ elif not self.constants.custom_model and wifi_devices and wifi_vendor== "E414" and wifi_device in ModelArray.BCM94322Wifi:
+ self.enable_kext("IO80211Mojave.kext", self.constants.io80211mojave_version, self.constants.io80211mojave_path)
+ self.get_kext_by_bundle_path("IO80211Mojave.kext/Contents/PlugIns/AirPortBrcm4331.kext")["Enabled"] = True
+ elif not self.constants.custom_model and wifi_devices and wifi_vendor == "E414" and wifi_device in ModelArray.BCM94328Wifi:
+ self.enable_kext("corecaptureElCap.kext", self.constants.corecaptureelcap_version, self.constants.corecaptureelcap_path)
+ self.enable_kext("IO80211ElCap.kext", self.constants.io80211elcap_version, self.constants.io80211elcap_path)
+ self.get_kext_by_bundle_path("IO80211ElCap.kext/Contents/PlugIns/AppleAirPortBrcm43224.kext")["Enabled"] = True
+ elif not self.constants.custom_model and wifi_devices and wifi_vendor == "168C" and wifi_device in ModelArray.AtherosWifi:
+ self.enable_kext("IO80211HighSierra.kext", self.constants.io80211high_sierra_version, self.constants.io80211high_sierra_path)
+ self.get_kext_by_bundle_path("IO80211HighSierra.kext/Contents/PlugIns/AirPortAtheros40.kext")["Enabled"] = True
else:
if self.model in ModelArray.WifiAtheros:
self.enable_kext("IO80211HighSierra.kext", self.constants.io80211high_sierra_version, self.constants.io80211high_sierra_path)
self.get_kext_by_bundle_path("IO80211HighSierra.kext/Contents/PlugIns/AirPortAtheros40.kext")["Enabled"] = True
if self.model in ModelArray.WifiBCM94331:
- self.enable_kext("AirportBrcmFixup.kext", self.constants.airportbcrmfixup_version, self.constants.airportbcrmfixup_path)
- self.get_kext_by_bundle_path("AirportBrcmFixup.kext/Contents/PlugIns/AirPortBrcmNIC_Injector.kext")["Enabled"] = True
-
- if self.model in ModelArray.EthernetNvidia:
- # Nvidia chipsets all have the same path to ARPT
- property_path = "PciRoot(0x0)/Pci(0x15,0x0)/Pci(0x0,0x0)"
- if self.model in ("MacBookAir2,1", "MacBookAir3,1", "MacBookAir3,2"):
- property_path = "PciRoot(0x0)/Pci(0x15,0x0)/Pci(0x0,0x0)"
- elif self.model in ("iMac7,1", "iMac8,1"):
- property_path = "PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x0)"
- elif self.model in ("iMac13,1", "iMac13,2"):
- property_path = "PciRoot(0x0)/Pci(0x1C,0x3)/Pci(0x0,0x0)"
- elif self.model == "MacPro5,1":
- property_path = "PciRoot(0x0)/Pci(0x1C,0x5)/Pci(0x0,0x0)"
- else:
- # Assumes we have a laptop with Intel chipset
- property_path = "PciRoot(0x0)/Pci(0x1C,0x1)/Pci(0x0,0x0)"
- print("- Applying fake ID for WiFi")
- self.config["DeviceProperties"]["Add"][property_path] = {"device-id": binascii.unhexlify("ba430000"), "compatible": "pci14e4,43ba"}
+ wifi_fake_id(self)
if self.model in ModelArray.WifiBCM94322:
self.enable_kext("IO80211Mojave.kext", self.constants.io80211mojave_version, self.constants.io80211mojave_path)
self.get_kext_by_bundle_path("IO80211Mojave.kext/Contents/PlugIns/AirPortBrcm4331.kext")["Enabled"] = True
diff --git a/payloads/Config/v0.6.8/config.plist b/payloads/Config/v0.6.8/config.plist
index 1f8e72d61..4e312e5e4 100644
--- a/payloads/Config/v0.6.8/config.plist
+++ b/payloads/Config/v0.6.8/config.plist
@@ -1009,7 +1009,7 @@
Arguments
Auxiliary
-
+
Name
OpenShell.efi
Comment
diff --git a/payloads/Kexts/Acidanthera/AppleALC-v1.6.0.zip b/payloads/Kexts/Acidanthera/AppleALC-v1.6.0.zip
index 62d7b7d21..0562ba8aa 100644
Binary files a/payloads/Kexts/Acidanthera/AppleALC-v1.6.0.zip and b/payloads/Kexts/Acidanthera/AppleALC-v1.6.0.zip differ