[ARMedslack] What's the difference between USB<->serial devices on Arm Slack and Intel Slack?

John O'Donnell unixjohn1969 at gmail.com
Wed Jul 21 18:18:48 UTC 2010


Jim Hawkins wrote:
> On Wed, 21 Jul 2010, Stuart Winter wrote:
> 
>> I'm not too familiar with why the kernel firmware stuff gets built but I 
>> suspect it's just because support for a specific driver is compiled in, 
>> or is compiled as a module, so the corresponding fw is built and 
>> packaged/installed when "make modules_install" is run.
> 
> Some of the firmwares needed by the drivers are not created as part of the 
> kernel build. They are binary blobs (often extracted from the Windows 
> drivers) which get uploaded to the hardware by the Linux kernel drivers to 
> make the devices operate as intended. As such, the legality of 
> distributing some of them is a bit dubious.

Is this why for the Globalscale GuruPlug's wifi drivers, I had to copy the 
debian /lib/firmware/mrvl files

root at guruslack:/lib/firmware/mrvl# l
total 512
-rwxr-xr-x 1 root root   2616 2010-05-27 23:54 helper_sd.bin*
-rw-r--r-- 1 root root 278640 2010-05-27 23:54 sd8688.bin
-rwxr-xr-x 1 root root 222572 2010-05-27 23:54 sd8688_ap.bin*
-rw-r--r-- 1 root root   2616 2010-05-27 23:54 sd8688_helper.bin

in order to get the wifi access point functionality working?  I couldnt find 
these in the standard kernel and it kept complaining every time I loaded the 
uap8xxx driver that it couldnt find the firmware.

Here is what a good boot looks like after I copied the firmware

[   59.381185] uap_probe: vendor=0x02DF device=0x9104 class=0 function=1
[   59.401417] uap_sdio mmc0:0001:1: firmware: requesting mrvl/helper_sd.bin
[   59.424156] uap_sdio mmc0:0001:1: firmware: requesting mrvl/sd8688_ap.bin
[   59.718283] UAP FW is active

one set of binaries is for access point, one set is for client (I believe).


My /etc/rc.uap:

#!/bin/sh
# rc.uap:  start/stop/restart Marvell access point subsystem.
#
# Load the kernel module and configure the access point
# for the Marvell wireless adapter in the Guru Plug PC
# using the binary (uaputl) copied from the Debian distribution
# that came with the Guru Plug PC since no source could be found
# as well as the firmware files that were not found with the
# standard kernels.
#
# Make sure to set up your dhcpd.
#
# This script sets up the wireless network as a separate network and
# assumes all your wireless devices will be NAT'ed out to your
# wired network.
#
# John O'Donnell <unixjohn1969 at gmail.com>
#

# The IP address of the access point
UAPIP=192.168.100.1
SSID=Pinguinista
PROTOCOL=32
WPA_PASSPHRASE=SomeUberSuperSecretPassword
CIPHER="8 8"
NATDEV=eth2
UAPDEV=uap0
CHANNEL=6

uap_start() {
   if [ -x /usr/bin/uaputl ]; then
     modprobe uap8xxx
     ifconfig ${UAPDEV} ${UAPIP} up
     uaputl sys_cfg_radio_ctl 0          # Radio on
     uaputl sys_cfg_channel ${CHANNEL}
     uaputl sys_cfg_ssid ${SSID}
     uaputl sys_cfg_protocol ${PROTOCOL}
     uaputl sys_cfg_wpa_passphrase ${WPA_PASSPHRASE}
     uaputl sys_cfg_cipher ${CIPHER}
     uaputl bss_start

     # Set firewall to NAT these clients
     iptables -t nat -A POSTROUTING -o ${NATDEV} -j MASQUERADE

     # Set leds
     echo 1 > `eval ls /sys/class/leds/guruplug\:green\:health/brightness`
     echo 1 > `eval ls /sys/class/leds/guruplug\:green\:wmode/brightness`
     echo 0 > `eval ls /sys/class/leds/guruplug\:red\:health/brightness`
     echo 0 > `eval ls /sys/class/leds/guruplug\:red\:wmode/brightness`

     # Startup DHCPD
     /etc/rc.d/rc.dhcpd start
   fi
}

uap_stop() {
   if [ -x /usr/bin/uaputl ]; then
     /etc/rc.d/rc.dhcpd stop
     ifconfig ${UAPDEV} ${UAPIP} down
     uaputl bss_stop
     uaputl sys_cfg_radio_ctl 1          # Radio off

     iptables -t nat -D POSTROUTING -o ${NATDEV} -j MASQUERADE
     modprobe -r uap8xxx

     # Set leds
     echo 0 > `eval ls /sys/class/leds/guruplug\:green\:health/brightness`
     echo 0 > `eval ls /sys/class/leds/guruplug\:green\:wmode/brightness`
     echo 0 > `eval ls /sys/class/leds/guruplug\:red\:health/brightness`
     echo 0 > `eval ls /sys/class/leds/guruplug\:red\:wmode/brightness`
   fi
}

uap_status() {
   echo "--------------------------------------------------------------------------"
   uaputl sys_info                 # display system info
   uaputl sta_list                 # display list of clients
   echo "--------------------------------------------------------------------------"
   exit 0
}

uap_restart() {
   uap_stop
   uap_start
}

case "$1" in
'start')
   uap_start
   ;;
'stop')
   uap_stop
   ;;
'status')
   uap_status
   ;;
'restart')
   uap_restart
   ;;
*)
   echo "usage $0 start|stop|restart"
esac

-- 
=== Never ask a geek why, just nod your head and slowly back away.===
+================================+==================================+
|  John O'Donnell                |                                  |
|  (Sr. Systems Engineer,        |    http://juanisan.homeip.net    |
|  Net Admin, Programmer, etc.)  |  E-Mail: unixjohn1969 at gmail.com  |
+================================+==================================+
No man is useless who has a friend, and if we are loved we are
indispensable.  -- Robert Louis Stevenson


More information about the ARMedslack mailing list