mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-21 14:40:52 +10:00
Hide OpenShell.efi by default
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/139
This commit is contained in:
+5
-1
@@ -2,8 +2,12 @@
|
|||||||
|
|
||||||
## 0.0.23
|
## 0.0.23
|
||||||
- Fix MacBookPro4,1 15" and 17" audio support
|
- 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
|
- 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
|
## 0.0.22
|
||||||
- Add ExFat support for models missing driver
|
- Add ExFat support for models missing driver
|
||||||
|
|||||||
+38
-4
@@ -708,10 +708,44 @@ AMDMXMGPUs = [
|
|||||||
"0x67c0",#AMD WX 7100
|
"0x67c0",#AMD WX 7100
|
||||||
]
|
]
|
||||||
|
|
||||||
nativeWifi = [
|
BCM4360Wifi = [
|
||||||
"ba430000",#BCM43602
|
"43BA",#BCM43602
|
||||||
"a3430000",#BCM4350
|
"43A3",#BCM4350
|
||||||
"a0430000",#BCM4360
|
"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 = [
|
NightShiftExclude = [
|
||||||
|
|||||||
+47
-22
@@ -98,43 +98,68 @@ class BuildOpenCore:
|
|||||||
]:
|
]:
|
||||||
self.enable_kext(name, version, path, check)
|
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
|
# 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
|
||||||
if self.constants.detected_os > self.constants.lion:
|
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())
|
try:
|
||||||
wifi_devices = [i for i in wifi_devices if i["vendor-id"] == binascii.unhexlify("E4140000") and i["class-code"] == binascii.unhexlify("00800200")]
|
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:
|
else:
|
||||||
wifi_devices = ""
|
wifi_devices = ""
|
||||||
print("- Can't run Wifi hardware detection on Snow Leopard and older")
|
print("- Can't run Wifi hardware detection on Snow Leopard and older")
|
||||||
if self.constants.wifi_build is True:
|
if self.constants.wifi_build is True:
|
||||||
print("- Skipping Wifi patches on request")
|
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")
|
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:
|
else:
|
||||||
if self.model in ModelArray.WifiAtheros:
|
if self.model in ModelArray.WifiAtheros:
|
||||||
self.enable_kext("IO80211HighSierra.kext", self.constants.io80211high_sierra_version, self.constants.io80211high_sierra_path)
|
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
|
self.get_kext_by_bundle_path("IO80211HighSierra.kext/Contents/PlugIns/AirPortAtheros40.kext")["Enabled"] = True
|
||||||
|
|
||||||
if self.model in ModelArray.WifiBCM94331:
|
if self.model in ModelArray.WifiBCM94331:
|
||||||
self.enable_kext("AirportBrcmFixup.kext", self.constants.airportbcrmfixup_version, self.constants.airportbcrmfixup_path)
|
wifi_fake_id(self)
|
||||||
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"}
|
|
||||||
if self.model in ModelArray.WifiBCM94322:
|
if self.model in ModelArray.WifiBCM94322:
|
||||||
self.enable_kext("IO80211Mojave.kext", self.constants.io80211mojave_version, self.constants.io80211mojave_path)
|
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
|
self.get_kext_by_bundle_path("IO80211Mojave.kext/Contents/PlugIns/AirPortBrcm4331.kext")["Enabled"] = True
|
||||||
|
|||||||
@@ -1009,7 +1009,7 @@
|
|||||||
<key>Arguments</key>
|
<key>Arguments</key>
|
||||||
<string></string>
|
<string></string>
|
||||||
<key>Auxiliary</key>
|
<key>Auxiliary</key>
|
||||||
<false/>
|
<true/>
|
||||||
<key>Name</key>
|
<key>Name</key>
|
||||||
<string>OpenShell.efi</string>
|
<string>OpenShell.efi</string>
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user