Before compiling qcacld drivers for BD-SL-i.MX6, you have to prepare operating system. Here is official guides and useful links with information:
- Development board's vendor wiki
- Buildroot guide for i.MX platforms
- Device's homepage
- Console connection guide
-
Download the Buildroot and qcacld sources:
git clone https://github.com/8devices/qcacld-2.0/ -b CNSS.LEA.NRT_3.0 git clone https://github.com/buildroot/buildroot -b 2018.02.x cd buildroot/
-
Use default configuration for the board:
make nitrogen6x_defconfig
-
Configure Linux:
make linux-menuconfig
Enable:
Device Drivers -> Network device support -> Wireless LAN -> Intersil devices -> IEEE 802.11 for Host AP (M)
Save and exit.
-
Configure buildroot:
make menuconfig
Here You can enable packages that You want to include in the filesystem (i.e. openssh, iw, etc.). Type
/
to search. Enable:Target packages -> Networking applications -> wireless tools Target packages -> Networking applications -> hostapd Target packages -> Networking applications -> wpa_supplicant Target packages -> Networking applications -> iw
Save and exit.
-
Build the image:
make linux -j${nproc}
-
Apply the kernel patch:
cd output/build/linux-custom/ patch -p1 < ../../../../qcacld-2.0/patches/NXP-i.MX6/0001-Disable-other-voltages-than-1.8V-for-SDIO.patch for i in ../../../../qcacld-2.0/patches/kernel/v4.9.11/* ; do patch -p1 < $i ; done cd ../../../
-
Rebuild the image:
make -j${nproc}
This will take some time.
-
Plug the USB stick/SD card to the computer and find out it's name with:
sudo fdisk -l
-
Write the image to the media:
sudo dd if=images/sdcard.img of=/dev/sdX bs=1M sync
-
Got to qcacld directory:
cd ../qcacld-2.0/
-
Edit the
Makefile
file accordingly:ARCH=arm KERNEL_SRC=../buildroot/output/build/linux-custom/ CROSS_COMPILE=../buildroot/output/host/bin/arm-buildroot-linux-uclibcgnueabihf-
-
Build the drivers:
make -j${nproc}
-
Mount the media:
sudo mount /dev/sdX1 /mnt/
-
The copy the drivers and blobs to system:
For USB module:
sudo cp wlan-usb.ko /mnt/lib/modules/4.1.15/extra/ sudo cp -r firmware_bin/usb/* /mnt/lib/firmware/
For SDIO module:
sudo cp wlan-sdio.ko /mnt/lib/modules/4.1.15/extra/ sudo cp -r firmware_bin/sdio/* /mnt/lib/firmware/
-
Unmount partition
sudo umount /mnt/
Now can unplug the media and plug it to the board. Prepare the serial connection to the device (guide provided above) and power up the device. The device should load the operating system. Default user login is `root You can load the modules for beans with commands:
USB module:
modprobe cfg80211
insmod /lib/modules/4.1.15/extra/wlan-usb.ko
SDIO module:
modprobe cfg80211
insmod /lib/modules/4.1.15/extra/wlan-sdio.ko