diff options
| author | Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> | 2047-10-21 11:59:01 +0800 |
|---|---|---|
| committer | Tom Zanussi <tom.zanussi@linux.intel.com> | 2016-07-22 13:36:58 -0500 |
| commit | 1827f6aa3048c61e6d6f174016fb61a614dbf3eb (patch) | |
| tree | ffb659fec821d41b029fc89119ff3b0ac1229864 /meta-isg/common | |
| parent | 9fc3a8235c53bf8fdda96b5c1178897a5eac5a67 (diff) | |
| download | meta-intel-1827f6aa3048c61e6d6f174016fb61a614dbf3eb.tar.gz | |
meta-isg: dpdk: simplify do_install
Using makefile for installing targets.
Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Diffstat (limited to 'meta-isg/common')
| -rw-r--r-- | meta-isg/common/recipes-extended/dpdk/dpdk.inc | 46 | ||||
| -rw-r--r-- | meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-16.04-dpdk-fix-installation-warning-and-issue.patch | 79 |
2 files changed, 93 insertions, 32 deletions
diff --git a/meta-isg/common/recipes-extended/dpdk/dpdk.inc b/meta-isg/common/recipes-extended/dpdk/dpdk.inc index 6228e7fd..b1b56c92 100644 --- a/meta-isg/common/recipes-extended/dpdk/dpdk.inc +++ b/meta-isg/common/recipes-extended/dpdk/dpdk.inc | |||
| @@ -8,6 +8,7 @@ SRC_URI = "http://dpdk.org/browse/dpdk/snapshot/dpdk-${PV}.tar.gz;name=dpdk \ | |||
| 8 | file://dpdk-16.04-add-sysroot-option-within-app-makefile.patch \ | 8 | file://dpdk-16.04-add-sysroot-option-within-app-makefile.patch \ |
| 9 | file://dpdk-16.04-point-to-the-right-include-and-lib-path.patch \ | 9 | file://dpdk-16.04-point-to-the-right-include-and-lib-path.patch \ |
| 10 | file://dpdk-16.04-Fix-for-misleading-indentation-error.patch \ | 10 | file://dpdk-16.04-Fix-for-misleading-indentation-error.patch \ |
| 11 | file://dpdk-16.04-dpdk-fix-installation-warning-and-issue.patch \ | ||
| 11 | " | 12 | " |
| 12 | 13 | ||
| 13 | COMPATIBLE_MACHINE = "crystalforest|intel-corei7-64" | 14 | COMPATIBLE_MACHINE = "crystalforest|intel-corei7-64" |
| @@ -40,7 +41,8 @@ export ICP_ROOT = "${PKG_CONFIG_SYSROOT_DIR}/usr/include" | |||
| 40 | export ICP_LIB_ROOT= "${PKG_CONFIG_SYSROOT_DIR}/usr/lib" | 41 | export ICP_LIB_ROOT= "${PKG_CONFIG_SYSROOT_DIR}/usr/lib" |
| 41 | export RTE_KERNELDIR = "${STAGING_KERNEL_DIR}" | 42 | export RTE_KERNELDIR = "${STAGING_KERNEL_DIR}" |
| 42 | export RTE_KERNELDIR_OUT = "${STAGING_KERNEL_BUILDDIR}" | 43 | export RTE_KERNELDIR_OUT = "${STAGING_KERNEL_BUILDDIR}" |
| 43 | export INSTALL_PATH = "${prefix}/dpdk" | 44 | export INSTALL_PATH = "${prefix}/share" |
| 45 | export RTE_OUTPUT = "${S}/${RTE_TARGET}" | ||
| 44 | export SYSROOTPATH = "--sysroot=${STAGING_DIR_HOST}" | 46 | export SYSROOTPATH = "--sysroot=${STAGING_DIR_HOST}" |
| 45 | export DPDK_TARGET_MACH = "${@get_dpdk_target_mach(bb,d)}" | 47 | export DPDK_TARGET_MACH = "${@get_dpdk_target_mach(bb,d)}" |
| 46 | export ICP_LAC_API_DIR = "${STAGING_DIR_TARGET}${includedir}/lac" | 48 | export ICP_LAC_API_DIR = "${STAGING_DIR_TARGET}${includedir}/lac" |
| @@ -97,30 +99,9 @@ do_compile () { | |||
| 97 | } | 99 | } |
| 98 | 100 | ||
| 99 | do_install () { | 101 | do_install () { |
| 100 | 102 | oe_runmake O=${RTE_OUTPUT} T= install-runtime DESTDIR=${D} | |
| 101 | install -m 0755 -d ${D}/${INSTALL_PATH} \ | 103 | oe_runmake O=${RTE_OUTPUT} T= install-kmod DESTDIR=${D} kerneldir=${MODULE_DIR} |
| 102 | ${D}/${INSTALL_PATH}/doc \ | 104 | oe_runmake O=${RTE_OUTPUT} T= install-sdk DESTDIR=${D} |
| 103 | ${D}/${INSTALL_PATH}/tools \ | ||
| 104 | ${D}/${INSTALL_PATH}/${RTE_TARGET} \ | ||
| 105 | ${D}/${INSTALL_PATH}/${RTE_TARGET}/app \ | ||
| 106 | ${D}${includedir} \ | ||
| 107 | ${D}${includedir}/${ARCHDIR} \ | ||
| 108 | ${D}${includedir}/exec-env \ | ||
| 109 | ${D}${libdir} \ | ||
| 110 | ${D}${MODULE_DIR} | ||
| 111 | |||
| 112 | install -m 0755 ${S}/${RTE_TARGET}/kmod/*.ko ${D}${MODULE_DIR}/ | ||
| 113 | |||
| 114 | install -m 640 ${S}/${RTE_TARGET}/lib/*.a ${D}${libdir} | ||
| 115 | |||
| 116 | install -m 640 ${S}/${RTE_TARGET}/.config ${D}/${INSTALL_PATH}/${RTE_TARGET}/ | ||
| 117 | install -m 640 ${S}/${RTE_TARGET}/include/*.h ${D}${includedir}/ | ||
| 118 | install -m 640 ${S}/${RTE_TARGET}/include/${ARCHDIR}/*.h ${D}${includedir}/${ARCHDIR}/ | ||
| 119 | install -m 640 ${S}/${RTE_TARGET}/include/exec-env/*.h ${D}${includedir}/exec-env/ | ||
| 120 | install -m 0755 ${S}/tools/*.py ${D}/${INSTALL_PATH}/tools/ | ||
| 121 | |||
| 122 | # Install applications | ||
| 123 | install -m 0755 ${S}/${RTE_TARGET}/app/* ${D}/${INSTALL_PATH}/${RTE_TARGET}/app/ | ||
| 124 | 105 | ||
| 125 | # Install examples | 106 | # Install examples |
| 126 | for dirname in ${S}/examples/* | 107 | for dirname in ${S}/examples/* |
| @@ -138,9 +119,6 @@ PACKAGES += "${PN}-examples" | |||
| 138 | 119 | ||
| 139 | FILES_${PN}-dbg += " \ | 120 | FILES_${PN}-dbg += " \ |
| 140 | ${INSTALL_PATH}/.debug \ | 121 | ${INSTALL_PATH}/.debug \ |
| 141 | ${INSTALL_PATH}/${RTE_TARGET}/app/.debug \ | ||
| 142 | ${INSTALL_PATH}/${RTE_TARGET}/hostapp/.debug \ | ||
| 143 | ${INSTALL_PATH}/${RTE_TARGET}/app/*.map \ | ||
| 144 | ${INSTALL_PATH}/examples/*/.debug \ | 122 | ${INSTALL_PATH}/examples/*/.debug \ |
| 145 | " | 123 | " |
| 146 | 124 | ||
| @@ -153,12 +131,16 @@ FILES_${PN}-dev += " \ | |||
| 153 | ${includedir} \ | 131 | ${includedir} \ |
| 154 | ${includedir}/${ARCHDIR} \ | 132 | ${includedir}/${ARCHDIR} \ |
| 155 | ${includedir}/exec-env \ | 133 | ${includedir}/exec-env \ |
| 134 | ${INSTALL_PATH}/scripts/ \ | ||
| 135 | ${INSTALL_PATH}/${RTE_TARGET}/include \ | ||
| 136 | ${INSTALL_PATH}/${RTE_TARGET}/lib \ | ||
| 156 | " | 137 | " |
| 157 | 138 | ||
| 158 | FILES_${PN} += " ${INSTALL_PATH}/tools/ " | 139 | FILES_${PN} += " ${INSTALL_PATH}/tools/ \ |
| 159 | 140 | ${prefix}/sbin/ \ | |
| 141 | ${prefix}/bin/ \ | ||
| 142 | ${libdir}/ \ | ||
| 143 | " | ||
| 160 | FILES_${PN}-examples += " \ | 144 | FILES_${PN}-examples += " \ |
| 161 | ${INSTALL_PATH}/${RTE_TARGET}/app/* \ | ||
| 162 | ${INSTALL_PATH}/${RTE_TARGET}/hostapp/* \ | ||
| 163 | ${INSTALL_PATH}/examples/* \ | 145 | ${INSTALL_PATH}/examples/* \ |
| 164 | " | 146 | " |
diff --git a/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-16.04-dpdk-fix-installation-warning-and-issue.patch b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-16.04-dpdk-fix-installation-warning-and-issue.patch new file mode 100644 index 00000000..1c880cf1 --- /dev/null +++ b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-16.04-dpdk-fix-installation-warning-and-issue.patch | |||
| @@ -0,0 +1,79 @@ | |||
| 1 | From 2b0979ce523e33f8c2744f8c021b8722b7571a3d Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> | ||
| 3 | Date: Thu, 21 Jul 2016 09:39:51 +0800 | ||
| 4 | Subject: [PATCH 2/2] dpdk: fix installation warning and issue | ||
| 5 | |||
| 6 | Upstream-Status: Inappropriate [configuration] | ||
| 7 | |||
| 8 | Ensure that all compiled libs should be installed to correct location. | ||
| 9 | For cross compiling cp -r and extra tar flags used to avoid QA warning | ||
| 10 | [host-user-contaminated]. | ||
| 11 | Added excluded files from bin and removing mk file installation since it | ||
| 12 | is not needed as a part of image. | ||
| 13 | |||
| 14 | Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> | ||
| 15 | --- | ||
| 16 | mk/rte.sdkinstall.mk | 24 +++++++++++------------- | ||
| 17 | 1 file changed, 11 insertions(+), 13 deletions(-) | ||
| 18 | |||
| 19 | diff --git a/mk/rte.sdkinstall.mk b/mk/rte.sdkinstall.mk | ||
| 20 | index 68e56b6..7674b47 100644 | ||
| 21 | --- a/mk/rte.sdkinstall.mk | ||
| 22 | +++ b/mk/rte.sdkinstall.mk | ||
| 23 | @@ -114,15 +114,13 @@ endif | ||
| 24 | |||
| 25 | install-runtime: | ||
| 26 | $(Q)$(call rte_mkdir, $(DESTDIR)$(libdir)) | ||
| 27 | - $(Q)cp -a $O/lib/* $(DESTDIR)$(libdir) | ||
| 28 | + $(Q)cp -r $O/lib/* $(DESTDIR)$(libdir) | ||
| 29 | $(Q)$(call rte_mkdir, $(DESTDIR)$(bindir)) | ||
| 30 | - $(Q)tar -cf - -C $O app --exclude 'app/*.map' \ | ||
| 31 | - --exclude 'app/cmdline*' --exclude app/test \ | ||
| 32 | - --exclude app/testacl --exclude app/testpipeline | \ | ||
| 33 | - tar -xf - -C $(DESTDIR)$(bindir) --strip-components=1 \ | ||
| 34 | - --keep-newer-files --warning=no-ignore-newer | ||
| 35 | + $(Q)tar -cf - -C $O app | \ | ||
| 36 | + tar -xf - -C $(DESTDIR)$(bindir) --no-same-owner --no-same-permissions \ | ||
| 37 | + --strip-components=1 --keep-newer-files --warning=no-ignore-newer | ||
| 38 | $(Q)$(call rte_mkdir, $(DESTDIR)$(datadir)) | ||
| 39 | - $(Q)cp -a $(RTE_SDK)/tools $(DESTDIR)$(datadir) | ||
| 40 | + $(Q)cp -r $(RTE_SDK)/tools $(DESTDIR)$(datadir) | ||
| 41 | $(Q)$(call rte_mkdir, $(DESTDIR)$(sbindir)) | ||
| 42 | $(Q)$(call rte_symlink, $(DESTDIR)$(datadir)/tools/dpdk_nic_bind.py, \ | ||
| 43 | $(DESTDIR)$(sbindir)/dpdk_nic_bind) | ||
| 44 | @@ -130,7 +128,7 @@ install-runtime: | ||
| 45 | install-kmod: | ||
| 46 | ifneq ($(wildcard $O/kmod/*),) | ||
| 47 | $(Q)$(call rte_mkdir, $(DESTDIR)$(kerneldir)) | ||
| 48 | - $(Q)cp -a $O/kmod/* $(DESTDIR)$(kerneldir) | ||
| 49 | + $(Q)cp -r $O/kmod/* $(DESTDIR)$(kerneldir) | ||
| 50 | endif | ||
| 51 | |||
| 52 | install-sdk: | ||
| 53 | @@ -139,10 +137,10 @@ install-sdk: | ||
| 54 | tar -xf - -C $(DESTDIR)$(includedir) --strip-components=1 \ | ||
| 55 | --keep-newer-files --warning=no-ignore-newer | ||
| 56 | $(Q)$(call rte_mkdir, $(DESTDIR)$(sdkdir)) | ||
| 57 | - $(Q)cp -a $(RTE_SDK)/mk $(DESTDIR)$(sdkdir) | ||
| 58 | - $(Q)cp -a $(RTE_SDK)/scripts $(DESTDIR)$(sdkdir) | ||
| 59 | + $(Q)cp -r $(RTE_SDK)/scripts $(DESTDIR)$(sdkdir) | ||
| 60 | $(Q)$(call rte_mkdir, $(DESTDIR)$(targetdir)) | ||
| 61 | - $(Q)cp -a $O/.config $(DESTDIR)$(targetdir) | ||
| 62 | + $(Q)cp -r $O/.config $(DESTDIR)$(targetdir) | ||
| 63 | + $(Q)cp -r $(RTE_SDK)/examples/ethtool/lib/$(RTE_TARGET)/lib/* $(DESTDIR)$(libdir) | ||
| 64 | $(Q)$(call rte_symlink, $(DESTDIR)$(includedir), $(DESTDIR)$(targetdir)/include) | ||
| 65 | $(Q)$(call rte_symlink, $(DESTDIR)$(libdir), $(DESTDIR)$(targetdir)/lib) | ||
| 66 | |||
| 67 | @@ -155,7 +153,7 @@ ifneq ($(wildcard $O/doc),) | ||
| 68 | endif | ||
| 69 | ifneq ($(wildcard $O/doc/*/*/*pdf),) | ||
| 70 | $(Q)$(call rte_mkdir, $(DESTDIR)$(docdir)/guides) | ||
| 71 | - $(Q)cp -a $O/doc/*/*/*pdf $(DESTDIR)$(docdir)/guides | ||
| 72 | + $(Q)cp -r $O/doc/*/*/*pdf $(DESTDIR)$(docdir)/guides | ||
| 73 | endif | ||
| 74 | $(Q)$(call rte_mkdir, $(DESTDIR)$(datadir)) | ||
| 75 | - $(Q)cp -a $(RTE_SDK)/examples $(DESTDIR)$(datadir) | ||
| 76 | + $(Q)cp -r $(RTE_SDK)/examples $(DESTDIR)$(datadir) | ||
| 77 | -- | ||
| 78 | 1.9.1 | ||
| 79 | |||
