wok-6.x view get-b43-firmware/stuff/get-b43-firmware @ rev 587

Add: b43-fwcutter + get-b43-firmware
author Christophe Lincoln <pankso@slitaz.org>
date Wed Apr 16 01:37:50 2008 +0200 (2008-04-16)
parents
children a93134a161ac
line source
1 #!/bin/sh
2 #
3 # Get and install non-free Broadcom b43 firmware.
4 #
6 DIR="broadcom-wl"
7 VERSION=4.80.53.0
8 TARBALL=$DIR-$VERSION.tar.bz2
9 WGET_URL="http://downloads.openwrt.org/sources/$TARBALL"
11 # Check if user is root to install.
12 if test $(id -u) != 0 ; then
13 echo -e "\nYou must be root to run `basename $0`."
14 echo -e "Please use 'su' and root password to become super-user.\n"
15 exit 0
16 fi
18 # Avoid reinstall
19 if [ ! -d /var/lib/tazpkg/installed/b43-firmware ]; then
20 echo -e "\nb43-firmware package is already installed.\n"
21 exit 0
22 fi
24 # Get files
25 cd /tmp
26 wget $WGET_URL
27 tar xjf $TARBALL
28 cd $DIR-$VERSION/kmod
30 # Create pseudo package
31 mkdir -p b43-firmware-$VERSION/fs/lib/firmware
32 b43-fwcutter -w "b43-firmware-$VERSION/fs/lib/firmware" wl_apsta.o
34 # Creat receipt
35 cat > b43-firmware-$VERSION/receipt <<EOT
36 PACKAGE="b43-firmware"
37 VERSION="$VERSION"
38 CATEGORY="non-free"
39 SHORT_DESC="Broadcom b43 firmware."
40 WEB_SITE="http://downloads.openwrt.org/"
41 EOT
43 # Pack
44 tazpkg pack b43-firmware-$VERSION
46 # Install pseudo package
47 tazpkg install b43-firmware-$VERSION.tazpkg
49 # Clean
50 cd /tmp
51 rm -rf $TARBALL $DIR-$VERSION