u-boot git: update beagleboard patches
[openembedded.git] / recipes / misc-binary-only / prism2-firmware-update_1.7.4.bb
blobdae62aebed0f703afc1a655d0b12d354de58d6eb
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"
47 SRC_URI[md5sum] = "ff4a902f62b8a8c4ccf1474ce27bee41"
48 SRC_URI[sha256sum] = "2660ad1f217e2cff5465cfb90b0cc2d5a6c57653fe769591af31da2e4f860c14"