get-scripts view speedtouch-firmware @ rev 63

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