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 EZSDK WLAN build

From Texas Instruments Wiki
Jump to: navigation, search

Introduction[edit]

This document describes the build procedure of WLAN components to provide wireless capabilities to DM814x (Centaurus) evaluation board. All build instructions regard EZSDK 5.03.01 which is official SDK for Centaurus board.

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

SDK[edit]

  • Download EZSDK 5.03.01 installer and run on the building Linux machine. Follow instructions of the installer to correctly setup EZSDK.

Throughout this document it is assumed that EZ SDK is installed under EZSDK-5.03 directory at some location on file system.

  • Export EZSDK environment variable to point to the directory where EZ SDK is installed:
bash# export EZSDK="<file system location/EZSDK-5.03"
  • Change to the EZ SDK's directory, run setup.sh script and follow its instructions:
bash# EZSDK-5.03> ./setup.sh

setup.sh will extract target file system at the specified location and set EXEC_DIR variable in Rules.make file to point to this location. For example, if the specified location of the target root file system is /home/user/EZSDK-5.03/targetfs, EXEC_DIR will be

EXEC_DIR=/home/user/EZSDK-5.03/targetfs/home/root/dm814x-evm

To install EZ SDK's components at their supposed location under target file system, it is recommended to edit Rules.make file to change EXEC_DIR variable:

instead of:
EXEC_DIR=/home/user/EZSDK-5.03/targetfs/home/root/dm814x-evm
change to:
EXEC_DIR=/home/user/EZSDK-5.03/targetfs/

EXEC_DIR is populated to Makefiles of all EZ SDK's components through Rules.make file.

  • The next step is to export all necessary for build process environment variables. Under linux-devkit directory installer will create file named environment-setup. Run environment-setup to script as follows:
bash# cd <EZSDK PATH>
bash# source linux-devkit/environment-setup
[linux-devkit]:<EZSDK PATH>

Note, after running environment-setup the shell promt will be changed to begin with [linux-devkit]: indicating that build process is being done in EZ SDK environment. For additional information about EZ SDK developing environmant, please refer to DM814x EZ Software Developers Guide.

Additional environment variables[edit]

export CROSS_COMPILE=arm-none-linux-gnueabi-
export ARCH=arm
export PKG_CONFIG=<install path>/EZSDK-5.03/linux-devkit/bin/pkg-config
export NFSROOT=${EXEC_DIR}
  • some of the built components use NFSROOT environment variable

Now host's environment is ready to proceed to the build of WLAN components.

Building Linux Kernel[edit]

  • Ensure kernel configuration file board-support/linux-2.6.37-psp04.01.00.06.patch2/arch/arm/configs/ti8148_evm_defconfig has the following switches
  • Add additional switch to board-support/linux-2.6.37-psp04.01.00.06.patch2/arch/arm/configs/ti8148_evm_defconfig to compile kernel with WLAN support for TI8148x evm.
[linux-devkit]: EZSDK-5.03> cd board-support/linux-2.6.37-psp04.01.00.06.patch2
[linux-devkit]: linux-2.6.37-psp04.01.00.06.patch2> echo "CONFIG_TI8148EVM_WL12XX=y" >> arch/arm/configs/ti8148_evm_defconfig 
  • Download <kernel patches> and apply them to the Linux kernel source tree. These patches will add support for WLAN over SDIO card for DM8148x EVM platform.
[linux-devkit]: linux-2.6.37-psp04.01.00.06.patch2> unzip patches-wlan-support-psp04.01.00.06.zip
[linux-devkit]: linux-2.6.37-psp04.01.00.06.patch2> patch -p1 < 0001-Subject-mmc-skip-detection-of-nonremovable-cards-on-.patch
[linux-devkit]: linux-2.6.37-psp04.01.00.06.patch2> patch -p1 < 0002-Subject-PATCH-2-8-mmc-sdio-don-t-reinitialize-nonrem.patch
[linux-devkit]: linux-2.6.37-psp04.01.00.06.patch2> patch -p1 < 0003-Subject-PATCH-3-8-mmc-sdio-don-t-power-up-cards-on-s.patch
[linux-devkit]: linux-2.6.37-psp04.01.00.06.patch2> patch -p1 < 0004-Subject-PATCH-5-6-mmc-fix-division-by-zero-in-MMC-co.patch
[linux-devkit]: linux-2.6.37-psp04.01.00.06.patch2> patch -p1 < 0005-Subject-wl12xx-Backport-wl12xx-platform-data.patch
[linux-devkit]: linux-2.6.37-psp04.01.00.06.patch2> patch -p1 < 0006-Subject-wl12xx-Fix-out-of-tree-build-issues.patch
[linux-devkit]: linux-2.6.37-psp04.01.00.06.patch2> patch -p1 < 0007-ARM-ti81xx-Fix-ti8148-s-mmc-indices.patch
[linux-devkit]: linux-2.6.37-psp04.01.00.06.patch2> patch -p1 < 0008-arm-ti8148evm-Add-wl12xx-wlan-support.patch

  • Build kernel image
[linux-devkit]: linux-2.6.37-psp04.01.00.06.patch2> cd ../../
[linux-devkit]:EZSDK-5.03> make linux_clean
[linux-devkit]:EZSDK-5.03> make linux
[linux-devkit]:EZSDK-5.03> make linux_install

Linux kernel and its modules will be installed at EXEC_DIR location as set up in previous section

WLAN components[edit]

