NOTICE: The Processors Wiki will End-of-Life in December of 2020. It is recommended to download any files or other content you may need that are hosted on The site is now set to read only.

WL18xx System Build Scripts

From Texas Instruments Wiki
Jump to: navigation, search


A short introduction to our build scripts and an explanation on how they operate.
We will refer to the System Build Scripts as build-scripts from now on.


  • The build scripts are an easy way for the user to build, update and eventually integrate WL18xx modules.
  • This page assumes the proper DTB file has been installed.
  • To build the WL18xx modules, it is required to have a pre complied Linux kernel (more information can be found here)
  • The build script will work with any Linux kernel version > 3.12, using standard backports methodology.


For the most part, the build scripts can :

  • Build WL18xx modules that are required for the WL18xx to operate.
  • Build additional applications such as hostap and wpa_supplicant for example.
  • Integrate scripts, tools and firmware into the file system.
  • Provide options to choose what goes into the file system (e.g build components seperatly).
  • Get the latest software release and build it.


The build scripts contain directories that are managed by git.
When a new version is out, all git repositories will have the version tag (e.g "R8.7_SP3")

After initializing the build scripts, a directory called src is created. This directory contains all of the source code for the relevant components:

backports a tool that allows for the usage of different kernel versions as stated before.
driver this directory contains the kernel source code that the latest driver is based on. 
kernel this directory contains a reference Processor SDK kernel, and in most cases can be ignored.
hostap source code for wpa_supplicant and hostapd.
iw source code for iw tool.
ti_utils different utilities supplied by TI.
firmware will be downloaded according to the tag specified.
scripts an assortment of scripts to operate the WL18xx.

There are more directories (e.g libnl, openssl etc.), some of them are prerequisites for wpa_supplicant and some contain files that will be copied to the file system after compilation.

When using the build scripts, the user has basically two options: build or update and build.

  • build: - will go over the directories that were specified earlier, and build their contents.

NoteNote: In this mode, the script does not check-out any directories, it just builds the branches that are currently checked-out.

  • update: - updating requires tag parameter (R8.7_SP3 for example).

The build script will check-out all of the relevant directories to the specified tag (i.e version) and build them.


Effectively, the outputs of the build scripts are two directories:

  • fs - installation directory for all of the compiled componenets.
  • outputs - will contain a compressed version of the fs directory content in a file called fs_skeleton.tbz2.

Extracting fs_skeleton.tbz2 onto the devices root directory will install the WL18xx modules, firmware, wpa_supplicant etc. on the device.
NoteNote: Remember, the kernel itself must be supplied by the user (TI SDK or custom).

Build Guide[edit]

Quick Overview[edit]

The script does the following:

  • Clones the relevant SW repositories
  • Builds WL18xx components
  • Installs components, scripts and utilities to the filesystem

The script will check for updates on every run. If an update exists it will notify the user.

Step 1: Download the Build Scripts[edit]

The build scripts are located in:

Clone the repository:

For example, if we continue the process started here then we will do all the WL18xx build inside a directory located at ~/wl8-build.

user@ubuntu:~/ti-sdk-am335x-evm-$ cd ~/wl8-build/
user@ubuntu:~/wl8-build$ git clone git://
Cloning into 'build-utilites'...
remote: Counting objects: 338, done.
remote: Compressing objects: 100% (261/261), done.
remote: Total 338 (delta 186), reused 152 (delta 72)
Receiving objects: 100% (338/338), 101.31 KiB | 0 bytes/s, done.
Resolving deltas: 100% (186/186), done.
Checking connectivity... done.
user@ubuntu:~/wl8-build$ cd build-utilites/
user@ubuntu:~/wl8-build/build-utilites$ ls  setup-env.sample
configuration    README  

Step 2: Create setup-env file[edit]

“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 should edit the setup-env file to point to the correct directories where the kernel and toolchain are located.
Instructions on how to compile a kernel from a TI SDK can be found here.

Here is a typical example that would work using AM335x EVM with SDK 7.00:

#                            \\\//
#                           -(o o)-
# This file contains the exports needed for automating the
# build process of WLAN components.
# Place this file in the same directory with
# build scripts. No need to run 'source setup-env', the build
# scripts will perfom it internaly.
# User specific environment settings - use full PATH

# if DEFAULT toolchain path is set toolchain will be downloaded to ./toolchain.
export TOOLCHAIN_PATH=~/ti-sdk-am335x-evm-
# if DEAFULT path to root filesystem is set ./fs folder will be used.
export ROOTFS=~/wl8-build/fs
#if DEFAULT kernel path is set - kernel will be downloaded (set branch to match kernel version)
export KERNEL_PATH=~/ti-sdk-am335x-evm-

# if KERNEL_VARIANT below is set the build script will look for kernel specific
# patches under the patches directory:
# - patches under the pathces/driver_patches/$KERNEL_VARIANT directory would be
#   applied during "modules" build.
# - patches under the patches/kernel_patches/$/$KERNEL_VARIANT directory would
#   be applied to the kernel pointed by KERNEL_PATH in case the "patch_kernel"
#   command is used.
#   Note: the kernel is not built automatically after the patches are applied

