summaryrefslogtreecommitdiffstats
path: root/meta-isg/common
diff options
context:
space:
mode:
authorOng Boon Leong <boon.leong.ong@intel.com>2015-07-10 21:23:40 +0800
committerSaul Wold <sgw@linux.intel.com>2015-07-10 08:16:04 -0700
commit1394f5835b4e31fe167fcab130978ee3916817c3 (patch)
tree519c5d86c96f263cd917c24e1a10dd7407a2d690 /meta-isg/common
parent308e320dfbc1964f8acff5b212b2768d36f2fe30 (diff)
downloadmeta-intel-1394f5835b4e31fe167fcab130978ee3916817c3.tar.gz
meta-isg: dpdk: improve software installation task
do_install() has been non-scalable due to different DPDK SW releases offer increasingly more examples. So, this patch is intended to make the do_install() simplified by using regular expression technique to extract out executables name that are built. Tested this patch with DPDK v1.6.0r2 and v1.7.0 and the software packages look intact. Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> (cherry picked from commit a43871c39ae462647ebe58679b92cd34c8ae48a6) 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/common')
-rw-r--r--meta-isg/common/recipes-extended/dpdk/dpdk.inc83
1 files changed, 26 insertions, 57 deletions
diff --git a/meta-isg/common/recipes-extended/dpdk/dpdk.inc b/meta-isg/common/recipes-extended/dpdk/dpdk.inc
index 5e7d52ba..910feb4b 100644
--- a/meta-isg/common/recipes-extended/dpdk/dpdk.inc
+++ b/meta-isg/common/recipes-extended/dpdk/dpdk.inc
@@ -9,13 +9,13 @@ inherit module
9 9
10export MODULE_DIR="/lib/modules/${KERNEL_VERSION}/kernel/drivers/net" 10export MODULE_DIR="/lib/modules/${KERNEL_VERSION}/kernel/drivers/net"
11export RTE_SDK = "${S}" 11export RTE_SDK = "${S}"
12export RTE_TARGET="${TARGET_ARCH}-ivshmem-${TARGET_OS}app-gcc" 12export RTE_TARGET="${@bb.utils.contains("TUNE_FEATURES", "corei7", "x86_64-ivshmem-linuxapp-gcc", "i686-native-linuxapp-gcc", d)}"
13
13export ICP_ROOT = "${PKG_CONFIG_SYSROOT_DIR}/usr/include" 14export ICP_ROOT = "${PKG_CONFIG_SYSROOT_DIR}/usr/include"
14export ICP_LIB_ROOT= "${PKG_CONFIG_SYSROOT_DIR}/usr/lib" 15export ICP_LIB_ROOT= "${PKG_CONFIG_SYSROOT_DIR}/usr/lib"
15export RTE_KERNELDIR = "${STAGING_KERNEL_DIR}" 16export RTE_KERNELDIR = "${STAGING_KERNEL_DIR}"
16export INSTALL_PATH = "${prefix}/dpdk" 17export INSTALL_PATH = "${prefix}/dpdk"
17 18
18
19do_configure () { 19do_configure () {
20 ############################################################# 20 #############################################################
21 ### default value for prefix is "usr", unsetting it, so it 21 ### default value for prefix is "usr", unsetting it, so it
@@ -25,10 +25,8 @@ do_configure () {
25 unset prefix 25 unset prefix
26 26
27 make O=$RTE_TARGET T=$RTE_TARGET config 27 make O=$RTE_TARGET T=$RTE_TARGET config
28
29} 28}
30 29
31
32do_compile () { 30do_compile () {
33 unset LDFLAGS TARGET_LDFLAGS BUILD_LDFLAGS 31 unset LDFLAGS TARGET_LDFLAGS BUILD_LDFLAGS
34 32
@@ -37,10 +35,8 @@ do_compile () {
37 EXTRA_CFLAGS=" --sysroot=${STAGING_DIR_HOST}" \ 35 EXTRA_CFLAGS=" --sysroot=${STAGING_DIR_HOST}" \
38 CROSS="${TARGET_PREFIX}" \ 36 CROSS="${TARGET_PREFIX}" \
39 prefix="" LDFLAGS="" WERROR_FLAGS="-w" V=1 37 prefix="" LDFLAGS="" WERROR_FLAGS="-w" V=1
40
41} 38}
42 39
43
44do_install () { 40do_install () {
45 41
46 install -m 0755 -d ${D}/${INSTALL_PATH} \ 42 install -m 0755 -d ${D}/${INSTALL_PATH} \
@@ -48,70 +44,36 @@ do_install () {
48 ${D}/${INSTALL_PATH}/tools \ 44 ${D}/${INSTALL_PATH}/tools \
49 ${D}/${INSTALL_PATH}/${RTE_TARGET} \ 45 ${D}/${INSTALL_PATH}/${RTE_TARGET} \
50 ${D}/${INSTALL_PATH}/${RTE_TARGET}/app \ 46 ${D}/${INSTALL_PATH}/${RTE_TARGET}/app \
47 ${D}/${INSTALL_PATH}/${RTE_TARGET}/hostapp \
51 ${D}${includedir} \ 48 ${D}${includedir} \
52 ${D}${includedir}/arch \ 49 ${D}${includedir}/arch \
53 ${D}${includedir}/exec-env \ 50 ${D}${includedir}/exec-env \
54 ${D}${libdir} \ 51 ${D}${libdir} \
55 ${D}${MODULE_DIR} 52 ${D}${MODULE_DIR}
56 53
57 install -m 0755 ${S}/${RTE_TARGET}/kmod/igb_uio.ko ${D}${MODULE_DIR}/ 54 install -m 0755 ${S}/${RTE_TARGET}/kmod/*.ko ${D}${MODULE_DIR}/
58 install -m 0755 ${S}/${RTE_TARGET}/kmod/rte_kni.ko ${D}${MODULE_DIR}/
59 55
60 install -m 640 ${S}/${RTE_TARGET}/lib/*.a ${D}${libdir} 56 install -m 640 ${S}/${RTE_TARGET}/lib/*.a ${D}${libdir}
61 57
62 install -m 640 ${S}/${RTE_TARGET}/.config ${D}/${INSTALL_PATH}/${RTE_TARGET}/ 58 install -m 640 ${S}/${RTE_TARGET}/.config ${D}/${INSTALL_PATH}/${RTE_TARGET}/
63 install -m 640 ${S}/${RTE_TARGET}/include/*.h ${D}${includedir}/ 59 install -m 640 ${S}/${RTE_TARGET}/include/*.h ${D}${includedir}/
64 install -m 640 ${S}/${RTE_TARGET}/include/arch/* ${D}${includedir}/arch/ 60 install -m 640 ${S}/${RTE_TARGET}/include/arch/*.h ${D}${includedir}/arch/
65 install -m 640 ${S}/${RTE_TARGET}/include/exec-env/* ${D}${includedir}/exec-env/ 61 install -m 640 ${S}/${RTE_TARGET}/include/exec-env/*.h ${D}${includedir}/exec-env/
66 install -m 0755 ${S}/tools/*.py ${D}/${INSTALL_PATH}/tools/ 62 install -m 0755 ${S}/tools/*.py ${D}/${INSTALL_PATH}/tools/
67 63
64 # Install applications
65 install -m 0755 ${S}/${RTE_TARGET}/app/* ${D}/${INSTALL_PATH}/${RTE_TARGET}/app/
66 install -m 0755 ${S}/${RTE_TARGET}/hostapp/* ${D}/${INSTALL_PATH}/${RTE_TARGET}/hostapp/
68 67
69 #Install test applications 68 # Install examples
70 install -m 0755 ${S}/${RTE_TARGET}/app/test ${D}/${INSTALL_PATH}/${RTE_TARGET}/app 69 for dirname in ${S}/examples/*
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 70 do
80 case `basename ${app}` in 71 install -m 0755 -d ${D}/${INSTALL_PATH}/examples/`basename ${dirname}`
81 "dpdk_qat" | "vhost" | "vhost_xen" | "Makefile" ) continue 72
82 ;; 73 for appname in `find ${dirname} -regex ".*${EXAMPLES_BUILD_DIR}\/app\/[-0-9a-zA-Z0-9/_]*$"`
83 "l2fwd-ivshmem") 74 do
84 install -m 0755 ${app}/guest/${EXAMPLES_BUILD_DIR}/app/guest ${D}/${INSTALL_PATH}/${RTE_TARGET}/app 75 install -m 755 ${appname} ${D}/${INSTALL_PATH}/examples/`basename ${dirname}`/
85 install -m 0755 ${app}/host/${EXAMPLES_BUILD_DIR}/app/host ${D}/${INSTALL_PATH}/${RTE_TARGET}/app 76 done
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 77 done
116} 78}
117 79
@@ -120,6 +82,9 @@ PACKAGES += "${PN}-examples"
120FILES_${PN}-dbg += " \ 82FILES_${PN}-dbg += " \
121 ${INSTALL_PATH}/.debug \ 83 ${INSTALL_PATH}/.debug \
122 ${INSTALL_PATH}/${RTE_TARGET}/app/.debug \ 84 ${INSTALL_PATH}/${RTE_TARGET}/app/.debug \
85 ${INSTALL_PATH}/${RTE_TARGET}/hostapp/.debug \
86 ${INSTALL_PATH}/${RTE_TARGET}/app/*.map \
87 ${INSTALL_PATH}/examples/*/.debug \
123 " 88 "
124 89
125FILES_${PN}-doc += "\ 90FILES_${PN}-doc += "\
@@ -133,6 +98,10 @@ FILES_${PN}-dev += " \
133 ${includedir}/exec-env \ 98 ${includedir}/exec-env \
134 " 99 "
135 100
136FILES_${PN} += " ${INSTALL_PATH}/tools/ " 101FILES_${PN} += " ${INSTALL_PATH}/tools/ "
137 102
138FILES_${PN}-examples += " ${INSTALL_PATH}/${RTE_TARGET}/app/ " 103FILES_${PN}-examples += " \
104 ${INSTALL_PATH}/${RTE_TARGET}/app/* \
105 ${INSTALL_PATH}/${RTE_TARGET}/hostapp/* \
106 ${INSTALL_PATH}/examples/* \
107 "