wok view get-b43-firmware/stuff/get-b43-firmware @ rev 1012

Add: tk8.4, tk5.4-dev, tcl8.4, tcl8.4-dev (tcl & tcl-dev must be removed).
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Tue Jul 08 01:18:51 2008 +0200 (2008-07-08)
parents 82b6491f7573
children 784c95ed7cd7
line source
1 #!/bin/sh
2 #
3 # Get and install non-free Broadcom b43 firmware. The script wil also
4 # install linux-wireless and b43-fwcutter if needed. Finaly try to
5 # configure wlan0 interface.
6 #
8 DIR="broadcom-wl"
9 VERSION=4.80.53.0
10 TARBALL=$DIR-$VERSION.tar.bz2
11 WGET_URL="http://downloads.openwrt.org/sources/$TARBALL"
13 # Check if user is root to install.
14 if test $(id -u) != 0 ; then
15 echo -e "\nYou must be root to run `basename $0`."
16 echo -e "Please use 'su' and root password to become super-user.\n"
17 exit 0
18 fi
20 # Avoid reinstall
21 if [ -d /var/lib/tazpkg/installed/b43-firmware ]; then
22 echo -e "\nb43-firmware package is already installed.\n"
23 exit 0
24 fi
26 # We need drivers, the extractor and tools.
27 for pkg in linux-wireless b43-fwcutter wireless_tools
28 do
29 if [ ! -d /var/lib/tazpkg/installed/$pkg ]; then
30 tazpkg get-install $pkg
31 fi
32 done
34 # Get files
35 cd /tmp
36 wget $WGET_URL
37 tar xjf $TARBALL
38 cd $DIR-$VERSION/kmod
40 # Create pseudo package
41 mkdir -p b43-firmware-$VERSION/fs/lib/firmware
42 b43-fwcutter -w "b43-firmware-$VERSION/fs/lib/firmware" wl_apsta.o
44 # Creat receipt
45 cat > b43-firmware-$VERSION/receipt <<EOT
46 PACKAGE="b43-firmware"
47 VERSION="$VERSION"
48 CATEGORY="non-free"
49 SHORT_DESC="Broadcom b43 firmware."
50 DEPENDS="b43-fwcutter"
51 WEB_SITE="http://downloads.openwrt.org/"
52 EOT
54 # Pack
55 tazpkg pack b43-firmware-$VERSION
57 # Install pseudo package
58 tazpkg install b43-firmware-$VERSION.tazpkg
60 # Clean
61 cd /tmp
62 rm -rf $TARBALL $DIR-$VERSION
64 # Load b43 module
65 echo "Loading module: b43..."
66 modprobe b43
67 sleep 1
69 # Configure /etc/network.conf and start connexion
70 sed -i s/'WIFI="no"'/'WIFI="yes"'/ /etc/network.conf
71 . /etc/network.conf
73 iwconfig $WIFI_INTERFACE essid $ESSID
74 echo "Starting udhcpc client on: $WIFI_INTERFACE... "
75 /sbin/udhcpc -b -i $WIFI_INTERFACE \
76 -p /var/run/udhcpc.$WIFI_INTERFACE.pid