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