From c527fd1f14c27855a37f2e8ac5346ce8d940ced2 Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Thu, 16 Oct 2014 03:05:19 +0200 Subject: initial commit for Enea Linux 4.0-140929 Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea --- meta/recipes-connectivity/iproute2/iproute2.inc | 40 ++++++++++++++ .../iproute2/0001-iproute2-de-bash-scripts.patch | 64 ++++++++++++++++++++++ .../iproute2/iproute2/configure-cross.patch | 32 +++++++++++ .../iproute2/iproute2_3.12.0.bb | 13 +++++ 4 files changed, 149 insertions(+) create mode 100644 meta/recipes-connectivity/iproute2/iproute2.inc create mode 100644 meta/recipes-connectivity/iproute2/iproute2/0001-iproute2-de-bash-scripts.patch create mode 100644 meta/recipes-connectivity/iproute2/iproute2/configure-cross.patch create mode 100644 meta/recipes-connectivity/iproute2/iproute2_3.12.0.bb (limited to 'meta/recipes-connectivity/iproute2') diff --git a/meta/recipes-connectivity/iproute2/iproute2.inc b/meta/recipes-connectivity/iproute2/iproute2.inc new file mode 100644 index 0000000000..568aa5f5dd --- /dev/null +++ b/meta/recipes-connectivity/iproute2/iproute2.inc @@ -0,0 +1,40 @@ +SUMMARY = "TCP / IP networking and traffic control utilities" +DESCRIPTION = "Iproute2 is a collection of utilities for controlling \ +TCP / IP networking and traffic control in Linux. Of the utilities ip \ +and tc are the most important. ip controls IPv4 and IPv6 \ +configuration and tc stands for traffic control." +HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2" +SECTION = "base" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \ + file://ip/ip.c;beginline=3;endline=8;md5=689d691d0410a4b64d3899f8d6e31817" + +DEPENDS = "flex-native bison-native iptables" + +inherit update-alternatives + +EXTRA_OEMAKE = "CC='${CC}' KERNEL_INCLUDE=${STAGING_INCDIR} DOCDIR=${docdir}/iproute2 SUBDIRS='lib tc ip' SBINDIR='${base_sbindir}' LIBDIR='${libdir}'" + +do_install () { + oe_runmake DESTDIR=${D} install + mv ${D}${base_sbindir}/ip ${D}${base_sbindir}/ip.iproute2 + install -d ${D}${datadir} + mv ${D}/share/* ${D}${datadir}/ || true + rm ${D}/share -rf || true +} + +# The .so files in iproute2-tc are modules, not traditional libraries +INSANE_SKIP_${PN}-tc = "dev-so" + +PACKAGES =+ "${PN}-tc" +FILES_${PN}-tc = "${base_sbindir}/tc* \ + ${libdir}/tc/*.so" + +FILES_${PN}-dbg += "${libdir}/tc/.debug" + +ALTERNATIVE_${PN} = "ip" +ALTERNATIVE_TARGET[ip] = "${base_sbindir}/ip.${BPN}" +ALTERNATIVE_LINK_NAME[ip] = "${base_sbindir}/ip" +ALTERNATIVE_PRIORITY = "100" + +PARALLEL_MAKE = "" 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 @@ +Subject: [PATCH] iproute2: de-bash scripts + +de-bash these two scripts to make iproute2 not depend on bash. + +Upstream-Status: Pending + +Signed-off-by: Chen Qi + +--- + ip/ifcfg | 15 ++++++++------- + ip/rtpr | 2 +- + 2 files changed, 9 insertions(+), 8 deletions(-) + +diff --git a/ip/ifcfg b/ip/ifcfg +index 083d9df..60bcf1f 100644 +--- a/ip/ifcfg ++++ b/ip/ifcfg +@@ -1,12 +1,13 @@ +-#! /bin/bash ++#! /bin/sh + + CheckForwarding () { +- local sbase fwd ++ local sbase fwd forwarding + sbase=/proc/sys/net/ipv4/conf + fwd=0 + if [ -d $sbase ]; then + for dir in $sbase/*/forwarding; do +- fwd=$[$fwd + `cat $dir`] ++ forwarding=`cat $dir` ++ fwd=$(($fwd+$forwarding)) + done + else + fwd=2 +@@ -127,12 +128,12 @@ fi + arping -q -A -c 1 -I $dev $ipaddr + noarp=$? + ( sleep 2 ; +- arping -q -U -c 1 -I $dev $ipaddr ) >& /dev/null /dev/null 2>&1 & /dev/null +-ip route add unreachable 255.255.255.255 >& /dev/null ++ip route add unreachable 224.0.0.0/24 > /dev/null 2>&1 ++ip route add unreachable 255.255.255.255 > /dev/null 2>&1 + if [ `ip link ls $dev | grep -c MULTICAST` -ge 1 ]; then +- ip route add 224.0.0.0/4 dev $dev scope global >& /dev/null ++ ip route add 224.0.0.0/4 dev $dev scope global > /dev/null 2>&1 + fi + + if [ $fwd -eq 0 ]; then +diff --git a/ip/rtpr b/ip/rtpr +index c3629fd..674198d 100644 +--- a/ip/rtpr ++++ b/ip/rtpr +@@ -1,4 +1,4 @@ +-#! /bin/bash ++#! /bin/sh + + exec tr "[\\\\]" "[ + ]" +-- +1.7.9.5 + 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 @@ +From 85b0589b4843c03e8e6fd9416d71ea449a73c5c0 Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Thu, 3 Nov 2011 10:46:16 +0100 +Subject: [PATCH] make configure cross compile safe + +According to Kevin Tian: +Upstream-Status: Pending + +Signed-off-by: Koen Kooi +Signed-off-by: Shane Wang + +Index: iproute2-3.7.0/configure +=================================================================== +--- iproute2-3.7.0.orig/configure ++++ iproute2-3.7.0/configure +@@ -2,6 +2,7 @@ + # This is not an autconf generated configure + # + INCLUDE=${1:-"$PWD/include"} ++SYSROOT=$1 + + # Make a temp directory in build tree. + TMPDIR=$(mktemp -d config.XXXXXX) +@@ -158,7 +159,7 @@ check_ipt_lib_dir() + return + fi + +- for dir in /lib /usr/lib /usr/local/lib ++ for dir in $SYSROOT/lib $SYSROOT/usr/lib $SYSROOT/usr/local/lib + do + for file in $dir/{xtables,iptables}/lib*t_*so ; do + if [ -f $file ]; then diff --git a/meta/recipes-connectivity/iproute2/iproute2_3.12.0.bb b/meta/recipes-connectivity/iproute2/iproute2_3.12.0.bb new file mode 100644 index 0000000000..8cd9d21317 --- /dev/null +++ b/meta/recipes-connectivity/iproute2/iproute2_3.12.0.bb @@ -0,0 +1,13 @@ +require iproute2.inc + +SRC_URI = "${KERNELORG_MIRROR}/linux/utils/net/${BPN}/${BPN}-${PV}.tar.xz \ + file://configure-cross.patch \ + file://0001-iproute2-de-bash-scripts.patch \ + " + +SRC_URI[md5sum] = "f87386aaaecafab95607fd10e8152c68" +SRC_URI[sha256sum] = "44f600475d27a421688cda2294efec38513473a740c24ead78eb20005f08f111" + +# CFLAGS are computed in Makefile and reference CCOPTS +# +EXTRA_OEMAKE_append = " CCOPTS='${CFLAGS}'" -- cgit v1.2.3-54-g00ecf