summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChunrong Guo <chunrong.guo@nxp.com>2017-03-17 15:51:02 +0800
committerOtavio Salvador <otavio@ossystems.com.br>2017-03-17 17:04:03 -0300
commit4a33957a21273ad50e2356f7e2c54c2ef4966b32 (patch)
tree34920fd4d268ab6b863fee7d86407385c8b2c007
parent7493e87a4d7db0fb4bf2a03d2891b7e056b3c41a (diff)
downloadmeta-freescale-4a33957a21273ad50e2356f7e2c54c2ef4966b32.tar.gz
dpdk/dpdk-extras/ovs-dpdk: add recipe
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
-rw-r--r--recipes-extended/dpdk/dpdk-extras_git.bb27
-rw-r--r--recipes-extended/dpdk/dpdk/0001-include-sys-sysmacros.h-for-major-minor-defintions.patch38
-rw-r--r--recipes-extended/dpdk/dpdk/add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch51
-rw-r--r--recipes-extended/dpdk/dpdk_16.07.bb85
-rw-r--r--recipes-extended/ovs-dpdk/ovs-dpdk_0.1.bb49
5 files changed, 250 insertions, 0 deletions
diff --git a/recipes-extended/dpdk/dpdk-extras_git.bb b/recipes-extended/dpdk/dpdk-extras_git.bb
new file mode 100644
index 00000000..a18c467e
--- /dev/null
+++ b/recipes-extended/dpdk/dpdk-extras_git.bb
@@ -0,0 +1,27 @@
1DESCRIPTION = "Data Plane Development Kit Extended utilities"
2HOMEPAGE = "http://dpdk.org"
3LICENSE = "GPLv2"
4LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=751419260aa954499f7abaabaa882bbe"
5
6RDEPENDS_${PN} = "dpdk"
7
8SRC_URI = "git://git.freescale.com/ppc/sdk/dpdk-extras.git;nobranch=1"
9SRCREV = "ebc515aad0605ad90d8ade5c1fde60d8da86973f"
10
11S = "${WORKDIR}/git"
12
13DPAA_VER ?= "dpaa2"
14DPAA_VER_fsl-lsch2 = "dpaa"
15
16do_install() {
17 install -d ${D}/${bindir}/dpdk-example/extras
18
19 for file_suffix in xml sh; do
20 if [ "`ls ${S}/${DPAA_VER}/*.${file_suffix}`" != "" ]; then
21 install -m 755 ${S}/${DPAA_VER}/*.${file_suffix} ${D}/${bindir}/dpdk-example/extras
22 fi
23 done
24}
25
26PACKAGE_ARCH = "${MACHINE_ARCH}"
27COMPATIBLE_MACHINE = "(ls2080ardb|ls2084ardb|ls2088a|ls1043a|ls1046a)"
diff --git a/recipes-extended/dpdk/dpdk/0001-include-sys-sysmacros.h-for-major-minor-defintions.patch b/recipes-extended/dpdk/dpdk/0001-include-sys-sysmacros.h-for-major-minor-defintions.patch
new file mode 100644
index 00000000..c8940446
--- /dev/null
+++ b/recipes-extended/dpdk/dpdk/0001-include-sys-sysmacros.h-for-major-minor-defintions.patch
@@ -0,0 +1,38 @@
1Subject: [PATCH] include <sys/sysmacros.h> for major/minor defintions
2
3glibc 2.25 is warning about it if applications depend on
4sys/types.h for these macros, it expects to be included
5from <sys/sysmacros.h>
6
7Fixes
8| Grow.c:3534:13: error: In the GNU C Library, "minor" is defined
9| by <sys/sysmacros.h>. For historical compatibility, it is
10| currently defined by <sys/types.h> as well, but we plan to
11| remove this soon. To use "minor", include <sys/sysmacros.h>
12| directly. If you did not intend to use a system-defined macro
13| "minor", you should undefine it after including <sys/types.h>. [-Werror]
14| Query.c: In function 'Query':
15| Query.c:105:13: error: In the GNU C Library, "makedev" is defined
16| by <sys/sysmacros.h>. For historical compatibility, it is
17| currently defined by <sys/types.h> as well, but we plan to
18| remove this soon. To use "makedev", include <sys/sysmacros.h>
19| directly. If you did not intend to use a system-defined macro
20| "makedev", you should undefine it after including <sys/types.h>. [-Werror]
21| makedev((unsigned)disc.major,(unsigned)disc.minor) == stb.st_rdev)
22| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23
24Signed-off-by: Chunrong Guo <chunrong.guo@nxp.com>
25---
26Upstream-Status: Pending
27
28
29--- a/lib/librte_eal/linuxapp/eal/eal_pci_uio.cold 2017-02-27 17:36:15.984931159 +0800
30+++ b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c 2017-02-27 17:36:57.520929721 +0800
31@@ -39,6 +39,7 @@
32 #include <sys/stat.h>
33 #include <sys/mman.h>
34 #include <linux/pci_regs.h>
35+#include <sys/sysmacros.h>
36
37 #if defined(RTE_ARCH_X86)
38 #include <sys/io.h>
diff --git a/recipes-extended/dpdk/dpdk/add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch b/recipes-extended/dpdk/dpdk/add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch
new file mode 100644
index 00000000..4657f070
--- /dev/null
+++ b/recipes-extended/dpdk/dpdk/add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch
@@ -0,0 +1,51 @@
1From 6c8d348190a8cf6c35111913cbf117ca98137e84 Mon Sep 17 00:00:00 2001
2From: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
3Date: Fri, 18 Dec 2015 18:30:47 +0800
4Subject: [PATCH] dpdk v2.2.0: add RTE_KERNELDIR_OUT to split kernel build
5 artifact
6
7Introduce RTE_KERNELDIR_OUT to be the path to which kernel build
8artifacts are located. This is for matching the workflow change
9since Yocto Project v1.8 onwards whereby tmp/work-shared contains
10separate directories for kernel source and kernel artifacts.
11
12Upstream-Status: Inappropriate [configuration]
13
14Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
15---
16 mk/rte.module.mk | 6 +++---
17 1 file changed, 3 insertions(+), 3 deletions(-)
18
19diff --git a/mk/rte.module.mk b/mk/rte.module.mk
20index 53ed4fe..b7a014b 100644
21--- a/mk/rte.module.mk
22+++ b/mk/rte.module.mk
23@@ -77,7 +77,7 @@ build: _postbuild
24 # build module
25 $(MODULE).ko: $(SRCS_LINKS)
26 @if [ ! -f $(notdir Makefile) ]; then ln -nfs $(SRCDIR)/Makefile . ; fi
27- @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) \
28+ @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) \
29 CC="$(KERNELCC)" CROSS_COMPILE=$(CROSS) V=$(if $V,1,0)
30
31 # install module in $(RTE_OUTPUT)/kmod
32@@ -88,7 +88,7 @@ $(RTE_OUTPUT)/kmod/$(MODULE).ko: $(MODULE).ko
33
34 # install module
35 modules_install:
36- @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) \
37+ @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) \
38 modules_install
39
40 .PHONY: clean
41@@ -98,7 +98,7 @@ clean: _postclean
42 .PHONY: doclean
43 doclean:
44 @if [ ! -f $(notdir Makefile) ]; then ln -nfs $(SRCDIR)/Makefile . ; fi
45- $(Q)$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) clean
46+ $(Q)$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) clean
47 @$(foreach FILE,$(SRCS-y) $(SRCS-n) $(SRCS-),\
48 if [ -h $(notdir $(FILE)) ]; then rm -f $(notdir $(FILE)) ; fi ;)
49 @if [ -h $(notdir Makefile) ]; then rm -f $(notdir Makefile) ; fi
50--
511.9.1
diff --git a/recipes-extended/dpdk/dpdk_16.07.bb b/recipes-extended/dpdk/dpdk_16.07.bb
new file mode 100644
index 00000000..380ec396
--- /dev/null
+++ b/recipes-extended/dpdk/dpdk_16.07.bb
@@ -0,0 +1,85 @@
1DESCRIPTION = "Data Plane Development Kit"
2HOMEPAGE = "http://dpdk.org"
3LICENSE = "BSD & LGPLv2 & GPLv2"
4LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=751419260aa954499f7abaabaa882bbe"
5
6DEPENDS += "virtual/kernel openssl"
7RDEPENDS_${PN} = "bash python"
8RDEPENDS_${PN}-examples = "bash python-core"
9
10inherit module
11
12SRC_URI = "git://git.freescale.com/ppc/sdk/dpdk.git;nobranch=1 \
13 file://add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch \
14 file://a.patch \
15"
16SRCREV = "34b69f9ab1af11db43df2d616be1c1f20feef70b"
17
18S = "${WORKDIR}/git"
19
20DPAA_VER ?= "dpaa2"
21DPAA_VER_fsl-lsch2 = "dpaa"
22export RTE_TARGET = "${ARCH}-${DPAA_VER}-linuxapp-gcc"
23
24EXTRA_OEMAKE += 'ARCH="${ARCH}" CROSS="${TARGET_PREFIX}" \
25 CPU_CFLAGS="--sysroot=${STAGING_DIR_HOST}" RTE_SDK="${S}" \
26 OPENSSL_PATH="${STAGING_DIR_HOST}" RTE_KERNELDIR="${STAGING_KERNEL_DIR}" \
27 RTE_KERNELDIR_OUT="${STAGING_KERNEL_BUILDDIR}" \
28'
29
30do_configure[noexec] = "1"
31
32do_compile[depends] += "virtual/kernel:do_shared_workdir"
33do_compile() {
34 oe_runmake O="${RTE_TARGET}" T="${RTE_TARGET}" config
35}
36
37do_install() {
38 unset LDFLAGS TARGET_LDFLAGS BUILD_LDFLAGS
39
40 oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu" T="${RTE_TARGET}" DESTDIR="${D}" install
41
42 # Build and install the DPDK examples
43 for APP in examples/l2fwd examples/l3fwd examples/l2fwd-crypto examples/ipsec-secgw examples/kni; do
44 oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu" -C ${APP}
45
46 [ ! -d ${D}/${bindir}/dpdk-example ] && install -d 0644 ${D}/${bindir}/dpdk-example
47 install -m 0755 ${S}/examples/`basename ${APP}`/build/`basename ${APP}` \
48 ${D}/${bindir}/dpdk-example/
49 done
50 install -m 0755 ${S}/${RTE_TARGET}/app/testpmd ${D}/${bindir}/dpdk-example/
51 rm -fr ${D}/lib/modules/*
52 install -d ${D}/lib/modules/${KERNEL_VERSION}/dpdk
53 install -m 0755 ${S}/${RTE_TARGET}/kmod/rte_kni.ko ${D}/lib/modules/${KERNEL_VERSION}/dpdk/
54
55 sed -i 's#/bin/echo#/bin/bash#' ${D}/${datadir}/scripts/load-devel-config.sh
56 # rm ${S}/${RTE_TARGET}/app/dpdk-pmdinfogen
57 rm ${D}/${datadir}/${RTE_TARGET}/app/dpdk-pmdinfogen
58
59 chown root:root -R ${D}
60}
61
62PACKAGE_ARCH = "${MACHINE_ARCH}"
63
64PACKAGES += "${PN}-examples"
65
66FILES_${PN} += "${datadir}/tools /usr/bin/* /usr/sbin/*"
67FILES_${PN}-dbg += "${bindir}/dpdk-example/.debug \
68 ${datadir}/examples/kni/build/.debug \
69 ${datadir}/examples/kni/build/app/.debug \
70 ${datadir}/examples/l2fwd/build/.debug \
71 ${datadir}/examples/l2fwd/build/app/.debug \
72 ${datadir}/examples/l2fwd-crypto/build/.debug \
73 ${datadir}/examples/l2fwd-crypto/build/app/.debug \
74 ${datadir}/examples/l3fwd/build/.debug \
75 ${datadir}/examples/l3fwd/build/app/.debug \
76 ${datadir}/examples/ipsec-secgw/build/.debug \
77 ${datadir}/examples/ipsec-secgw/build/app/.debug \
78"
79FILES_${PN}-dev += "${datadir}/mk ${datadir}/scripts \
80 ${datadir}/${RTE_TARGET} \
81 ${includedir} \
82"
83FILES_${PN}-examples += "${datadir}/examples"
84
85COMPATIBLE_MACHINE = "(ls2080ardb|ls2084ardb|ls2088a|ls1043a|ls1046a)"
diff --git a/recipes-extended/ovs-dpdk/ovs-dpdk_0.1.bb b/recipes-extended/ovs-dpdk/ovs-dpdk_0.1.bb
new file mode 100644
index 00000000..472ac16e
--- /dev/null
+++ b/recipes-extended/ovs-dpdk/ovs-dpdk_0.1.bb
@@ -0,0 +1,49 @@
1DESCRIPTION = "OVS DPDK"
2LICENSE = "BSD"
3LIC_FILES_CHKSUM = "file://COPYING;md5=17b2c9d4c70853a09c0e143137754b35"
4
5DEPENDS = "dpdk python-six-native"
6RDEPENDS_${PN} = "bash libcrypto libssl python"
7
8inherit pythonnative
9
10SRC_URI = "git://git.freescale.com/ppc/sdk/ovs-dpdk.git;nobranch=1"
11SRCREV = "84599fad4a10597fb4377174abdeb84b871cb4b0"
12
13S = "${WORKDIR}/git"
14
15DPAA_VER ?= "dpaa2"
16DPAA_VER_fsl-lsch2 = "dpaa"
17export RTE_TARGET = "${ARCH}-${DPAA_VER}-linuxapp-gcc"
18
19EXTRA_OEMAKE += 'ARCH="${ARCH}" CROSS="${TARGET_PREFIX}" \
20 CPU_CFLAGS="--sysroot=${STAGING_DIR_HOST}" RTE_SDK="${S}" \
21 OPENSSL_PATH="${STAGING_DIR_HOST}" RTE_KERNELDIR="${STAGING_KERNEL_DIR}" \
22 RTE_KERNELDIR_OUT="${STAGING_KERNEL_BUILDDIR}" \
23'
24
25do_configure() {
26 export SYSROOT_DPDK=${PKG_CONFIG_SYSROOT_DIR}
27 ${S}/boot.sh
28 ${S}/configure --host aarch64-fsl-linux --with-dpdk=${SYSROOT_DPDK}/usr/share/${RTE_TARGET} --with-openssl=${SYSROOT_DPDK}/usr CFLAGS="-g -Wno-cast-align -Ofast"
29}
30
31do_compile() {
32 oe_runmake O="${RTE_TARGET}" T="${RTE_TARGET}"
33}
34
35do_install() {
36 install -d ${D}${bindir}/ovs-dpdk
37 cp -rf ${S}/ovsdb/ovsdb-tool ${D}${bindir}/ovs-dpdk
38 cp -rf ${S}/ovsdb/ovsdb-server ${D}${bindir}/ovs-dpdk
39 cp -rf ${S}/vswitchd/vswitch.ovsschema ${D}${bindir}/ovs-dpdk
40 cp -rf ${S}/vswitchd/ovs-vswitchd ${D}${bindir}/ovs-dpdk
41 cp -rf ${S}/utilities/ovs-vsctl ${D}${bindir}/ovs-dpdk
42 cp -rf ${S}/utilities/ovs-ofctl ${D}${bindir}/ovs-dpdk
43 chmod 777 -R ${D}${bindir}/ovs-dpdk/*
44}
45
46ALLOW_EMPTY_${PN} = "1"
47INHIBIT_PACKAGE_STRIP = "1"
48PACKAGE_ARCH = "${MACHINE_ARCH}"
49COMPATIBLE_MACHINE = "(ls2080ardb|ls2084ardb|ls2088a|ls1043a|ls1046a)"