WLAN solution consists of the following components, which are all mandotary and have to be installed on the board's Linux environment:

  1. compat-wireless package to compile all necessary kernel drivers
  2. TI utilities
  3. userspace libraries needed to compile WLAN components: Libnl, OpenSSL
  4. WPA-supplicant - utility to manage wireless connection
  5. Hostapd - to set up Soft AP mode of work
  6. iw - tool to manipulate wireless devices and their configuration.
  7. crda - Linux wireless central regulatory domain agent

Compat-wireless[edit]

[linux-devkit]:compat-wireless-2.6> unzip compat-wireless-patches.zip
[linux-devkit]:compat-wireless-2.6> for p in `/bin/ls *.patch`; do patch -p1 -i $p; done
  • Export environment variables:
[linux-devkit]:compat-wireless-2.6> export KLIB_BUILD=<EZSDK path>/board-support/linux-2.6.37-psp04.01.00.06.patch2
[linux-devkit]:compat-wireless-2.6> export KLIB=<target rootfs>
  • Configure compat-wireless to build wl12xx family drivers:
[linux-devkit]:compat-wireless-2.6> ./scripts/driver-select wl12xx
  • Build compat-wireless:
[linux-devkit]:compat-wireless-2.6> make install-modules

Openssl[edit]

Configure of OpenSSL

[linux-devkit]:EZSDK-5.03> tar xzf openssl-1.0.0d.tar.gz
[linux-devkit]:EZSDK-5.03> cd openssl-1.0.0d
  • Change to openssl-1.0.0d directory and run
[linux-devkit]:openssl-1.0.0d> ./Configure --openssldir=${EXEC_DIR} 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:$EXEC_DIR/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:<rootfs>/lib/pkgconfig

For more information regarding libnl library, please refer to Netlink Protocol Library Suite home page

Building WPA supplicant[edit]

  • Clone following git repository
[linux-devkit]:EZSDK-5.03> git clone git://w1.fi/srv/git/hostap.git;protocol=git
  • Step inside newly created directory 'hostap' and checkout working directory to specific Commit ID:
[linux-devkit]:hostap> git checkout 83fa07226debc2f7082b6ccd62dbb1cd47c30472 
  • Download < patches> and apply them to hostap directory
[linux-devkit]:hostap> unzip hostapd-wpa-supplicant-patches.zip
[linux-devkit]:hostap> for p in `/bin/ls *.patch`; do patch -p1 -i $p; done
  • The downloaded package builds both wpa_supplicant and hostapd. Go to wpa_supplicant sub directory.
  • Copy following <defconfig> file as .config
  • Open .config and set following defines:
DESTDIR=<target rootfs>
LIBNL=<target rootfs>
LIBS += -L$(LIBNL)/usr/lib
LIBS_p += -L$(LIBNL)/usr/lib
CFLAGS += -I$(LIBNL)/usr/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
  • Go to hostapd sub directory of hostap sources. Use the following <defconfig> file as .config.
  • Open .config and change following defines:
DESTDIR=<target rootfs>
LIBNL=<target rootfs>
LIBS += -L$(LIBNL)/usr/lib
CFLAGS += -I$(LIBNL)/usr/include
  • Build and install hosapd binary
[linux-devkit]: hostapd> make
[linux-devkit]: hostapd> sudo -E make install

IW[edit]

  • Clone the IW git:
[linux-devkit]:EZSDK-5.03> git clone git://git.sipsolutions.net/iw.git;protocol=git
  • Point to the specific Commit ID:
[linux-devkit]:EZSDK-5.03> cd iw-0.9.20
[linux-devkit]:iw-0.9.20> git reset --hard 0a236ef5f8e4ba7218aac7d0cdacf45673d5b35c
  • Makefile of iw uses PKG_CONFIG and PKG_CONFIG_PATH environment variables to set up correctly compilation flags to compile with libnl. Make ensure 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-0.9.20> export DESTDIR=<target rootfs path>
[linux-devkit]:iw-0.9.20> make
[linux-devkit]:iw-0.9.20> 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
[linux-devkit]: EZSDK-5.03> git clone git://github.com/TI-ECS/ti-utils.git
  • Ensure CROSS_COMPILE and NFSROOT environment variables are set, as described ealier. From the ti-utils git directory run the following commands:
[linux-devkit]: ti-utils> make
[linux-devkit]: ti-utils> make install
  • Copy firmware directory of ti-utils to the target root file system
[linux-devkit]: ti-utils> sudo cp -r firmware <target rootfs>/lib/firmware/ti-connectivity

CRDA[edit]

[linux-devkit]: EZSDK-5.03> tar xjf crda-1.1.1.tar.bz2
[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=${EXEC_DIR} make install
[linux-devkit]: crda-1.1.1> sudo mkdir -p ${EXEC_DIR}/usr/lib/crda
[linux-devkit]: crda-1.1.1> sudo cp 2011.04.28-regulatory.bin <target rootfs>/usr/lib/crda/regulatory.bin

For more information about Central Regulatory Domain Agent, please refer to CRDA's home page
HomepageIcon.jpgHOME

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 OMAP Wireless Connectivity OpenSource EZSDK WLAN build here.

Keystone=
  • 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 OMAP Wireless Connectivity OpenSource EZSDK WLAN build here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article OMAP Wireless Connectivity OpenSource EZSDK WLAN build here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article OMAP Wireless Connectivity OpenSource EZSDK WLAN build here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article OMAP Wireless Connectivity OpenSource EZSDK WLAN build here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article OMAP Wireless Connectivity OpenSource EZSDK WLAN build here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article OMAP Wireless Connectivity OpenSource EZSDK WLAN build here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article OMAP Wireless Connectivity OpenSource EZSDK WLAN build here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article OMAP Wireless Connectivity OpenSource EZSDK WLAN build here.

}}

Hyperlink blue.png Links

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

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity