summaryrefslogtreecommitdiffstats
path: root/meta-isg
diff options
context:
space:
mode:
authorvenkatasubramanian pattu <venkatasubramanianx.pattu@intel.com>2015-07-10 13:23:39 (GMT)
committerSaul Wold <sgw@linux.intel.com>2015-07-10 15:16:04 (GMT)
commit308e320dfbc1964f8acff5b212b2768d36f2fe30 (patch)
tree555698d6f18e97bb1253790957ee1e75420fb4d8 /meta-isg
parent38652c3706f259d09c05860c569ef8d399f93284 (diff)
downloadmeta-intel-308e320dfbc1964f8acff5b212b2768d36f2fe30.tar.gz
meta-isg: Add include file for DPDK
Added include file dpdk.inc to share common functionality based on dpdk_1.6.0r2 Added a new variable EXAMPLE_BUILD_DIR. This points to apps build directory which is different in dpdk v1.6.0r2 and v1.7.0. Users of dpdk.inc have to define EXAMPLE_BUILD_DIR for the installation of example apps. This recipe is cherry-picked from branch dizzy and the commit ID: 1c825a06095178c0c51f28d5867549feac8a47f4:meta-intel/common: Add include file for DPDK Signed-off-by: venkatasubramanian pattu <venkatasubramanianx.pattu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> (cherry picked from commit 578494c0c4715bb8d24972fa52850e89c36410a1) Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta-isg')
-rw-r--r--meta-isg/common/recipes-extended/dpdk/dpdk.inc138
1 files changed, 138 insertions, 0 deletions
diff --git a/meta-isg/common/recipes-extended/dpdk/dpdk.inc b/meta-isg/common/recipes-extended/dpdk/dpdk.inc
new file mode 100644
index 0000000..5e7d52b
--- /dev/null
+++ b/meta-isg/common/recipes-extended/dpdk/dpdk.inc
@@ -0,0 +1,138 @@
1DESCRIPTION = "Intel(r) Data Plane Development Kit"
2HOMEPAGE = "http://dpdk.org"
3LICENSE = "BSD & LGPLv2 & GPLv2"
4LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=751419260aa954499f7abaabaa882bbe"
5
6RDEPENDS_${PN} += "python-subprocess"
7
8inherit module
9
10export MODULE_DIR="/lib/modules/${KERNEL_VERSION}/kernel/drivers/net"
11export RTE_SDK = "${S}"
12export RTE_TARGET="${TARGET_ARCH}-ivshmem-${TARGET_OS}app-gcc"
13export ICP_ROOT = "${PKG_CONFIG_SYSROOT_DIR}/usr/include"
14export ICP_LIB_ROOT= "${PKG_CONFIG_SYSROOT_DIR}/usr/lib"
15export RTE_KERNELDIR = "${STAGING_KERNEL_DIR}"
16export INSTALL_PATH = "${prefix}/dpdk"
17
18
19do_configure () {
20 #############################################################
21 ### default value for prefix is "usr", unsetting it, so it
22 ### will not be concatenated in ${RTE_TARGET}/Makefile
23 ### which will cause compilation failure
24 #############################################################
25 unset prefix
26
27 make O=$RTE_TARGET T=$RTE_TARGET config
28
29}
30
31
32do_compile () {
33 unset LDFLAGS TARGET_LDFLAGS BUILD_LDFLAGS
34
35 cd ${S}/${RTE_TARGET}
36 oe_runmake EXTRA_LDFLAGS=" --sysroot=${STAGING_DIR_HOST}" \
37 EXTRA_CFLAGS=" --sysroot=${STAGING_DIR_HOST}" \
38 CROSS="${TARGET_PREFIX}" \
39 prefix="" LDFLAGS="" WERROR_FLAGS="-w" V=1
40
41}
42
43
44do_install () {
45
46 install -m 0755 -d ${D}/${INSTALL_PATH} \
47 ${D}/${INSTALL_PATH}/doc \
48 ${D}/${INSTALL_PATH}/tools \
49 ${D}/${INSTALL_PATH}/${RTE_TARGET} \
50 ${D}/${INSTALL_PATH}/${RTE_TARGET}/app \
51 ${D}${includedir} \
52 ${D}${includedir}/arch \
53 ${D}${includedir}/exec-env \
54 ${D}${libdir} \
55 ${D}${MODULE_DIR}
56
57 install -m 0755 ${S}/${RTE_TARGET}/kmod/igb_uio.ko ${D}${MODULE_DIR}/
58 install -m 0755 ${S}/${RTE_TARGET}/kmod/rte_kni.ko ${D}${MODULE_DIR}/
59
60 install -m 640 ${S}/${RTE_TARGET}/lib/*.a ${D}${libdir}
61
62 install -m 640 ${S}/${RTE_TARGET}/.config ${D}/${INSTALL_PATH}/${RTE_TARGET}/
63 install -m 640 ${S}/${RTE_TARGET}/include/*.h ${D}${includedir}/
64 install -m 640 ${S}/${RTE_TARGET}/include/arch/* ${D}${includedir}/arch/
65 install -m 640 ${S}/${RTE_TARGET}/include/exec-env/* ${D}${includedir}/exec-env/
66 install -m 0755 ${S}/tools/*.py ${D}/${INSTALL_PATH}/tools/
67
68
69 #Install test applications
70 install -m 0755 ${S}/${RTE_TARGET}/app/test ${D}/${INSTALL_PATH}/${RTE_TARGET}/app
71 install -m 0755 ${S}/${RTE_TARGET}/app/testpmd ${D}/${INSTALL_PATH}/${RTE_TARGET}/app
72 install -m 0755 ${S}/${RTE_TARGET}/app/dump_cfg ${D}/${INSTALL_PATH}/${RTE_TARGET}/app
73 install -m 0755 ${S}/${RTE_TARGET}/app/cmdline_test ${D}/${INSTALL_PATH}/${RTE_TARGET}/app
74
75
76 # Install example applications
77 # It is expected that user of this include file should define EXAMPLES_BUILD_DIR
78 for app in ${S}/examples/*
79 do
80 case `basename ${app}` in
81 "dpdk_qat" | "vhost" | "vhost_xen" | "Makefile" ) continue
82 ;;
83 "l2fwd-ivshmem")
84 install -m 0755 ${app}/guest/${EXAMPLES_BUILD_DIR}/app/guest ${D}/${INSTALL_PATH}/${RTE_TARGET}/app
85 install -m 0755 ${app}/host/${EXAMPLES_BUILD_DIR}/app/host ${D}/${INSTALL_PATH}/${RTE_TARGET}/app
86 continue
87 ;;
88 "multi_process")
89 install -m 0755 ${app}/client_server_mp/mp_client/${EXAMPLES_BUILD_DIR}/app/mp_client ${D}/${INSTALL_PATH}/${RTE_TARGET}/app
90 install -m 0755 ${app}/client_server_mp/mp_server/${EXAMPLES_BUILD_DIR}/app/mp_server ${D}/${INSTALL_PATH}/${RTE_TARGET}/app
91 install -m 0755 ${app}/simple_mp/${EXAMPLES_BUILD_DIR}/app/simple_mp ${D}/${INSTALL_PATH}/${RTE_TARGET}/app
92 install -m 0755 ${app}/symmetric_mp/${EXAMPLES_BUILD_DIR}/app/symmetric_mp ${D}/${INSTALL_PATH}/${RTE_TARGET}/app
93 continue
94 ;;
95 "netmap_compat")
96 install -m 0755 ${app}/bridge/${EXAMPLES_BUILD_DIR}/app/bridge ${D}/${INSTALL_PATH}/${RTE_TARGET}/app
97 continue
98 ;;
99 "quota_watermark")
100 install -m 0755 ${app}/qw/${EXAMPLES_BUILD_DIR}/app/qw ${D}/${INSTALL_PATH}/${RTE_TARGET}/app
101 install -m 0755 ${app}/qwctl/${EXAMPLES_BUILD_DIR}/app/qwctl ${D}/${INSTALL_PATH}/${RTE_TARGET}/app
102 continue
103 ;;
104 "vmdq")
105 install -m 0755 ${app}/${EXAMPLES_BUILD_DIR}/app/`basename ${app}`_app ${D}/${INSTALL_PATH}/${RTE_TARGET}/app
106 continue
107 ;;
108 "vmdq_dcb")
109 install -m 0755 ${app}/${EXAMPLES_BUILD_DIR}/app/`basename ${app}`_app ${D}/${INSTALL_PATH}/${RTE_TARGET}/app
110 continue
111 ;;
112 esac
113
114 install -m 0755 ${app}/${EXAMPLES_BUILD_DIR}/app/`basename ${app}` ${D}/${INSTALL_PATH}/${RTE_TARGET}/app
115 done
116}
117
118PACKAGES += "${PN}-examples"
119
120FILES_${PN}-dbg += " \
121 ${INSTALL_PATH}/.debug \
122 ${INSTALL_PATH}/${RTE_TARGET}/app/.debug \
123 "
124
125FILES_${PN}-doc += "\
126 ${INSTALL_PATH}/doc \
127 "
128
129FILES_${PN}-dev += " \
130 ${INSTALL_PATH}/${RTE_TARGET}/.config \
131 ${includedir} \
132 ${includedir}/arch \
133 ${includedir}/exec-env \
134 "
135
136FILES_${PN} += " ${INSTALL_PATH}/tools/ "
137
138FILES_${PN}-examples += " ${INSTALL_PATH}/${RTE_TARGET}/app/ "