diff options
Diffstat (limited to 'meta-isg/common/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb')
-rw-r--r-- | meta-isg/common/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb | 113 |
1 files changed, 113 insertions, 0 deletions
diff --git a/meta-isg/common/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb b/meta-isg/common/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb new file mode 100644 index 00000000..b3dc19cb --- /dev/null +++ b/meta-isg/common/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb | |||
@@ -0,0 +1,113 @@ | |||
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" | ||
33 | |||
34 | ZLIB_VERSION = "1.2.8" | ||
35 | ZLIB_QAT_VERSION = "0.4.7-002" | ||
36 | |||
37 | S = "${WORKDIR}/zlib-${ZLIB_VERSION}" | ||
38 | |||
39 | export ICP_ROOT = "${S}" | ||
40 | export ZLIB_ROOT = "${S}" | ||
41 | export KERNEL_SOURCE_ROOT = "${STAGING_KERNEL_DIR}" | ||
42 | export KERNEL_BUILDDIR = "${STAGING_KERNEL_BUILDDIR}" | ||
43 | export ICP_LAC_API_DIR = "${STAGING_DIR_TARGET}${includedir}/lac" | ||
44 | export ICP_DC_API_DIR = "${STAGING_DIR_TARGET}${includedir}/dc" | ||
45 | export ZLIB_DH895XCC = "1" | ||
46 | export ZLIB_MEMORY_DRIVER = "qat_mem" | ||
47 | export ICP_BUILD_OUTPUT = "${STAGING_DIR_TARGET}" | ||
48 | |||
49 | inherit module | ||
50 | MEM_PATH = "${S}/contrib/qat" | ||
51 | |||
52 | do_unpack2(){ | ||
53 | cd ${WORKDIR}/ | ||
54 | unzip zlib_quickassist_patch_l.0.4.7_002_stable.zip | ||
55 | cd zlib_quickassist_patch_l.0.4.7_002_devbranch | ||
56 | tar -xvzf zlib-1.2.8-qat.L.0.4.7-002.tar.gz | ||
57 | cp zlib-1.2.8-qat.patch ${WORKDIR} | ||
58 | } | ||
59 | |||
60 | addtask unpack2 after do_unpack before do_patch | ||
61 | |||
62 | do_patch() { | ||
63 | cd ${S} | ||
64 | patch -p1 < ${WORKDIR}/zlib-1.2.8-qat.patch | ||
65 | patch -p1 < ${WORKDIR}/zlib-qat-0.4.7-002-qat_mem-build-qat_mem-ko-against-yocto-kernel-src.patch | ||
66 | patch -p1 < ${WORKDIR}/zlib-qat-0.4.7-002-zlib-qat-add-a-install-target-to-makefile.patch | ||
67 | patch -p1 < ${WORKDIR}/zlib-qat-0.4.7-002-zlib-Remove-rpaths-from-makefile.patch | ||
68 | } | ||
69 | |||
70 | do_configure() { | ||
71 | ./configure --prefix=${prefix} --shared --libdir=${libdir} | ||
72 | } | ||
73 | |||
74 | do_compile() { | ||
75 | unset CFLAGS CXXFLAGS | ||
76 | oe_runmake | ||
77 | |||
78 | cd ${S}/contrib/qat/qat_mem | ||
79 | oe_runmake | ||
80 | |||
81 | cd ${S}/contrib/qat/qat_zlib_test | ||
82 | oe_runmake | ||
83 | } | ||
84 | |||
85 | do_install() { | ||
86 | install -m 0755 -d ${D}${bindir}/ | ||
87 | install -m 0755 -d ${D}${sysconfdir}/zlib_conf/ | ||
88 | |||
89 | install -m 0755 zpipe ${D}${bindir} | ||
90 | install -m 0755 minigzip ${D}${bindir} | ||
91 | |||
92 | cd ${MEM_PATH}/qat_mem | ||
93 | oe_runmake INSTALL_MOD_PATH=${D} INSTALL_MOD_DIR="kernel/drivers" install | ||
94 | |||
95 | cd ${S}/contrib/qat/qat_zlib_test | ||
96 | oe_runmake DESTDIR=${D} install | ||
97 | |||
98 | install -m 660 ${MEM_PATH}/config/dh895xcc/multi_thread_optimized/* ${D}${sysconfdir}/zlib_conf/ | ||
99 | } | ||
100 | |||
101 | PACKAGES += "${PN}-app" | ||
102 | |||
103 | FILES_${PN} += " \ | ||
104 | ${sysconfdir}/zlib_conf/ \ | ||
105 | " | ||
106 | |||
107 | FILES_${PN}-app += " \ | ||
108 | ${bindir}/* \ | ||
109 | " | ||
110 | |||
111 | FILES_${PN}-dbg += " \ | ||
112 | ${bindir}/.debug \ | ||
113 | " | ||