summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2007-06-26 09:44:01 +0000
committerKoen Kooi <koen@openembedded.org>2007-06-26 09:44:01 +0000
commit56d2d617dee05c546ccd9f3aa0eed243f130ffaa (patch)
tree135e50985973145eca8c23d6e42b7e64db8403d3 /packages
parent6882e085a89278ac363da4ffc6fecb7cbc064ecd (diff)
parent7147e81f2ab5b63ef008189773b926138f99d860 (diff)
merge of '129af2bd91ba53785161642a1d0002b55797f5f4'
and '477ae0076f30be01a0a3ccbeffc47b13efb2b7c4'
Diffstat (limited to 'packages')
-rw-r--r--packages/misc-binary-only/prism-firmware.bb30
-rw-r--r--packages/misc-binary-only/prism-firmware/.mtn2git_empty (renamed from packages/prism3-support/.mtn2git_empty)0
-rw-r--r--packages/misc-binary-only/prism-firmware/hostap.rules4
-rw-r--r--packages/misc-binary-only/prism-firmware/prism-fw.sh33
-rw-r--r--packages/misc-binary-only/prism3-firmware_1.8.3.bb27
-rw-r--r--packages/misc-binary-only/prism3-firmware_1.8.4.bb27
-rw-r--r--packages/prism3-support/files/.mtn2git_empty0
-rw-r--r--packages/prism3-support/files/hostap-fw-load26
-rw-r--r--packages/prism3-support/prism3-support_1.0.0.bb15
-rw-r--r--packages/tasks/task-base.bb5
10 files changed, 69 insertions, 98 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..4b18d865da
--- /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 = "r1"
+
+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/prism3-support/.mtn2git_empty b/packages/misc-binary-only/prism-firmware/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/prism3-support/.mtn2git_empty
+++ 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..c58600791c
--- /dev/null
+++ b/packages/misc-binary-only/prism-firmware/prism-fw.sh
@@ -0,0 +1,33 @@
+#!/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
+
+if grep -q pri_only=0 $DIR/debug; then
+ /usr/sbin/prism2_srec -rp wlan0 $STA
+fi
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"
-
diff --git a/packages/prism3-support/files/.mtn2git_empty b/packages/prism3-support/files/.mtn2git_empty
deleted file mode 100644
index e69de29bb2..0000000000
--- a/packages/prism3-support/files/.mtn2git_empty
+++ /dev/null
diff --git a/packages/prism3-support/files/hostap-fw-load b/packages/prism3-support/files/hostap-fw-load
deleted file mode 100644
index 1f37aaf744..0000000000
--- a/packages/prism3-support/files/hostap-fw-load
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-# dont handle non-wireless interfaces
-if [ -z "`grep $IFACE /proc/net/wireless`" ]; then
- exit 0
-fi
-
-if test -e /sbin/cardctl; then
- CARDCTL=/sbin/cardctl
-elif test -e /sbin/pccardctl; then
- CARDCTL=/sbin/pccardctl
-else
- exit 0
-fi
-
-# Special case for prism3 cards needing firmware upload
-# Add more known manfids, if necessary
-
-if [ `$CARDCTL info|grep "d601,0010\|d601,0101"` ]; then
- iwpriv "$IFACE" reset 1
- hostap_fw_load "$IFACE"
-fi
-
-# lets hope that run-parts obeys the order :D
-
-exit 0
diff --git a/packages/prism3-support/prism3-support_1.0.0.bb b/packages/prism3-support/prism3-support_1.0.0.bb
deleted file mode 100644
index bcf571e093..0000000000
--- a/packages/prism3-support/prism3-support_1.0.0.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-DESCRIPTION = "meta-package for prism3 support through ifupdown and hostap_fw_load"
-SECTION = "base"
-LICENSE = "GPL"
-DEPENDS = "prism3-firmware hostap-utils"
-RDEPENDS = "prism3-firmware hostap-utils"
-PACKAGE_ARCH = "all"
-PR = "r5"
-
-SRC_URI = "file://hostap-fw-load"
-
-do_install() {
- install -d ${D}${sysconfdir}/network/if-pre-up.d/
- install -m 0755 ${WORKDIR}/hostap-fw-load ${D}${sysconfdir}/network/if-pre-up.d/
-}
-
diff --git a/packages/tasks/task-base.bb b/packages/tasks/task-base.bb
index d89d781202..0c11eeedc1 100644
--- a/packages/tasks/task-base.bb
+++ b/packages/tasks/task-base.bb
@@ -1,5 +1,5 @@
DESCRIPTION = "Merge machine and distro options to create a basic machine task/package"
-PR = "r36"
+PR = "r37"
DEPENDS = "task-boot"
PROVIDES = "${PACKAGES}"
@@ -196,8 +196,7 @@ RRECOMMENDS_task-base-alsa = "\
RDEPENDS_task-base-pcmcia = "\
${PCMCIA_MANAGER} \
- ${@base_contains('DISTRO_FEATURES', 'wifi', 'prism3-firmware', '',d)} \
- ${@base_contains('DISTRO_FEATURES', 'wifi', 'prism3-support', '',d)} \
+ ${@base_contains('DISTRO_FEATURES', 'wifi', 'prism-firmware', '',d)} \
${@base_contains('DISTRO_FEATURES', 'wifi', 'spectrum-fw', '',d)} \
"