diff options
author | Mike Fiore <mfiore@multitech.com> | 2013-04-18 13:18:47 -0500 |
---|---|---|
committer | Mike Fiore <mfiore@multitech.com> | 2013-04-18 13:18:47 -0500 |
commit | 121273ac8bd6d2c9799f724d7ece9b9c582736c7 (patch) | |
tree | ed9f92ca0e437aebe25d2217626f658cb3805067 /multitech/recipes/wl12xx-scripts | |
parent | ee187f293bd6fcab1d2309d71d7ceacd7e8924a6 (diff) |
wl12xx: not in a good state
Diffstat (limited to 'multitech/recipes/wl12xx-scripts')
-rw-r--r-- | multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0.inc | 8 | ||||
-rw-r--r-- | multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/calibrate-wifi.sh (renamed from multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/mt100eocg-pcie-dk/calibrate-wifi.sh) | 6 | ||||
-rw-r--r-- | multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/enable-wifi.sh | 38 | ||||
-rw-r--r-- | multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/mt100eocg-pcie-dk/enable-wifi.sh | 30 | ||||
-rw-r--r-- | multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/mtocgd3/calibrate-wifi.sh | 40 | ||||
-rw-r--r-- | multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/mtocgd3/enable-wifi.sh | 30 | ||||
-rw-r--r-- | multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/wifi | 1 | ||||
-rw-r--r-- | multitech/recipes/wl12xx-scripts/wl12xx-scripts_1.0.bb | 9 |
8 files changed, 56 insertions, 106 deletions
diff --git a/multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0.inc b/multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0.inc index 88f0e6d..fee4c53 100644 --- a/multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0.inc +++ b/multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0.inc @@ -6,9 +6,13 @@ inherit update-rc.d INITSCRIPT_NAME = "enable-wifi.sh" INITSCRIPT_PARAMS = "start 91 S ." +S = ${WORKDIR}/wl12xx-scripts-1.0/ + do_install() { install -d ${D}${sbindir} - install -m 755 ${WORKDIR}/calibrate-wifi.sh ${D}${sbindir} + install -m 755 ${WORKDIR}/wl12xx-scripts-1.0/calibrate-wifi.sh ${D}${sbindir} install -d ${D}${sysconfdir}/init.d - install -m 755 ${WORKDIR}/enable-wifi.sh ${D}${sysconfdir}/init.d + install -m 755 ${WORKDIR}/wl12xx-scripts-1.0/enable-wifi.sh ${D}${sysconfdir}/init.d + install -d ${D}${sysconfdir}/default + install -m 644 ${WORKDIR}/wl12xx-scripts-1.0/wifi ${D}${sysconfdir}/default/ } diff --git a/multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/mt100eocg-pcie-dk/calibrate-wifi.sh b/multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/calibrate-wifi.sh index 2ea1c1d..b57e0bb 100644 --- a/multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/mt100eocg-pcie-dk/calibrate-wifi.sh +++ b/multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/calibrate-wifi.sh @@ -12,7 +12,7 @@ NVS_OEM_FILE="$OEM_DIR/$NVS_DIR/wl1271-nvs.bin" NVS_FILE="/lib/firmware/ti-connectivity/wl1271-nvs.bin" NVS_DEFAULT_FILE="$NVS_FILE.factory" -set -x +echo "starting wifi calibration..." killall hostapd killall wpa_supplicant @@ -26,15 +26,19 @@ mts-io-sysfs store wlan-enabled 1 sleep 1 mount -o remount,rw /var/oem +echo "removing $NVS_OEM_FILE" rm -f $NVS_OEM_FILE modprobe atmel_mci sleep 1 rmmod wl12xx_sdio +echo "calibrating..." calibrator plt autocalibrate wlan0 \ /lib/modules/2.6.39.4/updates/drivers/net/wireless/wl12xx/wl12xx_sdio.ko \ /usr/share/ti/wifi-utils/ini_files/127x/TQS_S_2.6.ini \ $NVS_FILE $WIFIMAC mount -o remount,ro /var/oem + +echo "...calibration finished" diff --git a/multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/enable-wifi.sh b/multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/enable-wifi.sh new file mode 100644 index 0000000..976d82d --- /dev/null +++ b/multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/enable-wifi.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +source /etc/default/wifi + +OEM_DIR="/var/oem" +NVS_DIR="mts" +NVS_OEM_FILE="$OEM_DIR/$NVS_DIR/wl1271-nvs.bin" +NVS_FILE="/lib/firmware/ti-connectivity/wl1271-nvs.bin" +NVS_DEFAULT_FILE="$NVS_FILE.factory" + +if [[ $WIFIENABLED == "yes" ]]; then + echo "wl12xx: enabling wifi" + + # make sure nvs file exists in /var/oem/mts/ + if [[ ! -f $NVS_OEM_FILE ]]; then + echo "copying nvs file to $OEM_DIR" + mount -o remount,rw $OEM_DIR + mkdir -p $OEM_DIR/$NVS_DIR + cp $NVS_DEFAULT_FILE $NVS_OEM_FILE + mount -o remount,ro $OEM_DIR + fi + + # make sure nvs file exists in /lib/firmware/ti-connectivity/ + echo "creating $NVS_FILE" + ln -fs $NVS_OEM_FILE $NVS_FILE + + # probe wifi chip + mts-io-sysfs store wlan-enabled 0 + usleep 50000 + echo "starting up wifi chip" + mts-io-sysfs store wlan-enabled 1 + sleep 1 + echo "loading atmel_mci driver" + modprobe atmel_mci + sleep 3 +else + echo "NOT enabling wifi" +fi diff --git a/multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/mt100eocg-pcie-dk/enable-wifi.sh b/multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/mt100eocg-pcie-dk/enable-wifi.sh deleted file mode 100644 index 9c5aaf2..0000000 --- a/multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/mt100eocg-pcie-dk/enable-wifi.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -OEM_DIR="/var/oem" -NVS_DIR="mts" -NVS_OEM_FILE="$OEM_DIR/$NVS_DIR/wl1271-nvs.bin" -NVS_FILE="/lib/firmware/ti-connectivity/wl1271-nvs.bin" -NVS_DEFAULT_FILE="$NVS_FILE.factory" - -echo "wl12xx: enabling wifi" - -set -x - -# make sure nvs file exists in /var/oem/mts/ -if [[ ! -f $NVS_OEM_FILE ]]; then - mount -o remount,rw $OEM_DIR - mkdir -p $OEM_DIR/$NVS_DIR - cp $NVS_DEFAULT_FILE $NVS_OEM_FILE - mount -o remount,ro $OEM_DIR -fi - -# make sure nvs file exists in /lib/firmware/ti-connectivity/ -ln -fs $NVS_OEM_FILE $NVS_FILE - -# probe wifi chip -mts-io-sysfs store wlan-enabled 0 -usleep 50000 -mts-io-sysfs store wlan-enabled 1 -sleep 1 -modprobe atmel_mci -sleep 3 diff --git a/multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/mtocgd3/calibrate-wifi.sh b/multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/mtocgd3/calibrate-wifi.sh deleted file mode 100644 index 2ea1c1d..0000000 --- a/multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/mtocgd3/calibrate-wifi.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash - -if [[ $# -ne 1 ]]; then - echo "usage: $0 <wifi-mac-address>" - exit 1 -fi - -WIFIMAC=$1 -OEM_DIR="/var/oem" -NVS_DIR="mts" -NVS_OEM_FILE="$OEM_DIR/$NVS_DIR/wl1271-nvs.bin" -NVS_FILE="/lib/firmware/ti-connectivity/wl1271-nvs.bin" -NVS_DEFAULT_FILE="$NVS_FILE.factory" - -set -x - -killall hostapd -killall wpa_supplicant - -modprobe -r wl12xx_sdio -modprobe -r atmel_mci - -mts-io-sysfs store wlan-enabled 0 -sleep 1 -mts-io-sysfs store wlan-enabled 1 -sleep 1 - -mount -o remount,rw /var/oem -rm -f $NVS_OEM_FILE - -modprobe atmel_mci -sleep 1 -rmmod wl12xx_sdio - -calibrator plt autocalibrate wlan0 \ - /lib/modules/2.6.39.4/updates/drivers/net/wireless/wl12xx/wl12xx_sdio.ko \ - /usr/share/ti/wifi-utils/ini_files/127x/TQS_S_2.6.ini \ - $NVS_FILE $WIFIMAC - -mount -o remount,ro /var/oem diff --git a/multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/mtocgd3/enable-wifi.sh b/multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/mtocgd3/enable-wifi.sh deleted file mode 100644 index 9c5aaf2..0000000 --- a/multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/mtocgd3/enable-wifi.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -OEM_DIR="/var/oem" -NVS_DIR="mts" -NVS_OEM_FILE="$OEM_DIR/$NVS_DIR/wl1271-nvs.bin" -NVS_FILE="/lib/firmware/ti-connectivity/wl1271-nvs.bin" -NVS_DEFAULT_FILE="$NVS_FILE.factory" - -echo "wl12xx: enabling wifi" - -set -x - -# make sure nvs file exists in /var/oem/mts/ -if [[ ! -f $NVS_OEM_FILE ]]; then - mount -o remount,rw $OEM_DIR - mkdir -p $OEM_DIR/$NVS_DIR - cp $NVS_DEFAULT_FILE $NVS_OEM_FILE - mount -o remount,ro $OEM_DIR -fi - -# make sure nvs file exists in /lib/firmware/ti-connectivity/ -ln -fs $NVS_OEM_FILE $NVS_FILE - -# probe wifi chip -mts-io-sysfs store wlan-enabled 0 -usleep 50000 -mts-io-sysfs store wlan-enabled 1 -sleep 1 -modprobe atmel_mci -sleep 3 diff --git a/multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/wifi b/multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/wifi new file mode 100644 index 0000000..9d52c22 --- /dev/null +++ b/multitech/recipes/wl12xx-scripts/wl12xx-scripts-1.0/wifi @@ -0,0 +1 @@ +WIFIENABLED=yes diff --git a/multitech/recipes/wl12xx-scripts/wl12xx-scripts_1.0.bb b/multitech/recipes/wl12xx-scripts/wl12xx-scripts_1.0.bb index 5614cf6..fa7eacb 100644 --- a/multitech/recipes/wl12xx-scripts/wl12xx-scripts_1.0.bb +++ b/multitech/recipes/wl12xx-scripts/wl12xx-scripts_1.0.bb @@ -2,7 +2,10 @@ DESCRIPTION = "Scripts to enable and calibrate the wifi chip on the OCG" require wl12xx-scripts-1.0.inc -PR = "r1" +PR = "r2" -SRC_URI = "file://calibrate-wifi.sh \ - file://enable-wifi.sh" +SRC_URI = "file://wl12xx-scripts-1.0/calibrate-wifi.sh \ + file://wl12xx-scripts-1.0/wifi \ + file://wl12xx-scripts-1.0/enable-wifi.sh" + +CONFFILES_${PN} += "${sysconfdir}/default/wifi" |