summaryrefslogtreecommitdiff
path: root/recipes/wireless-tools
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/wireless-tools
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/wireless-tools')
-rw-r--r--recipes/wireless-tools/wireless-tools.inc50
-rw-r--r--recipes/wireless-tools/wireless-tools/fixheaders.patch34
-rw-r--r--recipes/wireless-tools/wireless-tools/man.patch13
-rwxr-xr-xrecipes/wireless-tools/wireless-tools/wireless-tools.if-pre-up122
-rw-r--r--recipes/wireless-tools/wireless-tools/zzz-wireless.if-pre-up34
-rw-r--r--recipes/wireless-tools/wireless-tools_29.bb3
6 files changed, 256 insertions, 0 deletions
diff --git a/recipes/wireless-tools/wireless-tools.inc b/recipes/wireless-tools/wireless-tools.inc
new file mode 100644
index 0000000000..36ee3eddef
--- /dev/null
+++ b/recipes/wireless-tools/wireless-tools.inc
@@ -0,0 +1,50 @@
+DESCRIPTION = "Tools for the Linux Standard Wireless Extension Subsystem"
+HOMEPAGE = "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html"
+SECTION = "base"
+PRIORITY = "optional"
+LICENSE = "GPL"
+
+SRC_URI += "\
+ http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools.${PV}.tar.gz \
+ file://man.patch;patch=1 \
+ file://wireless-tools.if-pre-up \
+ file://zzz-wireless.if-pre-up"
+S = "${WORKDIR}/wireless_tools.${PV}"
+
+CFLAGS =+ "-I${S}"
+
+EXTRA_OEMAKE = "-e 'BUILD_SHARED=y' \
+ 'INSTALL_DIR=${D}${base_sbindir}' \
+ 'INSTALL_LIB=${D}${libdir}' \
+ 'INSTALL_INC=${D}${includedir}' \
+ 'INSTALL_MAN=${D}${mandir}'"
+
+do_compile() {
+ oe_runmake all libiw.a
+}
+
+do_stage() {
+ install -m 0644 wireless.h ${STAGING_INCDIR}/
+ install -m 0644 iwlib.h ${STAGING_INCDIR}/
+ oe_libinstall -a -so libiw ${STAGING_LIBDIR}/
+}
+
+do_install() {
+ oe_runmake PREFIX=${D} install-iwmulticall install-dynamic install-man install-hdr
+ install -d ${D}${sbindir}
+ install -m 0755 ifrename ${D}${sbindir}/ifrename
+ install -d ${D}${sysconfdir}/network/if-pre-up.d
+ install ${WORKDIR}/wireless-tools.if-pre-up ${D}${sysconfdir}/network/if-pre-up.d/wireless-tools
+ install ${WORKDIR}/zzz-wireless.if-pre-up ${D}${sysconfdir}/network/if-pre-up.d/zzz-wireless
+}
+
+PACKAGES += "libiw libiw-dev libiw-doc libiw-dbg ifrename ifrename-dbg ifrename-doc"
+FILES_libiw += "${libdir}/*.so.*"
+FILES_libiw-dbg += "${libdir}/.debug/*.so.*"
+FILES_libiw-dev += "${libdir}/*.a ${libdir}/*.so ${includedir}"
+FILES_libiw-doc += "${mandir}/man7"
+FILES_ifrename += "${sbindir}/ifrename"
+FILES_ifrename-dbg += "${sbindir}/.debug/ifrename"
+FILES_ifrename-doc += "${mandir}/man8/ifrename.8 ${mandir}/man5/iftab.5"
+FILES_${PN} += "${bindir} ${sbindir}/iw* ${base_sbindir} ${base_bindir} ${sysconfdir}/network"
+FILES_${PN}-doc += "${mandir}/man8"
diff --git a/recipes/wireless-tools/wireless-tools/fixheaders.patch b/recipes/wireless-tools/wireless-tools/fixheaders.patch
new file mode 100644
index 0000000000..670804e502
--- /dev/null
+++ b/recipes/wireless-tools/wireless-tools/fixheaders.patch
@@ -0,0 +1,34 @@
+Index: wireless_tools.27/wireless.17.h
+===================================================================
+--- wireless_tools.27.orig/wireless.17.h 2004-08-27 15:04:41.000000000 -0400
++++ wireless_tools.27/wireless.17.h 2005-01-19 21:13:25.343064024 -0500
+@@ -71,9 +71,9 @@
+
+ /* To minimise problems in user space, I might remove those headers
+ * at some point. Jean II */
+-#include <linux/types.h> /* for "caddr_t" et al */
+-#include <linux/socket.h> /* for "struct sockaddr" et al */
+-#include <linux/if.h> /* for IFNAMSIZ and co... */
++#include <asm/types.h> /* for "caddr_t" et al */
++#include <sys/socket.h> /* for "struct sockaddr" et al */
++#include <net/if.h> /* for IFNAMSIZ and co... */
+
+ /***************************** VERSION *****************************/
+ /*
+Index: wireless_tools.27/iwlib.h
+===================================================================
+--- wireless_tools.27.orig/iwlib.h 2004-10-28 20:09:47.000000000 -0400
++++ wireless_tools.27/iwlib.h 2005-01-19 21:13:47.438704976 -0500
+@@ -123,9 +123,9 @@
+ #endif /* LIBC5_HEADERS */
+
+ /* Those 3 headers were previously included in wireless.h */
+-#include <linux/types.h> /* for "caddr_t" et al */
+-#include <linux/socket.h> /* for "struct sockaddr" et al */
+-#include <linux/if.h> /* for IFNAMSIZ and co... */
++#include <asm/types.h> /* for "caddr_t" et al */
++#include <sys/socket.h> /* for "struct sockaddr" et al */
++#include <net/if.h> /* for IFNAMSIZ and co... */
+
+ /* Private copy of Wireless extensions */
+ #include <wireless.h>
diff --git a/recipes/wireless-tools/wireless-tools/man.patch b/recipes/wireless-tools/wireless-tools/man.patch
new file mode 100644
index 0000000000..fd8cf42773
--- /dev/null
+++ b/recipes/wireless-tools/wireless-tools/man.patch
@@ -0,0 +1,13 @@
+--- wireless_tools.26/Makefile.orig 2003-06-18 03:38:58.000000000 +0200
++++ wireless_tools.26/Makefile 2004-07-03 23:35:29.000000000 +0200
+@@ -57,8 +57,8 @@
+ # Install directories
+ INSTALL_DIR= $(PREFIX)/sbin/
+ INSTALL_LIB= $(PREFIX)/lib/
+-INSTALL_INC= $(PREFIX)/include/
+-INSTALL_MAN= $(PREFIX)/man/
++INSTALL_INC= $(PREFIX)/usr/include/
++INSTALL_MAN= $(PREFIX)/usr/share/man/
+
+ # Use local header if the version of wireless extensions is specified
+ ifdef FORCE_WEXT_VERSION
diff --git a/recipes/wireless-tools/wireless-tools/wireless-tools.if-pre-up b/recipes/wireless-tools/wireless-tools/wireless-tools.if-pre-up
new file mode 100755
index 0000000000..2518a5c834
--- /dev/null
+++ b/recipes/wireless-tools/wireless-tools/wireless-tools.if-pre-up
@@ -0,0 +1,122 @@
+#!/bin/sh
+
+case "$METHOD" in loopback) exit 0 ;; esac
+
+IWCONFIG=/sbin/iwconfig
+IWPRIV=/sbin/iwpriv
+
+if [ ! -x $IWCONFIG ]; then
+ exit 0
+fi
+
+# Detect and do nothing for linux-wlan-ng interfaces;
+# which are configured by thier own if-pre-up script.
+if [ -n "$IF_WIRELESS_TYPE" -a "$IF_WIRELESS_TYPE" = "wlan-ng" ]; then
+ exit 0
+fi
+
+if [ -n "$IF_NEEDS_RESET" ]; then
+ $IWPRIV "$IFACE" reset 1
+ sleep 1
+fi
+
+if [ -n "$IF_NEEDS_FIRMWARE" ]; then
+ $IF_NEEDS_FIRMWARE "$IFACE"
+fi
+
+if [ -n "$IF_WIRELESS_SENS" ]; then
+ $IWCONFIG "$IFACE" sens $IF_WIRELESS_SENS
+fi
+
+if [ -n "$IF_WIRELESS_RATE" ]; then
+ $IWCONFIG "$IFACE" rate $IF_WIRELESS_RATE
+fi
+
+if [ -n "$IF_WIRELESS_RTS" ]; then
+ $IWCONFIG "$IFACE" rts $IF_WIRELESS_RTS
+fi
+
+if [ -n "$IF_WIRELESS_FRAG" ]; then
+ $IWCONFIG "$IFACE" frag $IF_WIRELESS_FRAG
+fi
+
+if [ -n "$IF_WIRELESS_POWER" ]; then
+ $IWCONFIG "$IFACE" power $IF_WIRELESS_POWER
+fi
+
+if [ -n "$IF_WIRELESS_POWERPERIOD" ]; then
+ $IWCONFIG "$IFACE" power period $IF_WIRELESS_POWERPERIOD
+fi
+
+if [ -n "$IF_WIRELESS_POWERTIMEOUT" ]; then
+ $IWCONFIG "$IFACE" power timeout $IF_WIRELESS_POWERTIMEOUT
+fi
+
+if [ -n "$IF_WIRELESS_TXPOWER" ]; then
+ $IWCONFIG "$IFACE" txpower $IF_WIRELESS_TXPOWER
+fi
+
+if [ -n "$IF_WIRELESS_RETRY" ]; then
+ $IWCONFIG "$IFACE" retry $IF_WIRELESS_RETRY
+fi
+
+if [ -n "$IF_WIRELESS_NICK" ]; then
+ $IWCONFIG "$IFACE" nick "$IF_WIRELESS_NICK"
+fi
+
+if [ -n "$IF_WIRELESS_NWID" ]; then
+ $IWCONFIG "$IFACE" nwid "$IF_WIRELESS_NWID"
+fi
+
+if [ -n "$IF_WIRELESS_ENC" ]; then
+ eval $IWCONFIG "$IFACE" enc $IF_WIRELESS_ENC
+fi
+
+if [ -n "$IF_WIRELESS_KEY" ]; then
+ eval $IWCONFIG "$IFACE" key $IF_WIRELESS_KEY
+fi
+
+if [ -n "$IF_WIRELESS_KEY1" ]; then
+ $IWCONFIG "$IFACE" key [1] "$IF_WIRELESS_KEY1"
+fi
+
+if [ -n "$IF_WIRELESS_KEY2" ]; then
+ $IWCONFIG "$IFACE" key [2] "$IF_WIRELESS_KEY2"
+fi
+
+if [ -n "$IF_WIRELESS_KEY3" ]; then
+ $IWCONFIG "$IFACE" key [3] "$IF_WIRELESS_KEY3"
+fi
+
+if [ -n "$IF_WIRELESS_KEY4" ]; then
+ $IWCONFIG "$IFACE" key [4] "$IF_WIRELESS_KEY4"
+fi
+
+if [ -n "$IF_WIRELESS_DEFAULTKEY" ]; then
+ $IWCONFIG "$IFACE" key ["$IF_WIRELESS_DEFAULTKEY"]
+fi
+
+if [ -n "$IF_WIRELESS_KEYMODE" ]; then
+ $IWCONFIG "$IFACE" key "$IF_WIRELESS_KEYMODE"
+fi
+
+if [ -n "$IF_WIRELESS_MODE" ]; then
+ $IWCONFIG "$IFACE" mode $IF_WIRELESS_MODE
+fi
+
+if [ -n "$IF_WIRELESS_FREQ" ]; then
+ $IWCONFIG "$IFACE" freq $IF_WIRELESS_FREQ
+fi
+
+if [ -n "$IF_WIRELESS_CHANNEL" ]; then
+ $IWCONFIG "$IFACE" channel $IF_WIRELESS_CHANNEL
+fi
+
+if [ -n "$IF_WIRELESS_ESSID" ]; then
+ $IWCONFIG "$IFACE" essid "$IF_WIRELESS_ESSID"
+fi
+
+if [ -n "$IF_WIRELESS_COMMIT" ]; then
+ $IWCONFIG "$IFACE" commit
+fi
+
diff --git a/recipes/wireless-tools/wireless-tools/zzz-wireless.if-pre-up b/recipes/wireless-tools/wireless-tools/zzz-wireless.if-pre-up
new file mode 100644
index 0000000000..85fcc87a99
--- /dev/null
+++ b/recipes/wireless-tools/wireless-tools/zzz-wireless.if-pre-up
@@ -0,0 +1,34 @@
+#!/bin/sh
+#
+# /etc/network/if-pre-up.d/zzz-wireless
+# by Stefan Tomanek (stefan@pico.ruhr.de)
+
+
+IWCONFIG=/sbin/iwconfig
+IFCONFIG=/sbin/ifconfig
+GREP=/bin/grep
+LOGGER=/usr/bin/logger
+SLEEP=/bin/sleep
+
+# How long do we wait for association?
+RETRIES=15
+SLEEPTIME=1
+
+# Only sleep if we use DHCP (add others methods seperated by spaces)
+ONLY_FOR="dhcp"
+
+if [ -z "$IF_WIRELESS_TYPE" ] && echo "$ONLY_FOR" | grep -q "$METHOD" ; then
+ $IFCONFIG $IFACE up
+ $LOGGER Checking for WLAN association...
+ while ( [ $RETRIES -gt 0 ] && ($IWCONFIG "$IFACE" | $GREP -q "Access Point: Not-Associated") ); do
+ $LOGGER No association yet, $RETRIES retries until timeout
+ RETRIES=$(($RETRIES-1))
+ $SLEEP $SLEEPTIME
+ done
+
+ if [ $RETRIES -eq 0 ]; then
+ $LOGGER Timeout waiting for association, continuing anyway...
+ else
+ $LOGGER Found association!
+ fi
+fi
diff --git a/recipes/wireless-tools/wireless-tools_29.bb b/recipes/wireless-tools/wireless-tools_29.bb
new file mode 100644
index 0000000000..e5c498bbfa
--- /dev/null
+++ b/recipes/wireless-tools/wireless-tools_29.bb
@@ -0,0 +1,3 @@
+require wireless-tools.inc
+
+PR = "r1"