summaryrefslogtreecommitdiffstats
path: root/common/recipes-extended/dpdk/dpdk_1.6.0r2.bb
diff options
context:
space:
mode:
authorSreeju Selvaraj <sreeju.armughanx.selvaraj@intel.com>2014-09-04 22:06:56 +0800
committerTom Zanussi <tom.zanussi@linux.intel.com>2014-10-01 22:54:52 -0500
commit1c825a06095178c0c51f28d5867549feac8a47f4 (patch)
tree1283b80ad5b06bae1e8527948b4bf9a654510157 /common/recipes-extended/dpdk/dpdk_1.6.0r2.bb
parent6702f5a00c414c68f6f6ceae46552bce571cf93f (diff)
downloadmeta-intel-1c825a06095178c0c51f28d5867549feac8a47f4.tar.gz
meta-intel/common: 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. Signed-off-by: Sreeju Selvaraj <sreeju.armughanx.selvaraj@intel.com> Acked-by: Ong Boon Leong <boon.leong.ong@intel.com> Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Diffstat (limited to 'common/recipes-extended/dpdk/dpdk_1.6.0r2.bb')
-rw-r--r--common/recipes-extended/dpdk/dpdk_1.6.0r2.bb150
1 files changed, 15 insertions, 135 deletions
diff --git a/common/recipes-extended/dpdk/dpdk_1.6.0r2.bb b/common/recipes-extended/dpdk/dpdk_1.6.0r2.bb
index cf06c4c5..72f57683 100644
--- a/common/recipes-extended/dpdk/dpdk_1.6.0r2.bb
+++ b/common/recipes-extended/dpdk/dpdk_1.6.0r2.bb
@@ -1,7 +1,4 @@
1DESCRIPTION = "Intel(r) Data Plane Development Kit" 1include dpdk.inc
2HOMEPAGE = "http://dpdk.org"
3LICENSE = "BSD & LGPLv2 & GPLv2"
4LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=751419260aa954499f7abaabaa882bbe"
5 2
6 3
7SRC_URI = "http://dpdk.org/browse/dpdk/snapshot/dpdk-${PV}.tar.gz;name=dpdk \ 4SRC_URI = "http://dpdk.org/browse/dpdk/snapshot/dpdk-${PV}.tar.gz;name=dpdk \
@@ -14,41 +11,9 @@ SRC_URI = "http://dpdk.org/browse/dpdk/snapshot/dpdk-${PV}.tar.gz;name=dpdk \
14SRC_URI[dpdk.md5sum] = "f406d027320fc8e724bff20db5397cbb" 11SRC_URI[dpdk.md5sum] = "f406d027320fc8e724bff20db5397cbb"
15SRC_URI[dpdk.sha256sum] = "e72fdebcf8a899fc58e60c9b6493b7457576eece60b08dea6aee96c9087df4b2" 12SRC_URI[dpdk.sha256sum] = "e72fdebcf8a899fc58e60c9b6493b7457576eece60b08dea6aee96c9087df4b2"
16 13
17RDEPENDS_${PN} += "python-subprocess" 14export EXAMPLES_BUILD_DIR = "build"
18
19inherit module
20
21export MODULE_DIR="/lib/modules/${KERNEL_VERSION}/kernel/drivers/net"
22export RTE_SDK = "${S}"
23export RTE_TARGET="${TARGET_ARCH}-ivshmem-${TARGET_OS}app-gcc"
24export ICP_ROOT = "${PKG_CONFIG_SYSROOT_DIR}/usr/include"
25export ICP_LIB_ROOT= "${PKG_CONFIG_SYSROOT_DIR}/usr/lib"
26export RTE_KERNELDIR = "${STAGING_KERNEL_DIR}"
27export INSTALL_PATH = "${prefix}/dpdk"
28
29
30do_configure () {
31 #############################################################
32 ### default value for prefix is "usr", unsetting it, so it
33 ### will not be concatenated in ${RTE_TARGET}/Makefile
34 ### which will cause compilation failure
35 #############################################################
36 unset prefix
37
38 make O=$RTE_TARGET T=$RTE_TARGET config
39
40}
41
42
43do_compile () {
44 unset LDFLAGS TARGET_LDFLAGS BUILD_LDFLAGS
45
46 cd ${S}/${RTE_TARGET}
47 oe_runmake EXTRA_LDFLAGS=" --sysroot=${STAGING_DIR_HOST}" \
48 EXTRA_CFLAGS=" --sysroot=${STAGING_DIR_HOST}" \
49 CROSS="${TARGET_PREFIX}" \
50 prefix="" LDFLAGS="" WERROR_FLAGS="-w" V=1
51 15
16do_compile_append () {
52 17
53 ################################################################### 18 ###################################################################
54 ### Compilation for examples 19 ### Compilation for examples
@@ -62,104 +27,19 @@ do_compile () {
62 [ `basename ${app}` = "dpdk_qat" -o `basename ${app}` = "vhost" -o `basename ${app}` = "vhost_xen" ] && continue; 27 [ `basename ${app}` = "dpdk_qat" -o `basename ${app}` = "vhost" -o `basename ${app}` = "vhost_xen" ] && continue;
63 28
64 cd ${app} 29 cd ${app}
65 oe_runmake CROSS="${TARGET_PREFIX}"
66 done
67
68}
69
70
71do_install () {
72
73 install -m 0755 -d ${D}/${INSTALL_PATH} \
74 ${D}/${INSTALL_PATH}/doc \
75 ${D}/${INSTALL_PATH}/tools \
76 ${D}/${INSTALL_PATH}/${RTE_TARGET} \
77 ${D}/${INSTALL_PATH}/${RTE_TARGET}/app \
78 ${D}${includedir} \
79 ${D}${includedir}/arch \
80 ${D}${includedir}/exec-env \
81 ${D}${libdir} \
82 ${D}${MODULE_DIR}
83 30
84 install -m 0755 ${S}/${RTE_TARGET}/kmod/igb_uio.ko ${D}${MODULE_DIR}/ 31 ###############################################################
85 install -m 0755 ${S}/${RTE_TARGET}/kmod/rte_kni.ko ${D}${MODULE_DIR}/ 32 # netmap_compat is putting the binary in a directory path
86 33 # which is different from rest of the example apps, so this
87 install -m 640 ${S}/${RTE_TARGET}/lib/*.a ${D}${libdir} 34 # special case is handled here to avoid installation failure
88 35 # with dpdk-1.6.0
89 install -m 640 ${S}/${RTE_TARGET}/.config ${D}/${INSTALL_PATH}/${RTE_TARGET}/ 36 ###############################################################
90 install -m 640 ${S}/${RTE_TARGET}/include/*.h ${D}${includedir}/ 37 if [ `basename ${app}` == "netmap_compat" ]; then
91 install -m 640 ${S}/${RTE_TARGET}/include/arch/* ${D}${includedir}/arch/ 38 oe_runmake CROSS="${TARGET_PREFIX}" O="${app}/bridge/${EXAMPLES_BUILD_DIR}/"
92 install -m 640 ${S}/${RTE_TARGET}/include/exec-env/* ${D}${includedir}/exec-env/ 39 else
93 install -m 0755 ${S}/tools/igb_uio_bind.py ${D}/${INSTALL_PATH}/tools/ 40 oe_runmake CROSS="${TARGET_PREFIX}"
94 install -m 0755 ${S}/tools/cpu_layout.py ${D}/${INSTALL_PATH}/tools/ 41 fi
95
96
97 #Install test applications
98 install -m 0755 ${S}/${RTE_TARGET}/app/test ${D}/${INSTALL_PATH}/${RTE_TARGET}/app
99 install -m 0755 ${S}/${RTE_TARGET}/app/testpmd ${D}/${INSTALL_PATH}/${RTE_TARGET}/app
100 install -m 0755 ${S}/${RTE_TARGET}/app/dump_cfg ${D}/${INSTALL_PATH}/${RTE_TARGET}/app
101 install -m 0755 ${S}/${RTE_TARGET}/app/cmdline_test ${D}/${INSTALL_PATH}/${RTE_TARGET}/app
102
103
104 #Install example applications
105 for app in ${S}/examples/*
106 do
107 case `basename ${app}` in
108 "dpdk_qat" | "vhost" | "vhost_xen" ) continue
109 ;;
110 "l2fwd-ivshmem")
111 install -m 0755 ${app}/guest/build/app/guest ${D}/${INSTALL_PATH}/${RTE_TARGET}/app
112 install -m 0755 ${app}/host/build/app/host ${D}/${INSTALL_PATH}/${RTE_TARGET}/app
113 continue
114 ;;
115 "multi_process")
116 install -m 0755 ${app}/client_server_mp/mp_client/build/app/mp_client ${D}/${INSTALL_PATH}/${RTE_TARGET}/app
117 install -m 0755 ${app}/client_server_mp/mp_server/build/app/mp_server ${D}/${INSTALL_PATH}/${RTE_TARGET}/app
118 install -m 0755 ${app}/simple_mp/build/app/simple_mp ${D}/${INSTALL_PATH}/${RTE_TARGET}/app
119 install -m 0755 ${app}/symmetric_mp/build/app/symmetric_mp ${D}/${INSTALL_PATH}/${RTE_TARGET}/app
120 continue
121 ;;
122 "netmap_compat")
123 install -m 0755 ${app}/build/app/bridge ${D}/${INSTALL_PATH}/${RTE_TARGET}/app
124 continue
125 ;;
126 "quota_watermark")
127 install -m 0755 ${app}/qw/build/app/qw ${D}/${INSTALL_PATH}/${RTE_TARGET}/app
128 install -m 0755 ${app}/qwctl/build/app/qwctl ${D}/${INSTALL_PATH}/${RTE_TARGET}/app
129 continue
130 ;;
131 "vmdq")
132 install -m 0755 ${app}/build/app/`basename ${app}`_app ${D}/${INSTALL_PATH}/${RTE_TARGET}/app
133 continue
134 ;;
135 "vmdq_dcb")
136 install -m 0755 ${app}/build/app/`basename ${app}`_app ${D}/${INSTALL_PATH}/${RTE_TARGET}/app
137 continue
138 ;;
139 esac
140
141 install -m 0755 ${app}/build/app/`basename ${app}` ${D}/${INSTALL_PATH}/${RTE_TARGET}/app
142 done 42 done
143}
144
145PACKAGES += "${PN}-examples"
146
147FILES_${PN}-dbg += " \
148 ${INSTALL_PATH}/.debug \
149 ${INSTALL_PATH}/${RTE_TARGET}/app/.debug \
150 "
151 43
152FILES_${PN}-doc += "\ 44}
153 ${INSTALL_PATH}/doc \
154 "
155
156FILES_${PN}-dev += " \
157 ${INSTALL_PATH}/${RTE_TARGET}/.config \
158 ${includedir} \
159 ${includedir}/arch \
160 ${includedir}/exec-env \
161 "
162
163FILES_${PN} += " ${INSTALL_PATH}/tools/ "
164 45
165FILES_${PN}-examples += " ${INSTALL_PATH}/${RTE_TARGET}/app/ "