summaryrefslogtreecommitdiffstats
path: root/meta-isg
diff options
context:
space:
mode:
authorOng Boon Leong <boon.leong.ong@intel.com>2015-07-10 13:23:49 (GMT)
committerSaul Wold <sgw@linux.intel.com>2015-07-10 15:17:08 (GMT)
commit90189cb6226738a9241ff98d8bcff7442efbfe5a (patch)
treeecd6e5b9c04efb3a5b43963ee96ce9842aa44efc /meta-isg
parent407cf5b800fd1b8cfd0e281a3a294351e2829df3 (diff)
downloadmeta-intel-90189cb6226738a9241ff98d8bcff7442efbfe5a.tar.gz
meta-isg: dpdk: rearrange common meta-data from dpdk_1.8.0.bb into dpdk.inc
Extract out common meta-data from dpdk_1.8.0.bb into dpdk.inc for better scalability into future dpdk. 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.inc24
-rw-r--r--meta-isg/common/recipes-extended/dpdk/dpdk_1.8.0.bb32
2 files changed, 24 insertions, 32 deletions
diff --git a/meta-isg/common/recipes-extended/dpdk/dpdk.inc b/meta-isg/common/recipes-extended/dpdk/dpdk.inc
index e1670c5..4125126 100644
--- a/meta-isg/common/recipes-extended/dpdk/dpdk.inc
+++ b/meta-isg/common/recipes-extended/dpdk/dpdk.inc
@@ -18,6 +18,25 @@ export ICP_LIB_ROOT= "${PKG_CONFIG_SYSROOT_DIR}/usr/lib"
18export RTE_KERNELDIR = "${STAGING_KERNEL_DIR}" 18export RTE_KERNELDIR = "${STAGING_KERNEL_DIR}"
19export RTE_KERNELDIR_OUT = "${STAGING_KERNEL_BUILDDIR}" 19export RTE_KERNELDIR_OUT = "${STAGING_KERNEL_BUILDDIR}"
20export INSTALL_PATH = "${prefix}/dpdk" 20export INSTALL_PATH = "${prefix}/dpdk"
21export SYSROOTPATH = "--sysroot=${STAGING_DIR_HOST}"
22export DPDK_TARGET_MACH = "${@get_dpdk_target_mach(bb,d)}"
23
24# The list of intel Comms platforms and their target machine
25# process mapping. The supported target machine is listed under
26# dpdk/mk/machine
27def get_dpdk_target_mach(bb, d):
28 target_arch = d.getVar('MACHINE_ARCH', True)
29 multiarch_options = {
30 "mohonpeak64": "atm",
31 "mohonpeak32": "atm",
32 "crystalforest": "ivb",
33 "romley": "snd",
34 "romley-ivb": "ivb",
35 }
36
37 if target_arch in multiarch_options :
38 return multiarch_options[target_arch]
39 return ""
21 40
22do_configure () { 41do_configure () {
23 ############################################################# 42 #############################################################
@@ -38,6 +57,11 @@ do_compile () {
38 EXTRA_CFLAGS="--sysroot=${STAGING_DIR_HOST} -I${STAGING_INCDIR}" \ 57 EXTRA_CFLAGS="--sysroot=${STAGING_DIR_HOST} -I${STAGING_INCDIR}" \
39 CROSS="${TARGET_PREFIX}" \ 58 CROSS="${TARGET_PREFIX}" \
40 prefix="" LDFLAGS="" WERROR_FLAGS="-w" V=1 59 prefix="" LDFLAGS="" WERROR_FLAGS="-w" V=1
60
61 cd ${S}/examples/
62 oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR}" \
63 EXTRA_CFLAGS="--sysroot=${STAGING_DIR_HOST} -I${STAGING_INCDIR}" \
64 CROSS="${TARGET_PREFIX}" O="${S}/examples/$@/"
41} 65}
42 66
43do_install () { 67do_install () {
diff --git a/meta-isg/common/recipes-extended/dpdk/dpdk_1.8.0.bb b/meta-isg/common/recipes-extended/dpdk/dpdk_1.8.0.bb
index 7a278b6..a0f8d8a 100644
--- a/meta-isg/common/recipes-extended/dpdk/dpdk_1.8.0.bb
+++ b/meta-isg/common/recipes-extended/dpdk/dpdk_1.8.0.bb
@@ -24,38 +24,6 @@ PACKAGECONFIG[dpdk_qat] = ",,qat"
24PACKAGECONFIG[vhost] = ",,fuse" 24PACKAGECONFIG[vhost] = ",,fuse"
25PACKAGECONFIG[libvirt] = ",,libvirt" 25PACKAGECONFIG[libvirt] = ",,libvirt"
26 26
27# The list of intel Comms platforms and their target machine
28# process mapping. The supported target machine is listed under
29# dpdk/mk/machine
30def get_dpdk_target_mach(bb, d):
31 target_arch = d.getVar('MACHINE_ARCH', True)
32 multiarch_options = {
33 "mohonpeak64": "atm",
34 "mohonpeak32": "atm",
35 "crystalforest": "ivb",
36 "romley": "snd",
37 "romley-ivb": "ivb",
38 }
39
40 if target_arch in multiarch_options :
41 return multiarch_options[target_arch]
42 return ""
43
44export CONFIG_EXAMPLE_DPDK_QAT = "${@base_contains('PACKAGECONFIG', 'dpdk_qat', 'y', 'n', d)}" 27export CONFIG_EXAMPLE_DPDK_QAT = "${@base_contains('PACKAGECONFIG', 'dpdk_qat', 'y', 'n', d)}"
45export CONFIG_EXAMPLE_VM_POWER_MANAGER = "${@base_contains('PACKAGECONFIG', 'libvirt', 'y', 'n', d)}" 28export CONFIG_EXAMPLE_VM_POWER_MANAGER = "${@base_contains('PACKAGECONFIG', 'libvirt', 'y', 'n', d)}"
46export CONFIG_VHOST_ENABLED = "${@base_contains('PACKAGECONFIG', 'vhost', 'y', 'n', d)}" 29export CONFIG_VHOST_ENABLED = "${@base_contains('PACKAGECONFIG', 'vhost', 'y', 'n', d)}"
47export SYSROOTPATH = "--sysroot=${STAGING_DIR_HOST}"
48export DPDK_TARGET_MACH = "${@get_dpdk_target_mach(bb,d)}"
49
50do_compile_append () {
51
52 cd ${S}/examples/
53
54 ###############################################################
55 # In order to make use of dpdk.inc for example app installation
56 # without failure, override the default build directory
57 ###############################################################
58 oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR}" \
59 EXTRA_CFLAGS="--sysroot=${STAGING_DIR_HOST} -I${STAGING_INCDIR}" \
60 CROSS="${TARGET_PREFIX}" O="${S}/examples/$@/"
61}