diff options
author | Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> | 2016-10-18 23:22:32 +0800 |
---|---|---|
committer | Saul Wold <sgw@linux.intel.com> | 2016-10-18 12:02:20 -0700 |
commit | b7747142dc46c14ced422d992d38c612a54b765c (patch) | |
tree | 7a3e524e33aca40c095cff7751b5b9ee03718b38 /common/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb | |
parent | 485f82ab71604173b698b55a8f4495b3741ce538 (diff) | |
download | meta-intel-b7747142dc46c14ced422d992d38c612a54b765c.tar.gz |
zlib-qat: move zlib-qat from meta-isg to common
Since there is plan to merge meta-isg layer to common meta-intel
layer. So relocate zlib-qat v0.4.7-002 recipe from meta-isg layer
to meta-intel/common layer.
Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'common/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb')
-rw-r--r-- | common/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb | 127 |
1 files changed, 127 insertions, 0 deletions
diff --git a/common/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb b/common/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb new file mode 100644 index 00000000..825fbfa7 --- /dev/null +++ b/common/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb | |||
@@ -0,0 +1,127 @@ | |||
1 | SUMMARY = "Zlib QAT_MEM Memory Management Module for Intel Quick Assist \ | ||
2 | Technology" | ||
3 | |||
4 | DESCRIPTION = "This software acelerates the data compression algorithm \ | ||
5 | in the zlib software library via the Intel QuickAssist Technology \ | ||
6 | implemented on Intel Communications Chipset 89xx and 895x Series based platforms." | ||
7 | |||
8 | HOMEPAGE = "http://zlib.net/" | ||
9 | SECTION = "libs" | ||
10 | LICENSE = "Zlib & GPLv2 & BSD" | ||
11 | LIC_FILES_CHKSUM = "file://${WORKDIR}/zlib-${ZLIB_VERSION}/zlib.h;beginline=4;endline=23;md5=fde612df1e5933c428b73844a0c494fd \ | ||
12 | file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6 \ | ||
13 | file://${COMMON_LICENSE_DIR}/BSD;md5=3775480a712fc46a69647678acb234cb" | ||
14 | |||
15 | # For target side versions of openssl enable support for OCF Linux driver | ||
16 | # if they are available. | ||
17 | DEPENDS += "cryptodev-linux pkgconfig virtual/qat" | ||
18 | |||
19 | SRC_URI = "http://www.zlib.net/zlib-${ZLIB_VERSION}.tar.gz;name=zlib \ | ||
20 | https://01.org/sites/default/files/page/zlib_shim_0.4.7-002_withdocumentation.zip;name=zlibqat \ | ||
21 | file://zlib-qat-0.4.7-002-qat_mem-build-qat_mem-ko-against-yocto-kernel-src.patch \ | ||
22 | file://zlib-qat-0.4.7-002-zlib-qat-add-a-install-target-to-makefile.patch \ | ||
23 | file://zlib-qat-0.4.7-002-zlib-Remove-rpaths-from-makefile.patch \ | ||
24 | " | ||
25 | |||
26 | SRC_URI[zlib.md5sum] = "44d667c142d7cda120332623eab69f40" | ||
27 | SRC_URI[zlib.sha256sum] = "36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d" | ||
28 | |||
29 | SRC_URI[zlibqat.md5sum] = "dfde8618198aa8d35ecc00d10dcc7000" | ||
30 | SRC_URI[zlibqat.sha256sum] = "8e5786400bbc2a879ae705c864ec63b53ae019b4f2d1c94524a97223847b6e46" | ||
31 | |||
32 | COMPATIBLE_MACHINE = "crystalforest|intel-corei7-64" | ||
33 | |||
34 | ZLIB_VERSION = "1.2.8" | ||
35 | ZLIB_QAT_VERSION = "0.4.7-002" | ||
36 | QAT_PATCH_VERSION = "l.0.4.7_002" | ||
37 | |||
38 | S = "${WORKDIR}/zlib-${ZLIB_VERSION}" | ||
39 | |||
40 | export ICP_ROOT = "${S}" | ||
41 | export ZLIB_ROOT = "${S}" | ||
42 | export KERNEL_SOURCE_ROOT = "${STAGING_KERNEL_DIR}" | ||
43 | export KERNEL_BUILDDIR = "${STAGING_KERNEL_BUILDDIR}" | ||
44 | export ICP_LAC_API_DIR = "${STAGING_DIR_TARGET}${includedir}/lac" | ||
45 | export ICP_DC_API_DIR = "${STAGING_DIR_TARGET}${includedir}/dc" | ||
46 | export ZLIB_DH895XCC = "1" | ||
47 | export ZLIB_MEMORY_DRIVER = "qat_mem" | ||
48 | export ICP_BUILD_OUTPUT = "${STAGING_DIR_TARGET}" | ||
49 | EXTRA_OEMAKE = "-e MAKEFLAGS=" | ||
50 | TARGET_CC_ARCH += "${LDFLAGS}" | ||
51 | |||
52 | inherit module | ||
53 | MEM_PATH = "${S}/contrib/qat" | ||
54 | |||
55 | zlibqat_do_patch() { | ||
56 | cd ${WORKDIR} | ||
57 | unzip -q -o zlib_quickassist_patch_${QAT_PATCH_VERSION}_stable.zip | ||
58 | cd zlib_quickassist_patch_${QAT_PATCH_VERSION}_devbranch | ||
59 | tar -xvzf zlib-${ZLIB_VERSION}-qat.L.${ZLIB_QAT_VERSION}.tar.gz | ||
60 | cp -f zlib-${ZLIB_VERSION}-qat.patch ${WORKDIR} | ||
61 | cd ${S} | ||
62 | if [ ! -d ${S}/debian/patches ]; then | ||
63 | mkdir -p ${S}/debian/patches | ||
64 | cp -f ${WORKDIR}/zlib-${ZLIB_VERSION}-qat.patch ${S}/debian/patches | ||
65 | echo "zlib-${ZLIB_VERSION}-qat.patch -p1" > ${S}/debian/patches/series | ||
66 | fi | ||
67 | quilt pop -a || true | ||
68 | if [ -d ${S}/.pc-zlibqat ]; then | ||
69 | rm -rf ${S}/.pc | ||
70 | mv ${S}/.pc-zlibqat ${S}/.pc | ||
71 | QUILT_PATCHES=${S}/debian/patches quilt pop -a | ||
72 | rm -rf ${S}/.pc | ||
73 | fi | ||
74 | QUILT_PATCHES=${S}/debian/patches quilt push -a | ||
75 | mv ${S}/.pc ${S}/.pc-zlibqat | ||
76 | } | ||
77 | |||
78 | # We invoke base do_patch at end, to incorporate any local patch | ||
79 | python do_patch() { | ||
80 | bb.build.exec_func('zlibqat_do_patch', d) | ||
81 | bb.build.exec_func('patch_do_patch', d) | ||
82 | } | ||
83 | |||
84 | do_configure() { | ||
85 | ./configure --prefix=${prefix} --shared --libdir=${libdir} | ||
86 | } | ||
87 | |||
88 | do_compile() { | ||
89 | unset CFLAGS CXXFLAGS | ||
90 | oe_runmake | ||
91 | |||
92 | cd ${S}/contrib/qat/qat_mem | ||
93 | oe_runmake | ||
94 | |||
95 | cd ${S}/contrib/qat/qat_zlib_test | ||
96 | oe_runmake | ||
97 | } | ||
98 | |||
99 | do_install() { | ||
100 | install -m 0755 -d ${D}${bindir}/ | ||
101 | install -m 0755 -d ${D}${sysconfdir}/zlib_conf/ | ||
102 | |||
103 | install -m 0755 zpipe ${D}${bindir} | ||
104 | install -m 0755 minigzip ${D}${bindir} | ||
105 | |||
106 | cd ${MEM_PATH}/qat_mem | ||
107 | oe_runmake INSTALL_MOD_PATH=${D} INSTALL_MOD_DIR="kernel/drivers" install | ||
108 | |||
109 | cd ${S}/contrib/qat/qat_zlib_test | ||
110 | oe_runmake DESTDIR=${D} install | ||
111 | |||
112 | install -m 660 ${MEM_PATH}/config/dh895xcc/multi_thread_optimized/* ${D}${sysconfdir}/zlib_conf/ | ||
113 | } | ||
114 | |||
115 | PACKAGES += "${PN}-app" | ||
116 | |||
117 | FILES_${PN} += " \ | ||
118 | ${sysconfdir}/zlib_conf/ \ | ||
119 | " | ||
120 | |||
121 | FILES_${PN}-app += " \ | ||
122 | ${bindir}/* \ | ||
123 | " | ||
124 | |||
125 | FILES_${PN}-dbg += " \ | ||
126 | ${bindir}/.debug \ | ||
127 | " | ||