summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTan, Raymond <raymond.tan@intel.com>2018-09-04 22:46:14 +0800
committerAnuj Mittal <anuj.mittal@intel.com>2018-09-04 22:31:38 +0800
commit1f03a46ab13b46f14beb2c566734d5fdd35f28f7 (patch)
treeecbdbfe420fddd12223a7ffa3c5f1cdc04df66b8
parent2eecd72ce9d42c3dcfca1bbee8a680386c8f385d (diff)
downloadmeta-intel-qat-1f03a46ab13b46f14beb2c566734d5fdd35f28f7.tar.gz
zlib-qat: add common zlib-qat.inc and zlib-qat shim version 0.4.10-001
This patch will do the following: 1) add zlib-qat.inc for common components across the zlib-qat shim version 0.4.7 and 0.4.10 2) add zlib-qat shim layer version 0.4.10-001, which works with QAT 1.7 hardware and uses the CMN driver(libusdm) provided by QAT17 package 3) inherit module.bbclass only in zlib-qat-0.4.7-002, which builds OOT kernel module (qat_mem.ko) 4) DEPENDS variable updated to respective zlib-qat shim version to respective QAT version; ver. 0.4.7-002 -> qat16, and ver. 0.4.10-001 -> qat17 Signed-off-by: Tan, Raymond <raymond.tan@intel.com>
-rw-r--r--recipes-extended/zlib-qat/zlib-qat.inc87
-rw-r--r--recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.10-001-zlib-Remove-rpaths-from-makefile.patch63
-rw-r--r--recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.10-001-zlib-qat-add-a-install-target-to-makefile.patch30
-rw-r--r--recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.10-001-zlib-qat-correct-the-order-for-static-linking-libude.patch31
-rw-r--r--recipes-extended/zlib-qat/zlib-qat_0.4.10-001.bb43
-rw-r--r--recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb99
6 files changed, 277 insertions, 76 deletions
diff --git a/recipes-extended/zlib-qat/zlib-qat.inc b/recipes-extended/zlib-qat/zlib-qat.inc
new file mode 100644
index 0000000..9e631c1
--- /dev/null
+++ b/recipes-extended/zlib-qat/zlib-qat.inc
@@ -0,0 +1,87 @@
1SUMMARY = "Zlib QAT_MEM Memory Management Module for Intel Quick Assist \
2Technology"
3
4DESCRIPTION = "This software acelerates the data compression algorithm \
5in the zlib software library via the Intel QuickAssist Technology"
6
7HOMEPAGE = "http://zlib.net/"
8SECTION = "libs"
9LICENSE = "Zlib & GPLv2 & BSD"
10LIC_FILES_CHKSUM = "file://${WORKDIR}/zlib-${ZLIB_VERSION}/zlib.h;beginline=4;endline=23;md5=fde612df1e5933c428b73844a0c494fd \
11 file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6 \
12 file://${COMMON_LICENSE_DIR}/BSD;md5=3775480a712fc46a69647678acb234cb"
13
14# For target side versions of openssl enable support for OCF Linux driver
15# if they are available.
16DEPENDS += "cryptodev-linux pkgconfig udev"
17
18SRC_URI = "http://www.zlib.net/zlib-${ZLIB_VERSION}.tar.gz;name=zlib \
19 "
20SRC_URI_append_libc-musl = " file://0001-qat_zlib.h-Add-pthread.h-for-MUSL.patch"
21
22SRC_URI[zlib.md5sum] = "44d667c142d7cda120332623eab69f40"
23SRC_URI[zlib.sha256sum] = "36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d"
24
25COMPATIBLE_MACHINE = "null"
26
27ZLIB_VERSION = "1.2.8"
28
29S = "${WORKDIR}/zlib-${ZLIB_VERSION}"
30
31export ICP_ROOT = "${S}"
32export ZLIB_ROOT = "${S}"
33export KERNEL_SOURCE_ROOT = "${STAGING_KERNEL_DIR}"
34export KERNEL_BUILDDIR = "${STAGING_KERNEL_BUILDDIR}"
35export ICP_LAC_API_DIR = "${STAGING_DIR_TARGET}${includedir}/lac"
36export ICP_DC_API_DIR = "${STAGING_DIR_TARGET}${includedir}/dc"
37export ICP_BUILD_OUTPUT = "${STAGING_DIR_TARGET}"
38
39EXTRA_OEMAKE = "-e MAKEFLAGS="
40TARGET_CC_ARCH += "${LDFLAGS}"
41
42MEM_PATH = "${S}/contrib/qat"
43
44# We invoke base do_patch at end, to incorporate any local patch
45python do_patch() {
46 bb.build.exec_func('zlibqat_do_patch', d)
47 bb.build.exec_func('patch_do_patch', d)
48}
49
50do_configure() {
51 ./configure --prefix=${prefix} --shared --libdir=${libdir}
52}
53
54do_compile() {
55 unset CFLAGS CXXFLAGS
56 oe_runmake
57
58 cd ${S}/contrib/qat/qat_zlib_test
59 oe_runmake
60}
61
62do_install() {
63 install -m 0755 -d ${D}${bindir}/
64 install -m 0755 -d ${D}${sysconfdir}/zlib_conf/
65
66 install -m 0755 zpipe ${D}${bindir}
67 install -m 0755 minigzip ${D}${bindir}
68
69 cd ${S}/contrib/qat/qat_zlib_test
70 oe_runmake DESTDIR=${D} install
71}
72
73PACKAGE_BEFORE_PN = "${PN}-app"
74
75FILES_${PN} += " \
76 ${sysconfdir}/zlib_conf/ \
77 "
78
79FILES_${PN}-app += " \
80 ${bindir}/* \
81 "
82
83FILES_${PN}-dbg += " \
84 ${bindir}/.debug \
85 "
86
87EXCLUDE_FROM_WORLD_core2-32-intel-common = "1"
diff --git a/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.10-001-zlib-Remove-rpaths-from-makefile.patch b/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.10-001-zlib-Remove-rpaths-from-makefile.patch
new file mode 100644
index 0000000..2da2bb7
--- /dev/null
+++ b/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.10-001-zlib-Remove-rpaths-from-makefile.patch
@@ -0,0 +1,63 @@
1From d14d6ea2072ede5d1afddf738cb1801263e90d70 Mon Sep 17 00:00:00 2001
2From: "Tan, Raymond" <raymond.tan@intel.com>
3Date: Fri, 10 Aug 2018 15:45:38 +0800
4Subject: [PATCH 2/3] zlib: Remove rpaths from makefile
5
6Upstream-Status: Inappropriate [configuration]
7
8This removes references to RPATHS that are no longer
9necesary when building using bitbake.
10
11Signed-off-by: Tan, Raymond <raymond.tan@intel.com>
12---
13 Makefile.in | 9 +++++----
14 contrib/qat/qat_zlib_test/Makefile | 3 ---
15 2 files changed, 5 insertions(+), 7 deletions(-)
16
17diff --git a/Makefile.in b/Makefile.in
18index 0100f59..8978ef1 100644
19--- a/Makefile.in
20+++ b/Makefile.in
21@@ -59,12 +59,13 @@ ICP_LAC_API_DIR=$(ICP_API_DIR)/lac/
22 ICP_DC_API_DIR=$(ICP_API_DIR)/dc/
23 CFLAGS+=-D_GNU_SOURCE -I$(ICP_API_DIR) -I$(ICP_DC_API_DIR) -I$(ICP_LAC_API_DIR) -I$(ICP_SAL_API_DIR)
24 SFLAGS+=-D_GNU_SOURCE -I$(ICP_API_DIR) -I$(ICP_DC_API_DIR) -I$(ICP_LAC_API_DIR) -I$(ICP_SAL_API_DIR)
25-ADDITIONAL_LDFLAGS+=-Wl,-rpath,$(ZLIB_ROOT) -lz
26-SHARED_APP_FLAGS=-Wl,-rpath,$(ZLIB_ROOT) -L$(ZLIB_ROOT) -lz
27+#ADDITIONAL_LDFLAGS+=-Wl,-rpath,$(ZLIB_ROOT) -lz
28+#SHARED_APP_FLAGS=-Wl,-rpath,$(ZLIB_ROOT) -L$(ZLIB_ROOT) -lz
29+SHARED_APP_FLAGS=-L$(ZLIB_ROOT) -lz
30
31 ifdef ICP_BUILD_OUTPUT
32 TEST_LDFLAGS+=-L$(ICP_BUILD_OUTPUT)
33- ADDITIONAL_LDFLAGS+=-Wl,-rpath,$(ICP_BUILD_OUTPUT) -L$(ICP_BUILD_OUTPUT)
34+# ADDITIONAL_LDFLAGS+=-Wl,-rpath,$(ICP_BUILD_OUTPUT) -L$(ICP_BUILD_OUTPUT)
35 endif
36
37 ifdef UPSTREAM_DRIVER_CMN_ROOT
38@@ -91,7 +92,7 @@ ADDITIONAL_SHAREDLIBC=-L$(ICP_BUILD_OUTPUT) -l$(DRIVER)_s -lpthread -lrt
39
40 ifeq ($(ZLIB_MEMORY_DRIVER),usdm_drv)
41 TEST_LDFLAGS+= $(CMN_ROOT)/libusdm_drv.a
42-ADDITIONAL_LDFLAGS+=-Wl,-rpath,$(CMN_ROOT) -L$(CMN_ROOT) -lusdm_drv_s
43+#ADDITIONAL_LDFLAGS+=-Wl,-rpath,$(CMN_ROOT) -L$(CMN_ROOT) -lusdm_drv_s
44 endif
45
46 STATICLIB=libz.a
47diff --git a/contrib/qat/qat_zlib_test/Makefile b/contrib/qat/qat_zlib_test/Makefile
48index 47829ac..bfcf86d 100644
49--- a/contrib/qat/qat_zlib_test/Makefile
50+++ b/contrib/qat/qat_zlib_test/Makefile
51@@ -85,9 +85,6 @@ COVERAGE_OBJS =
52 EXE=
53 LIBQAT=
54 UDEV=
55-ifdef ICP_BUILD_OUTPUT
56- LIBQAT+= -Wl,-rpath,$(ICP_BUILD_OUTPUT) -L$(ICP_BUILD_OUTPUT)
57-endif
58
59 ifdef UPSTREAM_DRIVER_CMN_ROOT
60 DRIVER=qat
61--
621.9.1
63
diff --git a/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.10-001-zlib-qat-add-a-install-target-to-makefile.patch b/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.10-001-zlib-qat-add-a-install-target-to-makefile.patch
new file mode 100644
index 0000000..3a202e9
--- /dev/null
+++ b/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.10-001-zlib-qat-add-a-install-target-to-makefile.patch
@@ -0,0 +1,30 @@
1From 943dd3c2b9d68385c9e71b1cc215cf03e2dd74fd Mon Sep 17 00:00:00 2001
2From: "Tan, Raymond" <raymond.tan@intel.com>
3Date: Wed, 29 Aug 2018 13:35:44 +0800
4Subject: [PATCH 1/3] zlib-qat: add a install target to makefile
5
6Upstream-Status: Inappropriate [Configuration]$
7
8This adds an install target to qat_zlib_test makefiles
9to facilitate the installation of test binaries to {D}.
10
11Signed-off-by: Tan, Raymond <raymond.tan@intel.com>
12---
13 contrib/qat/qat_zlib_test/Makefile | 2 ++
14 1 file changed, 2 insertions(+)
15
16diff --git a/contrib/qat/qat_zlib_test/Makefile b/contrib/qat/qat_zlib_test/Makefile
17index 7b86028..47829ac 100644
18--- a/contrib/qat/qat_zlib_test/Makefile
19+++ b/contrib/qat/qat_zlib_test/Makefile
20@@ -132,5 +132,7 @@ comptestappsh$(EXE): $(OBJS) Makefile
21 $(CC) -o comptestappsh $(OBJS) $(COVERAGE) \
22 $(SHAREDLIBQAT)
23
24+install:
25+ cp comptestapp $(DESTDIR)$(bindir)
26 clean:
27 rm -f $(OBJS) $(COVERAGE_OBJS) comptestapp comptestappsh
28--
291.9.1
30
diff --git a/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.10-001-zlib-qat-correct-the-order-for-static-linking-libude.patch b/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.10-001-zlib-qat-correct-the-order-for-static-linking-libude.patch
new file mode 100644
index 0000000..5352cb9
--- /dev/null
+++ b/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.10-001-zlib-qat-correct-the-order-for-static-linking-libude.patch
@@ -0,0 +1,31 @@
1From 7d74f6aa82042c2bb03e46fafe580bf4d117a24a Mon Sep 17 00:00:00 2001
2From: "Tan, Raymond" <raymond.tan@intel.com>
3Date: Thu, 16 Aug 2018 14:29:05 +0800
4Subject: [PATCH 3/3] zlib-qat: correct the order for static linking libudev
5
6Upstream-Status: Inappropriate [Configuration]
7
8This changes the order of linking command to link libudev after libadf
9to avoid undefined reference on udev.
10
11Signed-off-by: Tan, Raymond <raymond.tan@intel.com>
12---
13 contrib/qat/qat_zlib_test/Makefile | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/contrib/qat/qat_zlib_test/Makefile b/contrib/qat/qat_zlib_test/Makefile
17index bfcf86d..0498da8 100644
18--- a/contrib/qat/qat_zlib_test/Makefile
19+++ b/contrib/qat/qat_zlib_test/Makefile
20@@ -101,7 +101,7 @@ ifdef WITH_CPA_MUX
21 endif
22
23 SHAREDLIBQAT= -Wl,-rpath,$(ZLIB_ROOT) -L$(ZLIB_ROOT) -lz -ldl -lrt -lpthread
24-STATICLIBQAT= $(ZLIB_ROOT)/libz.a $(LIBQAT) $(UDEV) -l$(DRIVER) -l$(ADFPROXY) -losal -lcrypto -ldl -lrt -lpthread
25+STATICLIBQAT= $(ZLIB_ROOT)/libz.a $(LIBQAT) -l$(DRIVER) -l$(ADFPROXY) -losal -lcrypto -ldl -lrt -lpthread $(UDEV)
26
27 ifeq ($(ZLIB_MEMORY_DRIVER),usdm_drv)
28 STATICLIBQAT+= $(CMN_ROOT)/libusdm_drv.a
29--
301.9.1
31
diff --git a/recipes-extended/zlib-qat/zlib-qat_0.4.10-001.bb b/recipes-extended/zlib-qat/zlib-qat_0.4.10-001.bb
new file mode 100644
index 0000000..277a90f
--- /dev/null
+++ b/recipes-extended/zlib-qat/zlib-qat_0.4.10-001.bb
@@ -0,0 +1,43 @@
1require zlib-qat.inc
2
3DEPENDS += "qat17"
4
5SRC_URI += "https://01.org/sites/default/files/downloads/intelr-quickassist-technology/zlibshim0.4.10-001.tar.gz;name=zlibqat \
6 file://zlib-qat-0.4.10-001-zlib-qat-add-a-install-target-to-makefile.patch \
7 file://zlib-qat-0.4.10-001-zlib-Remove-rpaths-from-makefile.patch \
8 file://zlib-qat-0.4.10-001-zlib-qat-correct-the-order-for-static-linking-libude.patch \
9 "
10
11SRC_URI[zlibqat.md5sum] = "449e5b8dd41e49df1cced144b54d5bc1"
12SRC_URI[zlibqat.sha256sum] = "d9d288951a1c4b92d3261d2fcbbacf79168b09bd6528fea31fa82bb7c3139f03"
13
14ZLIB_QAT_VERSION = "0.4.10-001"
15
16export ZLIB_MEMORY_DRIVER = "usdm_drv"
17export CMN_ROOT = "${STAGING_DIR_TARGET}/lib"
18export UPSTREAM_DRIVER_CMN_ROOT = "${STAGING_DIR_TARGET}/lib"
19
20zlibqat_do_patch() {
21 cd ${WORKDIR}
22 tar -xvzf zlib-${ZLIB_VERSION}-qat.L.${ZLIB_QAT_VERSION}.tar.gz
23 cd ${S}
24 if [ ! -d ${S}/debian/patches ]; then
25 mkdir -p ${S}/debian/patches
26 cp -f ${WORKDIR}/zlib-${ZLIB_VERSION}-qat.patch ${S}/debian/patches
27 echo "zlib-${ZLIB_VERSION}-qat.patch -p1" > ${S}/debian/patches/series
28 fi
29 quilt pop -a || true
30 if [ -d ${S}/.pc-zlibqat ]; then
31 rm -rf ${S}/.pc
32 mv ${S}/.pc-zlibqat ${S}/.pc
33 QUILT_PATCHES=${S}/debian/patches quilt pop -a
34 rm -rf ${S}/.pc
35 fi
36 QUILT_PATCHES=${S}/debian/patches quilt push -a
37 mv ${S}/.pc ${S}/.pc-zlibqat
38}
39
40do_install_append() {
41 install -m 660 ${MEM_PATH}/config/c3xxx/multi_thread_optimized/* ${D}${sysconfdir}/zlib_conf/
42 install -m 660 ${MEM_PATH}/config/c6xx/multi_thread_optimized/* ${D}${sysconfdir}/zlib_conf/
43}
diff --git a/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb b/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb
index 90e036f..c2de063 100644
--- a/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb
+++ b/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb
@@ -1,60 +1,27 @@
1SUMMARY = "Zlib QAT_MEM Memory Management Module for Intel Quick Assist \ 1require zlib-qat.inc
2Technology" 2
3 3DEPENDS += "qat16"
4DESCRIPTION = "This software acelerates the data compression algorithm \ 4
5in the zlib software library via the Intel QuickAssist Technology \ 5SRC_URI += "https://01.org/sites/default/files/page/zlib_shim_0.4.7-002_withdocumentation.zip;name=zlibqat \
6implemented on Intel Communications Chipset 89xx and 895x Series based platforms."
7
8HOMEPAGE = "http://zlib.net/"
9SECTION = "libs"
10LICENSE = "Zlib & GPLv2 & BSD"
11LIC_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.
17DEPENDS += "cryptodev-linux pkgconfig virtual/qat"
18
19SRC_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 \ 6 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 \ 7 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 \ 8 file://zlib-qat-0.4.7-002-zlib-Remove-rpaths-from-makefile.patch \
24 " 9 "
25SRC_URI_append_libc-musl = " file://0001-qat_zlib.h-Add-pthread.h-for-MUSL.patch"
26
27SRC_URI[zlib.md5sum] = "44d667c142d7cda120332623eab69f40"
28SRC_URI[zlib.sha256sum] = "36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d"
29 10
30SRC_URI[zlibqat.md5sum] = "dfde8618198aa8d35ecc00d10dcc7000" 11SRC_URI[zlibqat.md5sum] = "dfde8618198aa8d35ecc00d10dcc7000"
31SRC_URI[zlibqat.sha256sum] = "8e5786400bbc2a879ae705c864ec63b53ae019b4f2d1c94524a97223847b6e46" 12SRC_URI[zlibqat.sha256sum] = "8e5786400bbc2a879ae705c864ec63b53ae019b4f2d1c94524a97223847b6e46"
32 13
33COMPATIBLE_MACHINE = "null"
34
35ZLIB_VERSION = "1.2.8"
36ZLIB_QAT_VERSION = "0.4.7-002" 14ZLIB_QAT_VERSION = "0.4.7-002"
37QAT_PATCH_VERSION = "l.0.4.7_002" 15QAT_PATCH_VERSION = "l.0.4.7_002"
38 16
39S = "${WORKDIR}/zlib-${ZLIB_VERSION}"
40
41export ICP_ROOT = "${S}"
42export ZLIB_ROOT = "${S}"
43export KERNEL_SOURCE_ROOT = "${STAGING_KERNEL_DIR}"
44export KERNEL_BUILDDIR = "${STAGING_KERNEL_BUILDDIR}"
45export ICP_LAC_API_DIR = "${STAGING_DIR_TARGET}${includedir}/lac"
46export ICP_DC_API_DIR = "${STAGING_DIR_TARGET}${includedir}/dc"
47export ZLIB_DH895XCC = "1" 17export ZLIB_DH895XCC = "1"
48export ZLIB_MEMORY_DRIVER = "qat_mem" 18export ZLIB_MEMORY_DRIVER = "qat_mem"
49export ICP_BUILD_OUTPUT = "${STAGING_DIR_TARGET}"
50EXTRA_OEMAKE = "-e MAKEFLAGS="
51TARGET_CC_ARCH += "${LDFLAGS}"
52 19
20# qat_mem OOT kernel module, thus inherit module.bbclass
53inherit module 21inherit module
54MEM_PATH = "${S}/contrib/qat"
55 22
56zlibqat_do_patch() { 23zlibqat_do_patch() {
57 cd ${WORKDIR} 24 cd ${WORKDIR}
58 unzip -q -o zlib_quickassist_patch_${QAT_PATCH_VERSION}_stable.zip 25 unzip -q -o zlib_quickassist_patch_${QAT_PATCH_VERSION}_stable.zip
59 cd zlib_quickassist_patch_${QAT_PATCH_VERSION}_devbranch 26 cd zlib_quickassist_patch_${QAT_PATCH_VERSION}_devbranch
60 tar -xvzf zlib-${ZLIB_VERSION}-qat.L.${ZLIB_QAT_VERSION}.tar.gz 27 tar -xvzf zlib-${ZLIB_VERSION}-qat.L.${ZLIB_QAT_VERSION}.tar.gz
@@ -76,58 +43,38 @@ zlibqat_do_patch() {
76 mv ${S}/.pc ${S}/.pc-zlibqat 43 mv ${S}/.pc ${S}/.pc-zlibqat
77} 44}
78 45
79# We invoke base do_patch at end, to incorporate any local patch 46# do_compile will override the module_do_compile from inherited module.bbclass
80python do_patch() { 47# which causes issues for components other than qat_mem.ko
81 bb.build.exec_func('zlibqat_do_patch', d)
82 bb.build.exec_func('patch_do_patch', d)
83}
84
85#addtask zlibqat_patch after do_prepare_recipe_sysroot before patch_do_patch
86#addtask do_zlibqat_patch after do_prepare_recipe_sysroot before do_configure
87
88do_configure() {
89 ./configure --prefix=${prefix} --shared --libdir=${libdir}
90}
91
92do_compile() { 48do_compile() {
93 unset CFLAGS CXXFLAGS 49 unset CFLAGS CXXFLAGS
94 oe_runmake 50 oe_runmake
95 51
96 cd ${S}/contrib/qat/qat_mem 52 cd ${S}/contrib/qat/qat_zlib_test
97 oe_runmake 53 oe_runmake
98 54
99 cd ${S}/contrib/qat/qat_zlib_test 55 cd ${S}/contrib/qat/qat_mem
100 oe_runmake 56 oe_runmake
101} 57}
102 58
59# do_install will override the module_do_install inherited from module.bbclass
60# which causes issues for components other than qat_mem.ko
103do_install() { 61do_install() {
104 install -m 0755 -d ${D}${bindir}/ 62 install -m 0755 -d ${D}${bindir}/
105 install -m 0755 -d ${D}${sysconfdir}/zlib_conf/ 63 install -m 0755 -d ${D}${sysconfdir}/zlib_conf/
106 64
107 install -m 0755 zpipe ${D}${bindir} 65 install -m 0755 zpipe ${D}${bindir}
108 install -m 0755 minigzip ${D}${bindir} 66 install -m 0755 minigzip ${D}${bindir}
109 67
110 cd ${MEM_PATH}/qat_mem
111 oe_runmake INSTALL_MOD_PATH=${D} INSTALL_MOD_DIR="kernel/drivers" install
112
113 cd ${S}/contrib/qat/qat_zlib_test 68 cd ${S}/contrib/qat/qat_zlib_test
114 oe_runmake DESTDIR=${D} install 69 oe_runmake DESTDIR=${D} install
115 70
116 install -m 660 ${MEM_PATH}/config/dh895xcc/multi_thread_optimized/* ${D}${sysconfdir}/zlib_conf/ 71 cd ${MEM_PATH}/qat_mem
117} 72 oe_runmake INSTALL_MOD_PATH=${D} INSTALL_MOD_DIR="kernel/drivers" install
118 73
119PACKAGES += "${PN}-app" 74 install -m 660 ${MEM_PATH}/config/dh895xcc/multi_thread_optimized/* ${D}${sysconfdir}/zlib_conf/
75}
120 76
77# module.bbclass will reset FILES variable
121FILES_${PN} += " \ 78FILES_${PN} += " \
122 ${sysconfdir}/zlib_conf/ \ 79 ${sysconfdir}/zlib_conf/ \
123 " 80 "
124
125FILES_${PN}-app += " \
126 ${bindir}/* \
127 "
128
129FILES_${PN}-dbg += " \
130 ${bindir}/.debug \
131 "
132
133EXCLUDE_FROM_WORLD_core2-32-intel-common = "1"