WL12xx NLCP Build Instructions
This document describes provides build scripts for WLAN build procedure, the script will download the WLAN components from the web, build and install the WLAN components on target File system.
The script is likely to work on any platform under the following assumptions:
- Linux version 2.6.35 and up
- Linux release should support Standard SDIO
- Any platform that has dedicated SDIO for the WLAN, IRQ line and GPIO for WLAN enable signal
- WLAN part only is handled by the script, all PSP related items are not covered by that script. Therefore SDIO, IRQ, WLAN Enable should be implemented in the PSP
- Build script assumes existence of Linux kernel PSP having kernel sources and precompiled root file system having all necessary libraries and configuration for initial bootstrap
- In the following instructions we use the file system that is provided with the SDK.
Host OS Preparations
- This documnet describes building process on host running Ubuntu Linux distribution. On other Linux distributions the process should be same. In the case results of the used shell commands will not be as expected, please, consult your distribution's documentation to see the differences.
- Linux distribution must have the following tools:
- bash - GNU Bourne-Again Shell
- autoconf and automake - automatic configure script and Makefile builder
- libtool - generic library support
- perl - Practical Extraction and Report Language
- gettext - support for internalization
- patch - utility to apply code patches
- bison - parser generator compatible with yacc
- flex - generates programs that perform pattern-matching on text
- bc - arbitrary precision calculator language
- python - interpreted, object-oriented programming language
- python-m2crypto - Python wrapper for OpenSSL
- git - control version utility
- corkscrew - tunnel TCP connections through HTTP proxies
On Ubuntu Linux distribution use apt-get command to install each of the specified packages, for example:
bash# sudo apt-get install perl
- In case working behaind a proxy, several steps should be apply, this is necessary since part of the WLAN components are downloaded from GitHub.com which cannot work with proxy. follow the steps below:
- 1. Ensure the proxy environment variables are exported:
bash# export http_proxy=<http proxy name>:<http proxy port> bash# export https_proxy=<https proxy name>:<https proxy port> bash# export ftp_proxy=<ftp proxy name>:<ftp proxy port> bash# export all_proxy=<all proxy name>:<all proxy port>
- 2. Edit your $HOME/.gitconfig file to use 'corcscrew':
user@ubt1004:~$ cat .gitconfig [user] [core] gitproxy = none for ti.com gitproxy = /home/user/bin/git-proxy-corcscrew-script.sh [color] [gui] [sendemail]
- For more information about GIT version control system, please check GIT's User Manual.
- 3. Create git-proxy-corcscrew-script.sh (in that example in folder /home/user/bin/), where corkscrew script is shell script containing the following command:
#!/bin/bash exec corkscrew <proxy-name> <proxy-port> $*
- 4. modify the script permissions to executable mode
bash# chmod +x /home/user/bin/git-proxy-corcscrew-script.sh
Sourcery G++ Lite
- Sourcery G++ Lite 2009q1 tool chain. Follow tool chain's instructions to install Sourcery G++ Lite. This document assumes that the location of the installed Sourcery G++ Lite is /home/user/arm-2009q1/
- If your host build environment is 64 bit you should have all libraries and headers of standard C library for 32 bits. For example, for Ubuntu 12.4 64 bits install following packages:
bash# sudo apt-get install ia32-libs bash# sudo apt-get install ia32-libs-multiarch
This is required the cross compile to work properly.
Kernel & Filesystem
Please have the pre-compiled kernel and filesystem ready. You may follow the AMSDK Linux User's Guide to build your kernel with desired configuration.
Build scripts are written for you to simplify the building steps. Once you entered the correct environment setting, building scripts will download the source, compile, and install into the filesystem for you.
You may download the latest build from cloning the git.
git clone git://git.ti.com/wl12xx/build-utilites.git
There are 13 files included:
functions README setup-env wl12xx_build_bt.sh wl18xx_build_ble.sh wl18xx_build_nfc.sh wl18xx_build.sh patches scripts setup-env.sample wl12xx_build.sh wl18xx_build_bt.sh wl18xx_build_nfc.sh~ wlan_enable_config.sh
For the purpose of building WL127x/WL128x driver, you may ignore all the wl18xx scripts.
“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
All environment variables are mandatory to be in the setup-env file.
The main settings user should provide are:
- ROOTFS - path to target root file system
- PATH - add to the PATH environment variable toolchain path (after "$PATH:").
- KLIB_BUILD - Path to the kernel sources
- CROSS_COMPILE - the begin part of cross compiler executable name, for example "arm-none-linux-gnueabi-"
- WORK_SPACE - Work directory for download and build process
setup-env file should to be placed in the same directory together with wl12xx_build.sh script.
Build WLAN - wl12xx_build.sh file
- This script compiles one of following utilities: libnl, openssl, hostapd, wpa_supplicant,wl12xx_modules,firmware,crda,callibrator by calling specific utility name and action.
This script compiles one of following utilities: libnl, openssl, hostapd, wpa_supplicant,wl12xx_modules,firmware,crda,calibrator by calling specific utility name and action. In case the options is 'all' all utilities will be downloaded and installed on root file system. File setup-env contains all required environment variables, for example: ROOTFS=<path to target root file system>. Part of operations requires root access. Usage: wl12xx_build.sh target <libnl openssl hostapd wpa_supplicant wl12xx_modules firmware crda bridge calibrator> action <download|build|install> all clean-all
./wl12xx_build.sh all ./wl12xx_build.sh all install ./wl12xx_build.sh wl12xx_modules build ./wl12xx_build.sh clean-all
If root file system requires root privileges add sudo before the script, for example:
sudo ./wl12xx_build.sh all
In case the options is 'all' all utilities will be downloaded and installed on root file system.
Option clean-all uninstalls all components and removes their sources from computer.
- If you are building for the first time and want to install all files into filesystem directly, simply execute the following. This will handle everything for you.
sudo ./wl12xx_build.sh all install
Build Bluetooth - wl12xx_build_bt.sh file
- This script builds and installs on target root file system Bluetooth kernel modules and userspace utilities. The components that are built: bluetooth kernel modules, bluez, hcidump, openobex, obexd, bt-obex, firmware and demo.
************************************ * Bluetooth Modules Builder Script * ************************************ This script compiles the BT modules components The script can build each component as standalone by invoking: "./wl12xx_build_bt.sh <module name> <build/rebuild>" For example: "./wl12xx_build_bt.sh bt-modules rebuild" Available components are: bt-modules, expat, dbus, libIConv, zlib, gettext, glib, dbus-glib, check, bluez, hcidump, ncurses readline, alsa-lib, openobex, libical, obexd, bt-obex, firmware, wl1271-demo, bt-enable You may also build all components by typing: "./wl12xx_build_bt.sh all build" Prerequisites ============= The following variables should be exported in order to run the script: 1) ROOTFS - should point to the root filesystem where the BT components will be installed 2) WORK_SPACE - should point to the workspace where the components will be downloaded and compiled 3) KLIB_BUILD - should point to the kernel which the compat bluetooth will be compiled against. 4) Path to cross compiler in PATH
To invoke the script run ./wl12xx_build_bt.sh <module name> <build/rebuild>, for example:
./wl12xx_build_bt.sh bt-modules rebuild
or Build the entire BT modules