diff options
Diffstat (limited to 'meta/recipes-connectivity/iproute2')
5 files changed, 181 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/iproute2/iproute2.inc b/meta/recipes-connectivity/iproute2/iproute2.inc new file mode 100644 index 0000000000..09ea3d2602 --- /dev/null +++ b/meta/recipes-connectivity/iproute2/iproute2.inc | |||
@@ -0,0 +1,38 @@ | |||
1 | SUMMARY = "TCP / IP networking and traffic control utilities" | ||
2 | DESCRIPTION = "Iproute2 is a collection of utilities for controlling \ | ||
3 | TCP / IP networking and traffic control in Linux. Of the utilities ip \ | ||
4 | and tc are the most important. ip controls IPv4 and IPv6 \ | ||
5 | configuration and tc stands for traffic control." | ||
6 | HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2" | ||
7 | SECTION = "base" | ||
8 | LICENSE = "GPLv2+" | ||
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \ | ||
10 | file://ip/ip.c;beginline=3;endline=8;md5=689d691d0410a4b64d3899f8d6e31817" | ||
11 | |||
12 | DEPENDS = "flex-native bison-native iptables" | ||
13 | |||
14 | inherit update-alternatives | ||
15 | |||
16 | EXTRA_OEMAKE = "CC='${CC}' KERNEL_INCLUDE=${STAGING_INCDIR} DOCDIR=${docdir}/iproute2 SUBDIRS='lib tc ip' SBINDIR='${base_sbindir}' LIBDIR='${libdir}'" | ||
17 | |||
18 | do_install () { | ||
19 | oe_runmake DESTDIR=${D} install | ||
20 | mv ${D}${base_sbindir}/ip ${D}${base_sbindir}/ip.iproute2 | ||
21 | install -d ${D}${datadir} | ||
22 | mv ${D}/share/* ${D}${datadir}/ || true | ||
23 | rm ${D}/share -rf || true | ||
24 | } | ||
25 | |||
26 | # The .so files in iproute2-tc are modules, not traditional libraries | ||
27 | INSANE_SKIP_${PN}-tc = "dev-so" | ||
28 | |||
29 | PACKAGES =+ "${PN}-tc" | ||
30 | FILES_${PN}-tc = "${base_sbindir}/tc* \ | ||
31 | ${libdir}/tc/*.so" | ||
32 | |||
33 | FILES_${PN}-dbg += "${libdir}/tc/.debug" | ||
34 | |||
35 | ALTERNATIVE_${PN} = "ip" | ||
36 | ALTERNATIVE_TARGET[ip] = "${base_sbindir}/ip.${BPN}" | ||
37 | ALTERNATIVE_LINK_NAME[ip] = "${base_sbindir}/ip" | ||
38 | ALTERNATIVE_PRIORITY = "100" | ||
diff --git a/meta/recipes-connectivity/iproute2/iproute2/0001-ip-link-Remove-unnecessary-device-checking.patch b/meta/recipes-connectivity/iproute2/iproute2/0001-ip-link-Remove-unnecessary-device-checking.patch new file mode 100644 index 0000000000..640accefb0 --- /dev/null +++ b/meta/recipes-connectivity/iproute2/iproute2/0001-ip-link-Remove-unnecessary-device-checking.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From 38790ccf7bd0e6eab78024ec381fd98d7c6a2782 Mon Sep 17 00:00:00 2001 | ||
2 | From: vadimk <vadim4j@gmail.com> | ||
3 | Date: Sat, 30 Aug 2014 15:06:00 +0300 | ||
4 | Subject: [PATCH] ip link: Remove unnecessary device checking | ||
5 | |||
6 | The real checking is performed later in iplink_modify(..) func which | ||
7 | checks device existence if NLM_F_CREATE flag is set. | ||
8 | |||
9 | Also it fixes the case when impossible to add veth link which was | ||
10 | caused by 9a02651a87 (ip: check for missing dev arg when doing VF rate) | ||
11 | because these devices are not exist yet. | ||
12 | |||
13 | Signed-off-by: Vadim Kochan <vadim4j@gmail.com> | ||
14 | Acked-by: Oliver Hartkopp <socketcan@hartkopp.net> | ||
15 | Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> | ||
16 | --- | ||
17 | ip/iplink.c | 2 -- | ||
18 | 1 file changed, 2 deletions(-) | ||
19 | |||
20 | diff --git a/ip/iplink.c b/ip/iplink.c | ||
21 | index 1a907d9..ea06871 100644 | ||
22 | --- a/ip/iplink.c | ||
23 | +++ b/ip/iplink.c | ||
24 | @@ -593,8 +593,6 @@ int iplink_parse(int argc, char **argv, struct iplink_req *req, | ||
25 | duparg2("dev", *argv); | ||
26 | *dev = *argv; | ||
27 | dev_index = ll_name_to_index(*dev); | ||
28 | - if (dev_index == 0) | ||
29 | - invarg("Unknown device", *argv); | ||
30 | } | ||
31 | argc--; argv++; | ||
32 | } | ||
33 | -- | ||
34 | 1.7.10.4 | ||
diff --git a/meta/recipes-connectivity/iproute2/iproute2/0001-iproute2-de-bash-scripts.patch b/meta/recipes-connectivity/iproute2/iproute2/0001-iproute2-de-bash-scripts.patch new file mode 100644 index 0000000000..39c7d40319 --- /dev/null +++ b/meta/recipes-connectivity/iproute2/iproute2/0001-iproute2-de-bash-scripts.patch | |||
@@ -0,0 +1,64 @@ | |||
1 | Subject: [PATCH] iproute2: de-bash scripts | ||
2 | |||
3 | de-bash these two scripts to make iproute2 not depend on bash. | ||
4 | |||
5 | Upstream-Status: Pending | ||
6 | |||
7 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
8 | |||
9 | --- | ||
10 | ip/ifcfg | 15 ++++++++------- | ||
11 | ip/rtpr | 2 +- | ||
12 | 2 files changed, 9 insertions(+), 8 deletions(-) | ||
13 | |||
14 | diff --git a/ip/ifcfg b/ip/ifcfg | ||
15 | index 083d9df..60bcf1f 100644 | ||
16 | --- a/ip/ifcfg | ||
17 | +++ b/ip/ifcfg | ||
18 | @@ -1,12 +1,13 @@ | ||
19 | -#! /bin/bash | ||
20 | +#! /bin/sh | ||
21 | |||
22 | CheckForwarding () { | ||
23 | - local sbase fwd | ||
24 | + local sbase fwd forwarding | ||
25 | sbase=/proc/sys/net/ipv4/conf | ||
26 | fwd=0 | ||
27 | if [ -d $sbase ]; then | ||
28 | for dir in $sbase/*/forwarding; do | ||
29 | - fwd=$[$fwd + `cat $dir`] | ||
30 | + forwarding=`cat $dir` | ||
31 | + fwd=$(($fwd+$forwarding)) | ||
32 | done | ||
33 | else | ||
34 | fwd=2 | ||
35 | @@ -127,12 +128,12 @@ fi | ||
36 | arping -q -A -c 1 -I $dev $ipaddr | ||
37 | noarp=$? | ||
38 | ( sleep 2 ; | ||
39 | - arping -q -U -c 1 -I $dev $ipaddr ) >& /dev/null </dev/null & | ||
40 | + arping -q -U -c 1 -I $dev $ipaddr ) > /dev/null 2>&1 </dev/null & | ||
41 | |||
42 | -ip route add unreachable 224.0.0.0/24 >& /dev/null | ||
43 | -ip route add unreachable 255.255.255.255 >& /dev/null | ||
44 | +ip route add unreachable 224.0.0.0/24 > /dev/null 2>&1 | ||
45 | +ip route add unreachable 255.255.255.255 > /dev/null 2>&1 | ||
46 | if [ `ip link ls $dev | grep -c MULTICAST` -ge 1 ]; then | ||
47 | - ip route add 224.0.0.0/4 dev $dev scope global >& /dev/null | ||
48 | + ip route add 224.0.0.0/4 dev $dev scope global > /dev/null 2>&1 | ||
49 | fi | ||
50 | |||
51 | if [ $fwd -eq 0 ]; then | ||
52 | diff --git a/ip/rtpr b/ip/rtpr | ||
53 | index c3629fd..674198d 100644 | ||
54 | --- a/ip/rtpr | ||
55 | +++ b/ip/rtpr | ||
56 | @@ -1,4 +1,4 @@ | ||
57 | -#! /bin/bash | ||
58 | +#! /bin/sh | ||
59 | |||
60 | exec tr "[\\\\]" "[ | ||
61 | ]" | ||
62 | -- | ||
63 | 1.7.9.5 | ||
64 | |||
diff --git a/meta/recipes-connectivity/iproute2/iproute2/configure-cross.patch b/meta/recipes-connectivity/iproute2/iproute2/configure-cross.patch new file mode 100644 index 0000000000..866609ca99 --- /dev/null +++ b/meta/recipes-connectivity/iproute2/iproute2/configure-cross.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From 85b0589b4843c03e8e6fd9416d71ea449a73c5c0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Thu, 3 Nov 2011 10:46:16 +0100 | ||
4 | Subject: [PATCH] make configure cross compile safe | ||
5 | |||
6 | According to Kevin Tian: | ||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
10 | Signed-off-by: Shane Wang <shane.wang@intel.com> | ||
11 | |||
12 | Index: iproute2-3.7.0/configure | ||
13 | =================================================================== | ||
14 | --- iproute2-3.7.0.orig/configure | ||
15 | +++ iproute2-3.7.0/configure | ||
16 | @@ -2,6 +2,7 @@ | ||
17 | # This is not an autconf generated configure | ||
18 | # | ||
19 | INCLUDE=${1:-"$PWD/include"} | ||
20 | +SYSROOT=$1 | ||
21 | |||
22 | # Make a temp directory in build tree. | ||
23 | TMPDIR=$(mktemp -d config.XXXXXX) | ||
24 | @@ -158,7 +159,7 @@ check_ipt_lib_dir() | ||
25 | return | ||
26 | fi | ||
27 | |||
28 | - for dir in /lib /usr/lib /usr/local/lib | ||
29 | + for dir in $SYSROOT/lib $SYSROOT/usr/lib $SYSROOT/usr/local/lib | ||
30 | do | ||
31 | for file in $dir/{xtables,iptables}/lib*t_*so ; do | ||
32 | if [ -f $file ]; then | ||
diff --git a/meta/recipes-connectivity/iproute2/iproute2_3.16.0.bb b/meta/recipes-connectivity/iproute2/iproute2_3.16.0.bb new file mode 100644 index 0000000000..39fe9c83b8 --- /dev/null +++ b/meta/recipes-connectivity/iproute2/iproute2_3.16.0.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | require iproute2.inc | ||
2 | |||
3 | SRC_URI = "${KERNELORG_MIRROR}/linux/utils/net/${BPN}/${BP}.tar.xz \ | ||
4 | file://configure-cross.patch \ | ||
5 | file://0001-iproute2-de-bash-scripts.patch \ | ||
6 | file://0001-ip-link-Remove-unnecessary-device-checking.patch \ | ||
7 | " | ||
8 | SRC_URI[md5sum] = "6c823b40fdcfa7b8120743349a52ac18" | ||
9 | SRC_URI[sha256sum] = "1f0a8a6c0e872166f75433f5cbf9766f3002b5c2f13501b3bb8c51846a127b79" | ||
10 | |||
11 | # CFLAGS are computed in Makefile and reference CCOPTS | ||
12 | # | ||
13 | EXTRA_OEMAKE_append = " CCOPTS='${CFLAGS}'" | ||