mtd-utils_1.2.0+git: remove the second docfdisk from the binary list
[openembedded.git] / packages / misc-binary-only / prism2-firmware-update_1.7.4.bb
blobe37cfd65623e248b3289487c0db083869e038067
1 DESCRIPTION = "one-time install package to upgrade the firmware of all installed prism2 based cards."
2 RDEPENDS = "hostap-modules-pci hostap-utils"
3 SECTION = "base"
4 PRIORITY = "optional"
5 LICENSE = "unknown"
7 SRC_URI = "http://www.red-bean.com/~proski/firmware/${PV}.tar.bz2"
9 INHIBIT_PACKAGE_STRIP = "1"
11 do_install() {
12 install -d ${D}tmp
13 install ${WORKDIR}/${PV}/pk010101.hex ${D}tmp
14 install ${WORKDIR}/${PV}/sf010704.hex ${D}tmp
17 pkg_postinst() {
18 if test "x$D" != "x"; then
19 exit 1
20 else
21 FW_VERSION="v${PV}";
23 fw_upgrade() {
24 IF=$1;
25 echo "firmware upgrade on $IF"
26 if [ ! `iwconfig $IF | grep "No such device"` ]; then
27 echo -n " - current firmware version: ";
28 echo `hostap_diag $IF | grep STAID | awk '{print $3}'`;
29 if [[ `hostap_diag $IF | grep STAID | awk '{print $3}'` < $FW_VERSION ]]; then
30 echo " - upgrading to version $FW_VERSION"
31 prism2_srec -f $IF /tmp/sf010704.hex /tmp/pk010101.hex
32 else
33 echo " - upgrade not necessary"
36 echo "done".
39 for i in `ls /proc/net/hostap`; do
40 fw_upgrade $i;
41 done;
45 FILES_${PN} += "/tmp"