get-scripts annotate speedtouch-firmware @ rev 9

Add speedtouch-firmware
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Feb 18 22:12:09 2014 +0000 (2014-02-18)
parents
children 552ec1a3614c
rev   line source
pascal@9 1 DEPENDS=""
pascal@9 2
pascal@9 3 VERSION="3.012"
pascal@9 4 mkdir -p $PACKAGE-$VERSION/fs/lib/firmware
pascal@9 5 TARBALL="SpeedTouch330_firmware_$(echo $VERSION | sed 's/\.//').zip"
pascal@9 6 SHORT_DESC="Firmware for SpeedTouch ADSL Modem."
pascal@9 7 WEB_SITE="http://www.linux-usb.org/SpeedTouch/"
pascal@9 8 #http://speedtouch.hysplace.co.uk/firmware.htm
pascal@9 9 #URL="http://www.speedtouch.com/download/drivers/USB/$TARBALL"
pascal@9 10 #from http://www.filewatcher.com/m/SpeedTouch330_firmware_3012.zip.769125-0.html
pascal@9 11 URL="ftp://ftp.netbsd.org/pub/pkgsrc/distfiles/$TARBALL"
pascal@9 12 wget $URL
pascal@9 13 [ $TARBALL ] || abort_package "Could not download $TARBALL. Exiting."
pascal@9 14 unzip -n $(basename $URL)
pascal@9 15 wget http://www.linux-usb.org/SpeedTouch/firmware/firmware-extractor.tar.gz
pascal@9 16 tar xzf firmware-extractor.tar.gz
pascal@9 17 cd firmware-extractor/
pascal@9 18 which gcc || tazpkg get-install gcc
pascal@9 19 gcc -o firmware-extractor firmware.c
pascal@9 20 FIRMWARE="ZZZL_$VERSION"
pascal@9 21 [ "$PACKAGE" = "speedtouch-firmware" ] && FIRMWARE="KQD6_$VERSION"
pascal@9 22 cp ../$FIRMWARE mgmt.o
pascal@9 23 ./firmware-extractor mgmt.o
pascal@9 24 install -m 600 speedtch-1.bin speedtch-2.bin \
pascal@9 25 ../$PACKAGE-$VERSION/fs/lib/firmware
pascal@9 26 cd ..
pascal@9 27 set +e