(WiFi)
 
(4 intermediate revisions by one user not shown)
Line 2: Line 2:
 
=== Enabling GuruPlug Server Marvell Libertas 8688 SDIO 802.11b/g WiFi ===
 
=== Enabling GuruPlug Server Marvell Libertas 8688 SDIO 802.11b/g WiFi ===
  
Enable the following Kernel modules and recompile:
+
The GuruPlug Server Plus incorporates an [http://www.azurewave.com/ AzureWave] AW-GH381 IEEE 802.11 b/g Wireless LAN & Bluetooth 3.0 module IC, functionally equivalent to the [http://www.marvell.com/wireless/assets/8688.pdf Marvell 88W8688] 
 +
 
 +
== WiFi ==
 +
 +
Enable the following as kernel <B>modules</B> and compile your modules:
  
 
<PRE>
 
<PRE>
Line 8: Line 12:
 
   Marvell 8xxx Libertas WLAN driver support
 
   Marvell 8xxx Libertas WLAN driver support
 
   Marvell Libertas 8385/8686/8688 SDIO 802.11b/g cards
 
   Marvell Libertas 8385/8686/8688 SDIO 802.11b/g cards
 +
</PRE>
 +
 +
The modules above will want to load firmware from the root filesystem that is not available until the filesystem is mounted. This will result in an initial error loading firmware (see below), but the kernel will retry later and should succeed. To mitigate this issue, I choose to compile these as loadable modules rather than built-in. 
 +
 +
<PRE>
 +
mmc0: new high speed SDIO card at address 0001
 +
libertas_sdio mmc0:0001:1: Direct firmware load failed with error -2
 +
libertas_sdio mmc0:0001:1: Falling back to user helper
 
</PRE>
 
</PRE>
  
Line 19: Line 31:
 
</PRE>
 
</PRE>
  
And reboot. Upon boot, the kernel should try to load the firmware before the rootfs is available and fail.  
+
And reboot. The modules should now load. If not, manually load them using:
  
 
<PRE>
 
<PRE>
mmc0: new high speed SDIO card at address 0001
+
insmod /lib/modules/<kernel ver>/kernel/drivers/net/wireless/libertas/libertas.ko
libertas_sdio mmc0:0001:1: Direct firmware load failed with error -2
+
insmod /lib/modules/<kernel ver>/kernel/drivers/net/wireless/libertas/libertas_sdio.ko
libertas_sdio mmc0:0001:1: Falling back to user helper
+
</PRE>  
</PRE>
+
  
It should then retry after rootfs is available and report something similar to:
+
When loaded, the following debug messages should be displayed:
  
 
<PRE>
 
<PRE>
Line 34: Line 45:
 
</PRE>
 
</PRE>
  
=== iw ===  
+
== Bluetooth ==
  
iw requires the [http://www.infradead.org/~tgr/libnl/ Netlink Protocol Library Suite (libnl)]
+
Enable the following Linux kernel modules and recompile your kernel. These modules will want to load firmware from the root filesystem that is not available until mounted. This will result in an initial error loading firmware, but the kernel will retry later and should succeed. To mitigate this issue, I choose to compile these as loadable modules rather than built-in. 
 
+
Download, cross compile and install the Netlink Protocol libraries:
+
  
 
<PRE>
 
<PRE>
wget http://www.infradead.org/~tgr/libnl/files/libnl-3.2.24.tar.gz
+
Networking Support -> Bluetooth subsystem support
tar -xzf libnl-3.2.24.tar.gz
+
Networking Support -> Bluetooth subsystem support -> Bluetooth device drivers
cd libnl-3.2.24
+
Marvell Bluetooth driver support
./configure --host=arm-linux-gnueabi --prefix=/usr/arm-linux-gnueabi
+
Marvell BT-over-SDIO driver
make
+
make install
+
cd include
+
make install
+
 
</PRE>
 
</PRE>
  
Now download and build the [http://wireless.kernel.org/en/users/Documentation/iw iw] nl80211 based CLI configuration utility:
+
The WLAN/Bluetooth SoC has an ARMv5TE core that runs closed firmware. Download the Binary BLOBs (firmware) to /lib/firmware/mrvl/:
  
 
<PRE>
 
<PRE>
wget https://www.kernel.org/pub/software/network/iw/iw-3.15.tar.gz
+
mkdir /lib/firmware /lib/firmware/mrvl
tar -xzf iw-3.15.tar.gz
+
cd /lib/firmware/mrvl
cd iw-3.15/
+
wget http://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/plain/mrvl/sd8688_helper.bin
export PKG_CONFIG_PATH=/usr/arm-linux-gnueabi/lib/pkgconfig
+
wget http://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/plain/mrvl/sd8688.bin
export CC=arm-linux-gnueabi-gcc
+
make
+
 
</PRE>
 
</PRE>
  
Manually install iw and required libraries on your target root-fs:
+
Upon reboot, you should now see the following kernel message as the module loads:
  
 
<PRE>
 
<PRE>
cp iw /home/export/rootfs/sbin/
+
Bluetooth: vendor=0x2df, device=0x9105, class=255, fn=2
cp /usr/arm-linux-gnueabi/lib/libnl-genl-3.so.200 /home/export/rootfs/lib/
+
cp /usr/arm-linux-gnueabi/lib/libnl-3.so.200 /home/export/rootfs/lib/
+
 
</PRE>
 
</PRE>
  
And update the dynamic linker run-time bindings on your target:
+
and be greeted with a Bluetooth hci device:
  
 
<PRE>
 
<PRE>
ldconfig -v
+
# hciconfig
 +
hci0:  Type: BR/EDR  Bus: SDIO
 +
        BD Address: 00:24:23:1F:B3:EA  ACL MTU: 1021:7  SCO MTU: 240:3
 +
        DOWN
 +
        RX bytes:647 acl:0 sco:0 events:22 errors:0
 +
        TX bytes:442 acl:0 sco:0 commands:22 errors:0
 
</PRE>
 
</PRE>
  
== wpa_supplicant ==
+
If this is not the case, check that the btmrvl.ko & btmrvl_sdio.ko modules are loaded.
 
+
 
+
<PRE>
+
wget http://www.infradead.org/~tgr/libnl/files/libnl-1.1.4.tar.gz
+
tar -xzf libnl-1.1.4.tar.gz
+
cd libnl-1.1.4
+
./configure --host=arm-linux-gnueabi --prefix=/usr/arm-linux-gnueabi
+
make
+
make install
+
</PRE>
+
 
+
 
+
<PRE>
+
wget https://www.openssl.org/source/openssl-1.0.1h.tar.gz
+
tar -xzf openssl-1.0.1h.tar.gz
+
cd openssl-1.0.1h
+
export ARCH=arm
+
export CROSS_COMPILE=arm-linux-gnueabi-
+
./Configure linux-generic32 --prefix=/usr/arm-linux-gnueabi
+
make
+
make install
+
</PRE>
+
 
+
 
+
<PRE>
+
wget http://hostap.epitest.fi/releases/wpa_supplicant-2.2.tar.gz
+
tar -xzf wpa_supplicant-2.2.tar.gz
+
cd wpa_supplicant-2.2/wpa_supplicant
+
cp defconfig .config
+
make CC=arm-linux-gnueabi-gcc
+
make install DESTDIR=/home/export/rootfs
+
</PRE>
+
 
+
wpa_supplicant requires the following libraries to be installed:
+
 
+
<PRE>
+
cp /usr/arm-linux-gnueabi/lib/libnl.so.1.1.4 /home/export/rootfs/lib/
+
cp /usr/arm-linux-gnueabi/lib/libcrypto.so.1.0.0 /home/export/rootfs/lib/
+
cp /usr/arm-linux-gnueabi/lib/libssl.so.1.0.0 /home/export/rootfs/lib/
+
</PRE>
+
 
+
== hostapd ==
+
 
+
<PRE>
+
wget http://hostap.epitest.fi/releases/hostapd-2.2.tar.gz
+
tar -xzf hostapd-2.2.tar.gz
+
cd hostapd-2.2/hostapd
+
cp defconfig .config
+
make CC=arm-linux-gnueabi-gcc
+
make install DESTDIR=/home/export/rootfs
+
</PRE>
+

Latest revision as of 11:47, 28 June 2014

Enabling GuruPlug Server Marvell Libertas 8688 SDIO 802.11b/g WiFi

The GuruPlug Server Plus incorporates an AzureWave AW-GH381 IEEE 802.11 b/g Wireless LAN & Bluetooth 3.0 module IC, functionally equivalent to the Marvell 88W8688

WiFi

Enable the following as kernel modules and compile your modules:

Device Drivers > Network device support > Wireless LAN
   Marvell 8xxx Libertas WLAN driver support
   Marvell Libertas 8385/8686/8688 SDIO 802.11b/g cards

The modules above will want to load firmware from the root filesystem that is not available until the filesystem is mounted. This will result in an initial error loading firmware (see below), but the kernel will retry later and should succeed. To mitigate this issue, I choose to compile these as loadable modules rather than built-in.

mmc0: new high speed SDIO card at address 0001
libertas_sdio mmc0:0001:1: Direct firmware load failed with error -2
libertas_sdio mmc0:0001:1: Falling back to user helper

Download Binary BLOBs to /lib/firmware:

mkdir /lib/firmware
cd /lib/firmware
wget http://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/plain/mrvl/sd8688_helper.bin
wget http://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/plain/mrvl/sd8688.bin

And reboot. The modules should now load. If not, manually load them using:

insmod /lib/modules/<kernel ver>/kernel/drivers/net/wireless/libertas/libertas.ko 
insmod /lib/modules/<kernel ver>/kernel/drivers/net/wireless/libertas/libertas_sdio.ko 

When loaded, the following debug messages should be displayed:

libertas_sdio mmc0:0001:1 (unregistered net_device): 00:24:23:1f:b3:e9, fw 10.38.1p25, cap 0x00000303
libertas_sdio mmc0:0001:1 wlan0: Marvell WLAN 802.11 adapter

Bluetooth

Enable the following Linux kernel modules and recompile your kernel. These modules will want to load firmware from the root filesystem that is not available until mounted. This will result in an initial error loading firmware, but the kernel will retry later and should succeed. To mitigate this issue, I choose to compile these as loadable modules rather than built-in.

Networking Support -> Bluetooth subsystem support 
Networking Support -> Bluetooth subsystem support -> Bluetooth device drivers
	Marvell Bluetooth driver support
	Marvell BT-over-SDIO driver

The WLAN/Bluetooth SoC has an ARMv5TE core that runs closed firmware. Download the Binary BLOBs (firmware) to /lib/firmware/mrvl/:

mkdir /lib/firmware /lib/firmware/mrvl 
cd /lib/firmware/mrvl 
wget http://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/plain/mrvl/sd8688_helper.bin
wget http://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/plain/mrvl/sd8688.bin

Upon reboot, you should now see the following kernel message as the module loads:

Bluetooth: vendor=0x2df, device=0x9105, class=255, fn=2

and be greeted with a Bluetooth hci device:

# hciconfig
hci0:   Type: BR/EDR  Bus: SDIO
        BD Address: 00:24:23:1F:B3:EA  ACL MTU: 1021:7  SCO MTU: 240:3
        DOWN
        RX bytes:647 acl:0 sco:0 events:22 errors:0
        TX bytes:442 acl:0 sco:0 commands:22 errors:0

If this is not the case, check that the btmrvl.ko & btmrvl_sdio.ko modules are loaded.