NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.
OMAP Wireless Connectivity OpenSource am335x-evm R5 00 18 WLAN build
Contents
- 1 Introduction
- 2 Change Log from R5.00.10
- 3 Build environment
- 4 Target file system
- 5 Linux kernel
- 6 WLAN components
- 7 Compat-wireless
- 8 Openssl
- 9 LIBNL - Netlink Protocol Library Suite
- 10 Building WPA supplicant
- 11 Building hostapd
- 12 IW
- 13 TI utilities - building the calibrator
- 14 TI utilities - Installing the wlan firmware files
- 15 TI utilities - Installing the calibrator ini files
- 16 CRDA
Introduction[edit]
This document describes the build procedure of all openLink R5.00.18 WLAN related components on the am335x-evm platform.
That release is engineering non formal release, for verification purpose only
Change Log from R5.00.10[edit]
- Updated tag for WPA Supplicant
- Updated tag for Host AP
- Updated Compat-Wireless
- Updated Linux kernel for am335x-evm
Build environment[edit]
Host OS[edit]
- This documnet describes building process on host running Ubuntu 10 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
- perl - Practical Extraction and Report Language
- bison (parser generator compatible with yacc)
- bc - arbitrary precision calculator language
- python - interpreted, object-oriented programming language
On Ubuntu Linux distribution use apt-get command to install each of the specified packages, for example:
bash# sudo apt-get install perl
- Sourcery G++ Lite 2009q1 tool chain.
Target file system[edit]
Make sure that you have an am335x-evm SDK target file system extracted to your build host
The root file system can be loaded from the following link:
rootfs-partition-2012-02-21.tar.gz
export the NFSROOT environment variable to point to the location of the extracted file system as shown below.
Environment variables[edit]
export CROSS_COMPILE=arm-none-linux-gnueabi- export CC=${CROSS_COMPILE}gcc export ARCH=arm export NFSROOT=<location of the extracted root filesystem>
Linux kernel[edit]
The linux 3.2 kernel for the am335x-evm should be cloned from the following git repository using the "v3.2_AM335xPSP_04.06.00.07" tag:
git clone git://arago-project.org/git/projects/linux-am33x.git git checkout v3.2_AM335xPSP_04.06.00.07
once the git is cloned you can compile the kernel using the am335x_evm_defconfig file as shown below:
make am335x_evm_defconfig make uImage -j4
WLAN components[edit]
WLAN solution consists of the following components, which should be installed on the board's Linux environment:
- compat-wireless package to compile all necessary kernel drivers
- TI utilities
- userspace libraries needed to compile WLAN components: Libnl, OpenSSL
- WPA-supplicant - utility to manage wireless connection
- Hostapd - to set up Soft AP mode of work
- iw - tool to manipulate wireless devices and their configuration.
- crda - Linux wireless central regulatory domain agent
Compat-wireless[edit]
- Download compat-wireless_ol_R5.00.18.tar.gz
- Extract the archive to your PC and change directory to the compat-wireless source directory
- Download the archive containing the patches for compat-wireless, unzip the file and apply each patch to the source tree by running patch command:
[linux-devkit]:compat-wireless> patch -p1 -i <file>
- Export environment variables:
[linux-devkit]:compat-wireless> export KLIB_BUILD=<location of the linux-am335x 3.2 kernel> [linux-devkit]:compat-wireless> export KLIB=${NFSROOT}
- Configure compat-wireless to build wl12xx family drivers:
[linux-devkit]:compat-wireless> ./scripts/driver-select wl12xx
- Build compat-wireless:
[linux-devkit]:compat-wireless> make install-modules
Openssl[edit]
Configure of OpenSSL
- Download OpneSSL-1.0.0d library and extract archive
[linux-devkit]: tar xzf openssl-1.0.0d.tar.gz [linux-devkit]: cd openssl-1.0.0d
- Change to openssl-1.0.0d directory and run
[linux-devkit]:openssl-1.0.0d> ./Configure --openssldir=${NFSROOT} shared os/compiler:${CROSS_COMPILE} [linux-devkit]:openssl-1.0.0d> make CC=${CROSS_COMPILE}gcc RANLIB=${CROSS_COMPILE}ranlib [linux-devkit]:openssl-1.0.0d> sudo -E make install
- sudo -E preserves all environment variables of a user
- Update PKG_CONFIG_PATH with the new path to pkgconfig directory containing openssl.pc and libssl.pc:
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$NFSROOT/lib/pkgconfig
For more information about openssl library, please refer to OpenSSL Project home page.
LIBNL - Netlink Protocol Library Suite[edit]
- Download libnl-2.0 and extract archive file.
- Change to libnl-2.0 directory and run:
[linux-devkit]:libnl-2.0> ./configure -–prefix=${NFSROOT} CC=${CROSS_COMPILE}gcc LD=${CROSS_COMPILE}ld RANLIB=${CROSS_COMPILE}ranlib --host=arm-linux [linux-devkit]:libnl-2.0> make [linux-devkit]:libnl-2.0> sudo -E make install
- Update PKG_CONFIG_PATH with the new path to pkgconfig directory containing libnl.pc:
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$NFSROOT/lib/pkgconfig
For more information regarding libnl library, please refer to Netlink Protocol Library Suite home page
Building WPA supplicant[edit]
- The hostap git contains both wpa_supplicant and hostapd.
- Clone following git repository
[linux-devkit]:> git clone git://github.com/TI-OpenLink/hostap.git
- Step inside newly created directory 'hostap' and checkout the ol_R5.00.18 tag:
[linux-devkit]:hostap> git checkout ol_R5.00.18
- Change into the wpa_supplicant sub directory in the hostap git.
- Unzip the archive and apply patches by running the follwing command for each file in the archive:
[linux-devkit]:hostap> patch -p1 -i <patch file>
- Copy following <defconfig> file as .config
- Open .config and set following defines:
CC=${CROSS_COMPILE}gcc LIBNL=${NFSROOT} LIBS += -L$(LIBNL)/lib LIBS_p += -L$(LIBNL)/lib CFLAGS += -I$(LIBNL)/include
- Run build
[linux-devkit]:wpa_supplicant> make [linux-devkit]:wpa_supplicant> sudo -E make install
For more details regarding the WPA supplicant, please refer to the wpa supplicant home page
Building hostapd[edit]
- Before building hostapd, wpa_supplicant's build must be cleaned
linux-devkit]:wpa_supplicant> make clean
- Change into the hostapd sub directory of the hostap git.
- Use the following <defconfig> file as .config.
- Open .config and change the following defines:
CC=${CROSS_COMPILE}gcc LIBNL=${NFSROOT} LIBS += -L$(LIBNL)/lib CFLAGS += -I$(LIBNL)/include
- Build and install the hosapd binary
[linux-devkit]: hostapd> make [linux-devkit]: hostapd> sudo -E make install
IW[edit]
- Clone the IW git:
[linux-devkit]:git clone git://git.sipsolutions.net/iw.git
- Point to the specific Commit ID:
[linux-devkit]:cd iw [linux-devkit]:iw> git reset --hard 0a236ef5f8e4ba7218aac7d0cdacf45673d5b35c
- The Makefile of iw uses PKG_CONFIG and PKG_CONFIG_PATH environment variables to set the compilation flags to compile with libnl. Make sure that IW is compiled with libnl-2.0. Please refer to Additional Environment Variables section to check PKG_CONFIG is correct.
- Run to build and instal IW:
[linux-devkit]:iw> export DESTDIR=${NFSROOT} [linux-devkit]:iw> make [linux-devkit]:iw> sudo PATH=$PATH make install
For more details regarding the IW utility, please refer to the IW home page
TI utilities - building the calibrator[edit]
- Clone the ti-utils git containing the calibrator and checkout the ol_R5.00.18 tag
[linux-devkit]: git clone git://github.com/TI-OpenLink/ti-utils.git [linux-devkit]: git checkout ol_R5.00.18
- Ensure that the CROSS_COMPILE and NFSROOT environment variables are set, as described earlier.
- From the ti-utils git directory run the following commands:
[linux-devkit]: ti-utils> make [linux-devkit]: ti-utils> install -d $(NFSROOT)/home/root [linux-devkit]: ti-utils> cp -f ./calibrator $(NFSROOT)/home/root
TI utilities - Installing the wlan firmware files[edit]
The wlan firmware files are also located inside the ti-utils git under the "hw/firmware" directory and should be copied to the file system under the /lib/firmware/ti-connectiviy direcory.
Please use the following command to perform the copy:
[linux-devkit]: ti-utils> install -d ${NFSROOT}/lib/firmware/ti-connectivity [linux-devkit]: ti-utils> sudo cp -r hw/firmware ${NFSROOT}/lib/firmware/ti-connectivity
TI utilities - Installing the calibrator ini files[edit]
The wlan calibration ini files are located inside the ti-utils git under the "hw/ini-files" directory and should be copied to the file system under the /lib/firmware/ti-connectiviy direcory.
Please use the following command to perform the copy:
[linux-devkit]: ti-utils> install -d ${NFSROOT}/lib/firmware/ti-connectivity [linux-devkit]: ti-utils> sudo cp -r hw/ini-files ${NFSROOT}/lib/firmware/ti-connectivity
CRDA[edit]
- Download crda_1.1.1.tar.bz2.
- Download 2011.04.28-regulatory.bin file.
- Ensure that environment variable PKG_CONFIG=<ezsdk dir>/linux-devkit/bin/pkg-config
- Perform following commands:
[linux-devkit]: tar xjf crda-1.1.1.tar.bz2 [linux-devkit]: cd crda-1.1.1 [linux-devkit]: crda-1.1.1> export CFLAGS="$CFLAGS -DCONFIG_LIBNL20" [linux-devkit]: crda-1.1.1> make all_noverify [linux-devkit]: crda-1.1.1> sudo -E DESTDIR=${NFSROOT} make install [linux-devkit]: crda-1.1.1> sudo mkdir -p ${NFSROOT}/usr/lib/crda [linux-devkit]: crda-1.1.1> sudo cp 2011.04.28-regulatory.bin ${NFSROOT}/usr/lib/crda/regulatory.bin
For more information about Central Regulatory Domain Agent, please refer to CRDA's home page
HOME