This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to enable wlan0 on SK-EVM?

Hi,

The stock SDK on the SD card that came with my AM335x Starter Kit EVM has wlan0 enabled. I would like to have wireless going by recompiling the kernel (ti-sdk-am335x-evm_05.07.00.00/board-support/linux-3.2.0-psp04.06.00.10) which I have successfully recompiled in the past to enable the SPI device driver.

I am getting these errors when booting from NFS:

Starting udev
[ 10.860900] Disabling lock debugging due to kernel taint
[ 12.415130] wl12xx: disagrees about version of symbol ieee80211_connection_loss
[ 12.422851] wl12xx: Unknown symbol ieee80211_connection_loss (err -22)
[ 12.429687] wl12xx: disagrees about version of symbol ieee80211_sched_scan_stopped
[ 12.437622] wl12xx: Unknown symbol ieee80211_sched_scan_stopped (err -22)
[ 12.444763] wl12xx: disagrees about version of symbol ieee80211_chswitch_done
...
and
root@am335x-evm:~# ip link set wlan0 up
Cannot find device "wlan0" 

My .config is attached () but here are the significant WLAN changes:

CONFIG_CFG80211=y
CONFIG_NL80211_TESTMODE=y
CONFIG_CFG80211_DEVELOPER_WARNINGS=y
# CONFIG_CFG80211_REG_DEBUG is not set
CONFIG_CFG80211_DEFAULT_PS=y
# CONFIG_CFG80211_DEBUGFS is not set
# CONFIG_CFG80211_INTERNAL_REGDB is not set
CONFIG_CFG80211_WEXT=y
CONFIG_WIRELESS_EXT_SYSFS=y
CONFIG_LIB80211=y
# CONFIG_LIB80211_DEBUG is not set
CONFIG_MAC80211=y
CONFIG_MAC80211_HAS_RC=y
CONFIG_MAC80211_RC_MINSTREL=y
CONFIG_MAC80211_RC_MINSTREL_HT=y
CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y
CONFIG_MAC80211_RC_DEFAULT="minstrel_ht"
# CONFIG_MAC80211_MESH is not set
# CONFIG_MAC80211_LEDS is not set
# CONFIG_MAC80211_DEBUGFS is not set
# CONFIG_MAC80211_DEBUG_MENU is not set
# CONFIG_WIMAX is not set
CONFIG_WLAN=y
# CONFIG_USB_NET_RNDIS_WLAN is not set
# CONFIG_WL1251 is not set
# CONFIG_WL12XX_MENU is not set
CONFIG_WL12XX_PLATFORM_DATA=y
# CONFIG_MFD_WL1273_CORE is not set

I have run the following commands:

sudo make ARCH=arm CROSS_COMPILE=/opt/ti/ti-sdk-am335x-evm_05.07.00.00/linux-devkit/bin/arm-arago-linux-gnueabi- uImage
sudo make ARCH=arm CROSS_COMPILE=/opt/ti/ti-sdk-am335x-evm/linux-devkit/bin/arm-arago-linux-gnueabi- INSTALL_MOD_PATH=/opt/ti/ti-sdk-am335x-evm/targetNFS
sudo make ARCH=arm CROSS_COMPILE=/opt/ti/ti-sdk-am335x-evm/linux-devkit/bin/arm-arago-linux-gnueabi- INSTALL_MOD_PATH=/opt/ti/ti-sdk-am335x-evm/targetNFS modules_install

Attached is my arch/arm/mach-omap2/board-am335xevm.c:

3377.board-am335xevm.c

