diff options
Diffstat (limited to 'meta/recipes-connectivity/wireless-tools')
7 files changed, 289 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/wireless-tools/wireless-tools/avoid_strip.patch b/meta/recipes-connectivity/wireless-tools/wireless-tools/avoid_strip.patch new file mode 100644 index 0000000000..f34e243de9 --- /dev/null +++ b/meta/recipes-connectivity/wireless-tools/wireless-tools/avoid_strip.patch | |||
@@ -0,0 +1,21 @@ | |||
1 | wireless_tools: Avoid stripping iwmulticall | ||
2 | |||
3 | Upstream-Status: Inappropriate [other] | ||
4 | The removed code was from upstream. | ||
5 | |||
6 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
7 | |||
8 | diff -ur wireless_tools.29.orig/Makefile wireless_tools.29/Makefile | ||
9 | --- wireless_tools.29.orig/Makefile 2011-06-18 11:35:12.183907453 -0500 | ||
10 | +++ wireless_tools.29/Makefile 2011-06-18 11:38:09.995907985 -0500 | ||
11 | @@ -135,9 +135,8 @@ | ||
12 | |||
13 | macaddr: macaddr.o $(IWLIB) | ||
14 | |||
15 | -# Always do symbol stripping here | ||
16 | iwmulticall: iwmulticall.o | ||
17 | - $(CC) $(LDFLAGS) -Wl,-s $(XCFLAGS) -o $@ $^ $(LIBS) | ||
18 | + $(CC) $(LDFLAGS) $(STRIPFLAGS) $(XCFLAGS) -o $@ $^ $(LIBS) | ||
19 | |||
20 | # It's a kind of magic... | ||
21 | wireless.h: | ||
diff --git a/meta/recipes-connectivity/wireless-tools/wireless-tools/ldflags.patch b/meta/recipes-connectivity/wireless-tools/wireless-tools/ldflags.patch new file mode 100644 index 0000000000..6c0d8cbd2e --- /dev/null +++ b/meta/recipes-connectivity/wireless-tools/wireless-tools/ldflags.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | wireless-tools: Remove QA warning: No GNU_HASH in the elf binary | ||
2 | |||
3 | Upstream-Status: Inappropriate [other] | ||
4 | Useful within bitbake environment only. | ||
5 | |||
6 | Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com> | ||
7 | |||
8 | --- | ||
9 | Makefile | 2 +- | ||
10 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
11 | |||
12 | --- wireless_tools.29.orig/Makefile | ||
13 | +++ wireless_tools.29/Makefile | ||
14 | @@ -144,7 +144,7 @@ wireless.h: | ||
15 | |||
16 | # Compilation of the dynamic library | ||
17 | $(DYNAMIC): $(OBJS:.o=.so) | ||
18 | - $(CC) -shared -o $@ -Wl,-soname,$@ $(STRIPFLAGS) $(LIBS) -lc $^ | ||
19 | + $(CC) -shared -o $@ -Wl,-soname,$@ $(LDFLAGS) $(STRIPFLAGS) $(LIBS) -lc $^ | ||
20 | |||
21 | # Compilation of the static library | ||
22 | $(STATIC): $(OBJS:.o=.so) | ||
diff --git a/meta/recipes-connectivity/wireless-tools/wireless-tools/man.patch b/meta/recipes-connectivity/wireless-tools/wireless-tools/man.patch new file mode 100644 index 0000000000..6a757dae76 --- /dev/null +++ b/meta/recipes-connectivity/wireless-tools/wireless-tools/man.patch | |||
@@ -0,0 +1,15 @@ | |||
1 | Upstream-Status: Inappropriate [configuration] | ||
2 | |||
3 | Index: wireless_tools.30/Makefile | ||
4 | =================================================================== | ||
5 | --- wireless_tools.30.orig/Makefile 2014-02-01 00:21:04.148463382 -0800 | ||
6 | +++ wireless_tools.30/Makefile 2014-02-01 00:23:35.448072279 -0800 | ||
7 | @@ -76,7 +76,7 @@ | ||
8 | INSTALL_DIR= $(PREFIX)/sbin | ||
9 | INSTALL_LIB= $(PREFIX)/lib | ||
10 | INSTALL_INC= $(PREFIX)/include | ||
11 | -INSTALL_MAN= $(PREFIX)/man | ||
12 | +INSTALL_MAN= $(PREFIX)/share/man | ||
13 | |||
14 | # Various commands | ||
15 | RM = rm -f | ||
diff --git a/meta/recipes-connectivity/wireless-tools/wireless-tools/remove.ldconfig.call.patch b/meta/recipes-connectivity/wireless-tools/wireless-tools/remove.ldconfig.call.patch new file mode 100644 index 0000000000..3a22c3f1e7 --- /dev/null +++ b/meta/recipes-connectivity/wireless-tools/wireless-tools/remove.ldconfig.call.patch | |||
@@ -0,0 +1,19 @@ | |||
1 | When /etc/ld.so.cache is writeable by user running bitbake then it creates invalid cache | ||
2 | (in my case libstdc++.so cannot be found after building zlib(-native) and I have to call | ||
3 | touch */libstdc++.so && /sbin/ldconfig to fix it. | ||
4 | |||
5 | So remove ldconfig call from make install-libs | ||
6 | |||
7 | Upstream-Status: Inappropriate [disable feature] | ||
8 | |||
9 | diff -uNr wireless_tools.29.orig/Makefile wireless_tools.29/Makefile | ||
10 | --- wireless_tools.29.orig/Makefile 2007-09-18 01:56:46.000000000 +0200 | ||
11 | +++ wireless_tools.29/Makefile 2012-02-15 20:46:41.780763514 +0100 | ||
12 | @@ -163,7 +163,6 @@ | ||
13 | install -m 755 $(DYNAMIC) $(INSTALL_LIB) | ||
14 | ln -sfn $(DYNAMIC) $(INSTALL_LIB)/$(DYNAMIC_LINK) | ||
15 | @echo "*** Don't forget to add $(INSTALL_LIB) to /etc/ld.so.conf, and run ldconfig as root. ***" | ||
16 | - @$(LDCONFIG) || echo "*** Could not run ldconfig ! ***" | ||
17 | |||
18 | # Install the static library | ||
19 | install-static:: $(STATIC) | ||
diff --git a/meta/recipes-connectivity/wireless-tools/wireless-tools/wireless-tools.if-pre-up b/meta/recipes-connectivity/wireless-tools/wireless-tools/wireless-tools.if-pre-up new file mode 100755 index 0000000000..2518a5c834 --- /dev/null +++ b/meta/recipes-connectivity/wireless-tools/wireless-tools/wireless-tools.if-pre-up | |||
@@ -0,0 +1,122 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | case "$METHOD" in loopback) exit 0 ;; esac | ||
4 | |||
5 | IWCONFIG=/sbin/iwconfig | ||
6 | IWPRIV=/sbin/iwpriv | ||
7 | |||
8 | if [ ! -x $IWCONFIG ]; then | ||
9 | exit 0 | ||
10 | fi | ||
11 | |||
12 | # Detect and do nothing for linux-wlan-ng interfaces; | ||
13 | # which are configured by thier own if-pre-up script. | ||
14 | if [ -n "$IF_WIRELESS_TYPE" -a "$IF_WIRELESS_TYPE" = "wlan-ng" ]; then | ||
15 | exit 0 | ||
16 | fi | ||
17 | |||
18 | if [ -n "$IF_NEEDS_RESET" ]; then | ||
19 | $IWPRIV "$IFACE" reset 1 | ||
20 | sleep 1 | ||
21 | fi | ||
22 | |||
23 | if [ -n "$IF_NEEDS_FIRMWARE" ]; then | ||
24 | $IF_NEEDS_FIRMWARE "$IFACE" | ||
25 | fi | ||
26 | |||
27 | if [ -n "$IF_WIRELESS_SENS" ]; then | ||
28 | $IWCONFIG "$IFACE" sens $IF_WIRELESS_SENS | ||
29 | fi | ||
30 | |||
31 | if [ -n "$IF_WIRELESS_RATE" ]; then | ||
32 | $IWCONFIG "$IFACE" rate $IF_WIRELESS_RATE | ||
33 | fi | ||
34 | |||
35 | if [ -n "$IF_WIRELESS_RTS" ]; then | ||
36 | $IWCONFIG "$IFACE" rts $IF_WIRELESS_RTS | ||
37 | fi | ||
38 | |||
39 | if [ -n "$IF_WIRELESS_FRAG" ]; then | ||
40 | $IWCONFIG "$IFACE" frag $IF_WIRELESS_FRAG | ||
41 | fi | ||
42 | |||
43 | if [ -n "$IF_WIRELESS_POWER" ]; then | ||
44 | $IWCONFIG "$IFACE" power $IF_WIRELESS_POWER | ||
45 | fi | ||
46 | |||
47 | if [ -n "$IF_WIRELESS_POWERPERIOD" ]; then | ||
48 | $IWCONFIG "$IFACE" power period $IF_WIRELESS_POWERPERIOD | ||
49 | fi | ||
50 | |||
51 | if [ -n "$IF_WIRELESS_POWERTIMEOUT" ]; then | ||
52 | $IWCONFIG "$IFACE" power timeout $IF_WIRELESS_POWERTIMEOUT | ||
53 | fi | ||
54 | |||
55 | if [ -n "$IF_WIRELESS_TXPOWER" ]; then | ||
56 | $IWCONFIG "$IFACE" txpower $IF_WIRELESS_TXPOWER | ||
57 | fi | ||
58 | |||
59 | if [ -n "$IF_WIRELESS_RETRY" ]; then | ||
60 | $IWCONFIG "$IFACE" retry $IF_WIRELESS_RETRY | ||
61 | fi | ||
62 | |||
63 | if [ -n "$IF_WIRELESS_NICK" ]; then | ||
64 | $IWCONFIG "$IFACE" nick "$IF_WIRELESS_NICK" | ||
65 | fi | ||
66 | |||
67 | if [ -n "$IF_WIRELESS_NWID" ]; then | ||
68 | $IWCONFIG "$IFACE" nwid "$IF_WIRELESS_NWID" | ||
69 | fi | ||
70 | |||
71 | if [ -n "$IF_WIRELESS_ENC" ]; then | ||
72 | eval $IWCONFIG "$IFACE" enc $IF_WIRELESS_ENC | ||
73 | fi | ||
74 | |||
75 | if [ -n "$IF_WIRELESS_KEY" ]; then | ||
76 | eval $IWCONFIG "$IFACE" key $IF_WIRELESS_KEY | ||
77 | fi | ||
78 | |||
79 | if [ -n "$IF_WIRELESS_KEY1" ]; then | ||
80 | $IWCONFIG "$IFACE" key [1] "$IF_WIRELESS_KEY1" | ||
81 | fi | ||
82 | |||
83 | if [ -n "$IF_WIRELESS_KEY2" ]; then | ||
84 | $IWCONFIG "$IFACE" key [2] "$IF_WIRELESS_KEY2" | ||
85 | fi | ||
86 | |||
87 | if [ -n "$IF_WIRELESS_KEY3" ]; then | ||
88 | $IWCONFIG "$IFACE" key [3] "$IF_WIRELESS_KEY3" | ||
89 | fi | ||
90 | |||
91 | if [ -n "$IF_WIRELESS_KEY4" ]; then | ||
92 | $IWCONFIG "$IFACE" key [4] "$IF_WIRELESS_KEY4" | ||
93 | fi | ||
94 | |||
95 | if [ -n "$IF_WIRELESS_DEFAULTKEY" ]; then | ||
96 | $IWCONFIG "$IFACE" key ["$IF_WIRELESS_DEFAULTKEY"] | ||
97 | fi | ||
98 | |||
99 | if [ -n "$IF_WIRELESS_KEYMODE" ]; then | ||
100 | $IWCONFIG "$IFACE" key "$IF_WIRELESS_KEYMODE" | ||
101 | fi | ||
102 | |||
103 | if [ -n "$IF_WIRELESS_MODE" ]; then | ||
104 | $IWCONFIG "$IFACE" mode $IF_WIRELESS_MODE | ||
105 | fi | ||
106 | |||
107 | if [ -n "$IF_WIRELESS_FREQ" ]; then | ||
108 | $IWCONFIG "$IFACE" freq $IF_WIRELESS_FREQ | ||
109 | fi | ||
110 | |||
111 | if [ -n "$IF_WIRELESS_CHANNEL" ]; then | ||
112 | $IWCONFIG "$IFACE" channel $IF_WIRELESS_CHANNEL | ||
113 | fi | ||
114 | |||
115 | if [ -n "$IF_WIRELESS_ESSID" ]; then | ||
116 | $IWCONFIG "$IFACE" essid "$IF_WIRELESS_ESSID" | ||
117 | fi | ||
118 | |||
119 | if [ -n "$IF_WIRELESS_COMMIT" ]; then | ||
120 | $IWCONFIG "$IFACE" commit | ||
121 | fi | ||
122 | |||
diff --git a/meta/recipes-connectivity/wireless-tools/wireless-tools/zzz-wireless.if-pre-up b/meta/recipes-connectivity/wireless-tools/wireless-tools/zzz-wireless.if-pre-up new file mode 100644 index 0000000000..4c8e95bf2a --- /dev/null +++ b/meta/recipes-connectivity/wireless-tools/wireless-tools/zzz-wireless.if-pre-up | |||
@@ -0,0 +1,34 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # /etc/network/if-pre-up.d/zzz-wireless | ||
4 | # by Stefan Tomanek (stefan@pico.ruhr.de) | ||
5 | |||
6 | |||
7 | IWCONFIG=/sbin/iwconfig | ||
8 | IFCONFIG=/sbin/ifconfig | ||
9 | GREP=/bin/grep | ||
10 | LOGGER=/usr/bin/logger | ||
11 | SLEEP=/bin/sleep | ||
12 | |||
13 | # How long do we wait for association? | ||
14 | RETRIES=15 | ||
15 | SLEEPTIME=1 | ||
16 | |||
17 | # Only sleep if we use DHCP (add others methods seperated by spaces) | ||
18 | ONLY_FOR="static dhcp" | ||
19 | |||
20 | if [ -z "$IF_WIRELESS_TYPE" ] && echo "$ONLY_FOR" | grep -q "$METHOD" ; then | ||
21 | $IFCONFIG $IFACE up | ||
22 | $LOGGER Checking for WLAN association... | ||
23 | while ( [ $RETRIES -gt 0 ] && ($IWCONFIG "$IFACE" | $GREP -q "Access Point: Not-Associated") ); do | ||
24 | $LOGGER No association yet, $RETRIES retries until timeout | ||
25 | RETRIES=$(($RETRIES-1)) | ||
26 | $SLEEP $SLEEPTIME | ||
27 | done | ||
28 | |||
29 | if [ $RETRIES -eq 0 ]; then | ||
30 | $LOGGER Timeout waiting for association, continuing anyway... | ||
31 | else | ||
32 | $LOGGER Found association! | ||
33 | fi | ||
34 | fi | ||
diff --git a/meta/recipes-connectivity/wireless-tools/wireless-tools_30.pre9.bb b/meta/recipes-connectivity/wireless-tools/wireless-tools_30.pre9.bb new file mode 100644 index 0000000000..26ecdf3b40 --- /dev/null +++ b/meta/recipes-connectivity/wireless-tools/wireless-tools_30.pre9.bb | |||
@@ -0,0 +1,56 @@ | |||
1 | SUMMARY = "Tools for the Linux Standard Wireless Extension Subsystem" | ||
2 | HOMEPAGE = "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html" | ||
3 | LICENSE = "GPLv2 & (LGPLv2.1 | MPL-1.1 | BSD)" | ||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ | ||
5 | file://iwconfig.c;beginline=1;endline=12;md5=cf710eb1795c376eb10ea4ff04649caf \ | ||
6 | file://iwevent.c;beginline=59;endline=72;md5=d66a10026d4394f0a5b1c5587bce4537 \ | ||
7 | file://sample_enc.c;beginline=1;endline=4;md5=838372be07874260b566bae2f6ed33b6" | ||
8 | SECTION = "base" | ||
9 | PE = "1" | ||
10 | |||
11 | SRC_URI = "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools.${PV}.tar.gz \ | ||
12 | file://wireless-tools.if-pre-up \ | ||
13 | file://zzz-wireless.if-pre-up \ | ||
14 | file://remove.ldconfig.call.patch \ | ||
15 | file://man.patch \ | ||
16 | file://avoid_strip.patch \ | ||
17 | file://ldflags.patch \ | ||
18 | " | ||
19 | SRC_URI[md5sum] = "ca91ba7c7eff9bfff6926b1a34a4697d" | ||
20 | SRC_URI[sha256sum] = "abd9c5c98abf1fdd11892ac2f8a56737544fe101e1be27c6241a564948f34c63" | ||
21 | |||
22 | S = "${WORKDIR}/wireless_tools.30" | ||
23 | |||
24 | CFLAGS =+ "-I${S}" | ||
25 | EXTRA_OEMAKE = "-e 'BUILD_SHARED=y' \ | ||
26 | 'INSTALL_DIR=${D}${base_sbindir}' \ | ||
27 | 'INSTALL_LIB=${D}${libdir}' \ | ||
28 | 'INSTALL_INC=${D}${includedir}' \ | ||
29 | 'INSTALL_MAN=${D}${mandir}'" | ||
30 | |||
31 | do_compile() { | ||
32 | oe_runmake all libiw.a | ||
33 | } | ||
34 | |||
35 | do_install() { | ||
36 | oe_runmake PREFIX=${D} install-iwmulticall install-dynamic install-man install-hdr | ||
37 | install -d ${D}${sbindir} | ||
38 | install -m 0755 ifrename ${D}${sbindir}/ifrename | ||
39 | # Disabled by RP - 20/8/08 - We don't seem to need/use these | ||
40 | #install -d ${D}${sysconfdir}/network/if-pre-up.d | ||
41 | #install ${WORKDIR}/wireless-tools.if-pre-up ${D}${sysconfdir}/network/if-pre-up.d/wireless-tools | ||
42 | #install ${WORKDIR}/zzz-wireless.if-pre-up ${D}${sysconfdir}/network/if-pre-up.d/zzz-wireless | ||
43 | } | ||
44 | |||
45 | PACKAGES = "libiw-dbg ifrename-dbg ${PN}-dbg \ | ||
46 | libiw libiw-dev libiw-doc ifrename-doc ifrename ${PN} ${PN}-doc" | ||
47 | |||
48 | FILES_libiw-dbg = "${libdir}/.debug/*.so.*" | ||
49 | FILES_ifrename-dbg = "${sbindir}/.debug/ifrename" | ||
50 | FILES_libiw = "${libdir}/*.so.*" | ||
51 | FILES_libiw-dev = "${libdir}/*.a ${libdir}/*.so ${includedir}" | ||
52 | FILES_libiw-doc = "${mandir}/man7" | ||
53 | FILES_ifrename = "${sbindir}/ifrename" | ||
54 | FILES_ifrename-doc = "${mandir}/man8/ifrename.8 ${mandir}/man5/iftab.5" | ||
55 | FILES_${PN} = "${bindir} ${sbindir}/iw* ${base_sbindir} ${base_bindir} ${sysconfdir}/network" | ||
56 | FILES_${PN}-doc = "${mandir}" | ||