From 1b5fb1cef6c65aba99f6a45e67e09aeb51c8a434 Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk <48863253+khronokernel@users.noreply.github.com> Date: Tue, 21 Sep 2021 21:41:29 -0600 Subject: [PATCH] Add additional bluetooth checks --- Resources/Build.py | 13 +++++++++---- Resources/ModelArray.py | 14 ++++++++++++++ 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/Resources/Build.py b/Resources/Build.py index 224826d9b..00a7b94d1 100644 --- a/Resources/Build.py +++ b/Resources/Build.py @@ -588,14 +588,19 @@ class BuildOpenCore: # Bluetooth Detection if not self.constants.custom_model and self.computer.bluetooth_chipset: - if self.computer.bluetooth_chipset in ["BRCM2070 Hub", "BRCM2046 Hub"] or self.model in ModelArray.ModernGPU: + if self.computer.bluetooth_chipset in ["BRCM2070 Hub", "BRCM2046 Hub"]: 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.model in ModelArray.Bluetooth_BRCM2070 or self.model in ModelArray.Bluetooth_BRCM2046 or self.model in ModelArray.ModernGPU: + if self.computer.bluetooth_chipset in ["BRCM2070 Hub", "BRCM2046 Hub"]: + self.enable_kext("Bluetooth-Spoof.kext", self.constants.btspoof_version, self.constants.btspoof_path) + elif self.computer.bluetooth_chipset == "BRCM20702 Hub" and self.model in ModelArray.Bluetooth_BRCM20702_v1: + print("- Fixing Legacy Bluetooth for macOS Monterey") + self.enable_kext("BlueToolFixup.kext", self.constants.bluetool_version, self.constants.bluetool_path) + elif self.model in ModelArray.Bluetooth_BRCM2070 or self.model in ModelArray.Bluetooth_BRCM2046 or self.model in ModelArray.Bluetooth_BRCM20702_v1: 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) + if self.model in ModelArray.Bluetooth_BRCM2070 or self.model in ModelArray.Bluetooth_BRCM2046: + self.enable_kext("Bluetooth-Spoof.kext", self.constants.btspoof_version, self.constants.btspoof_path) # Add XhciDxe if firmware doesn't have XHCI controller support and XCHI controller detected # TODO: Fix XhciDxe to work on pre UEFI 2.0 Macs diff --git a/Resources/ModelArray.py b/Resources/ModelArray.py index 45dacf0d0..f4b7ef7f9 100644 --- a/Resources/ModelArray.py +++ b/Resources/ModelArray.py @@ -1028,3 +1028,17 @@ Bluetooth_BRCM2070 = [ "Macmini5,2", "Macmini5,3", ] + +Bluetooth_BRCM20702_v1 = [ + "MacBookAir5,1", + "MacBookAir5,2", + "MacBookPro9,1", + "MacBookPro9,2", + "MacBookPro10,1", + "MacBookPro10,2", + "Macmini6,1", + "Macmini6,2", + "iMac13,1", + "iMac13,2", + "iMac13,3", +]