Add base MacBookAir8,x support

This commit is contained in:
Mykola Grymalyuk
2024-06-10 16:35:13 -06:00
parent 40484a42dd
commit 991c059f30
6 changed files with 39 additions and 15 deletions

View File

@@ -24,6 +24,8 @@ SupportedSMBIOS = [
"MacBookAir6,2",
"MacBookAir7,1",
"MacBookAir7,2",
"MacBookAir8,1",
"MacBookAir8,2",
# MacBook Pro
"MacBookPro4,1",
"MacBookPro5,1",

View File

@@ -507,7 +507,7 @@ smbios_dictionary = {
"FirmwareFeatures": "0x8FD8FF42E",
"SecureBootModel": "j140k",
"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,
"Bluetooth Model": bluetooth_data.bluetooth_data.UART,
"Screen Size": 13,
@@ -524,7 +524,7 @@ smbios_dictionary = {
"FirmwareFeatures": "0x8FD8FF42E",
"SecureBootModel": "j140k", # TODO: Verify
"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,
"Bluetooth Model": bluetooth_data.bluetooth_data.UART,
"Screen Size": 13,
@@ -543,7 +543,7 @@ smbios_dictionary = {
"FirmwareFeatures": "0x8FD8FF42E",
"SecureBootModel": "x589amlu",
"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,
"Bluetooth Model": bluetooth_data.bluetooth_data.UART,
"Screen Size": 13,
@@ -561,7 +561,7 @@ smbios_dictionary = {
"FirmwareFeatures": "0x8FD8FF42E",
"SecureBootModel": "j140a",
"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,
"Bluetooth Model": bluetooth_data.bluetooth_data.UART,
"Screen Size": 13,

View File

@@ -18,7 +18,8 @@ from ..detections import device_probe
from ..datasets import (
model_array,
smbios_data,
cpu_data
cpu_data,
os_data
)
@@ -64,14 +65,19 @@ xw
if self.constants.fu_status is False:
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)
if self.constants.fu_arguments is not None:
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
def _restrict_events_handling(self) -> None:
"""
def _restrict_events_handling(self) -> None: """
RestrictEvents Handler
"""

View File

@@ -10,7 +10,8 @@ from ...detections import device_probe
from ...datasets import (
smbios_data,
cpu_data
cpu_data,
os_data
)
@@ -55,6 +56,11 @@ class BuildWiredNetworking:
# the kernel driver to prevent a kernel panic
# - DriverKit: com.apple.DriverKit.AppleUserECM.dext
# - 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)
@@ -66,6 +72,8 @@ class BuildWiredNetworking:
# See ECM logic for why it's always enabled
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("CatalinaIntelI210Ethernet.kext", self.constants.i210_version, self.constants.i210_path)
# 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:

View File

@@ -12,6 +12,11 @@ from .. import constants
from ..support import utilities
from ..detections import device_probe
from ..datasets import (
smbios_data,
os_data
)
class BuildSecurity:
"""
@@ -83,5 +88,6 @@ class BuildSecurity:
logging.info("- Disabling SecureBootModel")
self.config["Misc"]["Security"]["SecureBootModel"] = "Disabled"
logging.info("- Enabling AMFIPass")
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AMFIPass.kext", self.constants.amfipass_version, self.constants.amfipass_path)
if smbios_data.smbios_dictionary[self.model]["Max OS Supported"] < os_data.os_data.sonoma:
logging.info("- Enabling AMFIPass")
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AMFIPass.kext", self.constants.amfipass_version, self.constants.amfipass_path)

View File

@@ -115,7 +115,6 @@ class GenerateDefaults:
# As we don't spoof on native models, we can safely ignore this
spoof_model = self.model
if spoof_model in smbios_data.smbios_dictionary:
if smbios_data.smbios_dictionary[spoof_model]["SecureBootModel"] is not None:
if self.constants.sip_status is False:
@@ -206,10 +205,13 @@ class GenerateDefaults:
# 12.0: Legacy Wireless chipsets require root patching
# 14.0: Modern Wireless chipsets require root patching
self.constants.sip_status = False
self.constants.secure_status = False
self.constants.disable_cs_lv = True
self.constants.disable_amfi = True
if self.model in smbios_data.smbios_dictionary:
if smbios_data.smbios_dictionary[self.model]["Max OS Supported"] >= os_data.os_data.sonoma:
self.constants.sip_status = 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:
# 13.0: Enabling AirPlay to Mac patches breaks Control Center on legacy chipsets