From 382b4195ce40ef4f6d406d94d7aa3a68396fc8a8 Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Thu, 20 Apr 2017 17:23:23 +0800 Subject: odp: add recipes Signed-off-by: Chunrong Guo Signed-off-by: Otavio Salvador --- recipes-extended/odp/odp-counters_git.bb | 14 +++++ recipes-extended/odp/odp-module_git.bb | 16 ++++++ recipes-extended/odp/odp.inc | 24 +++++++++ .../odp/odp/disable-the-Werror-flag.patch | 19 +++++++ recipes-extended/odp/odp_git.bb | 63 ++++++++++++++++++++++ 5 files changed, 136 insertions(+) create mode 100644 recipes-extended/odp/odp-counters_git.bb create mode 100644 recipes-extended/odp/odp-module_git.bb create mode 100644 recipes-extended/odp/odp.inc create mode 100644 recipes-extended/odp/odp/disable-the-Werror-flag.patch create mode 100644 recipes-extended/odp/odp_git.bb diff --git a/recipes-extended/odp/odp-counters_git.bb b/recipes-extended/odp/odp-counters_git.bb new file mode 100644 index 00000000..860dd5fa --- /dev/null +++ b/recipes-extended/odp/odp-counters_git.bb @@ -0,0 +1,14 @@ +require odp.inc + +inherit module + +do_compile_prepend () { + export KERNEL_PATH="${STAGING_KERNEL_DIR}" + export KERNEL_CFG_PATH="${STAGING_KERNEL_BUILDDIR}" + cd ${S}/test/debug/perf_counters +} + +do_install () { + install -d ${D}/lib/modules/${KERNEL_VERSION}/odp + install -m 755 ${S}/test/debug/perf_counters/odpfsl_perfcounters.ko ${D}/lib/modules/${KERNEL_VERSION}/odp +} diff --git a/recipes-extended/odp/odp-module_git.bb b/recipes-extended/odp/odp-module_git.bb new file mode 100644 index 00000000..46b89654 --- /dev/null +++ b/recipes-extended/odp/odp-module_git.bb @@ -0,0 +1,16 @@ +require odp.inc + +inherit module + +do_compile_prepend () { + export KERNEL_PATH="${STAGING_KERNEL_DIR}" + export KERNEL_CFG_PATH="${STAGING_KERNEL_BUILDDIR}" + cd ${S}/kern +} + +do_install () { + install -d ${D}/lib/modules/${KERNEL_VERSION}/odp + install -m 755 ${S}/kern/odpfsl_kni.ko ${D}/lib/modules/${KERNEL_VERSION}/odp +} + +PKG_${PN} = "kernel-module-${PN}" diff --git a/recipes-extended/odp/odp.inc b/recipes-extended/odp/odp.inc new file mode 100644 index 00000000..172b81c8 --- /dev/null +++ b/recipes-extended/odp/odp.inc @@ -0,0 +1,24 @@ +SUMMARY = "Open Data Plane Interface Implementation" +DESCRIPTION = "OpenDataPlane (ODP) provides a data plane application programming \ + environment that is easy to use, high performance, and portable between networking SoCs." +HOMEPAGE = "http://www.opendataplane.org" +SECTION = "console/network" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=4ccfa994aa96974cfcd39a59faee20a2" + +FILESEXTRAPATHS_prepend := "${THISDIR}/odp:" + +SRC_URI = " \ +git://git.freescale.com/ppc/sdk/odp.git;nobranch=1 \ +git://git.freescale.com/ppc/sdk/qbman_userspace.git;nobranch=1;name=qbman;destsuffix=git/platform/linux-dpaa2/flib/qbman \ +git://git.freescale.com/ppc/sdk/flib.git;nobranch=1;name=rta;destsuffix=git/platform/linux-dpaa2/flib/rta \ +" +SRC_URI += "file://disable-the-Werror-flag.patch" + +SRCREV = "a8935384642f5da8236260dd553c52dbbc7c63ed" +SRCREV_qbman = "0b8648d702f701417cd6cc3cbcdc228e640d20b6" +SRCREV_rta = "bbab28b03ae21c52ce913f8b052acf53bd24ff5d" + +S = "${WORKDIR}/git" + +COMPATIBLE_MACHINE = "(ls1043a|ls1046a|ls2080a|ls2088a)" diff --git a/recipes-extended/odp/odp/disable-the-Werror-flag.patch b/recipes-extended/odp/odp/disable-the-Werror-flag.patch new file mode 100644 index 00000000..3ba1c060 --- /dev/null +++ b/recipes-extended/odp/odp/disable-the-Werror-flag.patch @@ -0,0 +1,19 @@ +Patch to disable the Werror flag. + +Werror flag is causing the code compilaton error when +ubuntu toolchain is used to compile the code in Dash. +This patch disables the Werror flag to avoid such errors. + +Signed-off-by: Sandeep Malik + +--- a/configure.acold 2017-04-19 17:40:58.312258373 +0800 ++++ b/configure.ac 2017-04-19 17:41:22.820257525 +0800 +@@ -249,7 +249,7 @@ + ########################################################################## + # Default warning setup + ########################################################################## +-ODP_CFLAGS="$ODP_CFLAGS -W -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes" ++ODP_CFLAGS="$ODP_CFLAGS -W -Wall -Wstrict-prototypes -Wmissing-prototypes" + ODP_CFLAGS="$ODP_CFLAGS -Wmissing-declarations -Wold-style-definition -Wpointer-arith" + ODP_CFLAGS="$ODP_CFLAGS -Wcast-align -Wnested-externs -Wcast-qual -Wformat-nonliteral" + ODP_CFLAGS="$ODP_CFLAGS -Wformat-security -Wundef -Wwrite-strings" diff --git a/recipes-extended/odp/odp_git.bb b/recipes-extended/odp/odp_git.bb new file mode 100644 index 00000000..32e31072 --- /dev/null +++ b/recipes-extended/odp/odp_git.bb @@ -0,0 +1,63 @@ +require odp.inc + +inherit autotools-brokensep + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +DEPENDS = "openssl cunit libxml2" + +RDEPENDS_${PN} = "bash libcrypto libssl odp-module odp-counters" + +ODP_SOC ?= "" +ODP_SOC_ls1043ardb = "LS1043" +ODP_SOC_ls1046ardb = "LS1046" +ODP_PLATFORM ?= "linux-dpaa2" +ODP_PLATFORM_ls1043ardb = "linux-dpaa1" +ODP_PLATFORM_ls1046ardb = "linux-dpaa1" +ODP_BUILD_TYPE ?= "ls2088" +ODP_BUILD_TYPE_ls1043ardb = "ls1043" +ODP_BUILD_TYPE_ls1046ardb = "ls1046" +ODP_BUILD_TYPE_ls2080ardb = "ls2080" + +EXTRA_OECONF = "--with-platform=${ODP_PLATFORM} \ + --with-sdk-install-path=${STAGING_DIR_TARGET} \ + --enable-build-type=${ODP_BUILD_TYPE} \ + --enable-test-vald \ + --enable-test-perf \ + --enable-test-cpp \ +" + +EXTRA_OEMAKE = "CROSS_COMPILE="${TARGET_PREFIX}" \ + SYSROOT="${STAGING_DIR_TARGET}" \ +" + +PACKAGECONFIG[perf] = "--enable-test-perf,,," + +do_configure_prepend () { + export SOC=${ODP_SOC} + ${S}/bootstrap +} + +do_compile_prepend () { + export SOC=${ODP_SOC} + export ARCH=${TUNE_ARCH} +} + +do_install_append () { + install -d ${D}${includedir}/odp/kni + install -d ${D}${includedir}/odp/kern + install -d ${D}${includedir}/odp/flib/mc + install -d ${D}${includedir}/odp/flib/qbman/include/drivers + + cp -rf ${S}/platform/linux-dpaa2/include/* ${D}${includedir}/odp/ + cp -rf ${S}/platform/linux-dpaa2/kni/*.h ${D}${includedir}/odp/kni/ + cp -rf ${S}/kern/*.h ${D}${includedir}/odp/kern/ + cp -rf ${S}/platform/linux-dpaa2/flib/mc/*.h ${D}${includedir}/odp/flib/mc/ + cp -rf ${S}/platform/linux-dpaa2/flib/qbman/include/drivers/*.h ${D}${includedir}/odp/flib/qbman/include/drivers + + sed -i -e 's#platform/linux-dpaa2/##g' ${D}${includedir}/odp/kern/*.h +} + +FILES_${PN}-staticdev += "${datadir}/opendataplane/*.la" +FILES_${PN} += "/usr/odp/bin /usr/odp/scripts /usr/odp/debug /usr/odp/test/validation /usr/odp/test/performance /usr/odp/test/miscellaneous /usr/odp/test/api_test" +FILES_${PN}-dbg += "/usr/odp/bin/.debug /usr/odp/debug/.debug /usr/odp/test/validation/.debug /usr/odp/test/performance/.debug /usr/odp/test/miscellaneous/.debug /usr/odp/test/api_test/.debug" -- cgit v1.2.3-54-g00ecf