summaryrefslogtreecommitdiffstats
path: root/recipes-extended/odp
diff options
context:
space:
mode:
authorChunrong Guo <chunrong.guo@nxp.com>2017-04-20 17:23:23 +0800
committerOtavio Salvador <otavio@ossystems.com.br>2017-05-02 17:54:58 -0300
commit382b4195ce40ef4f6d406d94d7aa3a68396fc8a8 (patch)
treee0a21d5d480af714f016f80d79c7e1cc9b2c6bb9 /recipes-extended/odp
parentfc4edb4833ef2c9fec4890fac129cb87ca4e0dc7 (diff)
downloadmeta-freescale-382b4195ce40ef4f6d406d94d7aa3a68396fc8a8.tar.gz
odp: add recipes
Signed-off-by: Chunrong Guo <B40290@freescale.com> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'recipes-extended/odp')
-rw-r--r--recipes-extended/odp/odp-counters_git.bb14
-rw-r--r--recipes-extended/odp/odp-module_git.bb16
-rw-r--r--recipes-extended/odp/odp.inc24
-rw-r--r--recipes-extended/odp/odp/disable-the-Werror-flag.patch19
-rw-r--r--recipes-extended/odp/odp_git.bb63
5 files changed, 136 insertions, 0 deletions
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 @@
1require odp.inc
2
3inherit module
4
5do_compile_prepend () {
6 export KERNEL_PATH="${STAGING_KERNEL_DIR}"
7 export KERNEL_CFG_PATH="${STAGING_KERNEL_BUILDDIR}"
8 cd ${S}/test/debug/perf_counters
9}
10
11do_install () {
12 install -d ${D}/lib/modules/${KERNEL_VERSION}/odp
13 install -m 755 ${S}/test/debug/perf_counters/odpfsl_perfcounters.ko ${D}/lib/modules/${KERNEL_VERSION}/odp
14}
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 @@
1require odp.inc
2
3inherit module
4
5do_compile_prepend () {
6 export KERNEL_PATH="${STAGING_KERNEL_DIR}"
7 export KERNEL_CFG_PATH="${STAGING_KERNEL_BUILDDIR}"
8 cd ${S}/kern
9}
10
11do_install () {
12 install -d ${D}/lib/modules/${KERNEL_VERSION}/odp
13 install -m 755 ${S}/kern/odpfsl_kni.ko ${D}/lib/modules/${KERNEL_VERSION}/odp
14}
15
16PKG_${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 @@
1SUMMARY = "Open Data Plane Interface Implementation"
2DESCRIPTION = "OpenDataPlane (ODP) provides a data plane application programming \
3 environment that is easy to use, high performance, and portable between networking SoCs."
4HOMEPAGE = "http://www.opendataplane.org"
5SECTION = "console/network"
6LICENSE = "BSD-3-Clause"
7LIC_FILES_CHKSUM = "file://LICENSE;md5=4ccfa994aa96974cfcd39a59faee20a2"
8
9FILESEXTRAPATHS_prepend := "${THISDIR}/odp:"
10
11SRC_URI = " \
12git://git.freescale.com/ppc/sdk/odp.git;nobranch=1 \
13git://git.freescale.com/ppc/sdk/qbman_userspace.git;nobranch=1;name=qbman;destsuffix=git/platform/linux-dpaa2/flib/qbman \
14git://git.freescale.com/ppc/sdk/flib.git;nobranch=1;name=rta;destsuffix=git/platform/linux-dpaa2/flib/rta \
15"
16SRC_URI += "file://disable-the-Werror-flag.patch"
17
18SRCREV = "a8935384642f5da8236260dd553c52dbbc7c63ed"
19SRCREV_qbman = "0b8648d702f701417cd6cc3cbcdc228e640d20b6"
20SRCREV_rta = "bbab28b03ae21c52ce913f8b052acf53bd24ff5d"
21
22S = "${WORKDIR}/git"
23
24COMPATIBLE_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 @@
1Patch to disable the Werror flag.
2
3Werror flag is causing the code compilaton error when
4ubuntu toolchain is used to compile the code in Dash.
5This patch disables the Werror flag to avoid such errors.
6
7Signed-off-by: Sandeep Malik <Sandeep.Malik@nxp.com>
8
9--- a/configure.acold 2017-04-19 17:40:58.312258373 +0800
10+++ b/configure.ac 2017-04-19 17:41:22.820257525 +0800
11@@ -249,7 +249,7 @@
12 ##########################################################################
13 # Default warning setup
14 ##########################################################################
15-ODP_CFLAGS="$ODP_CFLAGS -W -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes"
16+ODP_CFLAGS="$ODP_CFLAGS -W -Wall -Wstrict-prototypes -Wmissing-prototypes"
17 ODP_CFLAGS="$ODP_CFLAGS -Wmissing-declarations -Wold-style-definition -Wpointer-arith"
18 ODP_CFLAGS="$ODP_CFLAGS -Wcast-align -Wnested-externs -Wcast-qual -Wformat-nonliteral"
19 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 @@
1require odp.inc
2
3inherit autotools-brokensep
4
5PACKAGE_ARCH = "${MACHINE_ARCH}"
6
7DEPENDS = "openssl cunit libxml2"
8
9RDEPENDS_${PN} = "bash libcrypto libssl odp-module odp-counters"
10
11ODP_SOC ?= ""
12ODP_SOC_ls1043ardb = "LS1043"
13ODP_SOC_ls1046ardb = "LS1046"
14ODP_PLATFORM ?= "linux-dpaa2"
15ODP_PLATFORM_ls1043ardb = "linux-dpaa1"
16ODP_PLATFORM_ls1046ardb = "linux-dpaa1"
17ODP_BUILD_TYPE ?= "ls2088"
18ODP_BUILD_TYPE_ls1043ardb = "ls1043"
19ODP_BUILD_TYPE_ls1046ardb = "ls1046"
20ODP_BUILD_TYPE_ls2080ardb = "ls2080"
21
22EXTRA_OECONF = "--with-platform=${ODP_PLATFORM} \
23 --with-sdk-install-path=${STAGING_DIR_TARGET} \
24 --enable-build-type=${ODP_BUILD_TYPE} \
25 --enable-test-vald \
26 --enable-test-perf \
27 --enable-test-cpp \
28"
29
30EXTRA_OEMAKE = "CROSS_COMPILE="${TARGET_PREFIX}" \
31 SYSROOT="${STAGING_DIR_TARGET}" \
32"
33
34PACKAGECONFIG[perf] = "--enable-test-perf,,,"
35
36do_configure_prepend () {
37 export SOC=${ODP_SOC}
38 ${S}/bootstrap
39}
40
41do_compile_prepend () {
42 export SOC=${ODP_SOC}
43 export ARCH=${TUNE_ARCH}
44}
45
46do_install_append () {
47 install -d ${D}${includedir}/odp/kni
48 install -d ${D}${includedir}/odp/kern
49 install -d ${D}${includedir}/odp/flib/mc
50 install -d ${D}${includedir}/odp/flib/qbman/include/drivers
51
52 cp -rf ${S}/platform/linux-dpaa2/include/* ${D}${includedir}/odp/
53 cp -rf ${S}/platform/linux-dpaa2/kni/*.h ${D}${includedir}/odp/kni/
54 cp -rf ${S}/kern/*.h ${D}${includedir}/odp/kern/
55 cp -rf ${S}/platform/linux-dpaa2/flib/mc/*.h ${D}${includedir}/odp/flib/mc/
56 cp -rf ${S}/platform/linux-dpaa2/flib/qbman/include/drivers/*.h ${D}${includedir}/odp/flib/qbman/include/drivers
57
58 sed -i -e 's#platform/linux-dpaa2/##g' ${D}${includedir}/odp/kern/*.h
59}
60
61FILES_${PN}-staticdev += "${datadir}/opendataplane/*.la"
62FILES_${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"
63FILES_${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"