mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-20 22:20:53 +10:00
Add base MacBookAir8,x support
This commit is contained in:
@@ -24,6 +24,8 @@ SupportedSMBIOS = [
|
|||||||
"MacBookAir6,2",
|
"MacBookAir6,2",
|
||||||
"MacBookAir7,1",
|
"MacBookAir7,1",
|
||||||
"MacBookAir7,2",
|
"MacBookAir7,2",
|
||||||
|
"MacBookAir8,1",
|
||||||
|
"MacBookAir8,2",
|
||||||
# MacBook Pro
|
# MacBook Pro
|
||||||
"MacBookPro4,1",
|
"MacBookPro4,1",
|
||||||
"MacBookPro5,1",
|
"MacBookPro5,1",
|
||||||
|
|||||||
@@ -507,7 +507,7 @@ smbios_dictionary = {
|
|||||||
"FirmwareFeatures": "0x8FD8FF42E",
|
"FirmwareFeatures": "0x8FD8FF42E",
|
||||||
"SecureBootModel": "j140k",
|
"SecureBootModel": "j140k",
|
||||||
"CPU Generation": cpu_data.CPUGen.coffee_lake.value,
|
"CPU Generation": cpu_data.CPUGen.coffee_lake.value,
|
||||||
"Max OS Supported": os_data.os_data.sequoia,
|
"Max OS Supported": os_data.os_data.sonoma,
|
||||||
"Wireless Model": device_probe.Broadcom.Chipsets.AppleBCMWLANBusInterfacePCIe,
|
"Wireless Model": device_probe.Broadcom.Chipsets.AppleBCMWLANBusInterfacePCIe,
|
||||||
"Bluetooth Model": bluetooth_data.bluetooth_data.UART,
|
"Bluetooth Model": bluetooth_data.bluetooth_data.UART,
|
||||||
"Screen Size": 13,
|
"Screen Size": 13,
|
||||||
@@ -524,7 +524,7 @@ smbios_dictionary = {
|
|||||||
"FirmwareFeatures": "0x8FD8FF42E",
|
"FirmwareFeatures": "0x8FD8FF42E",
|
||||||
"SecureBootModel": "j140k", # TODO: Verify
|
"SecureBootModel": "j140k", # TODO: Verify
|
||||||
"CPU Generation": cpu_data.CPUGen.coffee_lake.value,
|
"CPU Generation": cpu_data.CPUGen.coffee_lake.value,
|
||||||
"Max OS Supported": os_data.os_data.sequoia,
|
"Max OS Supported": os_data.os_data.sonoma,
|
||||||
"Wireless Model": device_probe.Broadcom.Chipsets.AppleBCMWLANBusInterfacePCIe,
|
"Wireless Model": device_probe.Broadcom.Chipsets.AppleBCMWLANBusInterfacePCIe,
|
||||||
"Bluetooth Model": bluetooth_data.bluetooth_data.UART,
|
"Bluetooth Model": bluetooth_data.bluetooth_data.UART,
|
||||||
"Screen Size": 13,
|
"Screen Size": 13,
|
||||||
@@ -543,7 +543,7 @@ smbios_dictionary = {
|
|||||||
"FirmwareFeatures": "0x8FD8FF42E",
|
"FirmwareFeatures": "0x8FD8FF42E",
|
||||||
"SecureBootModel": "x589amlu",
|
"SecureBootModel": "x589amlu",
|
||||||
"CPU Generation": cpu_data.CPUGen.coffee_lake.value,
|
"CPU Generation": cpu_data.CPUGen.coffee_lake.value,
|
||||||
"Max OS Supported": os_data.os_data.sequoia,
|
"Max OS Supported": os_data.os_data.sonoma,
|
||||||
"Wireless Model": device_probe.Broadcom.Chipsets.AppleBCMWLANBusInterfacePCIe,
|
"Wireless Model": device_probe.Broadcom.Chipsets.AppleBCMWLANBusInterfacePCIe,
|
||||||
"Bluetooth Model": bluetooth_data.bluetooth_data.UART,
|
"Bluetooth Model": bluetooth_data.bluetooth_data.UART,
|
||||||
"Screen Size": 13,
|
"Screen Size": 13,
|
||||||
@@ -561,7 +561,7 @@ smbios_dictionary = {
|
|||||||
"FirmwareFeatures": "0x8FD8FF42E",
|
"FirmwareFeatures": "0x8FD8FF42E",
|
||||||
"SecureBootModel": "j140a",
|
"SecureBootModel": "j140a",
|
||||||
"CPU Generation": cpu_data.CPUGen.coffee_lake.value,
|
"CPU Generation": cpu_data.CPUGen.coffee_lake.value,
|
||||||
"Max OS Supported": os_data.os_data.sequoia,
|
"Max OS Supported": os_data.os_data.sonoma,
|
||||||
"Wireless Model": device_probe.Broadcom.Chipsets.AppleBCMWLANBusInterfacePCIe,
|
"Wireless Model": device_probe.Broadcom.Chipsets.AppleBCMWLANBusInterfacePCIe,
|
||||||
"Bluetooth Model": bluetooth_data.bluetooth_data.UART,
|
"Bluetooth Model": bluetooth_data.bluetooth_data.UART,
|
||||||
"Screen Size": 13,
|
"Screen Size": 13,
|
||||||
|
|||||||
@@ -18,7 +18,8 @@ from ..detections import device_probe
|
|||||||
from ..datasets import (
|
from ..datasets import (
|
||||||
model_array,
|
model_array,
|
||||||
smbios_data,
|
smbios_data,
|
||||||
cpu_data
|
cpu_data,
|
||||||
|
os_data
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -64,14 +65,19 @@ xw
|
|||||||
if self.constants.fu_status is False:
|
if self.constants.fu_status is False:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if not self.model in smbios_data.smbios_dictionary:
|
||||||
|
return
|
||||||
|
|
||||||
|
if smbios_data.smbios_dictionary[self.model]["Max OS Supported"] >= os_data.os_data.sonoma:
|
||||||
|
return
|
||||||
|
|
||||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("FeatureUnlock.kext", self.constants.featureunlock_version, self.constants.featureunlock_path)
|
support.BuildSupport(self.model, self.constants, self.config).enable_kext("FeatureUnlock.kext", self.constants.featureunlock_version, self.constants.featureunlock_path)
|
||||||
if self.constants.fu_arguments is not None:
|
if self.constants.fu_arguments is not None:
|
||||||
logging.info(f"- Adding additional FeatureUnlock args: {self.constants.fu_arguments}")
|
logging.info(f"- Adding additional FeatureUnlock args: {self.constants.fu_arguments}")
|
||||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += self.constants.fu_arguments
|
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += self.constants.fu_arguments
|
||||||
|
|
||||||
|
|
||||||
def _restrict_events_handling(self) -> None:
|
def _restrict_events_handling(self) -> None: """
|
||||||
"""
|
|
||||||
RestrictEvents Handler
|
RestrictEvents Handler
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,8 @@ from ...detections import device_probe
|
|||||||
|
|
||||||
from ...datasets import (
|
from ...datasets import (
|
||||||
smbios_data,
|
smbios_data,
|
||||||
cpu_data
|
cpu_data,
|
||||||
|
os_data
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -55,6 +56,11 @@ class BuildWiredNetworking:
|
|||||||
# the kernel driver to prevent a kernel panic
|
# the kernel driver to prevent a kernel panic
|
||||||
# - DriverKit: com.apple.DriverKit.AppleUserECM.dext
|
# - DriverKit: com.apple.DriverKit.AppleUserECM.dext
|
||||||
# - Kext: AppleUSBECM.kext
|
# - Kext: AppleUSBECM.kext
|
||||||
|
if not self.model in smbios_data.smbios_dictionary:
|
||||||
|
return
|
||||||
|
if smbios_data.smbios_dictionary[self.model]["Max OS Supported"] >= os_data.os_data.sonoma:
|
||||||
|
return
|
||||||
|
|
||||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("ECM-Override.kext", self.constants.ecm_override_version, self.constants.ecm_override_path)
|
support.BuildSupport(self.model, self.constants, self.config).enable_kext("ECM-Override.kext", self.constants.ecm_override_version, self.constants.ecm_override_path)
|
||||||
|
|
||||||
|
|
||||||
@@ -66,6 +72,8 @@ class BuildWiredNetworking:
|
|||||||
# See ECM logic for why it's always enabled
|
# See ECM logic for why it's always enabled
|
||||||
if not self.model in smbios_data.smbios_dictionary:
|
if not self.model in smbios_data.smbios_dictionary:
|
||||||
return
|
return
|
||||||
|
if smbios_data.smbios_dictionary[self.model]["Max OS Supported"] >= os_data.os_data.sonoma:
|
||||||
|
return
|
||||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("CatalinaIntelI210Ethernet.kext", self.constants.i210_version, self.constants.i210_path)
|
support.BuildSupport(self.model, self.constants, self.config).enable_kext("CatalinaIntelI210Ethernet.kext", self.constants.i210_version, self.constants.i210_path)
|
||||||
# Ivy Bridge and newer natively support DriverKit, so set MinKernel to 23.0.0
|
# Ivy Bridge and newer natively support DriverKit, so set MinKernel to 23.0.0
|
||||||
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] >= cpu_data.CPUGen.ivy_bridge.value:
|
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] >= cpu_data.CPUGen.ivy_bridge.value:
|
||||||
|
|||||||
@@ -12,6 +12,11 @@ from .. import constants
|
|||||||
from ..support import utilities
|
from ..support import utilities
|
||||||
from ..detections import device_probe
|
from ..detections import device_probe
|
||||||
|
|
||||||
|
from ..datasets import (
|
||||||
|
smbios_data,
|
||||||
|
os_data
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class BuildSecurity:
|
class BuildSecurity:
|
||||||
"""
|
"""
|
||||||
@@ -83,5 +88,6 @@ class BuildSecurity:
|
|||||||
logging.info("- Disabling SecureBootModel")
|
logging.info("- Disabling SecureBootModel")
|
||||||
self.config["Misc"]["Security"]["SecureBootModel"] = "Disabled"
|
self.config["Misc"]["Security"]["SecureBootModel"] = "Disabled"
|
||||||
|
|
||||||
logging.info("- Enabling AMFIPass")
|
if smbios_data.smbios_dictionary[self.model]["Max OS Supported"] < os_data.os_data.sonoma:
|
||||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AMFIPass.kext", self.constants.amfipass_version, self.constants.amfipass_path)
|
logging.info("- Enabling AMFIPass")
|
||||||
|
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AMFIPass.kext", self.constants.amfipass_version, self.constants.amfipass_path)
|
||||||
|
|||||||
@@ -115,7 +115,6 @@ class GenerateDefaults:
|
|||||||
# As we don't spoof on native models, we can safely ignore this
|
# As we don't spoof on native models, we can safely ignore this
|
||||||
spoof_model = self.model
|
spoof_model = self.model
|
||||||
|
|
||||||
|
|
||||||
if spoof_model in smbios_data.smbios_dictionary:
|
if spoof_model in smbios_data.smbios_dictionary:
|
||||||
if smbios_data.smbios_dictionary[spoof_model]["SecureBootModel"] is not None:
|
if smbios_data.smbios_dictionary[spoof_model]["SecureBootModel"] is not None:
|
||||||
if self.constants.sip_status is False:
|
if self.constants.sip_status is False:
|
||||||
@@ -206,10 +205,13 @@ class GenerateDefaults:
|
|||||||
|
|
||||||
# 12.0: Legacy Wireless chipsets require root patching
|
# 12.0: Legacy Wireless chipsets require root patching
|
||||||
# 14.0: Modern Wireless chipsets require root patching
|
# 14.0: Modern Wireless chipsets require root patching
|
||||||
self.constants.sip_status = False
|
if self.model in smbios_data.smbios_dictionary:
|
||||||
self.constants.secure_status = False
|
if smbios_data.smbios_dictionary[self.model]["Max OS Supported"] >= os_data.os_data.sonoma:
|
||||||
self.constants.disable_cs_lv = True
|
self.constants.sip_status = True
|
||||||
self.constants.disable_amfi = True
|
self.constants.sip_status = False
|
||||||
|
self.constants.secure_status = False
|
||||||
|
self.constants.disable_cs_lv = True
|
||||||
|
self.constants.disable_amfi = True
|
||||||
|
|
||||||
if is_legacy_wifi is True:
|
if is_legacy_wifi is True:
|
||||||
# 13.0: Enabling AirPlay to Mac patches breaks Control Center on legacy chipsets
|
# 13.0: Enabling AirPlay to Mac patches breaks Control Center on legacy chipsets
|
||||||
|
|||||||
Reference in New Issue
Block a user