export CROSS_COMPILE=arm-linux-gnueabihf-
export ARCH=arm

setup-env file should to be placed in the same directory together with build scripts (, etc.).

Step 3: Download the source[edit]

NoteNote: Don't use the "sudo" version of the script for this step or you'll end up with directories owned by root instead of user.

user@ubuntu:~/wl8-build/build-utilites$ ./ init

This step takes a very long time (particularly the cloning of "driver"). Future updates will be very fast.

Step 4: Build & Update[edit]

The release notes for a given release will specify a tag name. For example, R8.7_SP3 is the latest as of this writing.

To checkout that release, build it, and install to the file system you would use the following command (assuming root privileges required for file system access):

user@ubuntu:~/wl8-build/build-utilites$ ./ update R8.7_SP3

Step 5: Install[edit]

Now that we have compiled a kernel and built the required wireless modules we need to install everything on our device.

We now have 2 files that we need:

zImage - located in <SDK directory>/board-support/Linux-xyz/arch/arm/boot/zImage
A compressed file system - located in <build-utilities>/outputs/fs_skeleton.tbz2

NoteNote: If the fs_skeleton.tbz2 file is not present, try adjusting the permissions of the files present in the build-utilities directory and go back to Step 3 to download the source again.

At this point we need to copy the files to the device:

  • Copy the fs_skeleton.tbz2 file into the root directory e.g /
  • Copy the zImage file into /boot directory.

Enter the following commands:

cd /
tar -xvf fs_skeleton.tbz2

This will effectively install the kernel modules required for the WiLink8 to operate properly.

Step 6: Configure The WLAN Device[edit]

Once you boot your board for the first time you are required to use a script to configure the chip appropriately.
The script is installed, as part of the release, in the target filesystem in /usr/sbin/wlconf.  Download Script
For more information please refer to  wlconf_Overview

Advanced Build Options[edit]

the KERNEL_VARIANT mechanism[edit]

Some kernels require certain patches to be applied on top of them.

This is usually in the case of:

  • A kernel that is lacking device tree support for reading wilink8 platform data
  • Bug fixes that have been done to internal kernel drivers that wilink8 is using (such as mmc, sdio, ti_st etc)

For such kernels that we have worked with and have a known list of patches for them they are provided with the build script. These patches are located inside the patches/kernel_patches/'KERNEL VARIANT' directory

When your setup_env has the KERNEL_VARIANT variable set for example:

export KERNEL_VARIANT=imx-3.14.28

and you use the command:

./ patch_kernel

The build script will look for kernel_patches available for this KERNEL_VARIANT and if such exist they will be applied to the kernel pointed by the KERNEL_PATH variable in your setup-env file<

Note: after applying the patches the kernel will not be built automatically and the user has to build it prior to using the build script for doing a full or modules build.

KERNEL_VARIANT and drivers specific patches[edit]

building the modules with some kernels, mainly ones that are not "valilla" kernels and may have some patches/fixes either back ported from upstream or have other fixes may fail. For such known kernel when your setup_env has the KERNEL_VARIANT variable set and patches are available for this KERNEL_VARIANT under patches/driver_patches/'KERNEL VARIANT' directory, those patches will be applied to the wilink8 drivers during the modules build process.

Clean, Build, and Install a Specific Component[edit]

If you only wish to clean, build, and install one specific component rather than everything, the script can be invoked as:

./ <module>

The above assumes you need root permission to install into the file system. You can simply use the script if that is not necessary. For the above <module> can be any of:

  • hostapd
  • wpa_supplicant
  • modules
  • kernel (*)
  • kernel_modules (*)
  • utils
  • iw
  • openssl
  • libnl
  • crda
  • uim
  • bt-firmware

(*) The kernel & kernel_modules options are valid only if DEFAULT was configured in the setup-env file.

Install Firmware or Scripts[edit]

To install the firmware to the file system you would execute:

./ firmware

To install the scripts to the file system you would execute:

./ scripts

Update to Specific Tag and Build[edit]

./ update R8.7_SP3


Q: Driver isn't loaded properly and I get the following: "wlcore: ERROR configuration binary file size is wrong..."
A: By default the build script does not installs the default wl18xx-conf-default.bin from /usr/sbin/wlconf to /lib/firmware/ti-connectivity.
This is because we do not want to override the existing one with the user configuration.
Any change in the file size (mostly due to version changes) will fail the driver from loading.
Please make sure that you use the default file from the build script and make your changes on top of it.

E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article WL18xx System Build Scripts here.

  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article WL18xx System Build Scripts here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article WL18xx System Build Scripts here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article WL18xx System Build Scripts here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article WL18xx System Build Scripts here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article WL18xx System Build Scripts here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article WL18xx System Build Scripts here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article WL18xx System Build Scripts here. For technical support please post your questions at Please post only comments about the article WL18xx System Build Scripts here.


Hyperlink blue.png Links

Amplifiers & Linear
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

Power Management


Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity