diff --git a/Data/bluetooth_data.py b/Data/bluetooth_data.py index 10a1daae3..c2dad8031 100644 --- a/Data/bluetooth_data.py +++ b/Data/bluetooth_data.py @@ -1,4 +1,6 @@ -class bluetooth_data: +import enum + +class bluetooth_data(enum.IntEnum): # Bluetooth Chipsets NonApplicable = 0 BRCM2045 = 1 # TODO: Rename chipset, currently guessing MacPro1,1-3,1 name @@ -8,4 +10,5 @@ class bluetooth_data: BRCM20702_v2 = 5 # BT 4.0 - 2013+ BRCM20703 = 6 # BT 4.2 BRCM20703_UART = 9 # BRCM20703 over UART, BT 4.2 - UART = 10 \ No newline at end of file + UART = 10 # T2 + PCIe = 20 # Apple Silicon \ No newline at end of file diff --git a/Data/cpu_data.py b/Data/cpu_data.py index 31016f340..0e1e77e2c 100644 --- a/Data/cpu_data.py +++ b/Data/cpu_data.py @@ -1,4 +1,6 @@ -class cpu_data: +import enum + +class cpu_data(enum.IntEnum): pentium_4 = 0 yonah = 1 conroe = 2 @@ -13,3 +15,8 @@ class cpu_data: coffee_lake = 11 # 8000 comet_lake = 12 # 9000 ice_lake = 13 # 10000 + + + apple_dtk = 112 # A12 + apple_m1 = 114 # A14 + apple_m2 = 115 # A15 \ No newline at end of file diff --git a/Resources/ModelExample.py b/Data/example_data.py similarity index 100% rename from Resources/ModelExample.py rename to Data/example_data.py diff --git a/Data/os_data.py b/Data/os_data.py index 3b8405f40..dd206fa48 100644 --- a/Data/os_data.py +++ b/Data/os_data.py @@ -1,4 +1,6 @@ -class os_data: +import enum + +class os_data(enum.IntEnum): # OS Versions, Based off Major Kernel Version tiger = 8 leopard = 9 diff --git a/Data/smbios_data.py b/Data/smbios_data.py index ffa881d68..d0a85723c 100644 --- a/Data/smbios_data.py +++ b/Data/smbios_data.py @@ -8,7 +8,7 @@ smbios_dictionary = { "Board ID": "Mac-F4208CC8", "FirmwareFeatures": None, "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.yonah, + "CPU Generation": cpu_data.cpu_data.yonah.value, "Max OS Supported": os_data.os_data.snow_leopard, "Wireless Model": device_probe.Atheros.Chipsets.AirPortAtheros40, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2045, @@ -21,7 +21,7 @@ smbios_dictionary = { "Board ID": "Mac-F4208CA9", "FirmwareFeatures": None, "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.conroe, + "CPU Generation": cpu_data.cpu_data.conroe.value, "Max OS Supported": os_data.os_data.lion, "Wireless Model": device_probe.Atheros.Chipsets.AirPortAtheros40, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2045, @@ -34,7 +34,7 @@ smbios_dictionary = { "Board ID": "Mac-F22788C8", "FirmwareFeatures": "0xC0001407", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.conroe, + "CPU Generation": cpu_data.cpu_data.conroe.value, "Max OS Supported": os_data.os_data.lion, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm43224, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2045, @@ -47,7 +47,7 @@ smbios_dictionary = { "Board ID": "Mac-F22788A9", "FirmwareFeatures": "0xC0001403", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.penryn, + "CPU Generation": cpu_data.cpu_data.penryn.value, "Max OS Supported": os_data.os_data.lion, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm43224, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2046, @@ -61,7 +61,7 @@ smbios_dictionary = { "Board ID": "Mac-F42D89C8", "FirmwareFeatures": "0xC0001403", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.penryn, + "CPU Generation": cpu_data.cpu_data.penryn.value, "Max OS Supported": os_data.os_data.el_capitan, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm4331, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2046, @@ -75,7 +75,7 @@ smbios_dictionary = { "Board ID": "Mac-F22788AA", "FirmwareFeatures": "0xC0001403", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.penryn, + "CPU Generation": cpu_data.cpu_data.penryn.value, "Max OS Supported": os_data.os_data.el_capitan, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm4331, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2046, @@ -89,7 +89,7 @@ smbios_dictionary = { "Board ID": "Mac-F22C8AC8", "FirmwareFeatures": "0xFC0FE13F", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.penryn, + "CPU Generation": cpu_data.cpu_data.penryn.value, "Max OS Supported": os_data.os_data.high_sierra, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm4360, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2070, @@ -103,7 +103,7 @@ smbios_dictionary = { "Board ID": "Mac-F22C89C8", "FirmwareFeatures": "0xFC0FE13F", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.penryn, + "CPU Generation": cpu_data.cpu_data.penryn.value, "Max OS Supported": os_data.os_data.high_sierra, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm4360, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2070, @@ -117,7 +117,7 @@ smbios_dictionary = { "Board ID": "Mac-BE0E8AC46FE800CC", "FirmwareFeatures": "0xFC0FE13F", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.broadwell, + "CPU Generation": cpu_data.cpu_data.broadwell.value, "Max OS Supported": os_data.os_data.big_sur, "Wireless Model": device_probe.Broadcom.Chipsets.AirportBrcmNIC, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20703_UART, @@ -129,7 +129,7 @@ smbios_dictionary = { "Board ID": "Mac-9AE82516C7C6B903", "FirmwareFeatures": "0xFC0FE13F", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.skylake, + "CPU Generation": cpu_data.cpu_data.skylake.value, "Max OS Supported": os_data.os_data.max_os, "Wireless Model": device_probe.Broadcom.Chipsets.AirportBrcmNIC, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20703_UART, @@ -141,7 +141,7 @@ smbios_dictionary = { "Board ID": "Mac-EE2EBD4B90B839A8", "FirmwareFeatures": "0xFC0FE13F", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.kaby_lake, + "CPU Generation": cpu_data.cpu_data.kaby_lake.value, "Max OS Supported": os_data.os_data.max_os, "Wireless Model": device_probe.Broadcom.Chipsets.AirportBrcmNIC, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20703_UART, @@ -154,7 +154,7 @@ smbios_dictionary = { "Board ID": "Mac-F42C8CC8", "FirmwareFeatures": "0xC0001403", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.conroe, + "CPU Generation": cpu_data.cpu_data.conroe.value, "Max OS Supported": os_data.os_data.lion, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm43224, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2046, @@ -166,7 +166,7 @@ smbios_dictionary = { "Board ID": "Mac-F42D88C8", "FirmwareFeatures": "0xC0001403", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.penryn, + "CPU Generation": cpu_data.cpu_data.penryn.value, "Max OS Supported": os_data.os_data.el_capitan, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm43224, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2046, @@ -180,7 +180,7 @@ smbios_dictionary = { "Board ID": "Mac-942452F5819B1C1B", "FirmwareFeatures": "0xD00DE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.penryn, + "CPU Generation": cpu_data.cpu_data.penryn.value, "Max OS Supported": os_data.os_data.high_sierra, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm4331, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2046, @@ -194,7 +194,7 @@ smbios_dictionary = { "Board ID": "Mac-942C5DF58193131B", "FirmwareFeatures": "0xD00DE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.penryn, + "CPU Generation": cpu_data.cpu_data.penryn.value, "Max OS Supported": os_data.os_data.high_sierra, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm4331, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2046, @@ -208,7 +208,7 @@ smbios_dictionary = { "Board ID": "Mac-C08A6BB70A942AC2", "FirmwareFeatures": "0xD00DE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.sandy_bridge, + "CPU Generation": cpu_data.cpu_data.sandy_bridge.value, "Max OS Supported": os_data.os_data.high_sierra, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm4360, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2070, @@ -221,7 +221,7 @@ smbios_dictionary = { "Board ID": "Mac-742912EFDBEE19B3", "FirmwareFeatures": "0xD00DE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.sandy_bridge, + "CPU Generation": cpu_data.cpu_data.sandy_bridge.value, "Max OS Supported": os_data.os_data.high_sierra, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm4360, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2070, @@ -234,7 +234,7 @@ smbios_dictionary = { "Board ID": "Mac-66F35F19FE2A0D05", "FirmwareFeatures": "0xE00DE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.ivy_bridge, + "CPU Generation": cpu_data.cpu_data.ivy_bridge.value, "Max OS Supported": os_data.os_data.catalina, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm4360, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20702_v1, @@ -247,7 +247,7 @@ smbios_dictionary = { "Board ID": "Mac-2E6FAB96566FE58C", "FirmwareFeatures": "0xE00DE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.ivy_bridge, + "CPU Generation": cpu_data.cpu_data.ivy_bridge.value, "Max OS Supported": os_data.os_data.catalina, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm4360, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20702_v1, @@ -260,7 +260,7 @@ smbios_dictionary = { "Board ID": "Mac-35C1E88140C3E6CF", "FirmwareFeatures": "0xE00FE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.haswell, + "CPU Generation": cpu_data.cpu_data.haswell.value, "Max OS Supported": os_data.os_data.big_sur, "Wireless Model": device_probe.Broadcom.Chipsets.AirportBrcmNIC, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20702_v2, @@ -273,7 +273,7 @@ smbios_dictionary = { "Board ID": "Mac-7DF21CB3ED6977E5", "FirmwareFeatures": "0xE00FE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.haswell, + "CPU Generation": cpu_data.cpu_data.haswell.value, "Max OS Supported": os_data.os_data.big_sur, "Wireless Model": device_probe.Broadcom.Chipsets.AirportBrcmNIC, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20702_v2, @@ -285,7 +285,7 @@ smbios_dictionary = { "Board ID": "Mac-9F18E312C5C2BF0B", "FirmwareFeatures": "0xFF0FF576", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.broadwell, + "CPU Generation": cpu_data.cpu_data.broadwell.value, "Max OS Supported": os_data.os_data.max_os, "Wireless Model": device_probe.Broadcom.Chipsets.AirportBrcmNIC, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20702_v2, @@ -297,7 +297,7 @@ smbios_dictionary = { "Board ID": "Mac-937CB26E2E02BB01", "FirmwareFeatures": "0xFF0FF576", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.broadwell, + "CPU Generation": cpu_data.cpu_data.broadwell.value, "Max OS Supported": os_data.os_data.max_os, "Wireless Model": device_probe.Broadcom.Chipsets.AirportBrcmNIC, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20702_v2, @@ -308,8 +308,8 @@ smbios_dictionary = { "MacBookAir8,1": { "Board ID": "Mac-827FAC58A8FDFA22", "FirmwareFeatures": "0xFD8FF42E", - "SecureBootModel": "j140kap", - "CPU Generation": cpu_data.cpu_data.coffee_lake, + "SecureBootModel": "j140k", + "CPU Generation": cpu_data.cpu_data.coffee_lake.value, "Max OS Supported": os_data.os_data.max_os, "Wireless Model": device_probe.Broadcom.Chipsets.AppleBCMWLANBusInterfacePCIe, "Bluetooth Model": bluetooth_data.bluetooth_data.UART, @@ -320,8 +320,8 @@ smbios_dictionary = { "MacBookAir8,2": { "Board ID": "Mac-226CB3C6A851A671", "FirmwareFeatures": "0xFD8FF42E", - "SecureBootModel": "j140aap", - "CPU Generation": cpu_data.cpu_data.coffee_lake, + "SecureBootModel": "j140a", + "CPU Generation": cpu_data.cpu_data.coffee_lake.value, "Max OS Supported": os_data.os_data.max_os, "Wireless Model": device_probe.Broadcom.Chipsets.AppleBCMWLANBusInterfacePCIe, "Bluetooth Model": bluetooth_data.bluetooth_data.UART, @@ -332,8 +332,8 @@ smbios_dictionary = { "MacBookAir9,1": { "Board ID": "Mac-0CFF9C7C2B63DF8D", "FirmwareFeatures": "0xFFAFF06E", - "SecureBootModel": "j230kap", - "CPU Generation": cpu_data.cpu_data.ice_lake, + "SecureBootModel": "j230k", + "CPU Generation": cpu_data.cpu_data.ice_lake.value, "Max OS Supported": os_data.os_data.max_os, "Wireless Model": device_probe.Broadcom.Chipsets.AppleBCMWLANBusInterfacePCIe, "Bluetooth Model": bluetooth_data.bluetooth_data.UART, @@ -341,11 +341,22 @@ smbios_dictionary = { "Ethernet Chipset": None, }, + "MacBookAir10,1": { + "Board ID": None, + "FirmwareFeatures": None, + "SecureBootModel": "j313", + "CPU Generation": cpu_data.cpu_data.apple_m1.value, + "Max OS Supported": os_data.os_data.max_os, + "Wireless Model": device_probe.Broadcom.Chipsets.AppleBCMWLANBusInterfacePCIe, + "Bluetooth Model": bluetooth_data.bluetooth_data.PCIe, + "Ethernet Chipset": None, + }, + "MacBookPro1,1": { "Board ID": "Mac-F425BEC8", "FirmwareFeatures": "", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.yonah, + "CPU Generation": cpu_data.cpu_data.yonah.value, "Max OS Supported": os_data.os_data.snow_leopard, "Wireless Model": device_probe.Atheros.Chipsets.AirPortAtheros40, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2045, @@ -358,7 +369,7 @@ smbios_dictionary = { "Board ID": "Mac-F42DBEC8", "FirmwareFeatures": None, "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.yonah, + "CPU Generation": cpu_data.cpu_data.yonah.value, "Max OS Supported": os_data.os_data.snow_leopard, "Wireless Model": device_probe.Atheros.Chipsets.AirPortAtheros40, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2045, @@ -371,7 +382,7 @@ smbios_dictionary = { "Board ID": "Mac-F42189C8", "FirmwareFeatures": None, "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.conroe, + "CPU Generation": cpu_data.cpu_data.conroe.value, "Max OS Supported": os_data.os_data.lion, "Wireless Model": device_probe.Atheros.Chipsets.AirPortAtheros40, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2045, @@ -384,7 +395,7 @@ smbios_dictionary = { "Board ID": "Mac-F42187C8", "FirmwareFeatures": None, "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.conroe, + "CPU Generation": cpu_data.cpu_data.conroe.value, "Max OS Supported": os_data.os_data.lion, "Wireless Model": device_probe.Atheros.Chipsets.AirPortAtheros40, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2045, @@ -397,7 +408,7 @@ smbios_dictionary = { "Board ID": "Mac-F4238BC8", "FirmwareFeatures": "0xC0001407", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.conroe, + "CPU Generation": cpu_data.cpu_data.conroe.value, "Max OS Supported": os_data.os_data.el_capitan, "Wireless Model": device_probe.Atheros.Chipsets.AirPortAtheros40, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2045, @@ -410,7 +421,7 @@ smbios_dictionary = { "Board ID": "Mac-F42C89C8", "FirmwareFeatures": "0xC0001403", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.penryn, + "CPU Generation": cpu_data.cpu_data.penryn.value, "Max OS Supported": os_data.os_data.el_capitan, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm43224, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2046, @@ -425,7 +436,7 @@ smbios_dictionary = { "Board ID": "Mac-F42D86C8", "FirmwareFeatures": "0xC0001403", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.penryn, + "CPU Generation": cpu_data.cpu_data.penryn.value, "Max OS Supported": os_data.os_data.el_capitan, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm4331, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2046, @@ -440,7 +451,7 @@ smbios_dictionary = { "Board ID": "Mac-F2268EC8", "FirmwareFeatures": "0xC0001403", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.penryn, + "CPU Generation": cpu_data.cpu_data.penryn.value, "Max OS Supported": os_data.os_data.el_capitan, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm4331, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2046, @@ -455,7 +466,7 @@ smbios_dictionary = { "Board ID": "Mac-F22587C8", "FirmwareFeatures": "0xC0001403", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.penryn, + "CPU Generation": cpu_data.cpu_data.penryn.value, "Max OS Supported": os_data.os_data.el_capitan, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm4331, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2046, @@ -470,7 +481,7 @@ smbios_dictionary = { "Board ID": "Mac-F22587A1", "FirmwareFeatures": "0xC0001403", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.penryn, + "CPU Generation": cpu_data.cpu_data.penryn.value, "Max OS Supported": os_data.os_data.el_capitan, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm4331, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2046, @@ -485,7 +496,7 @@ smbios_dictionary = { "Board ID": "Mac-F2268AC8", "FirmwareFeatures": "0xC0001403", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.penryn, + "CPU Generation": cpu_data.cpu_data.penryn.value, "Max OS Supported": os_data.os_data.el_capitan, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm4331, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2046, @@ -499,7 +510,7 @@ smbios_dictionary = { "Board ID": "Mac-F22589C8", "FirmwareFeatures": "0xC00DE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.nehalem, + "CPU Generation": cpu_data.cpu_data.nehalem.value, "Max OS Supported": os_data.os_data.high_sierra, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm4360, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2070, @@ -513,7 +524,7 @@ smbios_dictionary = { "Board ID": "Mac-F22586C8", "FirmwareFeatures": "0xC00DE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.nehalem, + "CPU Generation": cpu_data.cpu_data.nehalem.value, "Max OS Supported": os_data.os_data.high_sierra, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm4360, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2070, @@ -527,7 +538,7 @@ smbios_dictionary = { "Board ID": "Mac-F222BEC8", "FirmwareFeatures": "0xC00DE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.penryn, + "CPU Generation": cpu_data.cpu_data.penryn.value, "Max OS Supported": os_data.os_data.high_sierra, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm4331, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2046, @@ -541,7 +552,7 @@ smbios_dictionary = { "Board ID": "Mac-94245B3640C91C81", "FirmwareFeatures": "0xC00DE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.sandy_bridge, + "CPU Generation": cpu_data.cpu_data.sandy_bridge.value, "Max OS Supported": os_data.os_data.high_sierra, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm4360, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2070, @@ -554,7 +565,7 @@ smbios_dictionary = { "Board ID": "Mac-94245A3940C91C80", "FirmwareFeatures": "0xC00DE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.sandy_bridge, + "CPU Generation": cpu_data.cpu_data.sandy_bridge.value, "Max OS Supported": os_data.os_data.high_sierra, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm4360, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2070, @@ -568,7 +579,7 @@ smbios_dictionary = { "Board ID": "Mac-942459F5819B171B", "FirmwareFeatures": "0xC00DE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.sandy_bridge, + "CPU Generation": cpu_data.cpu_data.sandy_bridge.value, "Max OS Supported": os_data.os_data.high_sierra, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm4360, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2070, @@ -582,7 +593,7 @@ smbios_dictionary = { "Board ID": "Mac-4B7AC7E43945597E", "FirmwareFeatures": "0xC00DE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.ivy_bridge, + "CPU Generation": cpu_data.cpu_data.ivy_bridge.value, "Max OS Supported": os_data.os_data.catalina, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm4360, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20702_v1, @@ -596,7 +607,7 @@ smbios_dictionary = { "Board ID": "Mac-6F01561E16C75D06", "FirmwareFeatures": "0xC10DF577", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.ivy_bridge, + "CPU Generation": cpu_data.cpu_data.ivy_bridge.value, "Max OS Supported": os_data.os_data.catalina, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm4360, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20702_v1, @@ -609,7 +620,7 @@ smbios_dictionary = { "Board ID": "Mac-C3EC7CD22292981F", "FirmwareFeatures": "0xE00DE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.ivy_bridge, + "CPU Generation": cpu_data.cpu_data.ivy_bridge.value, "Max OS Supported": os_data.os_data.catalina, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm4360, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20702_v1, @@ -623,7 +634,7 @@ smbios_dictionary = { "Board ID": "Mac-AFD8A9D944EA4843", "FirmwareFeatures": "0xE00DE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.ivy_bridge, + "CPU Generation": cpu_data.cpu_data.ivy_bridge.value, "Max OS Supported": os_data.os_data.catalina, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm4360, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20702_v1, @@ -636,7 +647,7 @@ smbios_dictionary = { "Board ID": "Mac-189A3D4F975D5FFC", "FirmwareFeatures": "0xEB0FF577", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.haswell, + "CPU Generation": cpu_data.cpu_data.haswell.value, "Max OS Supported": os_data.os_data.big_sur, "Wireless Model": device_probe.Broadcom.Chipsets.AirportBrcmNIC, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20702_v2, @@ -649,7 +660,7 @@ smbios_dictionary = { "Board ID": "Mac-3CBD00234E554E41", "FirmwareFeatures": "0xEB0FF577", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.haswell, + "CPU Generation": cpu_data.cpu_data.haswell.value, "Max OS Supported": os_data.os_data.big_sur, "Wireless Model": device_probe.Broadcom.Chipsets.AirportBrcmNIC, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20702_v2, @@ -662,7 +673,7 @@ smbios_dictionary = { "Board ID": "Mac-2BD1B31983FE1663", "FirmwareFeatures": "0xEB0FF577", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.haswell, + "CPU Generation": cpu_data.cpu_data.haswell.value, "Max OS Supported": os_data.os_data.big_sur, "Wireless Model": device_probe.Broadcom.Chipsets.AirportBrcmNIC, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20702_v2, @@ -675,7 +686,7 @@ smbios_dictionary = { "Board ID": "Mac-06F11FD93F0323C5", "FirmwareFeatures": "0xEB0FF577", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.haswell, + "CPU Generation": cpu_data.cpu_data.haswell.value, "Max OS Supported": os_data.os_data.max_os, "Wireless Model": device_probe.Broadcom.Chipsets.AirportBrcmNIC, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20702_v2, @@ -687,7 +698,7 @@ smbios_dictionary = { "Board ID": "Mac-06F11F11946D27C5", "FirmwareFeatures": "0xEB0FF577", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.haswell, + "CPU Generation": cpu_data.cpu_data.haswell.value, "Max OS Supported": os_data.os_data.max_os, "Wireless Model": device_probe.Broadcom.Chipsets.AirportBrcmNIC, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20702_v2, @@ -700,7 +711,7 @@ smbios_dictionary = { "Board ID": "Mac-E43C1C25D4880AD6", "FirmwareFeatures": "0xFD0FF576", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.broadwell, + "CPU Generation": cpu_data.cpu_data.broadwell.value, "Max OS Supported": os_data.os_data.max_os, "Wireless Model": device_probe.Broadcom.Chipsets.AirportBrcmNIC, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20702_v2, @@ -712,7 +723,7 @@ smbios_dictionary = { "Board ID": "Mac-473D31EABEB93F9B", "FirmwareFeatures": "0xFC0FE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.skylake, + "CPU Generation": cpu_data.cpu_data.skylake.value, "Max OS Supported": os_data.os_data.max_os, "Wireless Model": device_probe.Broadcom.Chipsets.AirportBrcmNIC, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20703_UART, @@ -724,7 +735,7 @@ smbios_dictionary = { "Board ID": "Mac-66E35819EE2D0D05", "FirmwareFeatures": "0xFC0FE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.skylake, + "CPU Generation": cpu_data.cpu_data.skylake.value, "Max OS Supported": os_data.os_data.max_os, "Wireless Model": device_probe.Broadcom.Chipsets.AirportBrcmNIC, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20703_UART, @@ -736,7 +747,7 @@ smbios_dictionary = { "Board ID": "Mac-A5C67F76ED83108C", "FirmwareFeatures": "0xFC0FE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.skylake, + "CPU Generation": cpu_data.cpu_data.skylake.value, "Max OS Supported": os_data.os_data.max_os, "Wireless Model": device_probe.Broadcom.Chipsets.AirportBrcmNIC, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20703_UART, @@ -749,7 +760,7 @@ smbios_dictionary = { "Board ID": "Mac-B4831CEBD52A0C4C", "FirmwareFeatures": "0xFF0FF57E", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.kaby_lake, + "CPU Generation": cpu_data.cpu_data.kaby_lake.value, "Max OS Supported": os_data.os_data.max_os, "Wireless Model": device_probe.Broadcom.Chipsets.AirportBrcmNIC, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20703_UART, @@ -761,7 +772,7 @@ smbios_dictionary = { "Board ID": "Mac-CAD6701F7CEA0921", "FirmwareFeatures": "0xFF0FF57E", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.kaby_lake, + "CPU Generation": cpu_data.cpu_data.kaby_lake.value, "Max OS Supported": os_data.os_data.max_os, "Wireless Model": device_probe.Broadcom.Chipsets.AirportBrcmNIC, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20703_UART, @@ -773,7 +784,7 @@ smbios_dictionary = { "Board ID": "Mac-551B86E5744E2388", "FirmwareFeatures": "0xFF0FF57E", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.kaby_lake, + "CPU Generation": cpu_data.cpu_data.kaby_lake.value, "Max OS Supported": os_data.os_data.max_os, "Wireless Model": device_probe.Broadcom.Chipsets.AirportBrcmNIC, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20703_UART, @@ -785,8 +796,8 @@ smbios_dictionary = { "MacBookPro15,1": { "Board ID": "Mac-937A206F2EE63C01", "FirmwareFeatures": "0xFD8FF426", - "SecureBootModel": "j680ap", - "CPU Generation": cpu_data.cpu_data.coffee_lake, + "SecureBootModel": "j680", + "CPU Generation": cpu_data.cpu_data.coffee_lake.value, "Max OS Supported": os_data.os_data.max_os, "Wireless Model": device_probe.Broadcom.Chipsets.AppleBCMWLANBusInterfacePCIe, "Bluetooth Model": bluetooth_data.bluetooth_data.UART, @@ -798,8 +809,8 @@ smbios_dictionary = { "MacBookPro15,2": { "Board ID": "Mac-827FB448E656EC26", "FirmwareFeatures": "0xFD8FF426", - "SecureBootModel": "j132ap", - "CPU Generation": cpu_data.cpu_data.coffee_lake, + "SecureBootModel": "j132", + "CPU Generation": cpu_data.cpu_data.coffee_lake.value, "Max OS Supported": os_data.os_data.max_os, "Wireless Model": device_probe.Broadcom.Chipsets.AppleBCMWLANBusInterfacePCIe, "Bluetooth Model": bluetooth_data.bluetooth_data.UART, @@ -810,8 +821,8 @@ smbios_dictionary = { "MacBookPro15,3": { "Board ID": "Mac-1E7E29AD0135F9BC", "FirmwareFeatures": "0xFD8FF426", - "SecureBootModel": "j780ap", - "CPU Generation": cpu_data.cpu_data.coffee_lake, + "SecureBootModel": "j780", + "CPU Generation": cpu_data.cpu_data.coffee_lake.value, "Max OS Supported": os_data.os_data.max_os, "Wireless Model": device_probe.Broadcom.Chipsets.AppleBCMWLANBusInterfacePCIe, "Bluetooth Model": bluetooth_data.bluetooth_data.UART, @@ -823,8 +834,8 @@ smbios_dictionary = { "MacBookPro15,4": { "Board ID": "Mac-53FDB3D8DB8CA971", "FirmwareFeatures": "0xFD8FF426", - "SecureBootModel": "j213ap", - "CPU Generation": cpu_data.cpu_data.coffee_lake, + "SecureBootModel": "j213", + "CPU Generation": cpu_data.cpu_data.coffee_lake.value, "Max OS Supported": os_data.os_data.max_os, "Wireless Model": device_probe.Broadcom.Chipsets.AppleBCMWLANBusInterfacePCIe, "Bluetooth Model": bluetooth_data.bluetooth_data.UART, @@ -835,8 +846,8 @@ smbios_dictionary = { "MacBookPro16,1": { "Board ID": "Mac-E1008331FDC96864", "FirmwareFeatures": "0xFDAFF066", - "SecureBootModel": "j152fap", - "CPU Generation": cpu_data.cpu_data.coffee_lake, + "SecureBootModel": "j152f", + "CPU Generation": cpu_data.cpu_data.coffee_lake.value, "Max OS Supported": os_data.os_data.max_os, "Wireless Model": device_probe.Broadcom.Chipsets.AppleBCMWLANBusInterfacePCIe, "Bluetooth Model": bluetooth_data.bluetooth_data.UART, @@ -848,8 +859,8 @@ smbios_dictionary = { "MacBookPro16,2": { "Board ID": "Mac-5F9802EFE386AA28", "FirmwareFeatures": "0xFFAFF06E", - "SecureBootModel": "j214kap", - "CPU Generation": cpu_data.cpu_data.coffee_lake, + "SecureBootModel": "j214k", + "CPU Generation": cpu_data.cpu_data.coffee_lake.value, "Max OS Supported": os_data.os_data.max_os, "Wireless Model": device_probe.Broadcom.Chipsets.AppleBCMWLANBusInterfacePCIe, "Bluetooth Model": bluetooth_data.bluetooth_data.UART, @@ -860,8 +871,8 @@ smbios_dictionary = { "MacBookPro16,3": { "Board ID": "Mac-E7203C0F68AA0004", "FirmwareFeatures": "0xFDAFF066", - "SecureBootModel": "j223ap", - "CPU Generation": cpu_data.cpu_data.coffee_lake, + "SecureBootModel": "j223", + "CPU Generation": cpu_data.cpu_data.coffee_lake.value, "Max OS Supported": os_data.os_data.max_os, "Wireless Model": device_probe.Broadcom.Chipsets.AppleBCMWLANBusInterfacePCIe, "Bluetooth Model": bluetooth_data.bluetooth_data.UART, @@ -872,8 +883,8 @@ smbios_dictionary = { "MacBookPro16,4": { "Board ID": "Mac-A61BADE1FDAD7B05", "FirmwareFeatures": "0xFDAFF066", - "SecureBootModel": "j215ap", - "CPU Generation": cpu_data.cpu_data.coffee_lake, + "SecureBootModel": "j215", + "CPU Generation": cpu_data.cpu_data.coffee_lake.value, "Max OS Supported": os_data.os_data.max_os, "Wireless Model": device_probe.Broadcom.Chipsets.AppleBCMWLANBusInterfacePCIe, "Bluetooth Model": bluetooth_data.bluetooth_data.UART, @@ -882,11 +893,22 @@ smbios_dictionary = { "Ethernet Chipset": None, }, + "MacBookPro17,1": { + "Board ID": None, + "FirmwareFeatures": None, + "SecureBootModel": "j293", + "CPU Generation": cpu_data.cpu_data.apple_m1.value, + "Max OS Supported": os_data.os_data.max_os, + "Wireless Model": device_probe.Broadcom.Chipsets.AppleBCMWLANBusInterfacePCIe, + "Bluetooth Model": bluetooth_data.bluetooth_data.PCIe, + "Ethernet Chipset": None, + }, + "Macmini1,1": { "Board ID": "Mac-F4208EC8", "FirmwareFeatures": None, "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.yonah, + "CPU Generation": cpu_data.cpu_data.yonah.value, "Max OS Supported": os_data.os_data.snow_leopard, "Wireless Model": device_probe.Atheros.Chipsets.AirPortAtheros40, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2045, @@ -897,7 +919,7 @@ smbios_dictionary = { "Board ID": "Mac-F4208EAA", "FirmwareFeatures": None, "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.conroe, + "CPU Generation": cpu_data.cpu_data.conroe.value, "Max OS Supported": os_data.os_data.lion, "Wireless Model": device_probe.Atheros.Chipsets.AirPortAtheros40, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2045, @@ -908,7 +930,7 @@ smbios_dictionary = { "Board ID": "Mac-F22C86C8", "FirmwareFeatures": "0xC0001403", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.penryn, + "CPU Generation": cpu_data.cpu_data.penryn.value, "Max OS Supported": os_data.os_data.el_capitan, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm4331, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2046, @@ -921,7 +943,7 @@ smbios_dictionary = { "Board ID": "Mac-F2208EC8", "FirmwareFeatures": "0xC00C9423", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.penryn, + "CPU Generation": cpu_data.cpu_data.penryn.value, "Max OS Supported": os_data.os_data.high_sierra, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm4360, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2070, @@ -933,7 +955,7 @@ smbios_dictionary = { "Board ID": "Mac-8ED6AF5B48C039E1", "FirmwareFeatures": "0xD00DE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.sandy_bridge, + "CPU Generation": cpu_data.cpu_data.sandy_bridge.value, "Max OS Supported": os_data.os_data.high_sierra, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm4360, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2070, @@ -945,7 +967,7 @@ smbios_dictionary = { "Board ID": "Mac-4BC72D62AD45599E", "FirmwareFeatures": "0xD00DE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.sandy_bridge, + "CPU Generation": cpu_data.cpu_data.sandy_bridge.value, "Max OS Supported": os_data.os_data.high_sierra, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm4360, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2070, @@ -957,7 +979,7 @@ smbios_dictionary = { "Board ID": "Mac-7BA5B2794B2CDB12", "FirmwareFeatures": "0xD00DE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.sandy_bridge, + "CPU Generation": cpu_data.cpu_data.sandy_bridge.value, "Max OS Supported": os_data.os_data.high_sierra, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm4360, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2070, @@ -969,7 +991,7 @@ smbios_dictionary = { "Board ID": "Mac-031AEE4D24BFF0B1", "FirmwareFeatures": "0xE00DE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.ivy_bridge, + "CPU Generation": cpu_data.cpu_data.ivy_bridge.value, "Max OS Supported": os_data.os_data.catalina, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm4360, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20702_v1, @@ -981,7 +1003,7 @@ smbios_dictionary = { "Board ID": "Mac-F65AE981FFA204ED", "FirmwareFeatures": "0xE00DE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.ivy_bridge, + "CPU Generation": cpu_data.cpu_data.ivy_bridge.value, "Max OS Supported": os_data.os_data.catalina, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm4360, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20702_v1, @@ -992,7 +1014,7 @@ smbios_dictionary = { "Board ID": "Mac-35C5E08120C7EEAF", "FirmwareFeatures": "0xE00DE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.haswell, + "CPU Generation": cpu_data.cpu_data.haswell.value, "Max OS Supported": os_data.os_data.max_os, "Wireless Model": device_probe.Broadcom.Chipsets.AirportBrcmNIC, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20702_v2, @@ -1002,19 +1024,30 @@ smbios_dictionary = { "Macmini8,1": { "Board ID": "Mac-7BA5B2DFE22DDD8C", "FirmwareFeatures": "0xFD8FF466", - "SecureBootModel": "j174ap", - "CPU Generation": cpu_data.cpu_data.coffee_lake, + "SecureBootModel": "j174", + "CPU Generation": cpu_data.cpu_data.coffee_lake.value, "Max OS Supported": os_data.os_data.max_os, "Wireless Model": device_probe.Broadcom.Chipsets.AppleBCMWLANBusInterfacePCIe, "Bluetooth Model": bluetooth_data.bluetooth_data.UART, "Ethernet Chipset": "Broadcom", }, + "Macmini9,1": { + "Board ID": None, + "FirmwareFeatures": None, + "SecureBootModel": "j274", + "CPU Generation": cpu_data.cpu_data.apple_m1.value, + "Max OS Supported": os_data.os_data.max_os, + "Wireless Model": device_probe.Broadcom.Chipsets.AppleBCMWLANBusInterfacePCIe, + "Bluetooth Model": bluetooth_data.bluetooth_data.PCIe, + "Ethernet Chipset": "Broadcom", + }, + "iMac4,1": { "Board ID": "Mac-F42786C8", "FirmwareFeatures": None, "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.yonah, + "CPU Generation": cpu_data.cpu_data.yonah.value, "Max OS Supported": os_data.os_data.snow_leopard, "Wireless Model": device_probe.Atheros.Chipsets.AirPortAtheros40, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2045, @@ -1026,7 +1059,7 @@ smbios_dictionary = { "Board ID": "Mac-F4218EC8", "FirmwareFeatures": None, "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.yonah, + "CPU Generation": cpu_data.cpu_data.yonah.value, "Max OS Supported": os_data.os_data.snow_leopard, "Wireless Model": device_probe.Atheros.Chipsets.AirPortAtheros40, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2045, @@ -1038,7 +1071,7 @@ smbios_dictionary = { "Board ID": "Mac-F4228EC8", "FirmwareFeatures": None, "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.conroe, + "CPU Generation": cpu_data.cpu_data.conroe.value, "Max OS Supported": os_data.os_data.lion, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm43224, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2046, @@ -1050,7 +1083,7 @@ smbios_dictionary = { "Board ID": "Mac-F4218EC8", "FirmwareFeatures": None, "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.conroe, + "CPU Generation": cpu_data.cpu_data.conroe.value, "Max OS Supported": os_data.os_data.lion, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm43224, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2046, @@ -1062,7 +1095,7 @@ smbios_dictionary = { "Board ID": "Mac-F4218FC8", "FirmwareFeatures": None, "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.conroe, + "CPU Generation": cpu_data.cpu_data.conroe.value, "Max OS Supported": os_data.os_data.lion, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm43224, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2046, @@ -1087,7 +1120,7 @@ smbios_dictionary = { "Board ID": "Mac-F227BEC8", "FirmwareFeatures": "0xC0001403", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.penryn, + "CPU Generation": cpu_data.cpu_data.penryn.value, "Max OS Supported": os_data.os_data.el_capitan, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm43224, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2046, @@ -1100,7 +1133,7 @@ smbios_dictionary = { "Board ID": "Mac-F2218FA9", "FirmwareFeatures": "0xC0001403", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.penryn, + "CPU Generation": cpu_data.cpu_data.penryn.value, "Max OS Supported": os_data.os_data.el_capitan, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm4331, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2046, @@ -1114,7 +1147,7 @@ smbios_dictionary = { # "Board ID": "Mac-F2268CC8", "FirmwareFeatures": "0xE00DE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.penryn, + "CPU Generation": cpu_data.cpu_data.penryn.value, "Max OS Supported": os_data.os_data.high_sierra, "Wireless Model": device_probe.Atheros.Chipsets.AirPortAtheros40, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2046, @@ -1127,7 +1160,7 @@ smbios_dictionary = { "Board ID": "Mac-F2268DAE", "FirmwareFeatures": "0xE00DE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.nehalem, + "CPU Generation": cpu_data.cpu_data.nehalem.value, "Max OS Supported": os_data.os_data.high_sierra, "Wireless Model": device_probe.Atheros.Chipsets.AirPortAtheros40, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2046, @@ -1139,7 +1172,7 @@ smbios_dictionary = { "Board ID": "Mac-F2238AC8", "FirmwareFeatures": "0xC00C9423", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.nehalem, + "CPU Generation": cpu_data.cpu_data.nehalem.value, "Max OS Supported": os_data.os_data.high_sierra, "Wireless Model": device_probe.Atheros.Chipsets.AirPortAtheros40, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2046, @@ -1151,7 +1184,7 @@ smbios_dictionary = { "Board ID": "Mac-F2238BAE", "FirmwareFeatures": "0xE00DE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.nehalem, + "CPU Generation": cpu_data.cpu_data.nehalem.value, "Max OS Supported": os_data.os_data.high_sierra, "Wireless Model": device_probe.Atheros.Chipsets.AirPortAtheros40, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2046, @@ -1163,7 +1196,7 @@ smbios_dictionary = { "Board ID": "Mac-942B5BF58194151B", "FirmwareFeatures": "0xE00DE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.sandy_bridge, + "CPU Generation": cpu_data.cpu_data.sandy_bridge.value, "Max OS Supported": os_data.os_data.high_sierra, "Wireless Model": device_probe.Atheros.Chipsets.AirPortAtheros40, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2046, @@ -1175,7 +1208,7 @@ smbios_dictionary = { "Board ID": "Mac-942B59F58194171B", "FirmwareFeatures": "0xE00DE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.sandy_bridge, + "CPU Generation": cpu_data.cpu_data.sandy_bridge.value, "Max OS Supported": os_data.os_data.high_sierra, "Wireless Model": device_probe.Atheros.Chipsets.AirPortAtheros40, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2046, @@ -1187,7 +1220,7 @@ smbios_dictionary = { "Board ID": "Mac-00BE6ED71E35EB86", "FirmwareFeatures": "0xE00DE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.ivy_bridge, + "CPU Generation": cpu_data.cpu_data.ivy_bridge.value, "Max OS Supported": os_data.os_data.catalina, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm4360, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20702_v1, @@ -1199,7 +1232,7 @@ smbios_dictionary = { "Board ID": "Mac-FC02E91DDD3FA6A4", "FirmwareFeatures": "0xE00DE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.ivy_bridge, + "CPU Generation": cpu_data.cpu_data.ivy_bridge.value, "Max OS Supported": os_data.os_data.catalina, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm4360, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20702_v1, @@ -1211,7 +1244,7 @@ smbios_dictionary = { "Board ID": "Mac-7DF2A3B5E5D671ED", "FirmwareFeatures": "0xE00DE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.ivy_bridge, + "CPU Generation": cpu_data.cpu_data.ivy_bridge.value, "Max OS Supported": os_data.os_data.catalina, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm4360, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20702_v1, @@ -1223,7 +1256,7 @@ smbios_dictionary = { "Board ID": "Mac-031B6874CF7F642A", "FirmwareFeatures": "0xFB0FF577", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.haswell, + "CPU Generation": cpu_data.cpu_data.haswell.value, "Max OS Supported": os_data.os_data.catalina, "Wireless Model": device_probe.Broadcom.Chipsets.AirportBrcmNIC, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20702_v2, @@ -1235,7 +1268,7 @@ smbios_dictionary = { "Board ID": "Mac-27ADBB7B4CEE8E61", "FirmwareFeatures": "0xE00FE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.haswell, + "CPU Generation": cpu_data.cpu_data.haswell.value, "Max OS Supported": os_data.os_data.catalina, "Wireless Model": device_probe.Broadcom.Chipsets.AirportBrcmNIC, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20702_v2, @@ -1247,7 +1280,7 @@ smbios_dictionary = { "Board ID": "Mac-77EB7D7DAF985301", "FirmwareFeatures": "0xE00FE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.haswell, + "CPU Generation": cpu_data.cpu_data.haswell.value, "Max OS Supported": os_data.os_data.catalina, "Wireless Model": device_probe.Broadcom.Chipsets.AirportBrcmNIC, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20702_v2, @@ -1259,7 +1292,7 @@ smbios_dictionary = { "Board ID": "Mac-81E3E92DD6088272", "FirmwareFeatures": "0xF00FE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.haswell, + "CPU Generation": cpu_data.cpu_data.haswell.value, "Max OS Supported": os_data.os_data.big_sur, "Wireless Model": device_probe.Broadcom.Chipsets.AirportBrcmNIC, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20702_v2, @@ -1271,7 +1304,7 @@ smbios_dictionary = { "Board ID": "Mac-42FD25EABCABB274", "FirmwareFeatures": "0xF80FE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.haswell, + "CPU Generation": cpu_data.cpu_data.haswell.value, "Max OS Supported": os_data.os_data.big_sur, "Wireless Model": device_probe.Broadcom.Chipsets.AirportBrcmNIC, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20702_v2, @@ -1282,7 +1315,7 @@ smbios_dictionary = { "Board ID": "Mac-A369DDC4E67F1C45", "FirmwareFeatures": "0xFC0FE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.broadwell, + "CPU Generation": cpu_data.cpu_data.broadwell.value, "Max OS Supported": os_data.os_data.max_os, "Wireless Model": device_probe.Broadcom.Chipsets.AirportBrcmNIC, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20702_v2, @@ -1293,7 +1326,7 @@ smbios_dictionary = { "Board ID": "Mac-FFE5EF870D7BA81A", "FirmwareFeatures": "0xFC0FE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.broadwell, + "CPU Generation": cpu_data.cpu_data.broadwell.value, "Max OS Supported": os_data.os_data.max_os, "Wireless Model": device_probe.Broadcom.Chipsets.AirportBrcmNIC, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20702_v2, @@ -1306,7 +1339,7 @@ smbios_dictionary = { # "Board ID": "Mac-B809C3757DA9BB8D", "FirmwareFeatures": "0xFC0FE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.skylake, + "CPU Generation": cpu_data.cpu_data.skylake.value, "Max OS Supported": os_data.os_data.max_os, "Wireless Model": device_probe.Broadcom.Chipsets.AirportBrcmNIC, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20702_v2, @@ -1317,7 +1350,7 @@ smbios_dictionary = { "Board ID": "Mac-4B682C642B45593E", "FirmwareFeatures": "0xFD0FF576", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.kaby_lake, + "CPU Generation": cpu_data.cpu_data.kaby_lake.value, "Max OS Supported": os_data.os_data.max_os, "Wireless Model": device_probe.Broadcom.Chipsets.AirportBrcmNIC, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20703, @@ -1328,7 +1361,7 @@ smbios_dictionary = { "Board ID": "Mac-77F17D7DA9285301", "FirmwareFeatures": "0xFD0FF576", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.kaby_lake, + "CPU Generation": cpu_data.cpu_data.kaby_lake.value, "Max OS Supported": os_data.os_data.max_os, "Wireless Model": device_probe.Broadcom.Chipsets.AirportBrcmNIC, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20703, @@ -1339,7 +1372,7 @@ smbios_dictionary = { "Board ID": "Mac-BE088AF8C5EB4FA2", "FirmwareFeatures": "0xFD0FF576", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.kaby_lake, + "CPU Generation": cpu_data.cpu_data.kaby_lake.value, "Max OS Supported": os_data.os_data.max_os, "Wireless Model": device_probe.Broadcom.Chipsets.AirportBrcmNIC, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20703, @@ -1350,7 +1383,7 @@ smbios_dictionary = { "Board ID": "Mac-AA95B1DDAB278B95", "FirmwareFeatures": "0xFD8FF576", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.coffee_lake, + "CPU Generation": cpu_data.cpu_data.coffee_lake.value, "Max OS Supported": os_data.os_data.max_os, "Wireless Model": device_probe.Broadcom.Chipsets.AppleBCMWLANBusInterfacePCIe, "Bluetooth Model": bluetooth_data.bluetooth_data.UART, @@ -1361,7 +1394,7 @@ smbios_dictionary = { "Board ID": "Mac-63001698E7A34814", "FirmwareFeatures": "0xFD8FF576", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.coffee_lake, + "CPU Generation": cpu_data.cpu_data.coffee_lake.value, "Max OS Supported": os_data.os_data.max_os, "Wireless Model": device_probe.Broadcom.Chipsets.AppleBCMWLANBusInterfacePCIe, "Bluetooth Model": bluetooth_data.bluetooth_data.UART, @@ -1371,8 +1404,8 @@ smbios_dictionary = { "iMac20,1": { "Board ID": "Mac-CFF7D910A743CAAF", "FirmwareFeatures": "0xFD8FF576", - "SecureBootModel": "j185ap", - "CPU Generation": cpu_data.cpu_data.comet_lake, + "SecureBootModel": "j185", + "CPU Generation": cpu_data.cpu_data.comet_lake.value, "Max OS Supported": os_data.os_data.max_os, "Wireless Model": device_probe.Broadcom.Chipsets.AppleBCMWLANBusInterfacePCIe, "Bluetooth Model": bluetooth_data.bluetooth_data.UART, @@ -1382,19 +1415,42 @@ smbios_dictionary = { "iMac20,2": { "Board ID": "Mac-AF89B6D9451A490B", "FirmwareFeatures": "0xFD8FF576", - "SecureBootModel": "j185fap", - "CPU Generation": cpu_data.cpu_data.comet_lake, + "SecureBootModel": "j185f", + "CPU Generation": cpu_data.cpu_data.comet_lake.value, "Max OS Supported": os_data.os_data.max_os, "Wireless Model": device_probe.Broadcom.Chipsets.AppleBCMWLANBusInterfacePCIe, "Bluetooth Model": bluetooth_data.bluetooth_data.UART, "Ethernet Chipset": "Broadcom", }, + "iMac21,1": { + "Board ID": None, + "FirmwareFeatures": None, + "SecureBootModel": "j456", + "CPU Generation": cpu_data.cpu_data.apple_m1.value, + "Max OS Supported": os_data.os_data.max_os, + "Wireless Model": device_probe.Broadcom.Chipsets.AppleBCMWLANBusInterfacePCIe, + "Bluetooth Model": bluetooth_data.bluetooth_data.PCIe, + "Ethernet Chipset": "Broadcom", + }, + + "iMac21,2": { + "Board ID": None, + "FirmwareFeatures": None, + "SecureBootModel": "j457", + "CPU Generation": cpu_data.cpu_data.apple_m1.value, + "Max OS Supported": os_data.os_data.max_os, + "Wireless Model": device_probe.Broadcom.Chipsets.AppleBCMWLANBusInterfacePCIe, + "Bluetooth Model": bluetooth_data.bluetooth_data.PCIe, + "Ethernet Chipset": "Broadcom", + }, + + "iMacPro1,1": { "Board ID": "Mac-7BA5B2D9E42DDD94", "FirmwareFeatures": "0xFD8FF53E", - "SecureBootModel": "j137ap", - "CPU Generation": cpu_data.cpu_data.skylake, + "SecureBootModel": "j137", + "CPU Generation": cpu_data.cpu_data.skylake.value, "Max OS Supported": os_data.os_data.max_os, "Wireless Model": device_probe.Broadcom.Chipsets.AppleBCMWLANBusInterfacePCIe, "Bluetooth Model": bluetooth_data.bluetooth_data.UART, @@ -1405,7 +1461,7 @@ smbios_dictionary = { "Board ID": "Mac-F4208DC8", "FirmwareFeatures": "0x80000015", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.conroe, + "CPU Generation": cpu_data.cpu_data.conroe.value, "Max OS Supported": os_data.os_data.lion, "Wireless Model": None, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2045, @@ -1417,7 +1473,7 @@ smbios_dictionary = { "Board ID": "Mac-F4208DA9", "FirmwareFeatures": "0xC0000015", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.conroe, + "CPU Generation": cpu_data.cpu_data.conroe.value, "Max OS Supported": os_data.os_data.lion, "Wireless Model": None, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2045, @@ -1429,7 +1485,7 @@ smbios_dictionary = { "Board ID": "Mac-F42C88C8", "FirmwareFeatures": "0xC0001403", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.penryn, + "CPU Generation": cpu_data.cpu_data.penryn.value, "Max OS Supported": os_data.os_data.el_capitan, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm43224, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2045, @@ -1442,7 +1498,7 @@ smbios_dictionary = { "Board ID": "Mac-F221BEC8", "FirmwareFeatures": "0xE001F537", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.nehalem, + "CPU Generation": cpu_data.cpu_data.nehalem.value, "Max OS Supported": os_data.os_data.el_capitan, "Wireless Model": device_probe.Atheros.Chipsets.AirPortAtheros40, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2046, @@ -1454,7 +1510,7 @@ smbios_dictionary = { "Board ID": "Mac-F221BEC8", "FirmwareFeatures": "0xE80FE137", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.nehalem, + "CPU Generation": cpu_data.cpu_data.nehalem.value, "Max OS Supported": os_data.os_data.mojave, "Wireless Model": device_probe.Broadcom.Chipsets.AirPortBrcm4331, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2046, @@ -1465,7 +1521,7 @@ smbios_dictionary = { "Board ID": "Mac-F60DEB81FF30ACF6", "FirmwareFeatures": "0xE90FF576", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.ivy_bridge, + "CPU Generation": cpu_data.cpu_data.ivy_bridge.value, "Max OS Supported": os_data.os_data.max_os, "Wireless Model": device_probe.Broadcom.Chipsets.AirportBrcmNIC, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM20702_v2, @@ -1475,8 +1531,8 @@ smbios_dictionary = { "MacPro7,1": { "Board ID": "Mac-27AD2F918AE68F61", "FirmwareFeatures": "0xFDAFF066", - "SecureBootModel": "j160ap", - "CPU Generation": cpu_data.cpu_data.coffee_lake, + "SecureBootModel": "j160", + "CPU Generation": cpu_data.cpu_data.coffee_lake.value, "Max OS Supported": os_data.os_data.max_os, "Wireless Model": device_probe.Broadcom.Chipsets.AppleBCMWLANBusInterfacePCIe, "Bluetooth Model": bluetooth_data.bluetooth_data.UART, @@ -1487,7 +1543,7 @@ smbios_dictionary = { "Board ID": "Mac-F4208AC8", "FirmwareFeatures": None, "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.conroe, + "CPU Generation": cpu_data.cpu_data.conroe.value, "Max OS Supported": os_data.os_data.lion, "Wireless Model": None, "Bluetooth Model": bluetooth_data.bluetooth_data.NonApplicable, @@ -1499,7 +1555,7 @@ smbios_dictionary = { "Board ID": "Mac-F42289C8", "FirmwareFeatures": "0xC0001403", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.penryn, + "CPU Generation": cpu_data.cpu_data.penryn.value, "Max OS Supported": os_data.os_data.lion, "Wireless Model": None, "Bluetooth Model": bluetooth_data.bluetooth_data.NonApplicable, @@ -1511,11 +1567,22 @@ smbios_dictionary = { "Board ID": "Mac-F223BEC8", "FirmwareFeatures": "0xE001F537", "SecureBootModel": None, - "CPU Generation": cpu_data.cpu_data.nehalem, + "CPU Generation": cpu_data.cpu_data.nehalem.value, "Max OS Supported": os_data.os_data.el_capitan, "Wireless Model": None, "Bluetooth Model": bluetooth_data.bluetooth_data.NonApplicable, "Ethernet Chipset": "Intel 82574L", }, -} + "ADP3,2": { + "Board ID": None, + "FirmwareFeatures": None, + "SecureBootModel": "j293", + "CPU Generation": cpu_data.cpu_data.apple_dtk.value, + "Max OS Supported": os_data.os_data.max_os, + "Wireless Model": device_probe.Broadcom.Chipsets.AppleBCMWLANBusInterfacePCIe, + "Bluetooth Model": bluetooth_data.bluetooth_data.PCIe, + "Ethernet Chipset": "Broadcom", + }, + +} \ No newline at end of file diff --git a/Resources/SysPatchArray.py b/Data/sys_patch_data.py similarity index 99% rename from Resources/SysPatchArray.py rename to Data/sys_patch_data.py index 75b40ab0a..509cd3080 100644 --- a/Resources/SysPatchArray.py +++ b/Data/sys_patch_data.py @@ -1,4 +1,4 @@ -# Lists Root patches used by SysPatch.py +# Lists Root patches used by sys_patch.py # Copyright (C) 2020-2021, Dhinak G, Mykola Grymalyuk DeleteNvidiaAccel11 = [ "AMDRadeonX4000.kext", diff --git a/OpenCore-Patcher.command b/OpenCore-Patcher.command index 04eb4021c..639215903 100755 --- a/OpenCore-Patcher.command +++ b/OpenCore-Patcher.command @@ -7,7 +7,7 @@ import subprocess import sys from pathlib import Path -from Resources import Build, CliMenu, Constants, ModelArray, SysPatch, Utilities, device_probe, os_probe, defaults, arguments +from Resources import Build, cli_menu, Constants, ModelArray, sys_patch, Utilities, device_probe, os_probe, defaults, arguments from Data import smbios_data, cpu_data class OpenCoreLegacyPatcher: @@ -43,156 +43,6 @@ class OpenCoreLegacyPatcher: def install_opencore(self): Build.BuildOpenCore(self.constants.custom_model or self.constants.computer.real_model, self.constants).copy_efi() - def patcher_settings(self): - response = None - while not (response and response == -1): - title = ["Adjust Patcher Settings"] - menu = Utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True) - options = [ - ["Debug Settings", self.patcher_setting_debug], - ["Security Settings", self.patcher_settings_security], - ["SMBIOS Settings", self.patcher_settings_smbios], - ["Boot Volume Settings", self.patcher_settings_boot], - ["Miscellaneous Settings", self.patcher_settings_misc], - ["Dump detected hardware", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).dump_hardware], - [ - f"Allow Accel on Mojave/Catalina:\tCurrently {self.constants.moj_cat_accel}", - CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).allow_moj_cat_patch, - ], - [ - f"Allow OpenCore on native Models:\tCurrently {self.constants.allow_oc_everywhere}", - CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).allow_native_models, - ], - ["Advanced Settings, for developers only", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).advanced_patcher_settings], - ] - - for option in options: - menu.add_menu_option(option[0], function=option[1]) - - response = menu.start() - - def patcher_setting_debug(self): - response = None - while not (response and response == -1): - title = ["Adjust Debug Settings"] - menu = Utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True) - options = [ - [f"Enable Verbose Mode:\tCurrently {self.constants.verbose_debug}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_verbose], - [f"Enable OpenCore DEBUG:\tCurrently {self.constants.opencore_debug}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_oc], - [f"Enable Kext DEBUG:\t\tCurrently {self.constants.kext_debug}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_kext], - ] + ( - [ - [f"Set SurPlus Settings:\tCurrently {self.constants.force_surplus}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).set_surplus] - ] - if (smbios_data.smbios_dictionary[self.constants.custom_model or self.computer.real_model]["CPU Generation"] <= cpu_data.cpu_data.sandy_bridge) - else [] - ) - - for option in options: - menu.add_menu_option(option[0], function=option[1]) - - response = menu.start() - - def patcher_settings_security(self): - response = None - while not (response and response == -1): - title = ["Adjust Security Settings"] - menu = Utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True) - options = [ - # [ - # f"Set Apple Mobile File Integrity (AMFI):\tCurrently {self.constants.amfi_status}", - # CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).set_amfi, - # ], - [ - f"Set System Intrgity Protection (SIP):\tCurrently {self.constants.sip_status}", - CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_sip, - ], - [ - f"Set Secure Boot Model (SBM):\t\tCurrently {self.constants.secure_status}", - CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_sbm, - ], - [f"Set Vault Mode:\t\t\t\tCurrently {self.constants.vault}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_vault], - ] - - for option in options: - menu.add_menu_option(option[0], function=option[1]) - - response = menu.start() - - def patcher_settings_smbios(self): - response = None - while not (response and response == -1): - title = ["Adjust SMBIOS Settings"] - menu = Utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True) - options = [ - [f"Set SMBIOS Spoof Level:\tCurrently {self.constants.serial_settings}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_serial], - [f"Set SMBIOS Spoof Model:\tCurrently {self.constants.override_smbios}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).set_smbios], - [f"Set Custom name {self.constants.custom_cpu_model_value}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).custom_cpu], - ] - - for option in options: - menu.add_menu_option(option[0], function=option[1]) - - response = menu.start() - - def patcher_settings_boot(self): - response = None - while not (response and response == -1): - title = ["Adjust Bootable Volume Settings"] - menu = Utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True) - options = [ - [f"Set FireWire Boot:\tCurrently {self.constants.firewire_boot}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).allow_firewire], - [f"Set NVMe Boot:\tCurrently {self.constants.nvme_boot}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).allow_nvme], - ] - - for option in options: - menu.add_menu_option(option[0], function=option[1]) - - response = menu.start() - - def patcher_settings_misc(self): - response = None - while not (response and response == -1): - title = ["Adjust Miscellaneous Settings"] - menu = Utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True) - options = [ - [f"Set ShowPicker Mode:\tCurrently {self.constants.showpicker}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_showpicker], - [f"Set Wake on WLAN:\t\tCurrently {self.constants.enable_wake_on_wlan}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).allow_wowl], - [f"Set Ivy iMac iGPU:\t\tCurrently {self.constants.allow_ivy_igpu}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).allow_ivy], - [f"Set TeraScale 2 Accel:\tCurrently {self.constants.allow_ts2_accel}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).terascale_2_accel], - [ - f"Disable Thunderbolt:\tCurrently {self.constants.disable_tb}", - CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).disable_tb, - ], - [f"Set AppleALC Usage:\t\tCurrently {self.constants.set_alc_usage}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).applealc_support], - [f"Set Windows GMUX support:\tCurrently {self.constants.dGPU_switch}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).dGPU_switch_support], - ] - - for option in options: - menu.add_menu_option(option[0], function=option[1]) - - response = menu.start() - - def advanced_patcher_settings(self): - response = None - while not (response and response == -1): - title = ["Adjust Advanced Patcher Settings, for developers ONLY"] - menu = Utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True) - options = [ - [f"Set Metal GPU Status:\t\tCurrently {self.constants.imac_vendor}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_metal], - [f"Set DRM Preferences:\t\tCurrently {self.constants.drm_support}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).drm_setting], - [f"Set Generic Bootstrap:\t\tCurrently {self.constants.boot_efi}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).bootstrap_setting], - [ - f"Disable CPU Friend:\t\t\tCurrently {self.constants.disallow_cpufriend}", - CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).disable_cpufriend, - ], - ] - - for option in options: - menu.add_menu_option(option[0], function=option[1]) - - response = menu.start() - def main_menu(self): response = None while not (response and response == -1): @@ -228,10 +78,10 @@ class OpenCoreLegacyPatcher: else [] ) + [ ["Install OpenCore to USB/internal drive", self.install_opencore], - ["Post-Install Volume Patch", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).PatchVolume], - ["Change Model", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_model], - ["Patcher Settings", self.patcher_settings], - ["Credits", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).credits], + ["Post-Install Volume Patch", cli_menu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).PatchVolume], + ["Change Model", cli_menu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_model], + ["Patcher Settings", cli_menu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).patcher_settings], + ["Credits", cli_menu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).credits], ] for option in options: diff --git a/Resources/Build.py b/Resources/Build.py index 71b757b31..fa0606ee0 100644 --- a/Resources/Build.py +++ b/Resources/Build.py @@ -105,8 +105,8 @@ class BuildOpenCore: ("SMC-Spoof.kext", self.constants.smcspoof_version, self.constants.smcspoof_path, lambda: self.constants.allow_oc_everywhere is False), # CPU patches ("AppleMCEReporterDisabler.kext", self.constants.mce_version, self.constants.mce_path, lambda: self.model.startswith("MacPro") or self.model.startswith("Xserve")), - ("AAAMouSSE.kext", self.constants.mousse_version, self.constants.mousse_path, lambda: smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.penryn), - ("telemetrap.kext", self.constants.telemetrap_version, self.constants.telemetrap_path, lambda: smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.penryn), + ("AAAMouSSE.kext", self.constants.mousse_version, self.constants.mousse_path, lambda: smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.penryn.value), + ("telemetrap.kext", self.constants.telemetrap_version, self.constants.telemetrap_path, lambda: smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.penryn.value), ( "CPUFriend.kext", self.constants.cpufriend_version, @@ -121,7 +121,7 @@ class BuildOpenCore: # IDE patch ("AppleIntelPIIXATA.kext", self.constants.piixata_version, self.constants.piixata_path, lambda: self.model in ModelArray.IDEPatch), # Misc - ("FeatureUnlock.kext", self.constants.featureunlock_version, self.constants.featureunlock_path, lambda: smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.kaby_lake), + ("FeatureUnlock.kext", self.constants.featureunlock_version, self.constants.featureunlock_path, lambda: smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.kaby_lake.value), ("DebugEnhancer.kext", self.constants.debugenhancer_version, self.constants.debugenhancer_path, lambda: self.constants.kext_debug is True), ("AppleUSBTrackpad.kext", self.constants.apple_trackpad, self.constants.apple_trackpad_path, lambda: self.model in ["MacBook4,1", "MacBook5,2"]), ]: @@ -132,7 +132,7 @@ class BuildOpenCore: # Ethernet Patch Sets if smbios_data.smbios_dictionary[self.model]["Ethernet Chipset"] == "Broadcom": - if smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.cpu_data.ivy_bridge: + if smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.cpu_data.ivy_bridge.value: # Required due to Big Sur's BCM5701 requiring VT-x support # Applicable for pre-Ivy Bridge models self.enable_kext("CatalinaBCM5701Ethernet.kext", self.constants.bcm570_version, self.constants.bcm570_path) @@ -144,7 +144,7 @@ class BuildOpenCore: if self.get_kext_by_bundle_path("RestrictEvents.kext")["Enabled"] is False: self.enable_kext("RestrictEvents.kext", self.constants.restrictevents_version, self.constants.restrictevents_path) - if smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.sandy_bridge: + if smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.sandy_bridge.value: # Ref: https://github.com/reenigneorcim/SurPlus # Enable for all systems missing RDRAND support print("- Adding SurPlus Patch for Race Condition") @@ -301,18 +301,18 @@ class BuildOpenCore: self.get_kext_by_bundle_path("CPUFriendDataProvider.kext")["Enabled"] = True # HID patches - if smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.penryn: + if smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.penryn.value: print("- Adding IOHIDFamily patch") self.get_item_by_kv(self.config["Kernel"]["Patch"], "Identifier", "com.apple.iokit.IOHIDFamily")["Enabled"] = True # SSDT patches - if smbios_data.smbios_dictionary[self.model]["CPU Generation"] == cpu_data.cpu_data.nehalem and not (self.model.startswith("MacPro") or self.model.startswith("Xserve")): + if smbios_data.smbios_dictionary[self.model]["CPU Generation"] == cpu_data.cpu_data.nehalem.value and not (self.model.startswith("MacPro") or self.model.startswith("Xserve")): # Applicable for consumer Nehalem print("- Adding SSDT-CPBG.aml") self.get_item_by_kv(self.config["ACPI"]["Add"], "Path", "SSDT-CPBG.aml")["Enabled"] = True shutil.copy(self.constants.pci_ssdt_path, self.constants.acpi_path) - if cpu_data.cpu_data.sandy_bridge <= smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.ivy_bridge: + if cpu_data.cpu_data.sandy_bridge <= smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.ivy_bridge.value: # Based on: https://egpu.io/forums/pc-setup/fix-dsdt-override-to-correct-error-12/ # Applicable for Sandy and Ivy Bridge Macs print("- Enabling Windows 10 UEFI Audio support") @@ -422,7 +422,7 @@ class BuildOpenCore: if model.startswith("MacBook"): return False elif model.startswith("MacBookAir"): - if smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.cpu_data.sandy_bridge: + if smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.cpu_data.sandy_bridge.value: return False else: return True @@ -589,14 +589,14 @@ class BuildOpenCore: print("- Fixing Legacy Bluetooth for macOS Monterey") self.enable_kext("BlueToolFixup.kext", self.constants.bluetool_version, self.constants.bluetool_path) self.enable_kext("Bluetooth-Spoof.kext", self.constants.btspoof_version, self.constants.btspoof_path) - elif self.computer.bluetooth_chipset == "BRCM20702 Hub" and smbios_data.smbios_dictionary[self.model]["Bluetooth Model"] == bluetooth_data.bluetooth_data.BRCM20702_v1: + elif self.computer.bluetooth_chipset == "BRCM20702 Hub" and smbios_data.smbios_dictionary[self.model]["Bluetooth Model"] == bluetooth_data.bluetooth_data.BRCM20702_v1.value: print("- Fixing Legacy Bluetooth for macOS Monterey") self.enable_kext("BlueToolFixup.kext", self.constants.bluetool_version, self.constants.bluetool_path) # smbios_data.smbios_dictionary[self.model]["Bluetooth Model"] - elif smbios_data.smbios_dictionary[self.model]["Bluetooth Model"] <= bluetooth_data.bluetooth_data.BRCM20702_v1: + elif smbios_data.smbios_dictionary[self.model]["Bluetooth Model"] <= bluetooth_data.bluetooth_data.BRCM20702_v1.value: print("- Fixing Legacy Bluetooth for macOS Monterey") self.enable_kext("BlueToolFixup.kext", self.constants.bluetool_version, self.constants.bluetool_path) - if smbios_data.smbios_dictionary[self.model]["Bluetooth Model"] <= bluetooth_data.bluetooth_data.BRCM2070: + if smbios_data.smbios_dictionary[self.model]["Bluetooth Model"] <= bluetooth_data.bluetooth_data.BRCM2070.value: self.enable_kext("Bluetooth-Spoof.kext", self.constants.btspoof_version, self.constants.btspoof_path) if self.constants.nvme_boot is True: @@ -612,7 +612,7 @@ class BuildOpenCore: self.get_efi_binary_by_path("OpenRuntime.efi", "UEFI", "Drivers")["Enabled"] = True self.get_efi_binary_by_path("OpenLinuxBoot.efi", "UEFI", "Drivers")["Enabled"] = True # Exfat check - if smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.cpu_data.sandy_bridge: + if smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.cpu_data.sandy_bridge.value: # Sandy Bridge and newer Macs natively support ExFat print("- Adding ExFatDxeLegacy.efi") shutil.copy(self.constants.exfat_legacy_driver_path, self.constants.drivers_path) @@ -706,7 +706,7 @@ class BuildOpenCore: # Note this function was added in 11.3 (20E232, 20.4), older builds do not support this (ie. 11.2.3) print("- Allowing FileVault on Root Patched systems") self.get_item_by_kv(self.config["Kernel"]["Patch"], "Identifier", "com.apple.filesystems.apfs")["Enabled"] = True - # Lets us check in SysPatch.py if config supports FileVault + # Lets us check in sys_patch.py if config supports FileVault self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["OCLP-Settings"] += " -allow_fv" def set_smbios(self): diff --git a/Resources/Constants.py b/Resources/Constants.py index 2c173e9f7..2be9badd6 100644 --- a/Resources/Constants.py +++ b/Resources/Constants.py @@ -658,13 +658,4 @@ class Constants: "Mac-937CB26E2E02BB01", # MacBookAir7,2 "Mac-35C5E08120C7EEAF", # Macmini7,1 "Mac-7BA5B2D9E42DDD94", # iMacPro1,1 - ] - - target_type = { - "ADP3,2": "J273", - "MacBookAir10,1": "J313", - "MacBookPro17,1": "J293", - "Macmini9,1": "J274", - "iMac21,1": "J256", - "iMac21,2": "J257", - } + ] \ No newline at end of file diff --git a/Resources/arguments.py b/Resources/arguments.py index d5787b74b..5193cc478 100644 --- a/Resources/arguments.py +++ b/Resources/arguments.py @@ -1,7 +1,8 @@ import argparse import sys import subprocess -from Resources import ModelArray, defaults, Build, ModelExample +from Resources import ModelArray, defaults, Build +from Data import example_data # Generic building args class arguments: @@ -30,7 +31,7 @@ class arguments: parser.add_argument("--disk", action="store", help="Specifies disk to install to", required=False) parser.add_argument("--smbios_spoof", action="store", help="Set SMBIOS patching mode", required=False) - # SysPatch args + # sys_patch args parser.add_argument("--patch_sys_vol", help="Patches root volume", action="store_true", required=False) parser.add_argument("--unpatch_sys_vol", help="Unpatches root volume, EXPERIMENTAL", action="store_true", required=False) parser.add_argument("--validate", help="Runs Validation Tests for CI", action="store_true", required=False) @@ -38,10 +39,7 @@ class arguments: def check_cli(self): # If no core arguments are present, assume we're running in TUI - # - build - # - patch_sys_vol - # - unpatch_sys_vol - # - validate + # build, patch_sys_vol, unpatch_sys_vol, validate if not( self.args.build or self.args.patch_sys_vol or self.args.unpatch_sys_vol or self.args.validate ): @@ -50,6 +48,22 @@ class arguments: return True def parse_arguments(self, settings): + if self.args.model: + if self.args.model: + print(f"- Using custom model: {self.args.model}") + settings.custom_model = self.args.model + defaults.generate_defaults.probe(settings.custom_model, False, settings) + elif settings.computer.real_model not in ModelArray.SupportedSMBIOS and settings.allow_oc_everywhere is False: + print( + """Your model is not supported by this patcher for running unsupported OSes!" + +If you plan to create the USB for another machine, please select the "Change Model" option in the menu.""" + ) + sys.exit(1) + else: + print(f"- Using detected model: {settings.computer.real_model}") + defaults.generate_defaults.probe(settings.custom_model, True, settings) + if self.args.disk: print(f"- Install Disk set: {self.args.disk}") settings.disk = self.args.disk @@ -58,6 +72,8 @@ class arguments: if self.args.verbose: print("- Set verbose configuration") settings.verbose_debug = True + else: + settings.verbose_debug = False # Override Defaults detected if self.args.debug_oc: print("- Set OpenCore DEBUG configuration") settings.opencore_debug = True @@ -71,9 +87,13 @@ class arguments: if self.args.disable_sip: print("- Set Disable SIP configuration") settings.sip_status = False + else: + settings.sip_status = True # Override Defaults detected if self.args.disable_smb: print("- Set Disable SecureBootModel configuration") settings.secure_status = False + else: + settings.secure_status = True # Override Defaults detected if self.args.vault: print("- Set Vault configuration") settings.vault = True @@ -113,28 +133,10 @@ class arguments: settings.allow_oc_everywhere = True settings.serial_settings = "None" + # Avoid running the root patcher if we're just building if self.args.build: - if self.args.model: - print(f"- Using custom model: {self.args.model}") - settings.custom_model = self.args.model - #self.set_defaults(settings.custom_model, False) - defaults.generate_defaults.probe(settings.custom_model, False, settings) - #self.build_opencore() - Build.BuildOpenCore(settings.custom_model, settings).build_opencore() - elif settings.computer.real_model not in ModelArray.SupportedSMBIOS and settings.allow_oc_everywhere is False: - print( - """Your model is not supported by this patcher for running unsupported OSes!" - -If you plan to create the USB for another machine, please select the "Change Model" option in the menu.""" - ) - sys.exit(1) - else: - print(f"- Using detected model: {settings.computer.real_model}") - #self.set_defaults(settings.custom_model, True) - defaults.generate_defaults.probe(settings.custom_model, True, settings) - # self.build_opencore() - Build.BuildOpenCore(settings.custom_model, settings).build_opencore() - if self.args.patch_sys_vol: + Build.BuildOpenCore(settings.custom_model, settings).build_opencore() + elif self.args.patch_sys_vol: if self.args.moj_cat_accel: print("- Set Mojave/Catalina root patch configuration") settings.moj_cat_accel = True @@ -148,48 +150,68 @@ If you plan to create the USB for another machine, please select the "Change Mod # Runs through ocvalidate to check for errors valid_dumps = [ - # ModelExample.MacBookPro.MacBookPro92_Stock, - # ModelExample.MacBookPro.MacBookPro171_Stock, - # ModelExample.Macmini.Macmini91_Stock, - #ModelExample.iMac.iMac81_Stock, - ModelExample.iMac.iMac112_Stock, - #ModelExample.iMac.iMac122_Upgraded, - ModelExample.MacPro.MacPro31_Stock, - ModelExample.MacPro.MacPro31_Upgrade, - ModelExample.MacPro.MacPro31_Modern_AMD, - ModelExample.MacPro.MacPro31_Modern_Kepler, - ModelExample.MacPro.MacPro41_Upgrade, - ModelExample.MacPro.MacPro41_Modern_AMD, - ModelExample.MacPro.MacPro41_51__Flashed_Modern_AMD, + example_data.MacBookPro.MacBookPro92_Stock, + # example_data.MacBookPro.MacBookPro171_Stock, + # example_data.Macmini.Macmini91_Stock, + example_data.iMac.iMac81_Stock, + example_data.iMac.iMac112_Stock, + example_data.iMac.iMac122_Upgraded, + example_data.MacPro.MacPro31_Stock, + example_data.MacPro.MacPro31_Upgrade, + example_data.MacPro.MacPro31_Modern_AMD, + example_data.MacPro.MacPro31_Modern_Kepler, + example_data.MacPro.MacPro41_Upgrade, + example_data.MacPro.MacPro41_Modern_AMD, + example_data.MacPro.MacPro41_51__Flashed_Modern_AMD, ] settings.validate = True + def build_prebuilt(): + for model in ModelArray.SupportedSMBIOS: + print(f"Validating predefined model: {model}") + settings.custom_model = model + Build.BuildOpenCore(settings.custom_model, settings).build_opencore() + result = subprocess.run([settings.ocvalidate_path, f"{settings.opencore_release_folder}/EFI/OC/config.plist"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + if result.returncode != 0: + print("Error on build!") + print(result.stdout.decode()) + raise Exception(f"Validation failed for predefined model: {model}") + else: + print(f"Validation succeeded for predefined model: {model}") + + def build_dumps(): + for model in valid_dumps: + settings.computer = model + settings.custom_model = "" + print(f"Validating dumped model: {settings.computer.real_model}") + Build.BuildOpenCore(settings.computer.real_model, settings).build_opencore() + result = subprocess.run([settings.ocvalidate_path, f"{settings.opencore_release_folder}/EFI/OC/config.plist"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + if result.returncode != 0: + print("Error on build!") + print(result.stdout.decode()) + raise Exception(f"Validation failed for predefined model: {settings.computer.real_model}") + else: + print(f"Validation succeeded for predefined model: {settings.computer.real_model}") + + # First run is with default settings + build_prebuilt() + build_dumps() + # Second run, flip all settings + settings.verbose_debug = True + settings.opencore_debug = True + settings.opencore_build = "DEBUG" + settings.kext_debug = True + settings.showpicker = False + settings.sip_status = False + settings.secure_status = True + settings.firewire_boot = True + settings.nvme_boot = True + settings.enable_wake_on_wlan = True + settings.disable_tb = True + settings.force_surplus = True + build_prebuilt() + build_dumps() + - for model in ModelArray.SupportedSMBIOS: - print(f"Validating predefined model: {model}") - settings.custom_model = model - # self.build_opencore() - Build.BuildOpenCore(settings.custom_model, settings).build_opencore() - result = subprocess.run([settings.ocvalidate_path, f"{settings.opencore_release_folder}/EFI/OC/config.plist"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - if result.returncode != 0: - print("Error on build!") - print(result.stdout.decode()) - raise Exception(f"Validation failed for predefined model: {model}") - else: - print(f"Validation succeeded for predefined model: {model}") - for model in valid_dumps: - settings.computer = model - # self.computer = settings.computer - settings.custom_model = "" - print(f"Validating dumped model: {settings.computer.real_model}") - # self.build_opencore() - Build.BuildOpenCore(settings.computer.real_model, settings).build_opencore() - result = subprocess.run([settings.ocvalidate_path, f"{settings.opencore_release_folder}/EFI/OC/config.plist"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - if result.returncode != 0: - print("Error on build!") - print(result.stdout.decode()) - raise Exception(f"Validation failed for predefined model: {settings.computer.real_model}") - else: - print(f"Validation succeeded for predefined model: {settings.computer.real_model}") diff --git a/Resources/CliMenu.py b/Resources/cli_menu.py similarity index 75% rename from Resources/CliMenu.py rename to Resources/cli_menu.py index a397c1e17..49b411559 100644 --- a/Resources/CliMenu.py +++ b/Resources/cli_menu.py @@ -3,7 +3,8 @@ from __future__ import print_function import subprocess -from Resources import Constants, Utilities, defaults, ModelArray, SysPatch +from Resources import Constants, Utilities, defaults, ModelArray, sys_patch +from Data import cpu_data, smbios_data class MenuOptions: @@ -760,9 +761,9 @@ system_profiler SPHardwareDataType | grep 'Model Identifier' no_patch = True change_menu = input("Patch System Volume?: ") if no_patch is not True and change_menu == "1": - SysPatch.PatchSysVolume(self.constants.custom_model or self.constants.computer.real_model, self.constants).start_patch() + sys_patch.PatchSysVolume(self.constants.custom_model or self.constants.computer.real_model, self.constants).start_patch() elif no_patch is not True and change_menu == "2": - SysPatch.PatchSysVolume(self.constants.custom_model or self.constants.computer.real_model, self.constants).start_unpatch() + sys_patch.PatchSysVolume(self.constants.custom_model or self.constants.computer.real_model, self.constants).start_unpatch() else: print("Returning to main menu") @@ -785,6 +786,159 @@ system_profiler SPHardwareDataType | grep 'Model Identifier' menu.add_menu_option(option[0], function=option[1]) response = menu.start() + + + def patcher_settings(self): + response = None + while not (response and response == -1): + title = ["Adjust Patcher Settings"] + menu = Utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True) + options = [ + ["Debug Settings", self.patcher_setting_debug], + ["Security Settings", self.patcher_settings_security], + ["SMBIOS Settings", self.patcher_settings_smbios], + ["Boot Volume Settings", self.patcher_settings_boot], + ["Miscellaneous Settings", self.patcher_settings_misc], + ["Dump detected hardware", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).dump_hardware], + [ + f"Allow Accel on Mojave/Catalina:\tCurrently {self.constants.moj_cat_accel}", + MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).allow_moj_cat_patch, + ], + [ + f"Allow OpenCore on native Models:\tCurrently {self.constants.allow_oc_everywhere}", + MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).allow_native_models, + ], + ["Advanced Settings, for developers only", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).advanced_patcher_settings], + ] + + for option in options: + menu.add_menu_option(option[0], function=option[1]) + + response = menu.start() + + def patcher_setting_debug(self): + response = None + while not (response and response == -1): + title = ["Adjust Debug Settings"] + menu = Utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True) + options = [ + [f"Enable Verbose Mode:\tCurrently {self.constants.verbose_debug}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).change_verbose], + [f"Enable OpenCore DEBUG:\tCurrently {self.constants.opencore_debug}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).change_oc], + [f"Enable Kext DEBUG:\t\tCurrently {self.constants.kext_debug}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).change_kext], + ] + ( + [ + [f"Set SurPlus Settings:\tCurrently {self.constants.force_surplus}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_surplus] + ] + if (smbios_data.smbios_dictionary[self.constants.custom_model or self.constants.computer.real_model]["CPU Generation"] <= cpu_data.cpu_data.sandy_bridge) + else [] + ) + + for option in options: + menu.add_menu_option(option[0], function=option[1]) + + response = menu.start() + + def patcher_settings_security(self): + response = None + while not (response and response == -1): + title = ["Adjust Security Settings"] + menu = Utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True) + options = [ + # [ + # f"Set Apple Mobile File Integrity (AMFI):\tCurrently {self.constants.amfi_status}", + # MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_amfi, + # ], + [ + f"Set System Intrgity Protection (SIP):\tCurrently {self.constants.sip_status}", + MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).change_sip, + ], + [ + f"Set Secure Boot Model (SBM):\t\tCurrently {self.constants.secure_status}", + MenuOptions(self.constants.custom_model or self.constant.computer.real_model, self.constants).change_sbm, + ], + [f"Set Vault Mode:\t\t\t\tCurrently {self.constants.vault}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).change_vault], + ] + + for option in options: + menu.add_menu_option(option[0], function=option[1]) + + response = menu.start() + + def patcher_settings_smbios(self): + response = None + while not (response and response == -1): + title = ["Adjust SMBIOS Settings"] + menu = Utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True) + options = [ + [f"Set SMBIOS Spoof Level:\tCurrently {self.constants.serial_settings}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).change_serial], + [f"Set SMBIOS Spoof Model:\tCurrently {self.constants.override_smbios}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_smbios], + [f"Set Custom name {self.constants.custom_cpu_model_value}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).custom_cpu], + ] + + for option in options: + menu.add_menu_option(option[0], function=option[1]) + + response = menu.start() + + def patcher_settings_boot(self): + response = None + while not (response and response == -1): + title = ["Adjust Bootable Volume Settings"] + menu = Utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True) + options = [ + [f"Set FireWire Boot:\tCurrently {self.constants.firewire_boot}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).allow_firewire], + [f"Set NVMe Boot:\tCurrently {self.constants.nvme_boot}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).allow_nvme], + ] + + for option in options: + menu.add_menu_option(option[0], function=option[1]) + + response = menu.start() + + def patcher_settings_misc(self): + response = None + while not (response and response == -1): + title = ["Adjust Miscellaneous Settings"] + menu = Utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True) + options = [ + [f"Set ShowPicker Mode:\tCurrently {self.constants.showpicker}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).change_showpicker], + [f"Set Wake on WLAN:\t\tCurrently {self.constants.enable_wake_on_wlan}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).allow_wowl], + [f"Set Ivy iMac iGPU:\t\tCurrently {self.constants.allow_ivy_igpu}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).allow_ivy], + [f"Set TeraScale 2 Accel:\tCurrently {self.constants.allow_ts2_accel}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).terascale_2_accel], + [ + f"Disable Thunderbolt:\tCurrently {self.constants.disable_tb}", + MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).disable_tb, + ], + [f"Set AppleALC Usage:\t\tCurrently {self.constants.set_alc_usage}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).applealc_support], + [f"Set Windows GMUX support:\tCurrently {self.constants.dGPU_switch}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).dGPU_switch_support], + ] + + for option in options: + menu.add_menu_option(option[0], function=option[1]) + + response = menu.start() + + def advanced_patcher_settings(self): + response = None + while not (response and response == -1): + title = ["Adjust Advanced Patcher Settings, for developers ONLY"] + menu = Utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True) + options = [ + [f"Set Metal GPU Status:\t\tCurrently {self.constants.imac_vendor}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).change_metal], + [f"Set DRM Preferences:\t\tCurrently {self.constants.drm_support}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).drm_setting], + [f"Set Generic Bootstrap:\t\tCurrently {self.constants.boot_efi}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).bootstrap_setting], + [ + f"Disable CPU Friend:\t\t\tCurrently {self.constants.disallow_cpufriend}", + MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).disable_cpufriend, + ], + ] + + for option in options: + menu.add_menu_option(option[0], function=option[1]) + + response = menu.start() + + big_sur = """Patches Root volume to fix misc issues such as: diff --git a/Resources/SysPatch.py b/Resources/sys_patch.py similarity index 92% rename from Resources/SysPatch.py rename to Resources/sys_patch.py index 410e2e10c..1d425a54b 100644 --- a/Resources/SysPatch.py +++ b/Resources/sys_patch.py @@ -11,8 +11,8 @@ import subprocess import zipfile from pathlib import Path -from Resources import Constants, device_probe, ModelArray, SysPatchArray, Utilities -from Data import sip_data +from Resources import Constants, device_probe, ModelArray, Utilities +from Data import sip_data, sys_patch_data class PatchSysVolume: @@ -109,7 +109,7 @@ class PatchSysVolume: input("- Press [ENTER] to exit: ") def backup_volume(self): - for location in SysPatchArray.BackupLocations: + for location in sys_patch_data.BackupLocations: Utilities.cls() print("Backing up root volume before patching (This may take some time)") print(f"- Attempting to backup {location}") @@ -155,7 +155,7 @@ class PatchSysVolume: if (Path(self.mount_location) / Path("/System/Library/Extensions-Backup.zip")).exists(): print("- Verified manual unpatching is available") - for location in SysPatchArray.BackupLocations: + for location in sys_patch_data.BackupLocations: Utilities.cls() print("Reverting root volume patches (This may take some time)") @@ -290,18 +290,18 @@ set million colour before rebooting""" Utilities.process_status(self.elevated(["chown", "-Rf", "root:wheel", f"{self.mount_extensions}/{add_current_kext}"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)) def add_brightness_patch(self): - self.delete_old_binaries(SysPatchArray.DeleteBrightness) - self.add_new_binaries(SysPatchArray.AddBrightness, self.constants.legacy_brightness) + self.delete_old_binaries(sys_patch_data.DeleteBrightness) + self.add_new_binaries(sys_patch_data.AddBrightness, self.constants.legacy_brightness) self.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_private_frameworks_path_brightness}/", self.mount_private_frameworks], stdout=subprocess.PIPE) Utilities.process_status(self.elevated(["chmod", "-Rf", "755", f"{self.mount_private_frameworks}/DisplayServices.framework"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)) Utilities.process_status(self.elevated(["chown", "-Rf", "root:wheel", f"{self.mount_private_frameworks}/DisplayServices.framework"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)) def add_audio_patch(self): if self.model in ["iMac7,1", "iMac8,1"]: - self.delete_old_binaries(SysPatchArray.DeleteVolumeControl) - self.add_new_binaries(SysPatchArray.AddVolumeControl, self.constants.audio_path) + self.delete_old_binaries(sys_patch_data.DeleteVolumeControl) + self.add_new_binaries(sys_patch_data.AddVolumeControl, self.constants.audio_path) else: - self.add_new_binaries(SysPatchArray.AddVolumeControlv2, self.constants.audio_v2_path) + self.add_new_binaries(sys_patch_data.AddVolumeControlv2, self.constants.audio_v2_path) def add_wifi_patch(self): print("- Merging Wireless CoreSerices patches") @@ -314,103 +314,103 @@ set million colour before rebooting""" Utilities.process_status(self.elevated(["chown", "root:wheel", f"{self.mount_libexec}/airportd"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)) def add_legacy_mux_patch(self): - self.delete_old_binaries(SysPatchArray.DeleteDemux) + self.delete_old_binaries(sys_patch_data.DeleteDemux) print("- Merging Legacy Mux Kext patches") Utilities.process_status(self.elevated(["cp", "-R", f"{self.constants.legacy_mux_path}/AppleMuxControl.kext", self.mount_extensions_mux], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)) def gpu_accel_legacy(self): if self.constants.detected_os == self.constants.mojave: print("- Installing General Acceleration Kext patches for Mojave") - self.add_new_binaries(SysPatchArray.AddGeneralAccelMojave, self.constants.legacy_general_path) + self.add_new_binaries(sys_patch_data.AddGeneralAccelMojave, self.constants.legacy_general_path) elif self.constants.detected_os == self.constants.catalina: print("- Installing General Acceleration Kext patches for Catalina") - self.add_new_binaries(SysPatchArray.AddGeneralAccelCatalina, self.constants.legacy_general_path) + self.add_new_binaries(sys_patch_data.AddGeneralAccelCatalina, self.constants.legacy_general_path) elif self.constants.detected_os in [self.constants.big_sur, self.constants.monterey]: print("- Installing General Acceleration Kext patches for Big Sur/Monterey") - self.add_new_binaries(SysPatchArray.AddGeneralAccel, self.constants.legacy_general_path) + self.add_new_binaries(sys_patch_data.AddGeneralAccel, self.constants.legacy_general_path) # Nvidia def gpu_accel_legacy_nvidia_master(self): if self.constants.detected_os in [self.constants.mojave, self.constants.catalina]: print("- Installing Nvidia Acceleration Kext patches for Mojave/Catalina") self.gpu_accel_legacy() - self.add_new_binaries(SysPatchArray.AddNvidiaAccelLegacy, self.constants.legacy_nvidia_path) + self.add_new_binaries(sys_patch_data.AddNvidiaAccelLegacy, self.constants.legacy_nvidia_path) elif self.constants.detected_os in [self.constants.big_sur, self.constants.monterey]: print("- Installing Nvidia Acceleration Kext patches for Big Sur/Monterey") - self.delete_old_binaries(SysPatchArray.DeleteNvidiaAccel11) + self.delete_old_binaries(sys_patch_data.DeleteNvidiaAccel11) self.gpu_accel_legacy() - self.add_new_binaries(SysPatchArray.AddNvidiaAccel11, self.constants.legacy_nvidia_path) + self.add_new_binaries(sys_patch_data.AddNvidiaAccel11, self.constants.legacy_nvidia_path) if self.constants.detected_os == self.constants.monterey and self.constants.detected_os_minor > 0: # Beta 7+ removes NVDAStartup - self.add_new_binaries(SysPatchArray.AddNvidiaTeslaAccel12, self.constants.legacy_nvidia_kepler_path) + self.add_new_binaries(sys_patch_data.AddNvidiaTeslaAccel12, self.constants.legacy_nvidia_kepler_path) else: print("- Installing basic Nvidia Framebuffer Kext patches for generic OS") - self.add_new_binaries(SysPatchArray.AddNvidiaBrightness, self.constants.legacy_nvidia_path) + self.add_new_binaries(sys_patch_data.AddNvidiaBrightness, self.constants.legacy_nvidia_path) # AMD/ATI def gpu_accel_legacy_ts1_master(self): if self.constants.detected_os in [self.constants.mojave, self.constants.catalina]: print("- Installing TeraScale 1 Acceleration Kext patches for Mojave/Catalina") self.gpu_accel_legacy() - self.add_new_binaries(SysPatchArray.AddAMDAccelLegacy, self.constants.legacy_amd_path) + self.add_new_binaries(sys_patch_data.AddAMDAccelLegacy, self.constants.legacy_amd_path) elif self.constants.detected_os in [self.constants.big_sur, self.constants.monterey]: print("- Installing TeraScale 1 Acceleration Kext patches for Big Sur/Monterey") - self.delete_old_binaries(SysPatchArray.DeleteAMDAccel11) + self.delete_old_binaries(sys_patch_data.DeleteAMDAccel11) self.gpu_accel_legacy() - self.add_new_binaries(SysPatchArray.AddAMDAccel11, self.constants.legacy_amd_path) + self.add_new_binaries(sys_patch_data.AddAMDAccel11, self.constants.legacy_amd_path) else: print("- Installing basic TeraScale 1 Framebuffer Kext patches for generic OS") - self.add_new_binaries(SysPatchArray.AddAMDBrightness, self.constants.legacy_amd_path) + self.add_new_binaries(sys_patch_data.AddAMDBrightness, self.constants.legacy_amd_path) def gpu_accel_legacy_ts2_master(self): if self.constants.detected_os in [self.constants.mojave, self.constants.catalina] and self.constants.allow_ts2_accel is True: print("- Installing TeraScale 2 Acceleration Kext patches for Mojave/Catalina") self.gpu_accel_legacy() - self.add_new_binaries(SysPatchArray.AddAMDAccelLegacy, self.constants.legacy_amd_path) + self.add_new_binaries(sys_patch_data.AddAMDAccelLegacy, self.constants.legacy_amd_path) elif self.constants.detected_os in [self.constants.big_sur, self.constants.monterey] and self.constants.allow_ts2_accel is True: # TODO: Enable for Monterey when acceleration patches proress print("- Installing TeraScale 2 Acceleration Kext patches for Big Sur") - self.delete_old_binaries(SysPatchArray.DeleteAMDAccel11) - self.delete_old_binaries(SysPatchArray.DeleteAMDAccel11TS2) + self.delete_old_binaries(sys_patch_data.DeleteAMDAccel11) + self.delete_old_binaries(sys_patch_data.DeleteAMDAccel11TS2) self.gpu_accel_legacy() - self.add_new_binaries(SysPatchArray.AddAMDAccel11, self.constants.legacy_amd_path) + self.add_new_binaries(sys_patch_data.AddAMDAccel11, self.constants.legacy_amd_path) else: print("- Installing basic TeraScale 2 Framebuffer Kext patches for generic OS") - self.add_new_binaries(SysPatchArray.AddAMDBrightness, self.constants.legacy_amd_path) + self.add_new_binaries(sys_patch_data.AddAMDBrightness, self.constants.legacy_amd_path) # Intel def gpu_accel_legacy_ironlake_master(self): if self.constants.detected_os in [self.constants.mojave, self.constants.catalina]: print("- Installing Ironlake Acceleration Kext patches for Mojave/Catalina") self.gpu_accel_legacy() - self.add_new_binaries(SysPatchArray.AddIntelGen1Accel, self.constants.legacy_intel_gen1_path) + self.add_new_binaries(sys_patch_data.AddIntelGen1Accel, self.constants.legacy_intel_gen1_path) elif self.constants.detected_os in [self.constants.big_sur, self.constants.monterey]: print("- Installing Ironlake Acceleration Kext patches for Big Sur/Monterey") - self.delete_old_binaries(SysPatchArray.DeleteNvidiaAccel11) + self.delete_old_binaries(sys_patch_data.DeleteNvidiaAccel11) self.gpu_accel_legacy() - self.add_new_binaries(SysPatchArray.AddIntelGen1Accel, self.constants.legacy_intel_gen1_path) + self.add_new_binaries(sys_patch_data.AddIntelGen1Accel, self.constants.legacy_intel_gen1_path) else: print("- Installing basic Ironlake Framebuffer Kext patches for generic OS") - self.add_new_binaries(SysPatchArray.AddIntelGen1Accel, self.constants.legacy_intel_gen1_path) + self.add_new_binaries(sys_patch_data.AddIntelGen1Accel, self.constants.legacy_intel_gen1_path) def gpu_accel_legacy_sandybridge_master(self): if self.constants.detected_os in [self.constants.mojave, self.constants.catalina]: print("- Installing Sandy Bridge Acceleration Kext patches for Mojave/Catalina") self.gpu_accel_legacy() - self.add_new_binaries(SysPatchArray.AddIntelGen2Accel, self.constants.legacy_intel_gen2_path) + self.add_new_binaries(sys_patch_data.AddIntelGen2Accel, self.constants.legacy_intel_gen2_path) elif self.constants.detected_os in [self.constants.big_sur, self.constants.monterey]: print("- Installing Sandy Bridge Acceleration Kext patches for Big Sur/Monterey") - self.delete_old_binaries(SysPatchArray.DeleteNvidiaAccel11) + self.delete_old_binaries(sys_patch_data.DeleteNvidiaAccel11) self.gpu_accel_legacy() - self.add_new_binaries(SysPatchArray.AddIntelGen2Accel, self.constants.legacy_intel_gen2_path) + self.add_new_binaries(sys_patch_data.AddIntelGen2Accel, self.constants.legacy_intel_gen2_path) else: print("- Installing basic Sandy Bridge Framebuffer Kext patches for generic OS") - self.add_new_binaries(SysPatchArray.AddIntelGen2Accel, self.constants.legacy_intel_gen2_path) + self.add_new_binaries(sys_patch_data.AddIntelGen2Accel, self.constants.legacy_intel_gen2_path) def gpu_framebuffer_ivybridge_master(self): if self.constants.detected_os == self.constants.monterey: print("- Installing IvyBridge Acceleration Kext patches for Monterey") - self.add_new_binaries(SysPatchArray.AddIntelGen3Accel, self.constants.legacy_intel_gen3_path) + self.add_new_binaries(sys_patch_data.AddIntelGen3Accel, self.constants.legacy_intel_gen3_path) if self.validate is False: print("- Fixing Acceleration in CoreMedia") Utilities.process_status(subprocess.run(["defaults", "write", "com.apple.coremedia", "hardwareVideoDecoder", "-string", "enable"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)) @@ -420,15 +420,15 @@ set million colour before rebooting""" self.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_private_frameworks_path_accel_ivy}/", self.mount_private_frameworks], stdout=subprocess.PIPE) else: print("- Installing basic Ivy Bridge Kext patches for generic OS") - self.add_new_binaries(SysPatchArray.AddIntelGen3Accel, self.constants.legacy_intel_gen3_path) + self.add_new_binaries(sys_patch_data.AddIntelGen3Accel, self.constants.legacy_intel_gen3_path) def gpu_framebuffer_kepler_master(self): if self.constants.detected_os == self.constants.monterey: print("- Installing Kepler Acceleration Kext patches for Monterey") - self.add_new_binaries(SysPatchArray.AddNvidiaKeplerAccel11, self.constants.legacy_nvidia_kepler_path) + self.add_new_binaries(sys_patch_data.AddNvidiaKeplerAccel11, self.constants.legacy_nvidia_kepler_path) else: print("- Installing Kepler Kext patches for generic OS") - self.add_new_binaries(SysPatchArray.AddNvidiaKeplerAccel11, self.constants.legacy_nvidia_kepler_path) + self.add_new_binaries(sys_patch_data.AddNvidiaKeplerAccel11, self.constants.legacy_nvidia_kepler_path) def gpu_accel_legacy_extended(self): print("- Merging general legacy Frameworks") @@ -532,7 +532,7 @@ set million colour before rebooting""" if self.amd_ts2 is True and self.constants.detected_os in self.constants.legacy_accel_support and self.constants.allow_ts2_accel is True: # TeraScale 2 patches must be installed after Intel HD3000 - self.add_new_binaries(SysPatchArray.AddAMDAccel11TS2, self.constants.legacy_amd_path_ts2) + self.add_new_binaries(sys_patch_data.AddAMDAccel11TS2, self.constants.legacy_amd_path_ts2) if self.added_legacy_kexts is True and self.constants.detected_os in self.constants.legacy_accel_support: self.gpu_accel_legacy_extended()