Compile Driver for Linux (BD-SL-i.MX6)

The following instructions cover the driver compiling process for BLUE bean on devices running Linux. We recommend using Debian or Ubuntu. It also might be possible to compile on OSX. Compiling directly on a Windows platform is not supported. However, if all you have available is a windows machine then we would recommend to set up a linux based virtual machine.


Before compiling qcacld drivers for BD-SL-i.MX6, you have to prepare the kernel and a buildroot file system. Official guides listed below:


Prepare buildroot with kernel

1. Download the latest buildroot tree:

 git clone https://git.busybox.net/buildroot -b 2017.08.x

2. Download boundary devices external layer:

git clone https://github.com/boundarydevices/buildroot-external-boundary -b 2017.08.x

3. Download qcacld driver:

git clone https://github.com/8devices/qcacld-2.0.git -b caf-wlan/LNX.LEH.4.2.2.2

4. Create an output folder for your build:

make BR2_EXTERNAL=$PWD/buildroot-external-boundary/ -C buildroot/ \
O=$PWD/output nitrogen6x_qt5_gst1_defconfig
cd output

5. Build the image:

make -j${nproc}

Once completed, your image should be located here: ~/output/images/sdcard.img

6. Plug the USB stick/SD card into your computer and find out the assigned name:

sudo fdisk -l

7. Write the image to media (change sdX, where X = your drive's letter, usually sdb):

sudo dd if=~/output/images/sdcard.img of=/dev/sdX bs=1M
sync

Build qcacld driver

1. Enter qcacld directory:

 cd ~/qcacld-2.0/
 

2. Edit the Makefile file (also change the path /home/user to your own):

ARCH=arm
KERNEL_SRC=/home/user/output/build/linux-custom/
CROSS_COMPILE=/home/user/output/host/opt/ext-toolchain/bin/arm-linux-gnueabihf-

3. Build the driver:

make -j${nproc}

Prepare media

1. Mount the media (where X = your drive's letter, Y = your partition number):

sudo mount /dev/sdXY /mnt/

2. Copy drivers to system:

sudo cp ~/qcacld-2.0/wlan-usb.ko /mnt/lib/modules/4.1.15/extra/
sudo cp -r ~/qcacld-2.0/firmware/usb/* /mnt/lib/firmware/
sync

3. Unmount partition

sudo umount /mnt/

Boot

Plug media into the board and connect into it via a serial connection as shown on console connection guide.
Upon powering, the device should load the operating system automatically.

The default user login is root without a password.

1. Remove the stock driver (not supported by 8devices) and reboot the device:

rm ./lib/modules/4.1.15/extra/wlan.ko
reboot

2. Once rebooted, load the driver module from 8devices:

modprobe cfg80211
insmod /lib/modules/4.1.15/extra/wlan-usb.ko