aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChunrong Guo <chunrong.guo@nxp.com>2019-07-10 16:11:47 +0800
committerOtavio Salvador <otavio@ossystems.com.br>2019-07-12 17:18:34 -0300
commit1f2384233d0f51afd9ef88d01b627af4a7b19aea (patch)
tree9bfb28abff85567304cbb5fe148d80209d04981a
parentb7bf801bf6fc9c7b210602c933bbb8c42b92518d (diff)
downloadmeta-freescale-1f2384233d0f51afd9ef88d01b627af4a7b19aea.tar.gz
meta-freescale-1f2384233d0f51afd9ef88d01b627af4a7b19aea.tar.bz2
meta-freescale-1f2384233d0f51afd9ef88d01b627af4a7b19aea.zip
dpdkvpp: add recipes
*update to lsdk 1906 tag include the following changes: 0123ced - Merge pull request #966 in GITAM/dpdk from 18.11-qoriq-dev to 18.11-qoriq 9e58741 - Merge pull request #965 in GITAM/dpdk from 18.11-qoriq-dev-ppfe to 18.11-qoriq-dev 87b8c52 - net/ppfe: add checksum offload in capability ae172a2 - bus/dpaa: fix incorrect rte_free of malloc memory Signed-off-by: Chunrong Guo <chunrong.guo@nxp.com>
-rw-r--r--recipes-extended/vpp-core/dpdkvpp.bb109
-rw-r--r--recipes-extended/vpp-core/dpdkvpp/0001-Add-RTE_KERNELDIR_OUT.patch26
-rw-r--r--recipes-extended/vpp-core/dpdkvpp/0001-add-Wno-cast-function-type.patch27
-rw-r--r--recipes-extended/vpp-core/dpdkvpp/0004-update-WERROR_FLAGS.patch39
-rw-r--r--recipes-extended/vpp-core/dpdkvpp/add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch51
5 files changed, 252 insertions, 0 deletions
diff --git a/recipes-extended/vpp-core/dpdkvpp.bb b/recipes-extended/vpp-core/dpdkvpp.bb
new file mode 100644
index 00000000..09e913e8
--- /dev/null
+++ b/recipes-extended/vpp-core/dpdkvpp.bb
@@ -0,0 +1,109 @@
+DESCRIPTION = "Data Plane Development Kit"
+HOMEPAGE = "http://dpdk.org"
+LICENSE = "BSD-3-Clause & LGPLv2 & GPLv2"
+LIC_FILES_CHKSUM = "file://license/README;md5=3383def2d4c82237df281174e981a492"
+
+SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/dpdk;nobranch=1 \
+ file://add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch \
+ file://0001-add-Wno-cast-function-type.patch \
+ file://0001-Add-RTE_KERNELDIR_OUT.patch \
+ file://0004-update-WERROR_FLAGS.patch \
+"
+SRCREV = "0123ced10233e7de8a72f743e2ae7e9791124f07"
+
+RDEPENDS_${PN} += "python-subprocess"
+DEPENDS = "virtual/kernel openssl"
+do_configure[depends] += "virtual/kernel:do_shared_workdir"
+
+inherit module
+
+export RTE_TARGET = "${ARCH}-dpaa-linuxapp-gcc"
+export RTE_OUTPUT = "${S}/${RTE_TARGET}"
+
+S = "${WORKDIR}/git"
+
+EXTRA_OEMAKE += 'ETHTOOL_LIB_PATH="${S}/examples/ethtool/lib/${RTE_TARGET}" RTE_SDK="${S}" \
+ OPENSSL_PATH="${STAGING_DIR_HOST}" RTE_KERNELDIR="${STAGING_KERNEL_DIR}" \
+ RTE_KERNELDIR_OUT="${STAGING_KERNEL_BUILDDIR}" EXAMPLES_BUILD_DIR="${RTE_TARGET}" \
+'
+do_configure () {
+ #############################################################
+ ### default value for prefix is "usr", unsetting it, so it
+ ### will not be concatenated in ${RTE_TARGET}/Makefile
+ ### which will cause compilation failure
+ #############################################################
+ unset prefix
+ oe_runmake O=$RTE_TARGET T=$RTE_TARGET config
+}
+
+do_compile () {
+ unset LDFLAGS TARGET_LDFLAGS BUILD_LDFLAGS
+
+ cd ${S}/${RTE_TARGET}
+ oe_runmake CONFIG_RTE_EAL_IGB_UIO=n CONFIG_RTE_KNI_KMOD=y \
+ CONFIG_RTE_LIBRTE_PMD_OPENSSL=y \
+ EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu" \
+ EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -I${STAGING_INCDIR} -fPIC -mtls-dialect=trad" \
+ CROSS="${TARGET_PREFIX}" \
+ prefix="" LDFLAGS="${TUNE_LDARGS}" WERROR_FLAGS="-w" V=1
+
+ cd ${S}/examples/
+ for APP in l2fwd l3fwd cmdif l2fwd-qdma l2fwd-crypto ipsec-secgw vhost kni ip_fragmentation ip_reassembly; do
+ temp=`basename ${APP}`
+ if [ ${temp} = "ipsec-secgw" ] || [ ${temp} = "l2fwd-crypto" ]; then
+ oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu -fuse-ld=bfd" \
+ EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -I${STAGING_INCDIR}" \
+ CROSS="${TARGET_PREFIX}" -C ${APP} CONFIG_RTE_LIBRTE_PMD_OPENSSL=y O="${S}/examples/${temp}"
+ else
+ oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu -fuse-ld=bfd" \
+ EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -I${STAGING_INCDIR}" \
+ CROSS="${TARGET_PREFIX}" -C ${APP} CONFIG_RTE_LIBRTE_PMD_OPENSSL=y O="${S}/examples/${temp}/"
+ fi
+ done
+
+}
+
+do_install () {
+ oe_runmake O=${RTE_OUTPUT} T= install-runtime DESTDIR=${D}
+ oe_runmake O=${RTE_OUTPUT} T= install-sdk DESTDIR=${D}
+
+ # Install examples
+ install -d 0644 ${D}/${datadir}/dpdk/cmdif/include
+ install -d 0644 ${D}/${datadir}/dpdk/cmdif/lib
+ cp examples/cmdif/lib/client/fsl_cmdif_client.h examples/cmdif/lib/server/fsl_cmdif_server.h \
+ examples/cmdif/lib/shbp/fsl_shbp.h ${D}/${datadir}/dpdk/cmdif/include
+ cp examples/cmdif/lib/${RTE_TARGET}/librte_cmdif.a ${D}/${datadir}/dpdk/cmdif/lib
+ install -d 0644 ${D}/${datadir}/dpdk/examples/ipsec_secgw
+ cp -r ${S}/examples/ipsec-secgw/*.cfg ${D}/${datadir}/dpdk/examples/ipsec_secgw
+ cp -rf ${S}/nxp/* ${D}/${datadir}/dpdk
+
+ # Remove the unneeded dir
+ rm -rf ${D}/${datadir}/${RTE_TARGET}/app
+}
+
+PACKAGES += "${PN}-examples"
+
+FILES_${PN}-dbg += " \
+ ${datadir}/dpdk/.debug \
+ ${datadir}/dpdk/examples/*/.debug \
+ "
+FILES_${PN}-staticdev += "${datadir}/dpdk/cmdif/lib/*.a \
+"
+FILES_${PN}-dev += " \
+ ${datadir}/dpdk/${RTE_TARGET}/.config \
+ ${includedir} \
+ ${includedir}/exec-env \
+ ${datadir}/dpdk/buildtools/ \
+ ${datadir}/dpdk/${RTE_TARGET}/include \
+ ${datadir}/dpdk/${RTE_TARGET}/lib \
+ ${datadir}/dpdk/mk \
+ "
+
+FILES_${PN} += " ${datadir}/ \
+ ${prefix}/sbin/ \
+ ${prefix}/bin/ \
+ ${libdir}/ \
+ "
+FILES_${PN}-examples += " \
+ ${datadir}/examples/* \
+ "
diff --git a/recipes-extended/vpp-core/dpdkvpp/0001-Add-RTE_KERNELDIR_OUT.patch b/recipes-extended/vpp-core/dpdkvpp/0001-Add-RTE_KERNELDIR_OUT.patch
new file mode 100644
index 00000000..64a6876f
--- /dev/null
+++ b/recipes-extended/vpp-core/dpdkvpp/0001-Add-RTE_KERNELDIR_OUT.patch
@@ -0,0 +1,26 @@
+From 4ea737c1d5a185d56ee1d6da18172b389ea90760 Mon Sep 17 00:00:00 2001
+From: Chunrong Guo <chunrong.guo@nxp.com>
+Date: Wed, 3 Jul 2019 08:50:45 +0200
+Subject: [PATCH] Add RTE_KERNELDIR_OUT
+
+Signed-off-by: C.r. Guo <nxa13725@lsv07004.swis.us-cdc01.nxp.com>
+---
+ kernel/linux/kni/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/kernel/linux/kni/Makefile b/kernel/linux/kni/Makefile
+index 282be7b..dfbebdc 100644
+--- a/kernel/linux/kni/Makefile
++++ b/kernel/linux/kni/Makefile
+@@ -20,7 +20,7 @@ MODULE_CFLAGS += -Wall -Werror
+
+ ifeq ($(DISTRIB_ID),Ubuntu)
+ MODULE_CFLAGS += -DUBUNTU_RELEASE_CODE=$(subst .,,$(DISTRIB_RELEASE))
+-UBUNTU_KERNEL_CODE := $(shell echo `grep UTS_RELEASE $(RTE_KERNELDIR)/include/generated/utsrelease.h \
++UBUNTU_KERNEL_CODE := $(shell echo `grep UTS_RELEASE $(RTE_KERNELDIR_OUT)/include/generated/utsrelease.h \
+ | cut -d '"' -f2 | cut -d- -f1,2 | tr .- ,`,1)
+ MODULE_CFLAGS += -D"UBUNTU_KERNEL_CODE=UBUNTU_KERNEL_VERSION($(UBUNTU_KERNEL_CODE))"
+ endif
+--
+2.7.4
+
diff --git a/recipes-extended/vpp-core/dpdkvpp/0001-add-Wno-cast-function-type.patch b/recipes-extended/vpp-core/dpdkvpp/0001-add-Wno-cast-function-type.patch
new file mode 100644
index 00000000..c074eac6
--- /dev/null
+++ b/recipes-extended/vpp-core/dpdkvpp/0001-add-Wno-cast-function-type.patch
@@ -0,0 +1,27 @@
+From beb13be8023beb68499c72e71a79b8f91784e484 Mon Sep 17 00:00:00 2001
+From: "C.r. Guo" <nxa13725@lsv07005.swis.us-cdc01.nxp.com>
+Date: Wed, 27 Mar 2019 09:35:43 +0100
+Subject: [PATCH] add -Wno-cast-function-type
+
+Upstream-Status: Inappropriate [configuration]
+
+---
+ examples/cmdif/lib/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/examples/cmdif/lib/Makefile b/examples/cmdif/lib/Makefile
+index d28badf..4e9851c 100644
+--- a/examples/cmdif/lib/Makefile
++++ b/examples/cmdif/lib/Makefile
+@@ -28,7 +28,7 @@ SRCS-y += server/cmdif_srv_gpp.c
+ SRCS-y += shbp/shbp.c
+
+ CFLAGS += -O3
+-CFLAGS += $(WERROR_FLAGS)
++CFLAGS += $(WERROR_FLAGS) -Wno-cast-function-type -Wno-missing-attributes
+ CFLAGS += -I$(RTE_SDK)/examples/cmdif/lib
+ CFLAGS += -I$(RTE_SDK)/examples/cmdif/lib/client
+ CFLAGS += -I$(RTE_SDK)/examples/cmdif/lib/server
+--
+2.7.4
+
diff --git a/recipes-extended/vpp-core/dpdkvpp/0004-update-WERROR_FLAGS.patch b/recipes-extended/vpp-core/dpdkvpp/0004-update-WERROR_FLAGS.patch
new file mode 100644
index 00000000..9249b2b5
--- /dev/null
+++ b/recipes-extended/vpp-core/dpdkvpp/0004-update-WERROR_FLAGS.patch
@@ -0,0 +1,39 @@
+From 3828a36fa537a187127a1c9b82ce2f5959b88367 Mon Sep 17 00:00:00 2001
+From: Chunrong Guo <chunrong.guo@nxp.com>
+Date: Thu, 4 Jul 2019 08:03:56 +0200
+Subject: [PATCH] update WERROR_FLAGS
+
+Signed-off-by: C.r. Guo <nxa13725@lsv07004.swis.us-cdc01.nxp.com>
+---
+ kernel/linux/kni/Makefile | 2 +-
+ mk/toolchain/gcc/rte.vars.mk | 1 +
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/kernel/linux/kni/Makefile b/kernel/linux/kni/Makefile
+index dfbebdc..8b5c13e 100644
+--- a/kernel/linux/kni/Makefile
++++ b/kernel/linux/kni/Makefile
+@@ -14,7 +14,7 @@ MODULE = rte_kni
+ MODULE_CFLAGS += -I$(SRCDIR) --param max-inline-insns-single=50
+ MODULE_CFLAGS += -I$(RTE_OUTPUT)/include -I$(SRCDIR)/ethtool/ixgbe -I$(SRCDIR)/ethtool/igb
+ MODULE_CFLAGS += -include $(RTE_OUTPUT)/include/rte_config.h
+-MODULE_CFLAGS += -Wall -Werror
++MODULE_CFLAGS += -Wall -Werror -Wno-missing-attributes
+
+ -include /etc/lsb-release
+
+diff --git a/mk/toolchain/gcc/rte.vars.mk b/mk/toolchain/gcc/rte.vars.mk
+index aa94344..81efa1c 100644
+--- a/mk/toolchain/gcc/rte.vars.mk
++++ b/mk/toolchain/gcc/rte.vars.mk
+@@ -49,6 +49,7 @@ WERROR_FLAGS += -Wcast-align -Wnested-externs -Wcast-qual
+ WERROR_FLAGS += -Wformat-nonliteral -Wformat-security
+ WERROR_FLAGS += -Wundef -Wwrite-strings -Wdeprecated
+ WERROR_FLAGS += -Wno-error=pedantic
++WERROR_FLAGS += -Wno-address-of-packed-member
+
+ ifeq ($(RTE_DEVEL_BUILD),y)
+ WERROR_FLAGS += -Werror
+--
+2.7.4
+
diff --git a/recipes-extended/vpp-core/dpdkvpp/add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch b/recipes-extended/vpp-core/dpdkvpp/add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch
new file mode 100644
index 00000000..4657f070
--- /dev/null
+++ b/recipes-extended/vpp-core/dpdkvpp/add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch
@@ -0,0 +1,51 @@
+From 6c8d348190a8cf6c35111913cbf117ca98137e84 Mon Sep 17 00:00:00 2001
+From: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
+Date: Fri, 18 Dec 2015 18:30:47 +0800
+Subject: [PATCH] dpdk v2.2.0: add RTE_KERNELDIR_OUT to split kernel build
+ artifact
+
+Introduce RTE_KERNELDIR_OUT to be the path to which kernel build
+artifacts are located. This is for matching the workflow change
+since Yocto Project v1.8 onwards whereby tmp/work-shared contains
+separate directories for kernel source and kernel artifacts.
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
+---
+ mk/rte.module.mk | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/mk/rte.module.mk b/mk/rte.module.mk
+index 53ed4fe..b7a014b 100644
+--- a/mk/rte.module.mk
++++ b/mk/rte.module.mk
+@@ -77,7 +77,7 @@ build: _postbuild
+ # build module
+ $(MODULE).ko: $(SRCS_LINKS)
+ @if [ ! -f $(notdir Makefile) ]; then ln -nfs $(SRCDIR)/Makefile . ; fi
+- @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) \
++ @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) \
+ CC="$(KERNELCC)" CROSS_COMPILE=$(CROSS) V=$(if $V,1,0)
+
+ # install module in $(RTE_OUTPUT)/kmod
+@@ -88,7 +88,7 @@ $(RTE_OUTPUT)/kmod/$(MODULE).ko: $(MODULE).ko
+
+ # install module
+ modules_install:
+- @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) \
++ @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) \
+ modules_install
+
+ .PHONY: clean
+@@ -98,7 +98,7 @@ clean: _postclean
+ .PHONY: doclean
+ doclean:
+ @if [ ! -f $(notdir Makefile) ]; then ln -nfs $(SRCDIR)/Makefile . ; fi
+- $(Q)$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) clean
++ $(Q)$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) clean
+ @$(foreach FILE,$(SRCS-y) $(SRCS-n) $(SRCS-),\
+ if [ -h $(notdir $(FILE)) ]; then rm -f $(notdir $(FILE)) ; fi ;)
+ @if [ -h $(notdir Makefile) ]; then rm -f $(notdir Makefile) ; fi
+--
+1.9.1