SWRU561A September 2020 – October 2020 WL1801MOD , WL1805MOD , WL1807MOD , WL1831 , WL1831MOD , WL1835MOD , WL1837MOD
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:
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 |
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]
“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.).
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
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
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
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.
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
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
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>/