SWRU561A September   2020  – October 2020 WL1801MOD , WL1805MOD , WL1807MOD , WL1831 , WL1831MOD , WL1835MOD , WL1837MOD

 

  1.   Trademarks
  2. 1Driver Supported Features
  3. 2WL18xx Linux Driver Architecture Overview
  4. 3Platform Integration
    1. 3.1 Configuration required for Board Device Tree (DTS/DTB)
    2. 3.2 Configuring the Kernel for TI WLAN Drivers
    3. 3.3 Configuration required for Board Device Tree (DTS/DTB)
    4. 3.4 Building R8.8 Release Using Build Utilities
    5. 3.5 Building WiLink8 Driver Release Binaries Individually
  5. 4Booting and WLAN Bring-Up
    1. 4.1 Configuring the WiLink8 Target
  6. 5Testing Basic WLAN Functionality
    1. 5.1 STA Mode
      1. 5.1.1 Station Mode Procedure for Unsecured AP
      2. 5.1.2 Station Mode Procedure for Secured AP
      3. 5.1.3 Verifying Connectivity
    2. 5.2 AP Mode
      1. 5.2.1 AP Mode Procedure
      2. 5.2.2 Starting the AP
      3. 5.2.3 Verifying Connectivity
    3. 5.3 Multirole (AP +STA mode)
      1. 5.3.1 General Procedure for Multirole Connection
    4. 5.4 IEEE802.11s Mesh Mode
  7. 6References
  8.   A FAQ and Debug Hints

Building R8.8 Release Using Build Utilities

The following section details the steps to build the R8.8 release using build utilities. Build utilities provide a unified method to build, update and integrate WL18xx WLAN driver and modules. This step needs to be done after configuring the kernel and updating the necessary changes for the DTS/B files for the target platform. The WiLink8 R8.8 release is based on the Linux Kernel version 4.19 and does not support backports for previous kernel versions.

The build utilities integrate the WiLink8 WLAN modules, drivers required to operate WL18xx devices. It also includes additional build packages for WPA-supplicant and hostapd based on the open source, but customized for WL18xx devices. The utility also integrates the tools for testing, example scripts to demonstrate Wi-Fi operation and device FW. The scripts can be used to build the entire modules and kernel or has ability to build individual modules.

The general process included in build-utility script is as follows:

  1. Download built utilities package
  2. Configure the setup
  3. Clone source code and driver components for specific release (R8.8)
  4. Add right kernel configurations using verify_kernel.sh
  5. Apply kernel patches (required one time)
  6. Build all release binaries or individual components
  7. Install built binaries to the target filesystem

The script will download the following source files for the components. For exact version details of each of the components, see the WiLink8 R8.8 Release Notes. The downloaded source files are placed in ./build-utilities/src directory.

