get-scripts view speedtouch-firmware @ rev 26

Add apk-studio
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Nov 19 13:55:21 2014 +0100 (2014-11-19)
parents
children 552ec1a3614c
line source
1 DEPENDS=""
3 VERSION="3.012"
4 mkdir -p $PACKAGE-$VERSION/fs/lib/firmware
5 TARBALL="SpeedTouch330_firmware_$(echo $VERSION | sed 's/\.//').zip"
6 SHORT_DESC="Firmware for SpeedTouch ADSL Modem."
7 WEB_SITE="http://www.linux-usb.org/SpeedTouch/"
8 #http://speedtouch.hysplace.co.uk/firmware.htm
9 #URL="http://www.speedtouch.com/download/drivers/USB/$TARBALL"
10 #from http://www.filewatcher.com/m/SpeedTouch330_firmware_3012.zip.769125-0.html
11 URL="ftp://ftp.netbsd.org/pub/pkgsrc/distfiles/$TARBALL"
12 wget $URL
13 [ $TARBALL ] || abort_package "Could not download $TARBALL. Exiting."
14 unzip -n $(basename $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 ..
27 set +e