WL18xx to DM3xx porting guide
Contents
[hide]Adding WiLink8 Support to DM38x IPNC Software[edit]
These patches are to be applied to IPNC v3.8.0 for DM385. They will not run on the IPNC hardware as it does not have a connector to attach a WL18xx module (COM8). Therefore it must run on custom hardware that has the COM8 connector or a WL1835MOD mounted and using software based on IPNC v3.8.0. The patches will need to be adapted to the actual GPIOs used for WL_EN and WL_IRQ.
Rebuild the Linux Kernel to add Wi-Fi support[edit]
1. Download patchset ti_tools-wifi-overlay.tar.gz to IPNC's Source/ti_tools directory of the IPNC and untar it.
$ cd Source/ti_tools Source/ti_tools$ tar –xvf ti_tools-wilink8-overlay.tar.gz
2. Apply the patches to the IPNC kernel.
Source/ti_tools$ cd ipnc_psp_arago $./apply-wifi-patches.sh
Note: The patch 0002-custom-gpio-usage.patch file changes the GPIO usage of the IPNC to that on custom hardware. This is WL_EN on GP3[1] and WL_IRQ on GP2[15]. Also 0008-add-wl8-support-to-main-defconfig-options.patch modifies the 3 standard defconfigs for ipnc, dm385/388/8127. If a new config is used these patches must also be applied to that config.
3. Go back to ipnc directory and do a clean build of everything.
Source/ti_tools$ cd ../../ipnc_rdk Source/ipnc_rdk $make sysall
Note: This has not build the wifi drivers. They will be built separately. Suggestion here is to check at this point if the system will boot and detect the WL183x module.
Build modules for WiLink8 (COM8)[edit]
The wifi drivers are built in the directory Source/ti_tools/wifi-driver-files-r8-4 by the script build-ipnc-wifi.sh which will download, build and install drivers to the filesystem. The script also applies two additional patches to the compat-wireless directory to allow the wifi drivers to build against the 2.6.37 kernel used for the IPNC.
$cd Source/ti_tools/wifi-driver-files/build-files Source/ti_tools/wifi-driver-files-r8-4 $ ./build-ipnc-wifi.sh
Testing the Wifi Drivers[edit]
COM8 modules can be sanity checked with a simple procedure of connecting to an unsecured Access Point which in this case is called TP.
This can be done with the tool iw to connect to the AP. The following assumes that udev has assigned wlan0 to the COMx card.
On the DM3xx implement the following sequence of commands to load the wilink driver:
1. Load the interface:
#ifconfig wlan0 down #ifconfig wlan0 up
2. Scan for available AP’s
#iw wlan0 scan | grep SSID
3. Connect to the unsecured AP with SSID TP
#iw wlan0 connect TP
4. Check the link that has been created
#iw wlan0 link
5. Request an IP address from DHCP on AP
#udhcpc –i wlan0