Return-Path: Received: from mail-wi0-f170.google.com (mail-wi0-f170.google.com [209.85.212.170]) by mail.openembedded.org (Postfix) with ESMTP id A7F8D60167 for ; Sun, 9 Aug 2015 00:08:40 +0000 (UTC) Received: by wibhh20 with SMTP id hh20so107301345wib.0 for ; Sat, 08 Aug 2015 17:08:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=5IUGCswFIWfMGfLa5OU0lYSOhylTgTZWC9bdPLWjdqY=; b=R5KGUqv0xvfQ0V8GvvGct5L9+A3B3BTG0bQ+Uwzv55zCj40L9HTQ8ut6SqmQfdInC5 x8SELZW7KiTuO42uMGb1nGWNZ2sYMVnzzxoMN+bhVfWZR5/P3X35B6Ub9kVtJiNT3C8W nvwf9jmyegk+f6+kzUWa3+ZHlHdAedyE13A8AvPxz/3YG94UgQgPsGucELpNn6rsa+kL EiyXrCquNRslPpIIggw2YQbWHo+q8PkjfN74I0obO9B1J2Dc/xyTYWeabPofEsO0Ur+M mA+A4bVJ8o27r/EwapdMNBYVGKWedCfd5XjfNWW6SQI058iDB/EIDUncz6SA2lrqFWld EYTQ== X-Received: by 10.180.88.196 with SMTP id bi4mr11388093wib.70.1439078920847; Sat, 08 Aug 2015 17:08:40 -0700 (PDT) Received: from localhost.localdomain ([223.196.115.131]) by smtp.gmail.com with ESMTPSA id j2sm7240920wjq.5.2015.08.08.17.08.36 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 08 Aug 2015 17:08:39 -0700 (PDT) From: Armin Kuster To: openembedded-devel@lists.openembedded.org, joe_macdonald@mentor.com Date: Sun, 9 Aug 2015 05:38:30 +0530 Message-Id: <1439078910-14318-1-git-send-email-akuster808@gmail.com> X-Mailer: git-send-email 2.3.5 Cc: Armin Kuster Subject: [meta-networking][PATCH] netmap v2: add new package X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: openembedded-devel@lists.openembedded.org List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Aug 2015 00:08:45 -0000 From: Armin Kuster this adds netmap, the fast packet I/O framework http://info.iet.unipi.it/~luigi/netmap/ v2: fix config opt typo fix compile on non x86 targets exclude ppc and arm from builds do to issues with kernel headers Signed-off-by: Armin Kuster --- .../netmap/files/makefile_fixup.patch | 79 ++++++++++++++++++++++ .../recipes-kernel/netmap/netmap-modules_git.bb | 51 ++++++++++++++ meta-networking/recipes-kernel/netmap/netmap.inc | 17 +++++ .../recipes-kernel/netmap/netmap_git.bb | 34 ++++++++++ 4 files changed, 181 insertions(+) create mode 100644 meta-networking/recipes-kernel/netmap/files/makefile_fixup.patch create mode 100644 meta-networking/recipes-kernel/netmap/netmap-modules_git.bb create mode 100644 meta-networking/recipes-kernel/netmap/netmap.inc create mode 100644 meta-networking/recipes-kernel/netmap/netmap_git.bb diff --git a/meta-networking/recipes-kernel/netmap/files/makefile_fixup.patch b/meta-networking/recipes-kernel/netmap/files/makefile_fixup.patch new file mode 100644 index 0000000..e838653 --- /dev/null +++ b/meta-networking/recipes-kernel/netmap/files/makefile_fixup.patch @@ -0,0 +1,79 @@ +The makefile assumes building locally. + +Upstream Status: Inappropriate [Native] + +The configure is not auto-make based + +Signed-of-by: Armin Kuster + +Index: LINUX/netmap.mak.in +=================================================================== +--- a/LINUX/netmap.mak.in ++++ b/LINUX/netmap.mak.in +@@ -12,10 +12,8 @@ SRCDIR:=@SRCDIR@ + # The following commands are needed to build the modules as out-of-tree, + # in fact the kernel sources path must be specified. + +-PWD ?= $(CURDIR) +- + # Additional compile flags (e.g. header location) +-EXTRA_CFLAGS := -I$(PWD) -I$(SRCDIR) -I$(SRCDIR)/../sys -I$(SRCDIR)/../sys/dev -DCONFIG_NETMAP ++EXTRA_CFLAGS := -I$(SRCDIR) -I$(SRCDIR)/../sys -I$(SRCDIR)/../sys/dev -DCONFIG_NETMAP + EXTRA_CFLAGS += -Wno-unused-but-set-variable + EXTRA_CFLAGS += $(foreach s,$(SUBSYS),-DCONFIG_NETMAP_$(shell echo $s|tr a-z A-Z)) + +Index: LINUX/configure +=================================================================== +--- a/LINUX/configure ++++ b/LINUX/configure +@@ -311,34 +311,6 @@ reset_tests() { + NEXTTEST=1 + } + +-# run_tests: run all accumulated tests and exec the pertinent +-# success/failure actions for each one. +-run_tests() { +- local t= # prevent -EOF to eat the make TAB +- cat > $TMPDIR/Makefile <<-EOF +- ifneq (\$(KERNELRELEASE),) +- obj-m := $TESTOBJS +- else +- S_DRIVERS := $(drv print) +- all: \$(S_DRIVERS:%=get-%) +- $t \$(MAKE) -C $ksrc M=\$\$PWD $kopts +- +- -include $TOPDIR/drivers.mak +- EOF +- for d in $(drv print); do +- cat >> $TMPDIR/Makefile <<-EOF +- get-$d: +- $t [ -z "\$($d-src)" ] || cp -Rp \$($d-src) \$(if \$($d-dst),\$($d-dst),.) +- EOF +- done +- echo endif >> $TMPDIR/Makefile +- ( +- cd $TMPDIR +- make -k -j $(grep -c processor /proc/cpuinfo) +- ) >> config.log +- eval "$TESTPOSTPROC" +-} +- + configh=netmap_linux_config.h + # succes/failure actions are expected to write some macros + # in netma_linux_config.h. The following functions can be +@@ -555,7 +527,6 @@ configuration. Please check 'config.log' + + reset_tests + add_test true broken_buildsystem < /dev/null +-run_tests + + drvname2config() { + local name=$1 +@@ -1087,7 +1058,6 @@ cat > $configh <<-EOF + EOF + + # the TESTPOSTPROC script will add macros to $configh +-run_tests + + define DRIVER_SUFFIX \"$drvsuffix\" + diff --git a/meta-networking/recipes-kernel/netmap/netmap-modules_git.bb b/meta-networking/recipes-kernel/netmap/netmap-modules_git.bb new file mode 100644 index 0000000..00d334f --- /dev/null +++ b/meta-networking/recipes-kernel/netmap/netmap-modules_git.bb @@ -0,0 +1,51 @@ +require netmap.inc + +DEPENDS = "virtual/kernel" +do_configure[depends] += "virtual/kernel:do_shared_workdir" + +inherit module + +CLEANBROKEN = "1" + +export INSTALL_MOD_DIR="kernel/netmap-modules" + +EXTRA_OECONF = "--kernel-dir=${STAGING_KERNEL_BUILDDIR} \ + --kernel-sources=${STAGING_KERNEL_DIR} \ + --install-mod-path=${D} \ + --driver-suffix="-netmap" \ + " + +LDFLAGS := "${@'${LDFLAGS}'.replace('-Wl,-O1', '')}" +LDFLAGS := "${@'${LDFLAGS}'.replace('-Wl,--as-needed', '')}" + +do_configure () { + cd ${S}/LINUX + ./configure ${EXTRA_OECONF} +} + +do_configure_append () { + cat >> ${S}/LINUX/netmap_linux_config.h <