diff options
author | Rolf Leggewie <oe-devel@rolf.leggewie.biz> | 2007-06-29 23:21:52 +0000 |
---|---|---|
committer | Rolf Leggewie <oe-devel@rolf.leggewie.biz> | 2007-06-29 23:21:52 +0000 |
commit | 93d19714f8efa8413b63070f1c8a1e0ee5266131 (patch) | |
tree | 6c954f87ddb0d396882b78dff7d7e5d8bc59efd3 /packages/misc-binary-only | |
parent | 4674b880ed6fad924653543ee16d6c55ec31c402 (diff) | |
parent | eb71ae6bd2cecdcd19127066387676a56331b32d (diff) |
merge of '57fa0ccbbdbca8c188108e3c4fbde4702976f3c6'
and 'b29b99ceeb63af04c2736ab8176705046dc326c0'
Diffstat (limited to 'packages/misc-binary-only')
6 files changed, 66 insertions, 54 deletions
diff --git a/packages/misc-binary-only/prism-firmware.bb b/packages/misc-binary-only/prism-firmware.bb new file mode 100644 index 0000000000..fefdb0ae22 --- /dev/null +++ b/packages/misc-binary-only/prism-firmware.bb @@ -0,0 +1,30 @@ +DESCRIPTION = "Firmware for the Prism 2.x/3 cards" +SECTION = "base" +LICENSE = "closed" +RDEPENDS = "hostap-utils" +RREPLACES = "prism3-firmware prism3-support" +RCONFLICTS = "prism3-firmware prism3-support" +PACKAGE_ARCH = "all" +PR = "r2" + +SRC_URI = "http://www.red-bean.com/~proski/firmware/Latest-prism.tar.bz2 \ + file://prism-fw.sh \ + file://hostap.rules" + +S = "${WORKDIR}/Latest-prism/" + +do_install() { + install -d ${D}${base_libdir}/firmware/ + install -d ${D}${base_libdir}/udev/ + install -d ${D}${sysconfdir}/pcmcia/ + install -d ${D}${sysconfdir}/udev/rules.d/ + + install -m 0644 primary-RAM/*.hex ${D}${base_libdir}/firmware/ + install -m 0644 secondary-RAM/rf010804.hex ${D}${base_libdir}/firmware/ + + install -m 0755 ${WORKDIR}/prism-fw.sh ${D}${base_libdir}/udev/ + install -m 0644 ${WORKDIR}/hostap.rules ${D}${sysconfdir}/udev/rules.d/ +} + +PACKAGES = "${PN}" +FILES_${PN} += "${base_libdir}" diff --git a/packages/misc-binary-only/prism-firmware/.mtn2git_empty b/packages/misc-binary-only/prism-firmware/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/packages/misc-binary-only/prism-firmware/.mtn2git_empty diff --git a/packages/misc-binary-only/prism-firmware/hostap.rules b/packages/misc-binary-only/prism-firmware/hostap.rules new file mode 100644 index 0000000000..dece98ae93 --- /dev/null +++ b/packages/misc-binary-only/prism-firmware/hostap.rules @@ -0,0 +1,4 @@ +# +# update firmware on Prism cards (load it to RAM, not to Flash) +# +SUBSYSTEM=="net", KERNEL=="wlan*" RUN="/lib/udev/prism-fw.sh" diff --git a/packages/misc-binary-only/prism-firmware/prism-fw.sh b/packages/misc-binary-only/prism-firmware/prism-fw.sh new file mode 100644 index 0000000000..96a2457f33 --- /dev/null +++ b/packages/misc-binary-only/prism-firmware/prism-fw.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +CARD_ID=`/usr/sbin/hostap_diag $INTERFACE|grep NICID|awk '{print $2}'|sed -e 's/id=0x//'` + +# 801d cards lack even Primary firmware so we cannot use hostap_diag +PRI=/lib/firmware/pm010102.hex +STA=/lib/firmware/rf010804.hex + +if [ $CARD_ID = '800c' ] || [ $CARD_ID = '8013' ] || [ $CARD_ID = '8017' ] || \ + [ $CARD_ID = '801b' ] || [ $CARD_ID = '8022' ] || [ $CARD_ID = '8023' ] ; then + PRI=/lib/firmware/ak010104.hex +elif [ $CARD_ID = '800b' ] || [ $CARD_ID = '8012' ] || [ $CARD_ID = '8016' ] || \ + [ $CARD_ID = '801a' ] ; then + PRI=/lib/firmware/af010104.hex +elif [ $CARD_ID = '800e' ] || [ $CARD_ID = '8015' ] || [ $CARD_ID = '8019' ] || \ + [ $CARD_ID = '801d' ] ; then + PRI=/lib/firmware/pm010102.hex +fi + +DIR=/proc/net/hostap/wlan0 + +if [ ! -d $DIR ]; then + exit 1 +fi + +if grep -q no_pri=1 $DIR/debug; then + /usr/sbin/prism2_srec -gs wlan0 $PRI + /usr/sbin/prism2_srec -gp wlan0 $PRI +fi + +/usr/sbin/prism2_srec -rp wlan0 $STA + diff --git a/packages/misc-binary-only/prism3-firmware_1.8.3.bb b/packages/misc-binary-only/prism3-firmware_1.8.3.bb deleted file mode 100644 index fb8f83afac..0000000000 --- a/packages/misc-binary-only/prism3-firmware_1.8.3.bb +++ /dev/null @@ -1,27 +0,0 @@ -DESCRIPTION = "Firmware for the Prism3 cards" -SECTION = "base" -LICENSE = "Unknown" -PR = "r3" - -SRC_URI = "http://www.red-bean.com/~proski/firmware/${PV}.tar.bz2 \ - http://www.red-bean.com/~proski/firmware/primary.tar.bz2" -S = "${WORKDIR}" - -do_install() { - install -d ${D}${sysconfdir}/pcmcia/ - install -m 0644 primary/pm010102.hex ${D}${sysconfdir}/pcmcia/ - install -m 0644 ${PV}/rf010803.hex ${D}${sysconfdir}/pcmcia/ - cat >${D}${sysconfdir}/pcmcia/README.prism3-firmware <<EOF -To make a prism3 card w/ downloadable firmware work, do the following: - 0.) Install hostap-utils - 1.) Add "needs_reset yes" and "needs_firmware hostap_fw_load" to - the proper interface in /etc/network/interfaces - 2.) echo -e "#!/bin/sh\nifdown wlan0" >> /etc/apm/suspend.d/ifdown - 3.) chmod a+rx /etc/apm/suspend.d/ifdown - 4.) echo -e "#!/bin/sh\nifup wlan0" >> /etc/apm/resume.d/ifup - 5.) chmod a+rx /etc/apm/suspend.d/ifup -EOF -} - -PACKAGE_ARCH = "all" - diff --git a/packages/misc-binary-only/prism3-firmware_1.8.4.bb b/packages/misc-binary-only/prism3-firmware_1.8.4.bb deleted file mode 100644 index 2983ea7710..0000000000 --- a/packages/misc-binary-only/prism3-firmware_1.8.4.bb +++ /dev/null @@ -1,27 +0,0 @@ -DESCRIPTION = "Firmware for the Prism3 cards" -SECTION = "base" -LICENSE = "Unknown" -PR = "r0" - -SRC_URI = "http://www.red-bean.com/~proski/firmware/${PV}.tar.bz2 \ - http://www.red-bean.com/~proski/firmware/primary.tar.bz2" -S = "${WORKDIR}" - -do_install() { - install -d ${D}${sysconfdir}/pcmcia/ - install -m 0644 primary/pm010102.hex ${D}${sysconfdir}/pcmcia/ - install -m 0644 ${PV}/rf010804.hex ${D}${sysconfdir}/pcmcia/ - cat >${D}${sysconfdir}/pcmcia/README.prism3-firmware <<EOF -To make a prism3 card w/ downloadable firmware work, do the following: - 0.) Install hostap-utils - 1.) Add "needs_reset yes" and "needs_firmware hostap_fw_load" to - the proper interface in /etc/network/interfaces - 2.) echo -e "#!/bin/sh\nifdown wlan0" >> /etc/apm/suspend.d/ifdown - 3.) chmod a+rx /etc/apm/suspend.d/ifdown - 4.) echo -e "#!/bin/sh\nifup wlan0" >> /etc/apm/resume.d/ifup - 5.) chmod a+rx /etc/apm/suspend.d/ifup -EOF -} - -PACKAGE_ARCH = "all" - |