Directory Contents
fw_download Contains WiLink8 device FW accompanying the release
hostap Source code for wpa_supplicant and hostapd. These have build dependencies on opnessl and libnl, which are also downloaded under ./build-utilities/src
iw Source code for iw tool.
openssl Contains the cloned source for openssl
scripts_download An assortment of scripts to operate the WL18xx
ti_utils Different utilities supplied by TI.
wireless-regdb Wireless regulatory database
  1. Download the Build Scripts and Switch to R8.8 Branch.

    Clone build-utilities script from git://git.ti.com/wilink8-wlan/build-utilites.git. Below is an example:

    user@ubuntu:~/ti-sdk-am335x-evm-07.00.00.00$ cd ~/wl8-build/
    user@ubuntu:~/wl8-build$ git clone git://git.ti.com/wilink8-wlan/build-utilites.git
    Cloning into 'build-utilites'...
    remote: Counting objects: 888, done.
    remote: Compressing objects: 100% (412/412), done.
    Recremote: Total 888 (delta 490), reused 761 (delta 456)
    Receiving objects: 100% (888/888), 12.82 MiB | 5.10 MiB/s, done.
    Resolving deltas: 100% (490/490), done.
    user@ubuntu:~/wl8-build$ cd build-utilites/
    user@ubuntu:~/wl8-build/build-utilites$ ls
    build_wl18xx.sh  configuration/  configuration.sh  patches/  README  setup-env.sample  sudo_build_wl18xx.sh  verify_kernel_config.sh

    Switch to R8.8 branch using the following command:

    user@ubuntu:~/wl8-build/'build-utilites'$ git checkout r8.8

    After cloning, build-utilities following scripts are available in the. /build-utilities folder. The details of the scripts are provided below:

    setup-env.sample Sample environment setup file. Should be copied or renamed to setup-env
    configuration.sh Contains the configuration details of git repository address and git tags that are used for downloading the source files.
    build_wl18xx.sh This is the main script that uses setup-env and configuration.sh along with user parameters to download, clean, update or build specific components selected by the user.
    sudo_build_wl18xx.sh Same as build_wl18xx.sh with sudo option. Note that using the "sudo" version of the script for “init” option will end up with directories owned by root .
    verify_kernel_config.sh A script used for verifying kernel configuration.

    The following sections will use the build-wl18xx.sh script for clean, build, and install all of the components or specific components. Building specific components are discussed later. The –h parameter will display the available command options.

    ./build_wl18xx.sh -h 

    The available options are displayed as follows.

    user@ubuntu:~/R8.8/build-utilites$ ./build_wl18xx.sh -h 
    This script builds all/one of the relevant wl18xx software packages.
    
    Usage : 
    
    Building full package : Build all components except kernel, dtb 
        ./build_wl18xx.sh init         	   	                  [ Download and Update w/o build  ] 
                          update       R8.8       	          [ Update to specific TAG & Build ] 
                          clean               	              [ Clean & Build                  ] 
                          check_updates           	          [ Check for build script updates ] 
    
    Building specific component :
                          hostapd                 	          [ Clean & Build hostapd          ] 
                          wpa_supplicant          	          [ Clean & Build wpa_supplicant   ] 
                          modules                 	          [ Clean & Build driver modules   ] 
                          firmware                	          [ Install firmware binary        ] 
                          scripts                 	          [ Install scripts                ] 
                          utils                   	          [ Clean & Build scripts          ] 
                          iw                      	          [ Clean & Build iw               ] 
                          openssl                 	          [ Clean & Build openssll         ] 
                          libnl                   	          [ Clean & Build libnl            ] 
                          wireless-regdb          	          [ Install wireless regdb         ] 
                          patch_kernel            	          [ Apply provided kernel patches  ] 
                          kernel <defconfig filename>         [ Clean & Build Kernel 	       ] 
                          kernel_noclean <defconfig_filename> [ Build Kernel w/o clean         ] 
                          patch_bbbe14_dts [Patch bbb black dts file to add e14 cape support]
  2. Create setup-env file.

    “setup-env.sample” file is used as base of “setup-env” that includes user specific environment variables. User should copy the setup-env.sample to setup-env and edit the variables according to user specific environment. The user shall edit the setup-env file to point to the correct directories where the kernel and toolchain are located. Below is an example file:

    #                            \\\// 
    #                           -(o o)- 
    #========================oOO==(_)==OOo=======================
    # This file contains the exports needed for automating the
    # build process of WLAN components.
    # Place this file in the same directory with wl18xx_build.sh
    # build scripts. No need to run 'source setup-env', the build
    # scripts will perform it internally. 
    #===========================================================
    # User specific environment settings - use full PATH
    
    # TOOLCHAIN_PATH setting is mandatory. ex: TOOLCHAIN_PATH=/opt/ti-processor-sdk-linux-am335x-evm-06.00.00.07/linux-devkit/sysroots/x86_64-arago-linux/usr/bin
    export TOOLCHAIN_PATH=
    
    # ./fs folder will be created if ROOTFS is set to DEFAULT 
    export ROOTFS=DEFAULT
    
    # KERNEL_PATH setting is mandatory. ex: KERNEL_PATH=/opt/ti-processor-sdk-linux-am335x-evm-06.00.00.07/board-support/linux-4.19.38+gitAUTOINC+4dae378bbe-g4dae378bbe
    export KERNEL_PATH=
    
    # CROSS_COMPILE setting is mandatory
    export CROSS_COMPILE=arm-linux-gnueabihf-
    
    # ARCH setting is mandatory 
    export ARCH=arm
    [ "$TOOLCHAIN_PATH" != "" ] && export PATH=$TOOLCHAIN_PATH:$PATH

    setup-env file should be placed in the same directory together with build scripts (build_wl18xx.sh, and so forth.).

  3. Download the Source (a.k.a Initialize) repo.

    The following step downloads the entire source required for the build. This may take longer time for the first time installation. Subsequent updates will take shorter time.

    user@ubuntu:~/wl8-build$ cd build-utilites
    user@ubuntu:~/wl8-build/build-utilites$ ./build_wl18xx.sh init
    
  4. Verify and set required kernel configurations.

    WiLink8 WLAN functionality requires certain settings to be enabled in the kernel configuration. This can be set/verified using the verify_kernel_config.sh utility provided in the build-utility package as shown below:

    user@ubuntu:~/wl8-build/build-utilites$ ./verify_kernel_config.sh <def_config file>

    Example:user@ubuntu:~/wl8-build/build-utilites$ ./verify_kernel_config.sh /opt/ti-processor-sdk-linux-am335x-evm-06.00.00.07/board-support/linux-4.19.38+gitAUTOINC+4dae378bbe-g4dae378bbe/arch/arm/configs/tisdk_am335x-evm_defconfig

  5. Applying required kernel patches.

    WiLink8 driver package includes a set of patches that needs to be applied to enable complete functionality. These patches have feature enhancements and bug fixes. This step is needed while building the kernel image for the first time only to enable WiLink8 WLAN.

    user@ubuntu:~/wl8-build/build-utilites$ ./build_wl18xx.sh patch_kernel
  6. Build Kernel.

    The following commands will build the kernel. The kernel needs to be rebuilt to include the TI WiLink8 specific patches. User can build the kernel from SDK directly or use build script to build the kernel. Kernel defconfig filename is passed as an argument.

    user@ubuntu:~/wl8-build/build-utilites$ ./build_wl18xx.sh kernel <defconfig file>
    Ex: user@ubuntu:~/wl8-build/build-utilites$ ./build_wl18xx.sh kernel tisdk_am335x-evm_defconfig

    The following steps are needed in case using BeagleBone Black Cape and BeagleBone for development.

    Note: The kernel image. zImage is also placed along with the install file system.
  7. Patch and Build BeagleBone DTB file (Optional).

    DTS/B file needed for using BeagleBone Black with Element-14 Wireless cape can also be generated using the build_utilities. Patch BeagleBone Black dts file to add support for Element-14 wireless cape with WL1837MOD using the following command

    user@ubuntu:~/wl8-build/build-utilites$ ./build_wl18xx.sh patch_bbbe14_dts

    Build Beaglebone black dts with element 14 wireless cape support to generate the required dtb file.

    user@ubuntu:~/wl8-build/build-utilites$ ./build_wl18xx.sh bbbe14_dtb
  8. Build Release Binaries.

    Each WiLink8 driver release is given a specific tag. For Wilink8 Driver R8.8 driver the tag is “R8.8”. To checkout R8.8 release, build it, and install to the target file system you would use the following command (assuming root privileges required for file system access):

    user@ubuntu:~/wl8-build/build-utilites$ ./build_wl18xx.sh update R8.8
  9. Install the WiLink8 Release Binaries.

At this stage all components of WiLink8 driver and kernel should be built. The output libraries, binaries, example scripts, firmware and TI utilities etc. are placed in the folder specified in setup_env file (Default is ./build-utilities/fs) . The same is ready for installation. Note that the following steps assume that the default SDK image is already installed to the SD card. Copy the fs folder to the target using the below example command from ./build-utilities directory.

sudo cp –p ./fs/* <rootfs path on SD card>/