2 # Copyright (C) 2008 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
11 PKG_NAME
:=speedtouch-usb-firmware
15 PKG_BUILD_DIR
:=$(BUILD_DIR
)/speedtouch-usb-firmware-
$(PKG_VERSION
)
16 PKG_SOURCE
:=SpeedTouch330_firmware_
$(PKG_VERSION
)$(PKG_RELEASE
).zip
17 PKG_SOURCE_URL
:=http
://www.speedtouch.com
/download
/drivers
/USB
/
18 PKG_MD5SUM
:=2551ce46ef785642f2c6768511f70ff3
20 include $(INCLUDE_DIR
)/package.mk
22 define Package
/speedtouch-usb-firmware
26 TITLE
:=SpeedTouch
330 ADSL USB firmware
27 DEPENDS
:=+kmod-usb-atm
+kmod-usb-atm-speedtouch @LINUX_2_6
30 define Package
/speedtouch-usb-firmware
/description
31 This package add the firmware for SpeedTouch330 ADSL USB modem.
34 define Build
/Configure
38 mv
$(PKG_BUILD_DIR
)/..
/KQD6_
$(PKG_VERSION
).
$(PKG_RELEASE
) $(PKG_BUILD_DIR
)/
39 mv
$(PKG_BUILD_DIR
)/..
/ZZZL_
$(PKG_VERSION
).
$(PKG_RELEASE
) $(PKG_BUILD_DIR
)/
40 # next lines from Gentoo ebuild
41 # Extract the "stage 1" portion of the firmware
42 dd if
=$(PKG_BUILD_DIR
)/KQD6_
$(PKG_VERSION
).
$(PKG_RELEASE
) \
43 of
=$(PKG_BUILD_DIR
)/speedtch-1.bin
.2 ibs
=1 obs
=991 count
=991 skip
=36
44 dd if
=$(PKG_BUILD_DIR
)/ZZZL_
$(PKG_VERSION
).
$(PKG_RELEASE
) \
45 of
=$(PKG_BUILD_DIR
)/speedtch-1.bin
.4 ibs
=1 obs
=935 count
=935 skip
=32
46 # Extract the "stage 2" portion of the firmware
47 dd if
=$(PKG_BUILD_DIR
)/KQD6_
$(PKG_VERSION
).
$(PKG_RELEASE
) \
48 of
=$(PKG_BUILD_DIR
)/speedtch-2.bin
.2 ibs
=1 obs
=762650 count
=762650 skip
=1027
49 dd if
=$(PKG_BUILD_DIR
)/ZZZL_
$(PKG_VERSION
).
$(PKG_RELEASE
) \
50 of
=$(PKG_BUILD_DIR
)/speedtch-2.bin
.4 ibs
=1 obs
=775545 count
=775545 skip
=967
53 define Package
/speedtouch-usb-firmware
/install
54 $(INSTALL_DIR
) -d
$(1)/lib
/firmware
55 $(INSTALL_CONF
) $(PKG_BUILD_DIR
)/speedtch-1.bin
.2 $(1)/lib
/firmware
56 $(INSTALL_CONF
) $(PKG_BUILD_DIR
)/speedtch-1.bin
.4 $(1)/lib
/firmware
57 $(INSTALL_CONF
) $(PKG_BUILD_DIR
)/speedtch-2.bin
.2 $(1)/lib
/firmware
58 $(INSTALL_CONF
) $(PKG_BUILD_DIR
)/speedtch-2.bin
.4 $(1)/lib
/firmware
61 define Package
/speedtouch-usb-firmware
/postinst
63 # Symlinks for other revisions of the modem
64 cd
"$${IPKG_INSTROOT}/lib/firmware"
67 ln
-sfn speedtch-
$${n}.bin
.2 speedtch-
$${n}.bin.
$${rev}
69 # Seems like a reasonable guess, for revision 3
70 ln
-sfn speedtch-
$${stub}$${n}.bin
.4 speedtch-
$${n}.bin
.3
74 $(eval
$(call BuildPackage
,speedtouch-usb-firmware
))