aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 @@
+SUMMARY = "Zlib QAT_MEM Memory Management Module for Intel Quick Assist \
+Technology"
+
+DESCRIPTION = "This software acelerates the data compression algorithm \
+in the zlib software library via the Intel QuickAssist Technology"
+
+HOMEPAGE = "http://zlib.net/"
+SECTION = "libs"
+LICENSE = "Zlib & GPLv2 & BSD"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/zlib-${ZLIB_VERSION}/zlib.h;beginline=4;endline=23;md5=fde612df1e5933c428b73844a0c494fd \
+ file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6 \
+ file://${COMMON_LICENSE_DIR}/BSD;md5=3775480a712fc46a69647678acb234cb"
+
+# For target side versions of openssl enable support for OCF Linux driver
+# if they are available.
+DEPENDS += "cryptodev-linux pkgconfig udev"
+
+SRC_URI = "http://www.zlib.net/zlib-${ZLIB_VERSION}.tar.gz;name=zlib \
+ "
+SRC_URI_append_libc-musl = " file://0001-qat_zlib.h-Add-pthread.h-for-MUSL.patch"
+
+SRC_URI[zlib.md5sum] = "44d667c142d7cda120332623eab69f40"
+SRC_URI[zlib.sha256sum] = "36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d"
+
+COMPATIBLE_MACHINE = "null"
+
+ZLIB_VERSION = "1.2.8"
+
+S = "${WORKDIR}/zlib-${ZLIB_VERSION}"
+
+export ICP_ROOT = "${S}"
+export ZLIB_ROOT = "${S}"
+export KERNEL_SOURCE_ROOT = "${STAGING_KERNEL_DIR}"
+export KERNEL_BUILDDIR = "${STAGING_KERNEL_BUILDDIR}"
+export ICP_LAC_API_DIR = "${STAGING_DIR_TARGET}${includedir}/lac"
+export ICP_DC_API_DIR = "${STAGING_DIR_TARGET}${includedir}/dc"
+export ICP_BUILD_OUTPUT = "${STAGING_DIR_TARGET}"
+
+EXTRA_OEMAKE = "-e MAKEFLAGS="
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+MEM_PATH = "${S}/contrib/qat"
+
+# We invoke base do_patch at end, to incorporate any local patch
+python do_patch() {
+ bb.build.exec_func('zlibqat_do_patch', d)
+ bb.build.exec_func('patch_do_patch', d)
+}
+
+do_configure() {
+ ./configure --prefix=${prefix} --shared --libdir=${libdir}
+}
+
+do_compile() {
+ unset CFLAGS CXXFLAGS
+ oe_runmake
+
+ cd ${S}/contrib/qat/qat_zlib_test
+ oe_runmake
+}
+
+do_install() {
+ install -m 0755 -d ${D}${bindir}/
+ install -m 0755 -d ${D}${sysconfdir}/zlib_conf/
+
+ install -m 0755 zpipe ${D}${bindir}
+ install -m 0755 minigzip ${D}${bindir}
+
+ cd ${S}/contrib/qat/qat_zlib_test
+ oe_runmake DESTDIR=${D} install
+}
+
+PACKAGE_BEFORE_PN = "${PN}-app"
+
+FILES_${PN} += " \
+ ${sysconfdir}/zlib_conf/ \
+ "
+
+FILES_${PN}-app += " \
+ ${bindir}/* \
+ "
+
+FILES_${PN}-dbg += " \
+ ${bindir}/.debug \
+ "
+
+EXCLUDE_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 @@
+From d14d6ea2072ede5d1afddf738cb1801263e90d70 Mon Sep 17 00:00:00 2001
+From: "Tan, Raymond" <raymond.tan@intel.com>
+Date: Fri, 10 Aug 2018 15:45:38 +0800
+Subject: [PATCH 2/3] zlib: Remove rpaths from makefile
+
+Upstream-Status: Inappropriate [configuration]
+
+This removes references to RPATHS that are no longer
+necesary when building using bitbake.
+
+Signed-off-by: Tan, Raymond <raymond.tan@intel.com>
+---
+ Makefile.in | 9 +++++----
+ contrib/qat/qat_zlib_test/Makefile | 3 ---
+ 2 files changed, 5 insertions(+), 7 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 0100f59..8978ef1 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -59,12 +59,13 @@ ICP_LAC_API_DIR=$(ICP_API_DIR)/lac/
+ ICP_DC_API_DIR=$(ICP_API_DIR)/dc/
+ CFLAGS+=-D_GNU_SOURCE -I$(ICP_API_DIR) -I$(ICP_DC_API_DIR) -I$(ICP_LAC_API_DIR) -I$(ICP_SAL_API_DIR)
+ SFLAGS+=-D_GNU_SOURCE -I$(ICP_API_DIR) -I$(ICP_DC_API_DIR) -I$(ICP_LAC_API_DIR) -I$(ICP_SAL_API_DIR)
+-ADDITIONAL_LDFLAGS+=-Wl,-rpath,$(ZLIB_ROOT) -lz
+-SHARED_APP_FLAGS=-Wl,-rpath,$(ZLIB_ROOT) -L$(ZLIB_ROOT) -lz
++#ADDITIONAL_LDFLAGS+=-Wl,-rpath,$(ZLIB_ROOT) -lz
++#SHARED_APP_FLAGS=-Wl,-rpath,$(ZLIB_ROOT) -L$(ZLIB_ROOT) -lz
++SHARED_APP_FLAGS=-L$(ZLIB_ROOT) -lz
+
+ ifdef ICP_BUILD_OUTPUT
+ TEST_LDFLAGS+=-L$(ICP_BUILD_OUTPUT)
+- ADDITIONAL_LDFLAGS+=-Wl,-rpath,$(ICP_BUILD_OUTPUT) -L$(ICP_BUILD_OUTPUT)
++# ADDITIONAL_LDFLAGS+=-Wl,-rpath,$(ICP_BUILD_OUTPUT) -L$(ICP_BUILD_OUTPUT)
+ endif
+
+ ifdef UPSTREAM_DRIVER_CMN_ROOT
+@@ -91,7 +92,7 @@ ADDITIONAL_SHAREDLIBC=-L$(ICP_BUILD_OUTPUT) -l$(DRIVER)_s -lpthread -lrt
+
+ ifeq ($(ZLIB_MEMORY_DRIVER),usdm_drv)
+ TEST_LDFLAGS+= $(CMN_ROOT)/libusdm_drv.a
+-ADDITIONAL_LDFLAGS+=-Wl,-rpath,$(CMN_ROOT) -L$(CMN_ROOT) -lusdm_drv_s
++#ADDITIONAL_LDFLAGS+=-Wl,-rpath,$(CMN_ROOT) -L$(CMN_ROOT) -lusdm_drv_s
+ endif
+
+ STATICLIB=libz.a
+diff --git a/contrib/qat/qat_zlib_test/Makefile b/contrib/qat/qat_zlib_test/Makefile
+index 47829ac..bfcf86d 100644
+--- a/contrib/qat/qat_zlib_test/Makefile
++++ b/contrib/qat/qat_zlib_test/Makefile
+@@ -85,9 +85,6 @@ COVERAGE_OBJS =
+ EXE=
+ LIBQAT=
+ UDEV=
+-ifdef ICP_BUILD_OUTPUT
+- LIBQAT+= -Wl,-rpath,$(ICP_BUILD_OUTPUT) -L$(ICP_BUILD_OUTPUT)
+-endif
+
+ ifdef UPSTREAM_DRIVER_CMN_ROOT
+ DRIVER=qat
+--
+1.9.1
+
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 @@
+From 943dd3c2b9d68385c9e71b1cc215cf03e2dd74fd Mon Sep 17 00:00:00 2001
+From: "Tan, Raymond" <raymond.tan@intel.com>
+Date: Wed, 29 Aug 2018 13:35:44 +0800
+Subject: [PATCH 1/3] zlib-qat: add a install target to makefile
+
+Upstream-Status: Inappropriate [Configuration]$
+
+This adds an install target to qat_zlib_test makefiles
+to facilitate the installation of test binaries to {D}.
+
+Signed-off-by: Tan, Raymond <raymond.tan@intel.com>
+---
+ contrib/qat/qat_zlib_test/Makefile | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/contrib/qat/qat_zlib_test/Makefile b/contrib/qat/qat_zlib_test/Makefile
+index 7b86028..47829ac 100644
+--- a/contrib/qat/qat_zlib_test/Makefile
++++ b/contrib/qat/qat_zlib_test/Makefile
+@@ -132,5 +132,7 @@ comptestappsh$(EXE): $(OBJS) Makefile
+ $(CC) -o comptestappsh $(OBJS) $(COVERAGE) \
+ $(SHAREDLIBQAT)
+
++install:
++ cp comptestapp $(DESTDIR)$(bindir)
+ clean:
+ rm -f $(OBJS) $(COVERAGE_OBJS) comptestapp comptestappsh
+--
+1.9.1
+
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 @@
+From 7d74f6aa82042c2bb03e46fafe580bf4d117a24a Mon Sep 17 00:00:00 2001
+From: "Tan, Raymond" <raymond.tan@intel.com>
+Date: Thu, 16 Aug 2018 14:29:05 +0800
+Subject: [PATCH 3/3] zlib-qat: correct the order for static linking libudev
+
+Upstream-Status: Inappropriate [Configuration]
+
+This changes the order of linking command to link libudev after libadf
+to avoid undefined reference on udev.
+
+Signed-off-by: Tan, Raymond <raymond.tan@intel.com>
+---
+ contrib/qat/qat_zlib_test/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/contrib/qat/qat_zlib_test/Makefile b/contrib/qat/qat_zlib_test/Makefile
+index bfcf86d..0498da8 100644
+--- a/contrib/qat/qat_zlib_test/Makefile
++++ b/contrib/qat/qat_zlib_test/Makefile
+@@ -101,7 +101,7 @@ ifdef WITH_CPA_MUX
+ endif
+
+ SHAREDLIBQAT= -Wl,-rpath,$(ZLIB_ROOT) -L$(ZLIB_ROOT) -lz -ldl -lrt -lpthread
+-STATICLIBQAT= $(ZLIB_ROOT)/libz.a $(LIBQAT) $(UDEV) -l$(DRIVER) -l$(ADFPROXY) -losal -lcrypto -ldl -lrt -lpthread
++STATICLIBQAT= $(ZLIB_ROOT)/libz.a $(LIBQAT) -l$(DRIVER) -l$(ADFPROXY) -losal -lcrypto -ldl -lrt -lpthread $(UDEV)
+
+ ifeq ($(ZLIB_MEMORY_DRIVER),usdm_drv)
+ STATICLIBQAT+= $(CMN_ROOT)/libusdm_drv.a
+--
+1.9.1
+
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 @@
+require zlib-qat.inc
+
+DEPENDS += "qat17"
+
+SRC_URI += "https://01.org/sites/default/files/downloads/intelr-quickassist-technology/zlibshim0.4.10-001.tar.gz;name=zlibqat \
+ file://zlib-qat-0.4.10-001-zlib-qat-add-a-install-target-to-makefile.patch \
+ file://zlib-qat-0.4.10-001-zlib-Remove-rpaths-from-makefile.patch \
+ file://zlib-qat-0.4.10-001-zlib-qat-correct-the-order-for-static-linking-libude.patch \
+ "
+
+SRC_URI[zlibqat.md5sum] = "449e5b8dd41e49df1cced144b54d5bc1"
+SRC_URI[zlibqat.sha256sum] = "d9d288951a1c4b92d3261d2fcbbacf79168b09bd6528fea31fa82bb7c3139f03"
+
+ZLIB_QAT_VERSION = "0.4.10-001"
+
+export ZLIB_MEMORY_DRIVER = "usdm_drv"
+export CMN_ROOT = "${STAGING_DIR_TARGET}/lib"
+export UPSTREAM_DRIVER_CMN_ROOT = "${STAGING_DIR_TARGET}/lib"
+
+zlibqat_do_patch() {
+ cd ${WORKDIR}
+ tar -xvzf zlib-${ZLIB_VERSION}-qat.L.${ZLIB_QAT_VERSION}.tar.gz
+ cd ${S}
+ if [ ! -d ${S}/debian/patches ]; then
+ mkdir -p ${S}/debian/patches
+ cp -f ${WORKDIR}/zlib-${ZLIB_VERSION}-qat.patch ${S}/debian/patches
+ echo "zlib-${ZLIB_VERSION}-qat.patch -p1" > ${S}/debian/patches/series
+ fi
+ quilt pop -a || true
+ if [ -d ${S}/.pc-zlibqat ]; then
+ rm -rf ${S}/.pc
+ mv ${S}/.pc-zlibqat ${S}/.pc
+ QUILT_PATCHES=${S}/debian/patches quilt pop -a
+ rm -rf ${S}/.pc
+ fi
+ QUILT_PATCHES=${S}/debian/patches quilt push -a
+ mv ${S}/.pc ${S}/.pc-zlibqat
+}
+
+do_install_append() {
+ install -m 660 ${MEM_PATH}/config/c3xxx/multi_thread_optimized/* ${D}${sysconfdir}/zlib_conf/
+ install -m 660 ${MEM_PATH}/config/c6xx/multi_thread_optimized/* ${D}${sysconfdir}/zlib_conf/
+}
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 @@
-SUMMARY = "Zlib QAT_MEM Memory Management Module for Intel Quick Assist \
-Technology"
-
-DESCRIPTION = "This software acelerates the data compression algorithm \
-in the zlib software library via the Intel QuickAssist Technology \
-implemented on Intel Communications Chipset 89xx and 895x Series based platforms."
-
-HOMEPAGE = "http://zlib.net/"
-SECTION = "libs"
-LICENSE = "Zlib & GPLv2 & BSD"
-LIC_FILES_CHKSUM = "file://${WORKDIR}/zlib-${ZLIB_VERSION}/zlib.h;beginline=4;endline=23;md5=fde612df1e5933c428b73844a0c494fd \
- file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6 \
- file://${COMMON_LICENSE_DIR}/BSD;md5=3775480a712fc46a69647678acb234cb"
-
-# For target side versions of openssl enable support for OCF Linux driver
-# if they are available.
-DEPENDS += "cryptodev-linux pkgconfig virtual/qat"
-
-SRC_URI = "http://www.zlib.net/zlib-${ZLIB_VERSION}.tar.gz;name=zlib \
- https://01.org/sites/default/files/page/zlib_shim_0.4.7-002_withdocumentation.zip;name=zlibqat \
+require zlib-qat.inc
+
+DEPENDS += "qat16"
+
+SRC_URI += "https://01.org/sites/default/files/page/zlib_shim_0.4.7-002_withdocumentation.zip;name=zlibqat \
file://zlib-qat-0.4.7-002-qat_mem-build-qat_mem-ko-against-yocto-kernel-src.patch \
file://zlib-qat-0.4.7-002-zlib-qat-add-a-install-target-to-makefile.patch \
file://zlib-qat-0.4.7-002-zlib-Remove-rpaths-from-makefile.patch \
"
-SRC_URI_append_libc-musl = " file://0001-qat_zlib.h-Add-pthread.h-for-MUSL.patch"
-
-SRC_URI[zlib.md5sum] = "44d667c142d7cda120332623eab69f40"
-SRC_URI[zlib.sha256sum] = "36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d"
SRC_URI[zlibqat.md5sum] = "dfde8618198aa8d35ecc00d10dcc7000"
SRC_URI[zlibqat.sha256sum] = "8e5786400bbc2a879ae705c864ec63b53ae019b4f2d1c94524a97223847b6e46"
-COMPATIBLE_MACHINE = "null"
-
-ZLIB_VERSION = "1.2.8"
ZLIB_QAT_VERSION = "0.4.7-002"
QAT_PATCH_VERSION = "l.0.4.7_002"
-S = "${WORKDIR}/zlib-${ZLIB_VERSION}"
-
-export ICP_ROOT = "${S}"
-export ZLIB_ROOT = "${S}"
-export KERNEL_SOURCE_ROOT = "${STAGING_KERNEL_DIR}"
-export KERNEL_BUILDDIR = "${STAGING_KERNEL_BUILDDIR}"
-export ICP_LAC_API_DIR = "${STAGING_DIR_TARGET}${includedir}/lac"
-export ICP_DC_API_DIR = "${STAGING_DIR_TARGET}${includedir}/dc"
export ZLIB_DH895XCC = "1"
export ZLIB_MEMORY_DRIVER = "qat_mem"
-export ICP_BUILD_OUTPUT = "${STAGING_DIR_TARGET}"
-EXTRA_OEMAKE = "-e MAKEFLAGS="
-TARGET_CC_ARCH += "${LDFLAGS}"
+# qat_mem OOT kernel module, thus inherit module.bbclass
inherit module
-MEM_PATH = "${S}/contrib/qat"
zlibqat_do_patch() {
- cd ${WORKDIR}
+ cd ${WORKDIR}
unzip -q -o zlib_quickassist_patch_${QAT_PATCH_VERSION}_stable.zip
cd zlib_quickassist_patch_${QAT_PATCH_VERSION}_devbranch
tar -xvzf zlib-${ZLIB_VERSION}-qat.L.${ZLIB_QAT_VERSION}.tar.gz
@@ -76,58 +43,38 @@ zlibqat_do_patch() {
mv ${S}/.pc ${S}/.pc-zlibqat
}
-# We invoke base do_patch at end, to incorporate any local patch
-python do_patch() {
- bb.build.exec_func('zlibqat_do_patch', d)
- bb.build.exec_func('patch_do_patch', d)
-}
-
-#addtask zlibqat_patch after do_prepare_recipe_sysroot before patch_do_patch
-#addtask do_zlibqat_patch after do_prepare_recipe_sysroot before do_configure
-
-do_configure() {
- ./configure --prefix=${prefix} --shared --libdir=${libdir}
-}
-
+# do_compile will override the module_do_compile from inherited module.bbclass
+# which causes issues for components other than qat_mem.ko
do_compile() {
unset CFLAGS CXXFLAGS
- oe_runmake
+ oe_runmake
- cd ${S}/contrib/qat/qat_mem
- oe_runmake
+ cd ${S}/contrib/qat/qat_zlib_test
+ oe_runmake
- cd ${S}/contrib/qat/qat_zlib_test
- oe_runmake
+ cd ${S}/contrib/qat/qat_mem
+ oe_runmake
}
+# do_install will override the module_do_install inherited from module.bbclass
+# which causes issues for components other than qat_mem.ko
do_install() {
- install -m 0755 -d ${D}${bindir}/
- install -m 0755 -d ${D}${sysconfdir}/zlib_conf/
+ install -m 0755 -d ${D}${bindir}/
+ install -m 0755 -d ${D}${sysconfdir}/zlib_conf/
install -m 0755 zpipe ${D}${bindir}
install -m 0755 minigzip ${D}${bindir}
- cd ${MEM_PATH}/qat_mem
- oe_runmake INSTALL_MOD_PATH=${D} INSTALL_MOD_DIR="kernel/drivers" install
-
cd ${S}/contrib/qat/qat_zlib_test
oe_runmake DESTDIR=${D} install
- install -m 660 ${MEM_PATH}/config/dh895xcc/multi_thread_optimized/* ${D}${sysconfdir}/zlib_conf/
-}
+ cd ${MEM_PATH}/qat_mem
+ oe_runmake INSTALL_MOD_PATH=${D} INSTALL_MOD_DIR="kernel/drivers" install
-PACKAGES += "${PN}-app"
+ install -m 660 ${MEM_PATH}/config/dh895xcc/multi_thread_optimized/* ${D}${sysconfdir}/zlib_conf/
+}
+# module.bbclass will reset FILES variable
FILES_${PN} += " \
${sysconfdir}/zlib_conf/ \
"
-
-FILES_${PN}-app += " \
- ${bindir}/* \
- "
-
-FILES_${PN}-dbg += " \
- ${bindir}/.debug \
- "
-
-EXCLUDE_FROM_WORLD_core2-32-intel-common = "1"