summaryrefslogtreecommitdiffstats
path: root/common/recipes-extended/dpdk/dpdk.inc
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2017-09-25 12:38:20 -0500
committerSaul Wold <sgw@linux.intel.com>2017-09-25 15:53:57 -0700
commita20d06d7e4b07c8ba12364a5262eeab8455235af (patch)
tree6e44e0b398476a5bf1662426864d9400c3ba7ca2 /common/recipes-extended/dpdk/dpdk.inc
parent9bf043497c48c45c425081989d142c68968a1385 (diff)
downloadmeta-intel-a20d06d7e4b07c8ba12364a5262eeab8455235af.tar.gz
Move dpdk and qat components to meta-dpdk and meta-qat
meta-dpdk / meta-qat: * Move content from meta-intel/common * Create new basic README/LICENSE files from meta-intel * Create new layer.conf files * Fill out the maintainers files meta-intel: * update the maintainers files * bump the meta-intel layer version * add layer recommend No other content changes made in this commit. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'common/recipes-extended/dpdk/dpdk.inc')
-rw-r--r--common/recipes-extended/dpdk/dpdk.inc150
1 files changed, 0 insertions, 150 deletions
diff --git a/common/recipes-extended/dpdk/dpdk.inc b/common/recipes-extended/dpdk/dpdk.inc
deleted file mode 100644
index ba382675..00000000
--- a/common/recipes-extended/dpdk/dpdk.inc
+++ /dev/null
@@ -1,150 +0,0 @@
1DESCRIPTION = "Intel(r) Data Plane Development Kit"
2HOMEPAGE = "http://dpdk.org"
3LICENSE = "BSD & LGPLv2 & GPLv2"
4LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=751419260aa954499f7abaabaa882bbe"
5
6SRC_URI = "http://fast.dpdk.org/rel/${BP}.tar.gz;name=dpdk \
7 file://dpdk-16.04-add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch \
8 file://dpdk-16.07-add-sysroot-option-within-app-makefile.patch \
9 file://dpdk-16.04-Fix-for-misleading-indentation-error.patch \
10 file://dpdk-16.04-dpdk-fix-compilation-with-dynamic-libs.patch \
11 file://dpdk-16.07-dpdk-fix-for-parellel-make-issue.patch \
12 file://dpdk-17.02-dpdk-fix-installation-warning-and-issue.patch \
13 "
14
15COMPATIBLE_MACHINE = "intel-corei7-64"
16COMPATIBLE_HOST_libc-musl_class-target = "null"
17
18
19# dpdk example apps dpdk_qat and vhost have dependancy on fuse and qat.
20# fuse is in meta-filesystems and qat is not yet upstreamed.
21# So adding mechanism to explicitly disable the use of fuse and qat.
22# To enable, uncomment the below line or include in .bbappend.
23# PACKAGECONFIG ?= " dpdk_qat vhost libvirt"
24
25PACKAGECONFIG[dpdk_qat] = ",,virtual/qat"
26PACKAGECONFIG[vhost] = ",,fuse"
27PACKAGECONFIG[libvirt] = ",,libvirt"
28
29export CONFIG_EXAMPLE_DPDK_QAT = "${@bb.utils.contains('PACKAGECONFIG', 'dpdk_qat', 'y', 'n', d)}"
30export CONFIG_EXAMPLE_VM_POWER_MANAGER = "${@bb.utils.contains('PACKAGECONFIG', 'libvirt', 'y', 'n', d)}"
31export CONFIG_VHOST_ENABLED = "${@bb.utils.contains('PACKAGECONFIG', 'vhost', 'y', 'n', d)}"
32
33RDEPENDS_${PN} += "python-subprocess dpdk-dev-libibverbs"
34DEPENDS = "virtual/kernel dpdk-dev-libibverbs"
35do_configure[depends] += "virtual/kernel:do_shared_workdir"
36
37inherit module
38
39export MODULE_DIR="/lib/modules/${KERNEL_VERSION}/kernel/drivers/net"
40export RTE_SDK = "${S}"
41export RTE_TARGET="${@bb.utils.contains("TUNE_FEATURES", "m64", "x86_64-native-linuxapp-gcc", "i686-native-linuxapp-gcc", d)}"
42
43export ICP_ROOT = "${PKG_CONFIG_SYSROOT_DIR}/usr/include"
44export ICP_LIB_ROOT= "${PKG_CONFIG_SYSROOT_DIR}/usr/lib"
45export RTE_KERNELDIR = "${STAGING_KERNEL_DIR}"
46export RTE_KERNELDIR_OUT = "${STAGING_KERNEL_BUILDDIR}"
47export INSTALL_PATH = "${prefix}/share"
48export RTE_OUTPUT = "${S}/${RTE_TARGET}"
49export ETHTOOL_LIB_PATH = "${S}/examples/ethtool/lib/${RTE_TARGET}/"
50export SYSROOTPATH = "--sysroot=${STAGING_DIR_HOST}"
51export DPDK_TARGET_MACH = "${@get_dpdk_target_mach(bb,d)}"
52export ICP_LAC_API_DIR = "${STAGING_DIR_TARGET}${includedir}/lac"
53
54# The list of intel Comms platforms and their target machine
55# process mapping. The supported target machine is listed under
56# dpdk/mk/machine
57def get_dpdk_target_mach(bb, d):
58 target_arch = d.getVar('MACHINE_ARCH', True)
59 multiarch_options = {
60 "mohonpeak64": "atm",
61 "mohonpeak32": "atm",
62 "crystalforest": "ivb",
63 "intel_corei7_64": "atm",
64 }
65
66 if target_arch in multiarch_options :
67 return multiarch_options[target_arch]
68 return "default"
69
70do_configure () {
71 #############################################################
72 ### default value for prefix is "usr", unsetting it, so it
73 ### will not be concatenated in ${RTE_TARGET}/Makefile
74 ### which will cause compilation failure
75 #############################################################
76 unset prefix
77
78 # Fix-up CONFIG_RTE_MACHINE based on target machine
79 sed -e "s#CONFIG_RTE_MACHINE=\"native\"#CONFIG_RTE_MACHINE=\"${DPDK_TARGET_MACH}\"#" -i ${S}/config/defconfig_x86_64-native-linuxapp-gcc
80 sed -e "s#CONFIG_RTE_MACHINE=\"native\"#CONFIG_RTE_MACHINE=\"${DPDK_TARGET_MACH}\"#" -i ${S}/config/defconfig_i686-native-linuxapp-gcc
81
82 # Fix-up vhost configs based on package config
83 sed -e "s#CONFIG_RTE_KNI_VHOST=n#CONFIG_RTE_KNI_VHOST=${CONFIG_VHOST_ENABLED}#" -i ${S}/config/common_linuxapp
84 sed -e "s#CONFIG_RTE_KNI_VHOST_VNET_HDR_EN=n#CONFIG_RTE_KNI_VHOST_VNET_HDR_EN=${CONFIG_VHOST_ENABLED}#" -i ${S}/config/common_linuxapp
85 sed -e "s#CONFIG_RTE_LIBRTE_VHOST=n#CONFIG_RTE_LIBRTE_VHOST=${CONFIG_VHOST_ENABLED}#" -i ${S}/config/common_linuxapp
86
87 make O=$RTE_TARGET T=$RTE_TARGET config
88}
89
90do_compile () {
91 unset LDFLAGS TARGET_LDFLAGS BUILD_LDFLAGS
92
93 cd ${S}/${RTE_TARGET}
94 oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu" \
95 EXTRA_CFLAGS="--sysroot=${STAGING_DIR_HOST} -I${STAGING_INCDIR}" \
96 CROSS="${TARGET_PREFIX}" \
97 prefix="" LDFLAGS="" WERROR_FLAGS="-w" V=1
98
99 cd ${S}/examples/
100 oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu -fuse-ld=bfd" \
101 EXTRA_CFLAGS="--sysroot=${STAGING_DIR_HOST} -I${STAGING_INCDIR}" \
102 CROSS="${TARGET_PREFIX}" O="${S}/examples/$@/"
103}
104
105do_install () {
106 oe_runmake O=${RTE_OUTPUT} T= install-runtime DESTDIR=${D}
107 oe_runmake O=${RTE_OUTPUT} T= install-kmod DESTDIR=${D} kerneldir=${MODULE_DIR}
108 oe_runmake O=${RTE_OUTPUT} T= install-sdk DESTDIR=${D}
109
110 # Install examples
111 for dirname in ${S}/examples/*
112 do
113 install -m 0755 -d ${D}/${INSTALL_PATH}/examples/`basename ${dirname}`
114
115 for appname in `find ${dirname} -regex ".*${EXAMPLES_BUILD_DIR}\/app\/[-0-9a-zA-Z0-9/_]*$"`
116 do
117 install -m 755 ${appname} ${D}/${INSTALL_PATH}/examples/`basename ${dirname}`/
118 done
119 done
120}
121
122PACKAGES += "${PN}-examples"
123
124FILES_${PN}-dbg += " \
125 ${INSTALL_PATH}/.debug \
126 ${INSTALL_PATH}/examples/*/.debug \
127 "
128
129FILES_${PN}-doc += "\
130 ${INSTALL_PATH}/doc \
131 "
132
133FILES_${PN}-dev += " \
134 ${INSTALL_PATH}/${RTE_TARGET}/.config \
135 ${includedir} \
136 ${includedir}/${ARCHDIR} \
137 ${includedir}/exec-env \
138 ${INSTALL_PATH}/buildtools/ \
139 ${INSTALL_PATH}/${RTE_TARGET}/include \
140 ${INSTALL_PATH}/${RTE_TARGET}/lib \
141 "
142
143FILES_${PN} += " ${INSTALL_PATH}/usertools/ \
144 ${prefix}/sbin/ \
145 ${prefix}/bin/ \
146 ${libdir}/ \
147 "
148FILES_${PN}-examples += " \
149 ${INSTALL_PATH}/examples/* \
150 "