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 DM365-RMD WLAN build

From Texas Instruments Wiki
Jump to: navigation, search

Introduction[edit]

This document describes the build procedure of all WLAN related components to provide wireless capabilities to the DM365-RMD platfrom. .

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

Target file system[edit]

Make sure that you have the dm365-rmd target file system extracted to your build host
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 ARCH=arm
export PKG_CONFIG=<install path>/EZSDK-5.03/linux-devkit/bin/pkg-config
export NFSROOT=<location of the extracted root filesystem>

Linux kernel[edit]

Make sure that you have the dm365-rmd PSP which has the wlan related patches applied on it, extracted to your build host and compiled using the "davinci_dm365_rmd_cs_rdk_150_defconfig" defconfig file

make distclean
make davinci_dm365_rmd_cs_rdk_150_defconfig
make uImage -j4

WLAN components[edit]

WLAN solution consists of the following components, which should 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> unzip compat-wireless-r4-sp2-patches.zip
[linux-devkit]:compat-wireless> for p in `/bin/ls *.patch`; do patch -p1 -i $p; done
  • Export environment variables:
[linux-devkit]:compat-wireless> export KLIB_BUILD=<location of the linux-2.6.37-psp03.21.00.04_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

[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=${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 the 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]:git clone git://git.sipsolutions.net/iw.git;protocol=git
  • Point to the specific Commit ID:
[linux-devkit]: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]: 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]: 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=${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 DM365-RMD 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 DM365-RMD 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 DM365-RMD 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 DM365-RMD 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 DM365-RMD 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 DM365-RMD 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 DM365-RMD 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 DM365-RMD 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 DM365-RMD 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