Files
QualcommWireless/docs/BUILD.md
T
Erwan a10e097a7e feat(tahoe): port QualcommWireless & QualcommWifi to macOS Tahoe 26.x (Darwin 25)
Breakthroughs & Reverse Engineering (macOS Tahoe 26.7.1 / Darwin 25.6.0):
- Reconstructed the complete 463-slot Skywalk vtable and class layout (0x128 / 296 bytes) of IO80211Controller (__ZTV17IO80211Controller at 0xffffff8002461148) and AppleBCMWLANCore from BootKernelExtensions.kc (IO80211Family 1200.13.1, source 1566.5).
- Verified IOUSBHostDevice::deviceRequest vtable slot in Tahoe's BootKernelExtensions.kc (__ZTV15IOUSBHostDevice at 0xffffff8002e72720): confirmed exact match at slot 374 (0x176, byte offset 0xbb0).
- Disassembled Tahoe's /usr/sbin/bluetoothd (FindTransportType at 0x10014c700, Found_USB_Dongle at 0x1000e9559, GetProductAndVendorID at 0x1000edf2a) confirming USB transport matching on 'Bluetooth USB Host Controller' and CSR 0x0a12 descriptor spoofing.

Code & Build Modifications (v1.1.0):
- IO80211Controller.h: Add full 463-slot Tahoe Skywalk vtable declaration (slots 394..462, offsets 0xc50..0xe70) and exact 0x80 filler size when __IO80211_TARGET >= 260000 while preserving legacy compatibility.
- QualcommWifi.hpp/.cpp: Implement Tahoe IO80211Controller pure virtual methods (isCommandProhibited, handleCardSpecific, getDRIVER_VERSION, getHARDWARE_VERSION, getCARD_CAPABILITIES, getPOWER, setPOWER, getCOUNTRY_CODE, setCOUNTRY_CODE, setGET_DEBUG_INFO, getLogger, getFaultReporterFromDriver) and guard un-reserved IONetworkController slots 6..7 on SDK 26.5.
- QualcommWireless.cpp: Add non-null vtable slot sanity check prior to installing the shadow vtable hook on IOUSBHostDevice::deviceRequest.
- project.pbxproj & Info.plist: Upgrade to Xcode 26.6 (MacOSX26.5.sdk), MACOSX_DEPLOYMENT_TARGET = 26.0, __IO80211_TARGET = 260000, and bump version to 1.1.0.
- docs & README: Document macOS Tahoe (Darwin 25) architecture, bluetoothd offsets, and Skywalk IO80211Controller ABI.
2026-10-16 02:41:25 +02:00

136 lines
4.9 KiB
Markdown

# Compilation et Déploiement de QualcommWireless
Ce guide détaille les étapes pour compiler le kext **QualcommWireless** à partir des sources et l'intégrer proprement dans l'EFI OpenCore.
---
## 1. Prérequis Système
- **Système d'exploitation hôte** : macOS Tahoe (26.x / Darwin 25), macOS Sequoia (15.x / Darwin 24) ou macOS Sonoma (14.x).
- **Environnement de développement** : Xcode 26+ (ex. Xcode 26.6) ou Xcode 16+ avec les outils en ligne de commande (`xcode-select --install`).
- **SDK macOS** : macOS 26.x SDK (ex. `MacOSX26.5.sdk`, inclus dans Xcode 26.6).
- **Architectures cibles** : Binaire universel `x86_64` (Hackintosh Intel/AMD) et `arm64e` (Apple Silicon).
---
## 2. Arborescence du Projet
```text
QualcommWireless/
├── .gitignore # Filtres pour conserver un dépôt git propre
├── docs/ # Documentation technique détaillée
│ ├── ARCHITECTURE.md # Vue d'ensemble matérielle & logicielle
│ ├── BLUETOOTH.md # Analyse Bluetooth, diagnostic crash & fix
│ ├── NATIVE_WIFI.md # Pile Wi-Fi native (IO80211Controller)
│ └── BUILD.md # Ce guide de compilation et d'installation
├── firmware/ # Binaires de microprogrammes WCN7850
│ ├── amss.bin # Microprogramme principal Wi-Fi
│ ├── board-2.bin # Données de calibration radio RF
│ └── m3.bin # Microprogramme d'économie d'énergie M3
├── QualcommWifi/ # Code source du pilote Wi-Fi 7 natif (IO80211Controller)
│ ├── Firmware_WCN7850_Wifi.h/.cpp# Microprogrammes Wi-Fi intégrés
│ └── QualcommWifi.hpp/.cpp # Implémentation IO80211Controller (Tahoe Skywalk & Legacy)
├── QualcommWireless/ # Code source du pilote Bluetooth USB (IOService)
│ ├── Info.plist # Descripteur et personnalités IOKit (v1.1.0)
│ ├── Firmware_WCN7850.h # Header des microprogrammes BT intégrés
│ ├── QualcommWireless.hpp/.cpp # Implémentation DFU Bluetooth & Shadow VTable
│ └── include/ # Headers internes IOKit & 802.11
└── QualcommWireless.xcodeproj # Projet Xcode configuré pour build KEXT
```
---
## 3. Compilation
### 3.1. En Ligne de Commande (Recommandé)
Depuis la racine du projet :
```bash
xcodebuild -project QualcommWireless.xcodeproj -configuration Release
```
Le bundle kext final est généré dans :
`build/Release/QualcommWireless.kext`
### 3.2. Vérification du Binaire
Pour s'assurer que le kext est bien un binaire universel prêt pour le chargement noyau :
```bash
file build/Release/QualcommWireless.kext/Contents/MacOS/QualcommWireless
```
Sortie attendue :
```text
Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit kext bundle x86_64] [arm64e]
```
---
## 4. Déploiement dans OpenCore
### 4.1. Copie du Kext dans l'EFI
Montez votre partition EFI (ex. `/Volumes/EFI`), puis copiez le kext compilé :
```bash
cp -R build/Release/QualcommWireless.kext /Volumes/EFI/EFI/OC/Kexts/
```
### 4.2. Configuration dans `config.plist`
Dans la section `Kernel -> Add` de votre `config.plist` :
```xml
<dict>
<key>Arch</key>
<string>Any</string>
<key>BundlePath</key>
<string>QualcommWireless.kext</string>
<key>Comment</key>
<string>Qualcomm FastConnect 7800 Wi-Fi & Bluetooth</string>
<key>Enabled</key>
<true/>
<key>ExecutablePath</key>
<string>Contents/MacOS/QualcommWireless</string>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string></string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
```
> [!CAUTION]
> **RÈGLE CRITIQUE POUR ÉVITER LES CRASHS :**
> - **DÉSACTIVEZ ET SUPPRIMEZ `IntelBTPatcher.kext`**. Il est conçu uniquement pour les puces Intel et provoque un Kernel Panic immédiat à la connexion des périphériques Bluetooth sous macOS 15 Sequoia (`IOBluetoothL2CAPChannel` taggedRelease registry corruption).
> - **CONSERVEZ `BlueToolFixup.kext`**, qui est indispensable pour activer la gestion des dongles tiers dans `bluetoothd`.
### 4.3. Arguments de Démarrage (`NVRAM -> boot-args`)
Vérifiez la présence des arguments suivants pour assurer la compatibilité Bluetooth :
```text
-btlfxallowanyaddr -btlfxnvramcheck
```
---
## 5. Diagnostic et Commandes Utiles
Pour vérifier l'état du système après un redémarrage :
- **Vérifier l'état du Bluetooth** :
```bash
system_profiler SPBluetoothDataType
```
- **Vérifier la détection USB du contrôleur** :
```bash
ioreg -l -r -n "IOUSBHostDevice@00a10000"
```
- **Consulter les journaux Bluetooth en temps réel** :
```bash
/usr/bin/log stream --predicate 'process == "bluetoothd"'
```
- **Vérifier les extensions noyau chargées** :
```bash
kmutil showloaded | grep -iE 'qualcomm|blue'
```