wok-next rev 5105
wifi-firmare: improve wget_urls; add support for fw-only install; distribute free fw
author | Rohit Joshi <jozee@slitaz.org> |
---|---|
date | Wed Mar 17 11:48:31 2010 +0000 (2010-03-17) |
parents | 7e4cec027e34 |
children | 83044428b484 |
files | get-wifi-firmware/receipt get-wifi-firmware/stuff/get-wifi-firmware |
line diff
1.1 --- a/get-wifi-firmware/receipt Tue Mar 16 18:06:21 2010 +0000 1.2 +++ b/get-wifi-firmware/receipt Wed Mar 17 11:48:31 2010 +0000 1.3 @@ -1,7 +1,7 @@ 1.4 # SliTaz package receipt. 1.5 1.6 PACKAGE="get-wifi-firmware" 1.7 -VERSION="1.0" 1.8 +VERSION="2.0" 1.9 CATEGORY="non-free" 1.10 SHORT_DESC="Get misc wifi firmwares." 1.11 MAINTAINER="pascal.bellard@slitaz.org" 1.12 @@ -13,8 +13,21 @@ 1.13 mkdir -p $fs/usr/bin 1.14 cp stuff/$PACKAGE $fs/usr/bin 1.15 for i in b43 b43legacy ipw2100 ipw2200 rt61 rt73 rt2860 zd1211 \ 1.16 - rt61pci rt73usb zd1211rw \ 1.17 - iwlwifi-3945 iwlwifi-4965 iwlwifi-5000; do 1.18 + rt61pci rt73usb rt2870usb zd1211rw \ 1.19 + iwlwifi-3945 iwlwifi-4965 iwlwifi-5000 iwlwifi-5150 iwlwifi-1000 iwlwifi-6000; do 1.20 ln -s $PACKAGE $fs/usr/bin/get-$i-firmware 1.21 done 1.22 } 1.23 + 1.24 +post_install() 1.25 +{ 1.26 + # directly support some freely distributable firmware drivers 1.27 + # intel 1.28 + get-iwlwifi-3945-firmware --firmware 1.29 + get-iwlwifi-4965-firmware --firmware 1.30 + get-iwlwifi-5000-firmware --firmware 1.31 + # ralink 1.32 + get-rt61-firmware --firmware 1.33 + get-rt73-firmware --firmware 1.34 + get-rt2870usb-firmware --firmware 1.35 +}
2.1 --- a/get-wifi-firmware/stuff/get-wifi-firmware Tue Mar 16 18:06:21 2010 +0000 2.2 +++ b/get-wifi-firmware/stuff/get-wifi-firmware Wed Mar 17 11:48:31 2010 +0000 2.3 @@ -24,16 +24,16 @@ 2.4 FWSET=wl_apsta-$VERSION.o 2.5 ;; 2.6 ipw2100) 2.7 - VERSION=1.3-6.0.1 2.8 + VERSION=1.3 2.9 SHORT_DESC="Intel PRO/Wireless 2100 firmware." 2.10 WEB_SITE="http://$MODULE.sourceforge.net/" 2.11 - WGET_URL="http://dl.atrpms.net/all/$PKG-$VERSION.noarch.rpm" 2.12 + WGET_URL="http://bughost.org/firmware/${MODULE}-fw-${VERSION}.tgz" 2.13 ;; 2.14 ipw2200) 2.15 - VERSION=3.0-9.0.1 2.16 + VERSION=3.1 2.17 SHORT_DESC="Intel PRO/Wireless 2200BG firmware." 2.18 WEB_SITE="http://$MODULE.sourceforge.net/" 2.19 - WGET_URL="http://dl.atrpms.net/all/$PKG-$VERSION.noarch.rpm" 2.20 + WGET_URL="http://bughost.org/firmware/${MODULE}-fw-${VERSION}.tgz" 2.21 ;; 2.22 iwlwifi-3945) 2.23 VERSION=15.32.2.9 2.24 @@ -83,6 +83,12 @@ 2.25 WEB_SITE="http://www.ralinktech.com/" 2.26 WGET_URL="ftp://ftp.archlinux.org/other/rt2x00-rt71w-fw/RT71W_Firmware_V${VERSION}.zip" 2.27 ;; 2.28 +rt2870usb) 2.29 + VERSION=8 2.30 + SHORT_DESC="RaLink RT2870USB (RT2870/RT2770) WiFi adapter." 2.31 + WEB_SITE="http://www.ralinktech.com/" 2.32 + WGET_URL="ftp://ftp.archlinux.org/other/${MODULE}-fw/RT2870_Firmware_V${VERSION}.zip" 2.33 + ;; 2.34 zd1211|zd1211rw) 2.35 VERSION=2.16.0.0-0.1 2.36 SHORT_DESC="zd1211/zd1211rw Wireless Lan firmware." 2.37 @@ -144,16 +150,18 @@ 2.38 esac 2.39 2.40 # Create pseudo package 2.41 -mkdir -p $PKG-$VERSION/fs/lib/firmware 2.42 +mkdir -p $PKG-$VERSION/fs/lib/firmware $PKG-$VERSION/fs/usr/share/licenses 2.43 case "$MODULE" in 2.44 b43*) b43-fwcutter -w "$PKG-$VERSION/fs/lib/firmware" $FWSET;; 2.45 -ipw*) rm -f lib/firmware/*LICENSE* 2.46 - mv lib/firmware/* $PKG-$VERSION/fs/lib/firmware;; 2.47 -rt61|rt61pci|rt2860) 2.48 - mv RT*_Firmware_V$VERSION/*.bin $PKG-$VERSION/fs/lib/firmware;; 2.49 -rt73|rt73usb) 2.50 - mv RT73_Linux_STA_Drv$VERSION/Module/rt73.bin $PKG-$VERSION/fs/lib/firmware;; 2.51 -iwlwifi*) mv iwlwifi*/iwlwifi*.ucode $PKG-$VERSION/fs/lib/firmware;; 2.52 +ipw2200) cp ${MODULE}-fw-$VERSION/*LICENSE* $PKG-$VERSION/fs/usr/share/licenses/intel-$MODULE-LICENSE.txt 2.53 + mv ${MODULE}-fw-$VERSION/* $PKG-$VERSION/fs/lib/firmware;; 2.54 +ipw2100) cp *LICENSE* $PKG-$VERSION/fs/usr/share/licenses/intel-$MODULE-LICENSE.txt 2.55 + mv *.fw* *LICENSE* $PKG-$VERSION/fs/lib/firmware;; 2.56 +rt*) 2.57 + mv RT*_Firmware_V$VERSION/*.bin $PKG-$VERSION/fs/lib/firmware 2.58 + mv RT*_Firmware_V$VERSION/*LICENSE* $PKG-$VERSION/fs/usr/share/licenses/ralink-rt61-LICENSE.txt;; 2.59 +iwlwifi*) mv iwlwifi*/iwlwifi*.ucode $PKG-$VERSION/fs/lib/firmware 2.60 + mv iwlwifi*/*LICENSE* $PKG-$VERSION/fs/usr/share/licenses/intel-iwlwifi-LICENSE.txt ;; 2.61 zd1211|zd1211rw) 2.62 mv lib/firmware/zd1211 $PKG-$VERSION/fs/lib/firmware 2.63 for i in $(cd usr/lib/hotplug/firmware; ls); do 2.64 @@ -182,23 +190,31 @@ 2.65 cd $TOP 2.66 rm -rf $TMP 2.67 2.68 -# Check if we need wpa_supplicant 2.69 -. $ROOT/etc/network.conf 2.70 -if [ $WIFI_KEY_TYPE = "wpa" ] || [ $WIFI_KEY_TYPE = "WPA" ]; then 2.71 - if [ ! -d $ROOT/var/lib/tazpkg/installed/wpa_supplicant ]; then 2.72 - tazpkg get-install wpa_supplicant --root=$ROOT 2.73 +if [ "$1" == "--firmware" ] ; then 2.74 + echo "just install firmare: yes" 2.75 + JUST_INSTALL_FIRMWARE="yes" 2.76 +fi 2.77 + 2.78 +if [ ! "$JUST_INSTALL_FIRMWARE" == "yes" ]; then 2.79 + echo "configuring and loading module ..." 2.80 + # Check if we need wpa_supplicant 2.81 + . $ROOT/etc/network.conf 2.82 + if [ $WIFI_KEY_TYPE = "wpa" ] || [ $WIFI_KEY_TYPE = "WPA" ]; then 2.83 + if [ ! -d $ROOT/var/lib/tazpkg/installed/wpa_supplicant ]; then 2.84 + tazpkg get-install wpa_supplicant --root=$ROOT 2.85 + fi 2.86 + fi 2.87 + 2.88 + # Configure /etc/network.conf and start connexion 2.89 + sed -i s/'WIFI="no"'/'WIFI="yes"'/ $ROOT/etc/network.conf 2.90 + 2.91 + # Load module 2.92 + if [ -z "$ROOT" -a -n "$(modprobe -l $MODULE)" ]; then 2.93 + echo "Loading module: $MODULE..." 2.94 + if modprobe $MODULE ; then 2.95 + sleep 2 2.96 + /etc/init.d/network.sh restart 2.97 + fi 2.98 fi 2.99 fi 2.100 2.101 -# Configure /etc/network.conf and start connexion 2.102 -sed -i s/'WIFI="no"'/'WIFI="yes"'/ $ROOT/etc/network.conf 2.103 - 2.104 -# Load module 2.105 -if [ -z "$ROOT" -a -n "$(modprobe -l $MODULE)" ]; then 2.106 - echo "Loading module: $MODULE..." 2.107 - if modprobe $MODULE ; then 2.108 - sleep 2 2.109 - /etc/init.d/network.sh restart 2.110 - fi 2.111 -fi 2.112 -