diff options
-rw-r--r-- | recipes-extended/odp/odp-counters_git.bb | 14 | ||||
-rw-r--r-- | recipes-extended/odp/odp-module_git.bb | 16 | ||||
-rw-r--r-- | recipes-extended/odp/odp.inc | 24 | ||||
-rw-r--r-- | recipes-extended/odp/odp/disable-the-Werror-flag.patch | 19 | ||||
-rw-r--r-- | recipes-extended/odp/odp_git.bb | 63 |
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 @@ | |||
1 | require odp.inc | ||
2 | |||
3 | inherit module | ||
4 | |||
5 | do_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 | |||
11 | do_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 @@ | |||
1 | require odp.inc | ||
2 | |||
3 | inherit module | ||
4 | |||
5 | do_compile_prepend () { | ||
6 | export KERNEL_PATH="${STAGING_KERNEL_DIR}" | ||
7 | export KERNEL_CFG_PATH="${STAGING_KERNEL_BUILDDIR}" | ||
8 | cd ${S}/kern | ||
9 | } | ||
10 | |||
11 | do_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 | |||
16 | 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 @@ | |||
1 | SUMMARY = "Open Data Plane Interface Implementation" | ||
2 | DESCRIPTION = "OpenDataPlane (ODP) provides a data plane application programming \ | ||
3 | environment that is easy to use, high performance, and portable between networking SoCs." | ||
4 | HOMEPAGE = "http://www.opendataplane.org" | ||
5 | SECTION = "console/network" | ||
6 | LICENSE = "BSD-3-Clause" | ||
7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=4ccfa994aa96974cfcd39a59faee20a2" | ||
8 | |||
9 | FILESEXTRAPATHS_prepend := "${THISDIR}/odp:" | ||
10 | |||
11 | SRC_URI = " \ | ||
12 | git://git.freescale.com/ppc/sdk/odp.git;nobranch=1 \ | ||
13 | git://git.freescale.com/ppc/sdk/qbman_userspace.git;nobranch=1;name=qbman;destsuffix=git/platform/linux-dpaa2/flib/qbman \ | ||
14 | git://git.freescale.com/ppc/sdk/flib.git;nobranch=1;name=rta;destsuffix=git/platform/linux-dpaa2/flib/rta \ | ||
15 | " | ||
16 | SRC_URI += "file://disable-the-Werror-flag.patch" | ||
17 | |||
18 | SRCREV = "a8935384642f5da8236260dd553c52dbbc7c63ed" | ||
19 | SRCREV_qbman = "0b8648d702f701417cd6cc3cbcdc228e640d20b6" | ||
20 | SRCREV_rta = "bbab28b03ae21c52ce913f8b052acf53bd24ff5d" | ||
21 | |||
22 | S = "${WORKDIR}/git" | ||
23 | |||
24 | 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 @@ | |||
1 | Patch to disable the Werror flag. | ||
2 | |||
3 | Werror flag is causing the code compilaton error when | ||
4 | ubuntu toolchain is used to compile the code in Dash. | ||
5 | This patch disables the Werror flag to avoid such errors. | ||
6 | |||
7 | Signed-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 @@ | |||
1 | require odp.inc | ||
2 | |||
3 | inherit autotools-brokensep | ||
4 | |||
5 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
6 | |||
7 | DEPENDS = "openssl cunit libxml2" | ||
8 | |||
9 | RDEPENDS_${PN} = "bash libcrypto libssl odp-module odp-counters" | ||
10 | |||
11 | ODP_SOC ?= "" | ||
12 | ODP_SOC_ls1043ardb = "LS1043" | ||
13 | ODP_SOC_ls1046ardb = "LS1046" | ||
14 | ODP_PLATFORM ?= "linux-dpaa2" | ||
15 | ODP_PLATFORM_ls1043ardb = "linux-dpaa1" | ||
16 | ODP_PLATFORM_ls1046ardb = "linux-dpaa1" | ||
17 | ODP_BUILD_TYPE ?= "ls2088" | ||
18 | ODP_BUILD_TYPE_ls1043ardb = "ls1043" | ||
19 | ODP_BUILD_TYPE_ls1046ardb = "ls1046" | ||
20 | ODP_BUILD_TYPE_ls2080ardb = "ls2080" | ||
21 | |||
22 | EXTRA_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 | |||
30 | EXTRA_OEMAKE = "CROSS_COMPILE="${TARGET_PREFIX}" \ | ||
31 | SYSROOT="${STAGING_DIR_TARGET}" \ | ||
32 | " | ||
33 | |||
34 | PACKAGECONFIG[perf] = "--enable-test-perf,,," | ||
35 | |||
36 | do_configure_prepend () { | ||
37 | export SOC=${ODP_SOC} | ||
38 | ${S}/bootstrap | ||
39 | } | ||
40 | |||
41 | do_compile_prepend () { | ||
42 | export SOC=${ODP_SOC} | ||
43 | export ARCH=${TUNE_ARCH} | ||
44 | } | ||
45 | |||
46 | do_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 | |||
61 | FILES_${PN}-staticdev += "${datadir}/opendataplane/*.la" | ||
62 | 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" | ||
63 | 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" | ||