I have the suspicion that the WLAN driver somehow needs to be recompiled into a module. For example, if I search for drivers/*.ko from linux-3.2.0-psp04.06.00.10, I only see

drivers/hid/hid-logitech-dj.ko
drivers/scsi/scsi_wait_scan.ko
drivers/usb/gadget/g_file_storage.ko
drivers/usb/gadget/g_mass_storage.ko
drivers/usb/gadget/g_ether.ko

so no sign of any WLAN driver but I don't see how to make that driver if that is the problem.

Here are some other clues from the SK-EVM target itself that wireless is missing.

root@am335x-evm:~# ls /lib/modules/3.2.0/kernel/drivers/
hid/ scsi/ usb/

On the other hand, there is a ti-connectivity directory:

root@am335x-evm:~# ls /lib/firmware/ti-connectivity/
Android.mk wl127x-fw-4-sr.bin
LICENCE wl128x-fw-4-mr.bin
wl1271-fw-multirole-plt.bin wl128x-fw-4-plt.bin
wl1271-fw-multirole-roc.bin wl128x-fw-4-sr.bin
wl127x-fw-4-mr.bin wl128x-fw-multirole-plt.bin
wl127x-fw-4-plt.bin wl128x-fw-multirole-roc.bin

Thanks.

  • Hi,

    Did you try cleaning everything (make clean) and then making a clean build - both the uImage and then the modules?

    You can also check the output of "cat /proc/version" and compare it to the vermagic string of "modinfo <module_name>.ko".

    Best regards,
    Miroslav

  • Hi Miroslav,

    I did what you suggested (clean followed by building the uImage, the modules and a modules_install) but I still get the same errors. Here is the modinfo output:

    root@am335x-evm:~# modinfo wl12xx_sdio
    filename: /lib/modules/3.2.0/updates/drivers/net/wireless/wl12xx/wl12xx_sd
    io.ko
    firmware: ti-connectivity/wl128x-fw-4-plt.bin
    firmware: ti-connectivity/wl127x-fw-4-plt.bin
    firmware: ti-connectivity/wl128x-fw-4-mr.bin
    firmware: ti-connectivity/wl128x-fw-4-sr.bin
    firmware: ti-connectivity/wl127x-fw-4-mr.bin
    firmware: ti-connectivity/wl127x-fw-4-sr.bin
    author: Juuso Oikarinen <juuso.oikarinen@nokia.com>
    author: Luciano Coelho <coelho@ti.com>
    license: GPL
    srcversion: C77E2A1AE7B252844CB2E27
    alias: sdio:c*v0097d4076*
    depends:
    vermagic: 3.2.0 mod_unload modversions ARMv7 p2v8

    And,

    root@am335x-evm:~# cat /proc/version
    Linux version 3.2.0 (root@tautruong-d810) (gcc version 4.5.3 20110311 (prereleas
    e) (GCC) ) #3 Fri Jun 7 11:55:33 MDT 2013

    I think that they match.

    So let me turn this around and ask. If I want to recreate the uImage and rootfs that are shipped with the EVM-SK SDK, what are the steps that I should follow, starting with menuconfig?

    I should start with tisdk_am335x-evm_defconfig then do ..? Could you please let me know? If I can get that working for wlan then I can figure out what the difference is with my setup. Thanks.

    -Tho

  • Within our Sitara SDK there is a directory called board-support/extra-drivers that contains additional drivers that aren't included within the kernel sources. This directory contains drivers that you need to recompile if you change the Linux kernel within the SDK.

    Within this directory you will find several Wilink 6 drivers that you must recompile against your latest kernel sources.

    If you look at the top level of our SDK you will see a Makefile that you can use to build the various Wilink 6 drivers.

  • Franklin,

    I can indeed see the extra drivers directory and I can also rebuild those compatibility drivers and the kernel from the top of the Sitara SDK. And the result does have wlan working and no errors. Your suggestion was very helpful. The only reason I am not yet marking this issue as resolved is that my original goal was to build the kernel with my options and wlan.

    I feel that I am close, though. Thanks again.

    -Tho

  • All,

    I was able to have a custom build of the kernel that has wireless as well. I guess the key is that I had to build the compatibility drivers first at the top of the SDK then do a build with my .config. Thanks. I am marking this fixed.

    -Tho