继续上一篇,我们还是要找到能减少改动最小的一个SDK驱动包。TI 给出的SDK是基于am3355的,所以,改动是必须的,
这里把大部分SDK相关的东西该为灰色。
在软件包里面的发表说明里面有关于软件的版本说明:
http://processors.wiki.ti.com/index.php/WiLink8_Release_Notes/R8.3SP1
Release Notes Document:
Component | Version |
---|---|
Reference Host Platform | TI AM335x EVM Rev 1.2 |
Linux Kernel | 3.8.13+ |
SDK Release | N/A (not released as part of an SDK) |
WL18xx MAC firmware version | 8.8.0.0.13 |
WL18xx PHY firmware version | 8.2.0.0.195 |
WL18xx Driver version | ol_r8.a8.10 |
This service pack includes all features included in R8.3 release with additional bug fixes.
This is a Beta release.
ID | Title |
---|---|
MCS00128368 |
AP Connection Failure: Failure to re-connect to AP after a disconnection during beacon profile or with traffic at low duty cycle (e.g. periodic ping) |
MCS00125828 | Some FW crashes observed during long traffic-stability tests |
MCS00127878 | STA sometimes doesn’t enter ELP immediately after re-connection |
MCS00128389 | Clipping temperature estimation for PA calibration to 50degC. Improves stability and robustness in MIMO scenarios. |
MCS00128387 MCS00128938 |
Improve IQMM calibration in automotive packages |
MCS00128390 | Automotive 5GHz TX improvements through DPD optimizations |
MCS00128736 MCS00128832 |
CSD fix. Solving degraded performance when connected in CSD mode |
Role | Band | |
---|---|---|
2.4GHz | 5GHz | |
STA | 20 MHz SISO 40 MHz SISO 20 MHz MIMO |
20 MHz SISO 40 MHz SISO |
AP | 20 MHz SISO 20 MHz MIMO |
20 MHz SISO 40 MHz SISO |
P2P | 20 MHz SISO 20 MHz MIMO |
20 MHz SISO 40 MHz SISO |
This release was developed and tested on the following HW/SW platform:
Note: Information regarding the kernel used in the development of this release, as well as patches that were needed in order to adapt the Wilink SW to the "Device-Tree" mechanism in the kernel can be found in Appendix I - Kernel and Kernel-Patches.
The WLAN codebase can be found in github, according to the following specification:
(***) Note: The WLAN Firmware Binary file-name is required to be "wl18xx-fw-2.bin".
To build the driver with kernel 3.2 please use tag : ol_r8.a8.10_32
On these repositories :
Evaluation Pre-Builds provided for legacy SDK6.0 (kernel 3.2) boot, rootfs
Please refer to the following page:R8.3SP1_kernel_3.8
This page will walk you through how to do the following:
This page assumes that you are familiar with the process of configuring and compiling the kernel.
On Ubuntu Linux distribution use apt-get command to install each of the specified packages, for example:sudo apt-get install perl
export http_proxy=:
export https_proxy=:
export ftp_proxy=:
export all_proxy=:
user@ubt1004:~$ cat .gitconfig
[user]
[core]
gitproxy = none for ti.com
gitproxy = /home/user/bin/git-proxy-corcscrew-script.sh
[color]
[gui]
[sendemail]
#!/bin/bash
exec corkscrew $*
chmod +x /home/user/bin/git-proxy-corcscrew-script.sh
sudo apt-get install ia32-libs
sudo apt-get install ia32-libs-multiarch
bash# ~/SDK> export ROOTFS=/home/user/SDK/targetfs
export KLIB_BUILD=/home/bvijay/ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11
For example, download "ti-sdk-am335x-evm-06.00.00.00-Linux-x86-Install" and change the permission if required to run the installer.
Please refer to the Sitara_Linux_Software_Developer’s_Guide on how to use the installer
这里是移植的参考,为各个目录文件的位置做设想,当然依旧是SDK AM335X Sitara
The Sitara Linux SDK contains the following top-level directories and files
These directories contain the code and tools used to develop for Sitara devices.
bvijay@ulx0112741:~/ti-sdk-am335x-evm-06.00.00.00$ cd board-support/linux-3.2.0-psp04.06.00.11/ bvijay@ulx0112741:~/ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/$ ls arch firmware kernel README usr block fs lib REPORTING-BUGS virt COPYING include MAINTAINERS samples CREDITS init Makefile scripts crypto ipc mm security Documentation Kbuild net sound drivers Kconfig patches tools bvijay@ulx0112741:~/ti-sdk-am335x-evm-06.00.00.00$
Root file system file name is arago-base-tisdk-image-am335x-evm.tar.gz
Following is the instruction how to extract it:
bvijay@ulx0112741:~/AM335x/rootFS$ ls arago-base-tisdk-image-am335x-evm.tar.gz bvijay@ulx0112741:~/AM335x/rootFS$
bvijay@ulx0112741:~/ti-sdk-am335x-evm-06.00.00.00$ tar xzf arago-base-tisdk-image-am335x-evm.tar.gz -C AM335x/rootFS/
user@ubt1004:~/AM335x/rootFS$ ls proc bin sbin boot srv dev sys etc tisdk-rootfs-am335x-evm.tar.gz home tmp lib u-boot-am335x-evm.img linuxrc uImage-am335x-evm.bin media usr MLO-am335x-evm var mnt www opt user@ubt1004:~/AM335x/rootFS$
There is a need for sudo permission to extract the dev directory, therefore additional extraction operation needed to extract the dev directory.
user@ubt1004:~/AM335x/rootFS$ sudo tar xzf tisdk-rootfs-am335x-evm.tar.gz dev
in that example the environment variables will be as follows:
export ROOTFS=/home/user/AM335x/rootFS export KLIB_BUILD=/home/bvijay/ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11 export CROSS_COMPILE="arm-linux-gnueabihf-" export PATH=$PATH:"Path to Cross Compiler" export WORK_SPACE = "path where wlan components needs to be downloaded"
export CROSS_COMPILE=arm-linux-gnueabihf-
export ARCH=arm
export TOOLCHAIN_PATH="Cross compiler tool chain path"
If you are not sure where the tool chain is installed run "locate arm-linux-gnueabihf-" it will show the complete path
export PATH=$PATH:$TOOLCHAIN_PATH/bin
export CC=${CROSS_COMPILE}gcc
export AS=${CROSS_COMPILE}as
export AR=${CROSS_COMPILE}ar
export OBJDUMP=${CROSS_COMPILE}objdump
export STRIP=${CROSS_COMPILE}strip
It is often easiest to start with a base default configuration and then customize it for you use case if needed. In the Linux kernel a command of the form:
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
will look in the arch/arm/configs directory for the configuration file (
Note: The configuration file used to build the pre-built binaries found in the SDK can be found in the arch/arm/configs directory as tisdk_
Device | SDK config | PSP config |
---|---|---|
AM335x/Beaglebone | tisdk_am335x-evm_defconfig | am335x_evm_defconfig |
AM37x | tisdk_am37x-evm_defconfig | omap3_evm_defconfig |
AM3517 | tisdk_am3517-evm_defconfig | am3517_evm_defconfig |
Beagleboard | tisdk_beagleboard_defconfig | omap3_beagle_defconfig |
AM180x | tisdk_am180x-evm_defconfig | da850_omapl138_defconfig |
For example, to build the default PSP configuration for the AM335x the command would be:
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- am335x_evm_defconfig
To build the SDK configuration for the AM335x the command would be:
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- tisdk_am335x-evm_defconfig
After the configuration step has run the full configuration file is saved to the root of the kernel tree as .config. Any further configuration changes are based on this file until it is cleanup up by doing a kernel clean as mentioned above.
Note: As we are using compat-wireless and compat-bluetooth packages, most of the mac80211 and bluetooth related switches are bot needed in the kernel .config file.
Note: CONFIG_REGULATOR_FIXED_VOLTAGE=y for AM37x platform and not needed for AM18x and AM335x platforms.
CONFIG_BT=N CONFIG_CFG80211=N CONFIG_MAC80211=N
In addition make sure that the following build kernel options are enabled in the .config file
# # Network testing # # MAC 80211 CONFIG_WLAN=y CONFIG_WIRELESS=y CONFIG_WIRELESS_EXT=y CONFIG_WL12XX_PLATFORM_DATA=y CONFIG_KEYS=y CONFIG_SECURITY=y CONFIG_CRYPTO=y CONFIG_WIRELESS_EXT=y CONFIG_CRYPTO_ARC4=y CONFIG_CRYPTO_ECB=y CONFIG_CRYPTO_AES=y CONFIG_CRYPTO_MICHAEL_MIC=y CONFIG_RFKILL=y CONFIG_REGULATOR_FIXED_VOLTAGE=y CONFIG_CRC7=y # The following are needed for soft AP CONFIG_NETFILTER=y CONFIG_NETFILTER_ADVANCED=y CONFIG_NF_CONNTRACK=y CONFIG_NETFILTER_XTABLES=y CONFIG_NF_DEFRAG_IPV4=y CONFIG_NF_CONNTRACK_IPV4=y CONFIG_NF_CONNTRACK_PROC_COMPAT=y CONFIG_IP_NF_IPTABLES=y CONFIG_IP_NF_FILTER=y CONFIG_IP_NF_TARGET_LOG=y CONFIG_NF_NAT=y CONFIG_NF_NAT_NEEDED=y CONFIG_IP_NF_TARGET_MASQUERADE=y CONFIG_INPUT_UINPUT=y # Enable Ethernet-WLAN Bridge CONFIG_NETFILTER=y CONFIG_NETFILTER_ADVANCED=y CONFIG_BRIDGE_NETFILTER=y CONFIG_STP=y CONFIG_BRIDGE=y CONFIG_BRIDGE_IGMP_SNOOPING=y CONFIG_LLC=y CONFIG_INPUT_UINPUT=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT=y CONFIG_HAS_DMA=y CONFIG_NLATTR=y CONFIG_AVERAGE=y
There are 2 option to perform that
use of script to modify the .config file
./wlan_enable_config.sh .configwhich will modify the .config with the right kernel switches
Note: In case there are missing kernel switches like CONFIG_WL12XX_PLATFORM_DATA, then there probably is a missing part in the kernel that relates to the WL127x chipset, and patches should be applied.
The build script located in github and can be cloned as follows:
user@ubuntu:~$ mkdir utility user@ubuntu:~$ cd utility user@ubuntu:~/utility$ git clone git://github.com/TI-ECS/build-utilites.git Cloning into 'build-utilites'... remote: Counting objects: 223, done. remote: Compressing objects: 100% (176/176), done. remote: Total 223 (delta 115), reused 145 (delta 40) Receiving objects: 100% (223/223), 78.98 KiB | 61 KiB/s, done. Resolving deltas: 100% (115/115), done. user@ubuntu:~/utility$ ls build-utilites user@ubuntu:~/utility$ cd build-utilites/ user@ubuntu:~/utility/build-utilites$ ls functions scripts wl12xx_build.sh patches setup-env.sample wl18xx_build_bt.sh wl18xx_build_ble.sh wl18xx_build.sh README wl12xx_build_bt.sh wlan_enable_config.sh user@ubuntu:~/utility/build-utilites$
Set tag to build R8.3SP1, there are two possible tags depending upon kernel version.To build with a 3.2 kernel (as in AM335x SDK 6.0) use
git reset --hard ol_r8.a8.10_32
and to build with any other kernel use
git reset --hard ol_r8.a8.10
There are 2 Build scripts:
in addition there 2 folders:
“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
Typical file will be as follows:
# User specific environment settings export CROSS_COMPILE="arm-linux-gnueabihf-" export PATH="$PATH:"Path to cross compiler tool chain path" export ROOTFS="/home/user/AM335x/RootFS" export WORK_SPACE="/home/user/AM335x/work_space_R8_A8_10_32" export KLIB_BUILD="/home/user/AM335x/PSP/linux-3.2.0-psp04.06.00.11" # MACHINE_TYPE - The target machine type. Can have one of the following values: "am1808" , "omap3evm" , "am335x" # This is needed to build bluetooth components. # This parameter is not relevant for ti814x board. export MACHINE_TYPE="am335x" export BUILD_VERSION="r8" #=========================================================== export ARCH="arm" export MY_PREFIX="/usr" export MY_SYSCONFDIR="/etc" export MY_LOCALSTATEDIR="/var" export CC="${CROSS_COMPILE}gcc" export CXX="${CROSS_COMPILE}g++" export AR="${CROSS_COMPILE}ar" export RANLIB="${CROSS_COMPILE}ranlib" export CFLAGS="${CFLAGS} -I${ROOTFS}${MY_PREFIX}/include" export CPPFLAGS="${CFLAGS}" export LDFLAGS="${LDFLAGS} -L${ROOTFS}${MY_PREFIX}/lib" export PKG_CONFIG_SYSROOT_DIR=${ROOTFS} export PKG_CONFIG_PATH="${ROOTFS}${MY_PREFIX}/lib/pkgconfig:${ROOTFS}/lib/pkgconfig" export PKG_CONFIG_LIBDIR="" export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS="" export PKG_CONFIG_ALLOW_SYSTEM_LIBS=""
The main settings user should provide are:
setup-env file should to be placed in the same directory together with build scripts (wl18xx_build.sh,wl18xx_build_bt.sh etc.).
This script compiles one of following utilities: libnl, openssl, hostapd, wpa_supplicant,wl12xx_modules,firmware,crda,callibrator by calling specific utility name and action.
./wl18xx_build.sh
were available "module name" is
libnl openssl iw hostap wpa_supplicant crda ti-utils wl18xx-firmware compat-wireless wlconf
examples:
./wl18xx_build.sh all ./wl18xx_build.sh compat-wireless build ./wl18xx_build.sh clean-all
If root file system requires root privileges add sudo before the script, for example:
sudo ./wl18xx_build.sh all
WL18xx AMxxx Platform Integration Guide