wok-6.x rev 985
Add: b43legacy-firmware installer for old BROADCOM cards
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Wed Jul 02 18:23:20 2008 +0200 (2008-07-02) |
parents | 892930883f57 |
children | 29ef7d8a4729 |
files | get-b43legacy-firmware/receipt get-b43legacy-firmware/stuff/get-b43legacy-firmware |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/get-b43legacy-firmware/receipt Wed Jul 02 18:23:20 2008 +0200 1.3 @@ -0,0 +1,15 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="get-b43legacy-firmware" 1.7 +VERSION="1.01" 1.8 +CATEGORY="non-free" 1.9 +SHORT_DESC="Get Broadcom b43lagacy firmware." 1.10 +MAINTAINER="pankso@slitaz.org" 1.11 +WEB_SITE="http://downloads.openwrt.org/" 1.12 + 1.13 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.14 +genpkg_rules() 1.15 +{ 1.16 + mkdir -p $fs/usr/bin 1.17 + cp stuff/$PACKAGE $fs/usr/bin 1.18 +}
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/get-b43legacy-firmware/stuff/get-b43legacy-firmware Wed Jul 02 18:23:20 2008 +0200 2.3 @@ -0,0 +1,77 @@ 2.4 +#!/bin/sh 2.5 +# 2.6 +# Get and install non-free Broadcom b43 firmware. The script wil also 2.7 +# install linux-wireless and b43-fwcutter if needed. Finaly try to 2.8 +# configure wlan0 interface. 2.9 +# 2.10 + 2.11 +DIR="wl_apsta" 2.12 +VERSION=3.130.20.0 2.13 +TARBALL=$DIR-$VERSION.o 2.14 +WGET_URL="http://downloads.openwrt.org/sources/$TARBALL" 2.15 + 2.16 +# Check if user is root to install. 2.17 +if test $(id -u) != 0 ; then 2.18 + echo -e "\nYou must be root to run `basename $0`." 2.19 + echo -e "Please use 'su' and root password to become super-user.\n" 2.20 + exit 0 2.21 +fi 2.22 + 2.23 +# Avoid reinstall 2.24 +if [ -d /var/lib/tazpkg/installed/b43legacy-firmware ]; then 2.25 + echo -e "\nb43legacy-firmware package is already installed.\n" 2.26 + exit 0 2.27 +fi 2.28 + 2.29 +# We need drivers, the extractor and tools. 2.30 +for pkg in linux-wireless b43-fwcutter wireless_tools 2.31 +do 2.32 + if [ ! -d /var/lib/tazpkg/installed/$pkg ]; then 2.33 + tazpkg get-install $pkg 2.34 + fi 2.35 +done 2.36 + 2.37 +# Get files 2.38 +cd /tmp 2.39 +wget $WGET_URL || exit 2.40 +#tar xjf $TARBALL 2.41 +#cd $DIR-$VERSION/ 2.42 + 2.43 +# Create pseudo package 2.44 +mkdir -p b43legacy-firmware-$VERSION/fs/lib/firmware 2.45 +b43-fwcutter -w "b43legacy-firmware-$VERSION/fs/lib/firmware" wl_apsta-3.130.20.0.o 2.46 + 2.47 +# Creat receipt 2.48 +cat > b43legacy-firmware-$VERSION/receipt <<EOT 2.49 +PACKAGE="b43legacy-firmware" 2.50 +VERSION="$VERSION" 2.51 +CATEGORY="non-free" 2.52 +SHORT_DESC="Broadcom b43legacy firmware." 2.53 +DEPENDS="b43-fwcutter" 2.54 +WEB_SITE="http://downloads.openwrt.org/" 2.55 +EOT 2.56 + 2.57 +# Pack 2.58 +tazpkg pack b43legacy-firmware-$VERSION 2.59 + 2.60 +# Install pseudo package 2.61 +tazpkg install b43legacy-firmware-$VERSION.tazpkg 2.62 + 2.63 +# Clean 2.64 +cd /tmp 2.65 +rm -rf $TARBALL $DIR-$VERSION 2.66 + 2.67 +# Load b43legacy module 2.68 +echo "Loading module: b43legacy..." 2.69 +modprobe b43legacy 2.70 +sleep 1 2.71 + 2.72 +# Configure /etc/network.conf and start connexion 2.73 +sed -i s/'WIFI="no"'/'WIFI="yes"'/ /etc/network.conf 2.74 +. /etc/network.conf 2.75 + 2.76 +iwconfig $WIFI_INTERFACE essid $ESSID 2.77 +echo "Starting udhcpc client on: $WIFI_INTERFACE... " 2.78 +/sbin/udhcpc -b -i $WIFI_INTERFACE \ 2.79 + -p /var/run/udhcpc.$WIFI_INTERFACE.pid 2.80 +