meta-qat: Move to independant meta-intel-qat layer

The Quick Assist Software is specific to certain Intel hardware
and not needed by all, it should be a standalone additional software
layer and not part of the core Intel (meta-intel) BSP.

This is done in part for better Yocto Project Layer Compatibility

Signed-off-by: Saul Wold <sgw@linux.intel.com>
This commit is contained in:
Saul Wold 2017-09-26 08:04:29 -07:00
parent a72281adbb
commit 419e4be6cc
33 changed files with 0 additions and 6842 deletions

View File

@ -1,17 +0,0 @@
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@ -1,5 +0,0 @@
All metadata files (including, but not limited to bb, bbappend,
bbclass, inc and conf files) are MIT licensed unless otherwise stated.
Source code included in tree for individual recipes is under the
LICENSE stated in the associated recipe (.bb file) unless otherwise
stated.

View File

@ -1,85 +0,0 @@
meta-qat
========
This README file contains information on building and booting
meta-intel BSP layers. Please see the corresponding sections below
for details.
Yocto Project Compatible
========================
The BSPs contained in this layer are compatible with the Yocto Project
as per the requirements listed here:
https://www.yoctoproject.org/webform/yocto-project-compatible-registration
Dependencies
============
This layer depends on:
URI: git://git.openembedded.org/bitbake
branch: 1.34
URI: git://git.openembedded.org/openembedded-core
layers: meta
branch: rocko
Guidelines for submitting patches
====================================
Please submit any patches against meta-dpdk to the meta-intel
mailing list (meta-intel@yoctoproject.org). Also, if your patches are
available via a public git repository, please also include a URL to
the repo and branch containing your patches as that makes it easier
for maintainers to grab and test your patches.
There are patch submission scripts available that will, among other
things, automatically include the repo URL and branch as mentioned.
Please see the Yocto Project Development Manual sections entitled
'Using Scripts to Push a Change Upstream and Request a Pull' and
'Using Email to Submit a Patch' for details.
Regardless of how you submit a patch or patchset, the patches should
at minimum follow the suggestions outlined in the 'Submitting a Change
to the Yocto Project' section in the Yocto Project Development Manual.
Specifically, they should:
- Include a 'Signed-off-by:' line. A commit can't legally be pulled
in without this.
- Provide a single-line, short summary of the change. This short
description should be prefixed by the BSP or recipe name, as
appropriate, followed by a colon. Capitalize the first character
of the summary (following the colon).
- For the body of the commit message, provide detailed information
that describes what you changed, why you made the change, and the
approach you used.
- If the change addresses a specific bug or issue that is associated
with a bug-tracking ID, include a reference to that ID in your
detailed description in the following format: [YOCTO #<bug-id>].
- Pay attention to line length - please don't allow any particular
line in the commit message to stretch past 72 characters.
- For any non-trivial patch, provide information about how you
tested the patch, and for any non-trivial or non-obvious testing
setup, provide details of that setup.
Doing a quick 'git log' in meta-intel will provide you with many
examples of good example commits if you have questions about any
aspect of the preferred format.
The meta-intel maintainers will do their best to review and/or pull in
a patch or patchset within 24 hours of the time it was posted. For
larger and/or more involved patches and patchsets, the review process
may take longer.
Please see the meta-intel/MAINTAINERS file for the list of maintainers
and their specific areas; it's also a good idea to cc: the specific
maintainer, if applicable.

View File

@ -1,5 +0,0 @@
# This file contains a list of recipe maintainers for meta-intel
RECIPE_MAINTAINER_pn-openssl-qat = "TBD DPDK Flex Team"
RECIPE_MAINTAINER_pn-qat16 = "TBD DPDK Flex Team"
RECIPE_MAINTAINER_pn-zlib-qat = "TBD DPDK Flex Team"

View File

@ -1,20 +0,0 @@
# We have a conf and classes directory, add to BBPATH
BBPATH .= ":${LAYERDIR}"
# We have recipes-* directories, add to BBFILES
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS += "intel-qat"
BBFILE_PATTERN_intel-qat := "^${LAYERDIR}/"
BBFILE_PRIORITY_intel-qat = "5"
LAYERDEPENDS_intel-qat = "core intel"
# This should only be incremented on significant changes that will
# cause compatibility issues with other layers
LAYERVERSION_intel-qat = "1"
LAYERSERIES_COMPAT_intel-qat = "rocko"
require ${LAYERDIR}/conf/include/maintainers.inc

View File

@ -1,125 +0,0 @@
SUMMARY = "libcrypto* (OpenSSL*) QAT_MEM Memory Management Module \
for Intel Quick Assist Technology"
DESCRIPTION = "This software adds an engine that accelerates some of \
the libcrypto algorithms via the Intel QuickAssist Technology \
implemented on Intel Communications Chipset 89xx Series based platforms."
HOMEPAGE = "http://www.openssl.org/"
SECTION = "libs/network"
LICENSE = "openssl & GPLv2 & BSD"
LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSE;md5=f9a8f968107345e0b75aa8c2ecaa7ec8 \
file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6 \
file://${COMMON_LICENSE_DIR}/BSD;md5=3775480a712fc46a69647678acb234cb \
"
SRC_URI = "https://01.org/sites/default/files/page/libcrypto_shim_${PV}_withdocumentation.zip;name=openssl_qat;subdir=openssl_qat-${PV} \
file://openssl_qat-environment-variables-to-have-precedence.patch \
file://openssl_qat-pass-oe_ldflags-to-linker.patch \
file://openssl_qat-remove-redundant-rpaths.patch \
file://openssl_qat-build-qat_mem-ko-against-yocto-kernel.patch \
file://openssl_qat-install-engines-in-libdir-ssl.patch \
"
DEPENDS += " qat16 zlib"
RDEPENDS_${PN} += " qat16 zlib zlib-qat"
inherit pkgconfig module
PACKAGES =+ "${PN}-misc"
PARALLEL_MAKE = ""
AR_append = " r"
EXTRA_OEMAKE = "-e MAKEFLAGS="
export ICP_ROOT = "${WORKDIR}/git"
export ICP_BUILD_OUTPUT = "${STAGING_DIR_TARGET}"
export OPENSSL_ROOT = "${ICP_ROOT}"
export OPENSSL_PREFIX = "/usr/local"
export AS = "${CC} -c"
export OE_LDFLAGS="${LDFLAGS} -L${OPENSSL_PREFIX}{base_libdir}"
export ICP_API_PATH = "${STAGING_DIR_TARGET}${includedir}/lac"
export KERNEL_SOURCE_ROOT = "${STAGING_KERNEL_DIR}"
export KERNEL_BUILDDIR = "${STAGING_KERNEL_BUILDDIR}"
S = "${WORKDIR}/git"
opensslqat_do_patch() {
cd ${WORKDIR}/openssl_qat-${PV}
cd libcrypto_shim_${PV}_*
tar -zxof libCrypto_Shim_${PV}.tar.gz
tar -zxof libcrypto-openssl-${OPENSSL_VERSION}-qat.L.${PV}.tar.gz
mv openssl-${OPENSSL_VERSION}-qat.patch ${WORKDIR}
cd ${S}
if [ ! -d ${S}/debian/patches ]; then
mkdir -p ${S}/debian/patches
cp -f ${WORKDIR}/openssl-${OPENSSL_VERSION}-qat.patch ${S}/debian/patches
echo "openssl-${OPENSSL_VERSION}-qat.patch -p1" > ${S}/debian/patches/series
fi
quilt pop -a || true
if [ -d ${S}/.pc-opensslqat ]; then
rm -rf ${S}/.pc
mv ${S}/.pc-opensslqat ${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-opensslqat
}
# We invoke base do_patch at end, to incorporate any local patch
python do_patch() {
bb.build.exec_func('opensslqat_do_patch', d)
bb.build.exec_func('patch_do_patch', d)
}
do_configure () {
os=linux
target=linux-x86_64
./Configure -no-ssl3 enable-hw-qat --prefix=$OPENSSL_PREFIX --openssldir="${OPENSSL_PREFIX}${base_libdir}/ssl" --libdir="${base_libdir}" $target
}
do_compile() {
oe_runmake
}
do_install() {
install -m 0755 -d ${D}${bindir} \
${D}${OPENSSL_PREFIX}/include \
${D}${sysconfdir}/openssl_conf
oe_runmake INSTALL_PREFIX="${D}" install
cp --dereference -R include/openssl ${D}${OPENSSL_PREFIX}/include
cp ${WORKDIR}/openssl_qat-${PV}/libcrypto_shim_${PV}_withdocumentation/qat/config/dh895xcc/multi_process_optimized/* ${D}${sysconfdir}/openssl_conf/
}
FILES_${PN}-misc += "\
${OPENSSL_PREFIX}${base_libdir}/ssl/misc \
${bindir}/c_rehash \
"
FILES_${PN}-dbg += "\
${OPENSSL_PREFIX}${base_libdir}/ssl/engines/.debug \
${OPENSSL_PREFIX}${base_libdir}/engines/.debug \
${OPENSSL_PREFIX}${base_libdir}/.debug \
${OPENSSL_PREFIX}/bin/.debug \
"
FILES_${PN}-dev = "${OPENSSL_PREFIX}/include"
FILES_${PN}-staticdev += "${OPENSSL_PREFIX}${base_libdir}/*.a"
FILES_${PN} =+ "\
${bindir} \
${sysconfdir}/openssl_conf \
${OPENSSL_PREFIX}/bin \
${OPENSSL_PREFIX}${base_libdir} \
${OPENSSL_PREFIX}${base_libdir}/ssl \
${OPENSSL_PREFIX}${base_libdir}/ssl/openssl.cnf \
"
COMPATIBLE_MACHINE = "null"

View File

@ -1,47 +0,0 @@
From f4c50648752ee1000f606585f4df9fa6bd9ff8e8 Mon Sep 17 00:00:00 2001
From: Saul Wold <sgw@linux.intel.com>
Date: Wed, 8 Feb 2017 17:36:48 -0800
Subject: [PATCH] openssl-qat: Use sched_yield() instead of pthread_yield()
sched_yield() is the correct POSIX API to use for thread switching
This futher supports building with MUSL.
Upstream-Status: Pending
Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
engines/qat_engine/e_qat.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/engines/qat_engine/e_qat.c b/engines/qat_engine/e_qat.c
index 17d7935..af543bc 100644
--- a/engines/qat_engine/e_qat.c
+++ b/engines/qat_engine/e_qat.c
@@ -90,6 +90,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <sched.h>
#include <pthread.h>
#include <unistd.h>
#include <ctype.h>
@@ -545,7 +546,7 @@ CpaStatus myPerformOp(const CpaInstanceHandle instanceHandle,
pSrcBuffer, pDstBuffer, pVerifyResult);
if (status == CPA_STATUS_RETRY) {
qatPerformOpRetries++;
- pthread_yield();
+ sched_yield();
if (uiRetry >= iMsgRetry
&& iMsgRetry != QAT_INFINITE_MAX_NUM_RETRIES) {
break;
@@ -588,7 +589,7 @@ static void *sendPoll(void *ih)
if (likely(CPA_STATUS_SUCCESS == status)) {
/* Do nothing */
} else if (CPA_STATUS_RETRY == status) {
- pthread_yield();
+ sched_yield();
} else {
WARN("WARNING icp_sal_CyPollInstance returned status %d\n",
status);
--
2.7.4

View File

@ -1,113 +0,0 @@
From a5068bd456c60b5611494dff2db2093ad6693e6a Mon Sep 17 00:00:00 2001
From: Anuj Mittal <anujx.mittal@intel.com>
Date: Thu, 9 Jul 2015 23:58:34 +0800
Subject: [PATCH] openssl_qat: add openssl async specific symbols
Upstream-Status: Inappropriate [Configuration]
Signed-off-by: Anuj Mittal <anujx.mittal@intel.com>
---
engines/ccgost/openssl.ld | 8 ++++++++
engines/openssl.ld | 9 +++++++++
engines/qat_engine/openssl.ld | 19 +++++++++++++++++++
openssl.ld | 28 ++++++++++++++++++++++++++++
4 files changed, 64 insertions(+)
create mode 100644 engines/qat_engine/openssl.ld
diff --git a/engines/ccgost/openssl.ld b/engines/ccgost/openssl.ld
index 010fd6f..edf9d87 100644
--- a/engines/ccgost/openssl.ld
+++ b/engines/ccgost/openssl.ld
@@ -8,3 +8,11 @@ OPENSSL_1.0.0 {
*;
};
+OPENSSL_1.0.1async {
+ global:
+ qaeCryptoMemV2P;
+ qaeCryptoAtFork;
+ qaeCryptoMemAlloc;
+ qaeCryptoMemRealloc;
+ qaeCryptoMemFree;
+} OPENSSL_1.0.0;
diff --git a/engines/openssl.ld b/engines/openssl.ld
index 010fd6f..3d56887 100644
--- a/engines/openssl.ld
+++ b/engines/openssl.ld
@@ -8,3 +8,12 @@ OPENSSL_1.0.0 {
*;
};
+OPENSSL_1.0.1async {
+ global:
+ qaeCryptoMemV2P;
+ qaeCryptoAtFork;
+ qaeCryptoMemAlloc;
+ qaeCryptoMemRealloc;
+ qaeCryptoMemFree;
+} OPENSSL_1.0.0;
+
diff --git a/engines/qat_engine/openssl.ld b/engines/qat_engine/openssl.ld
new file mode 100644
index 0000000..bdd927d
--- /dev/null
+++ b/engines/qat_engine/openssl.ld
@@ -0,0 +1,19 @@
+OPENSSL_1.0.0 {
+ global:
+ bind_engine;
+ v_check;
+ OPENSSL_init;
+ OPENSSL_finish;
+ local:
+ *;
+};
+
+OPENSSL_1.0.1async {
+ global:
+ qaeCryptoMemV2P;
+ qaeCryptoAtFork;
+ qaeCryptoMemAlloc;
+ qaeCryptoMemRealloc;
+ qaeCryptoMemFree;
+} OPENSSL_1.0.0;
+
diff --git a/openssl.ld b/openssl.ld
index 0c0ed28..afa9349 100644
--- a/openssl.ld
+++ b/openssl.ld
@@ -4618,3 +4618,31 @@ OPENSSL_1.0.1d {
CRYPTO_memcmp;
} OPENSSL_1.0.1;
+OPENSSL_1.0.1async {
+ global:
+ ECDH_compute_key_asynch;
+ ECDH_generate_key_asynch;
+ ECDH_generate_key;
+ DH_compute_key_asynch;
+ DH_generate_key_asynch;
+ ECDSA_verify_asynch;
+ ECDSA_sign_asynch;
+ DSA_verify_asynch;
+ DSA_sign_asynch;
+ RSA_public_decrypt_asynch;
+ RSA_private_encrypt_asynch;
+ EVP_MD_CTX_ctrl_ex;
+ EVP_CIPHER_CTX_ctrl_ex;
+ qaeCryptoMemV2P;
+ qaeCryptoAtFork;
+ SSL_CTX_set_asynch_completion_callback;
+ RSA_private_decrypt_asynch;
+ RSA_public_encrypt_asynch;
+ qaeCryptoMemAlloc;
+ qaeCryptoMemRealloc;
+ qaeCryptoMemFree;
+ RSA_sign_asynch;
+ RSA_verify_asynch;
+ EVP_PKEY_derive_PRF;
+} OPENSSL_1.0.1;
+
--
1.7.9.5

View File

@ -1,62 +0,0 @@
From 3927de1c19b48a031b27b2635928cd6f9650d02e Mon Sep 17 00:00:00 2001
From: Anuj Mittal <anujx.mittal@intel.com>
Date: Wed, 8 Jul 2015 17:49:09 +0800
Subject: [PATCH] openssl-qat: build qat_mem ko against yocto kernel
Upstream-Status: Inappropriate [Configuration]
Signed-off-by: Anuj Mittal <anujx.mittal@intel.com>
---
engines/qat_engine/qat_mem/Makefile | 23 +++++++----------------
1 file changed, 7 insertions(+), 16 deletions(-)
diff --git a/engines/qat_engine/qat_mem/Makefile b/engines/qat_engine/qat_mem/Makefile
index 3d9a19f..4369503 100644
--- a/engines/qat_engine/qat_mem/Makefile
+++ b/engines/qat_engine/qat_mem/Makefile
@@ -9,23 +9,10 @@
MODULENAME := qat_mem
### should not need to change stuff below ######################
-
-KDIR := /lib/modules/$(shell uname -r)/build
-#KDIR := /exports/linux-2.6.12.2/
+KDIR := $(KERNEL_SOURCE_ROOT)
PWD := $(shell pwd)
-ifeq ($(shell uname -r|grep -c grsec-WR), 1)
-AUTO_CONF=/lib/modules/$(shell uname -r)/build/include/generated/autoconf.h
-else
-AUTO_CONF=/usr/src/kernels/$(shell uname -r)/include/linux/autoconf.h
-endif
-
-ifdef KERNEL_SOURCE_ROOT
-AUTO_CONF=$(KERNEL_SOURCE_ROOT)/include/linux/autoconf.h
-KDIR=$(KERNEL_SOURCE_ROOT)
-endif
-
-CC := gcc -Wall -imacros $(AUTO_CONF)
+CC := ${CC} -Wall -imacros $(KERNEL_BUILDDIR)/include/generated/autoconf.h
ifeq ($(KERNELRELEASE),)
all: $(MODULENAME)_test
@@ -38,6 +25,11 @@ endif
$(MODULENAME)_test: $(MODULENAME)_test.c
$(CC) -g -o $(MODULENAME)_test $(MODULENAME)_test.c
+install: modules_install
+ cp $(MODULENAME)_test $(DESTDIR)
+
+modules_install:
+ $(MAKE) -C $(KDIR) M=$(PWD) modules_install
load:
insmod ./$(MODULENAME).ko
@@ -50,4 +42,3 @@ test: all
clean:
rm -f *.o *.ko Modules.symvers *.mod.c .*.cmd $(MODULENAME)_test
-
--
1.7.9.5

View File

@ -1,59 +0,0 @@
From dde5f7d6603d875b1d871498ae95a6837ccd591d Mon Sep 17 00:00:00 2001
From: Anuj Mittal <anujx.mittal@intel.com>
Date: Sat, 20 Jun 2015 00:25:27 +0800
Subject: [PATCH] openssl_qat: environment variables to have precedence
Upstream-Status: Inappropriate [configuration]
(From meta/recipes-connectivity/openssl/openssl/shared-libs.patch
rev: 5dd1d7566964c90d33c0c44f569d9336fb0724ce)
Signed-off-by: Anuj Mittal <anujx.mittal@intel.com>
---
Makefile.org | 2 +-
crypto/Makefile | 2 +-
ssl/Makefile | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Makefile.org b/Makefile.org
index 1f2f5e1..679c884 100644
--- a/Makefile.org
+++ b/Makefile.org
@@ -311,7 +311,7 @@ libcrypto$(SHLIB_EXT): libcrypto.a fips_premain_dso$(EXE_EXT)
libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
@if [ "$(SHLIB_TARGET)" != "" ]; then \
- $(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \
+ $(MAKE) -e SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \
else \
echo "There's no support for shared libraries on this platform" >&2; \
exit 1; \
diff --git a/crypto/Makefile b/crypto/Makefile
index 2355661..1b0c324 100644
--- a/crypto/Makefile
+++ b/crypto/Makefile
@@ -107,7 +107,7 @@ $(LIB): $(LIBOBJ)
shared: buildinf.h lib subdirs
if [ -n "$(SHARED_LIBS)" ]; then \
- (cd ..; $(MAKE) $(SHARED_LIB)); \
+ (cd ..; $(MAKE) -e $(SHARED_LIB)); \
fi
libs:
diff --git a/ssl/Makefile b/ssl/Makefile
index e05ada2..6f51862 100644
--- a/ssl/Makefile
+++ b/ssl/Makefile
@@ -64,7 +64,7 @@ lib: $(LIBOBJ)
shared: lib
if [ -n "$(SHARED_LIBS)" ]; then \
- (cd ..; $(MAKE) $(SHARED_LIB)); \
+ (cd ..; $(MAKE) -e $(SHARED_LIB)); \
fi
files:
--
1.7.9.5

View File

@ -1,72 +0,0 @@
From 9ca66b344a9e9cb3345281496793a74ef01c548f Mon Sep 17 00:00:00 2001
From: Anuj Mittal <anujx.mittal@intel.com>
Date: Sat, 20 Jun 2015 00:28:55 +0800
Subject: [PATCH] openssl_qat: install engines in ${libdir}/ssl
Upstream-Status: Inappropriate [configuration]
(Taken from meta/recipes-connectivity/openssl/openssl
rev: 5dd1d7566964c90d33c0c44f569d9336fb0724ce)
Signed-off-by: Anuj Mittal <anujx.mittal@intel.com>
---
engines/Makefile | 10 +++++-----
engines/ccgost/Makefile | 8 ++++----
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/engines/Makefile b/engines/Makefile
index 5240c07..721f1e0 100644
--- a/engines/Makefile
+++ b/engines/Makefile
@@ -108,7 +108,7 @@ install:
@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
@if [ -n "$(SHARED_LIBS)" ]; then \
set -e; \
- $(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines; \
+ $(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines; \
for l in $(LIBNAMES); do \
( echo installing $$l; \
pfx=lib; \
@@ -120,13 +120,13 @@ install:
*DSO_WIN32*) sfx="eay32.dll"; pfx=;; \
*) sfx=".bad";; \
esac; \
- cp $$pfx$$l$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
+ cp $$pfx$$l$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$$pfx$$l$$sfx.new; \
else \
sfx=".so"; \
- cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
+ cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$$pfx$$l$$sfx.new; \
fi; \
- chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
- mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx ); \
+ chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$$pfx$$l$$sfx.new; \
+ mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$$pfx$$l$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$$pfx$$l$$sfx ); \
done; \
fi
@target=install; $(RECURSIVE_MAKE)
diff --git a/engines/ccgost/Makefile b/engines/ccgost/Makefile
index d661c10..e137b37 100644
--- a/engines/ccgost/Makefile
+++ b/engines/ccgost/Makefile
@@ -53,13 +53,13 @@ install:
*DSO_WIN32*) sfx="eay32.dll"; pfx=;; \
*) sfx=".bad";; \
esac; \
- cp $${pfx}$(LIBNAME)$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \
+ cp $${pfx}$(LIBNAME)$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$${pfx}$(LIBNAME)$$sfx.new; \
else \
sfx=".so"; \
- cp cyg$(LIBNAME).dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \
+ cp cyg$(LIBNAME).dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$${pfx}$(LIBNAME)$$sfx.new; \
fi; \
- chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \
- mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx; \
+ chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$${pfx}$(LIBNAME)$$sfx.new; \
+ mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$${pfx}$(LIBNAME)$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$${pfx}$(LIBNAME)$$sfx; \
fi
links:
--
1.7.9.5

View File

@ -1,40 +0,0 @@
From accc6c251cafdb3332db946d543952e2cf0698cd Mon Sep 17 00:00:00 2001
From: Anuj Mittal <anujx.mittal@intel.com>
Date: Sat, 20 Jun 2015 00:31:31 +0800
Subject: [PATCH] openssl_qat: pass oe_ldflags to linker
Upstream-Status: Inappropriate [open-embedded]
(Taken from meta/recipes-connectivity/openssl/openssl/oe-ldflags.patch
rev: 5dd1d7566964c90d33c0c44f569d9336fb0724ce)
Signed-off-by: Anuj Mittal <anujx.mittal@intel.com>
---
Makefile.shared | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile.shared b/Makefile.shared
index e753f44..fcdcb9e 100644
--- a/Makefile.shared
+++ b/Makefile.shared
@@ -92,7 +92,7 @@ CALC_VERSIONS= \
LINK_APP= \
( $(SET_X); \
LIBDEPS="$${LIBDEPS:-$(LIBDEPS)}"; \
- LDCMD="$${LDCMD:-$(CC)}"; LDFLAGS="$${LDFLAGS:-$(CFLAGS)}"; \
+ LDCMD="$${LDCMD:-$(CC)}"; LDFLAGS="$(OE_LDFLAGS) $${LDFLAGS:-$(CFLAGS)}"; \
LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \
LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
@@ -102,7 +102,7 @@ LINK_SO= \
( $(SET_X); \
LIBDEPS="$${LIBDEPS:-$(LIBDEPS)}"; \
SHAREDCMD="$${SHAREDCMD:-$(CC)}"; \
- SHAREDFLAGS="$${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \
+ SHAREDFLAGS="$(OE_LDFLAGS) $${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \
LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \
LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
--
1.7.9.5

View File

@ -1,31 +0,0 @@
From ed93d22846a1859ba3ab4584a1358b9325bf2e93 Mon Sep 17 00:00:00 2001
From: Anuj Mittal <anujx.mittal@intel.com>
Date: Tue, 23 Jun 2015 13:59:52 +0800
Subject: [PATCH] openssl_qat: remove redundant rpaths
Upstream-Status: Inappropriate [Configuration]
This is not required and introduces bad rpath errors when
building with bitbake.
Signed-off-by: Anuj Mittal <anujx.mittal@intel.com>
---
engines/qat_engine/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/engines/qat_engine/Makefile b/engines/qat_engine/Makefile
index 02cfd15..e96e66a 100644
--- a/engines/qat_engine/Makefile
+++ b/engines/qat_engine/Makefile
@@ -99,7 +99,7 @@ endif
SRC=$(QATLIBSRC)
QATLIBTARGET=$(TOP)/libcrypto.a
ifdef ICP_BUILD_OUTPUT
-QATSHAREDLIBDEPS=-Wl,-rpath,$(ICP_BUILD_OUTPUT) -L$(ICP_BUILD_OUTPUT) -l$(DRIVER)_s
+QATSHAREDLIBDEPS=-L$(ICP_BUILD_OUTPUT) -l$(DRIVER)_s
else
QATSHAREDLIBDEPS=-l$(DRIVER)_s
endif
--
1.7.9.5

View File

@ -1,14 +0,0 @@
include openssl-qat.inc
OPENSSL_VERSION = "1.0.1async"
SRC_URI += "git://opensslfoundation.com/openssl-async.git;branch=OpenSSL_1_0_1-async;rev=asynch_v0.4.9-009 \
file://openssl-qat_0.4.9-009-openssl_qat-add-version-script.patch \
file://openssl-qat_0.4.9-009-openssl_qat-add-openssl-async-specific-symbols.patch \
"
SRC_URI_append_libc-musl = " file://0001-Use_sched_yield_api.patch"
SRC_URI[openssl_qat.md5sum]="8e2b45cf9b345356bdff0956845c6103"
SRC_URI[openssl_qat.sha256sum]="c2334b4d1fc8498e06f0554ef155041a6bf441de134cfdd3635e5a449a34bf81"

View File

@ -1,123 +0,0 @@
DESCRIPTION = "Intel(r) QuickAssist Technology API"
HOMEPAGE = "https://01.org/packet-processing/intel%C2%AE-quickassist-technology-drivers-and-patches"
#Dual BSD and GPLv2 License
LICENSE = "BSD & GPLv2"
LIC_FILES_CHKSUM = "\
file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6 \
file://${COMMON_LICENSE_DIR}/BSD;md5=3775480a712fc46a69647678acb234cb \
"
DEPENDS += "zlib openssl"
PROVIDES += "virtual/qat"
SRC_URI="file://qat16_2.3.0-34-qat-fix-for-cross-compilation-issue.patch \
file://qat16_2.3.0-34-qat-remove-local-path-from-makefile.patch \
file://qat16_2.3.0-34-make-sure-CFLAGS-are-correct.patch \
file://qat16_2.5.0-80-qat-change-in-return-type-of-func-in-kernel-v4.4.patch \
file://qat16_2.5.0-80-qat-Added-include-dir-path.patch \
"
COMPATIBLE_MACHINE = "null"
COMPATIBLE_HOST_linux-gnux32 = "null"
S = "${WORKDIR}/${ICP_DRIVER_TYPE}"
ICP_TOOLS = "accelcomp"
SAMPLE_CODE_DIR = "${S}/quickassist/lookaside/access_layer/src/sample_code"
TARGET_CC_ARCH += "$(LDFLAGS)"
export ICP_DRIVER_TYPE = "QAT1.6"
export ICP_FIRMWARE_DIR="dh895xcc"
export ICP_ROOT = "${S}"
export ICP_ENV_DIR = "${S}/quickassist/build_system/build_files/env_files"
export ICP_BUILDSYSTEM_PATH = "${S}/quickassist/build_system"
export ICP_TOOLS_TARGET = "${ICP_TOOLS}"
export FUNC_PATH = "${ICP_ROOT}/quickassist/lookaside/access_layer/src/sample_code/functional"
export KERNEL_SOURCE_ROOT = "${STAGING_KERNEL_DIR}"
export ICP_BUILD_OUTPUT = "${D}"
export DEST_LIBDIR = "${libdir}"
export DEST_BINDIR = "${bindir}"
export QAT_KERNEL_VER = "${KERNEL_VERSION}"
export SAMPLE_BUILD_OUTPUT = "${D}"
export MODULE_DIR = "${base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers"
inherit module
inherit update-rc.d
INITSCRIPT_NAME = "qat_service"
PARALLEL_MAKE = ""
#To get around the double slashes in paths in QAT makefiles
PACKAGE_DEBUG_SPLIT_STYLE = "debug-without-src"
EXTRA_OEMAKE_append = " CFLAGS+='-fgnu89-inline -fPIC'"
EXTRA_OEMAKE = "-e MAKEFLAGS="
do_unpack2() {
cd ${S}/
tar xzvf ${ICP_DRIVER_TYPE}.L.${PV}.tar.gz
}
addtask unpack2 after do_unpack before do_patch
do_compile () {
export LD="${CC} -Wl,--hash-style=gnu -nostartfiles -nodefaultlibs"
export MACHINE="${TARGET_ARCH}"
cd ${S}/quickassist
oe_runmake
cd ${SAMPLE_CODE_DIR}
touch ${SAMPLE_CODE_DIR}/performance/compression/calgary
touch ${SAMPLE_CODE_DIR}/performance/compression/canterbury
#build the whole sample code: fips, functional, performance
oe_runmake 'all'
oe_runmake 'fips_user_code'
}
do_install() {
export MACHINE="${TARGET_ARCH}"
cd ${S}/quickassist
oe_runmake install
cd ${SAMPLE_CODE_DIR}
oe_runmake install
install -d ${D}/etc/udev/rules.d \
${D}${includedir} \
${D}${includedir}/dc \
${D}${includedir}/lac \
${D}${sysconfdir}/dh895xcc \
${D}${base_libdir}/firmware
echo 'KERNEL=="icp_adf_ctl" MODE="0600"' > ${D}/etc/udev/rules.d/00-dh895xcc_qa.rules
echo 'KERNEL=="icp_dev[0-9]*" MODE="0600"' >> ${D}/etc/udev/rules.d/00-dh895xcc_qa.rules
echo 'KERNEL=="icp_dev_mem?" MODE="0600"' >> ${D}/etc/udev/rules.d/00-dh895xcc_qa.rules
install -m 640 ${S}/quickassist/include/*.h ${D}${includedir}
install -m 640 ${S}/quickassist/include/dc/*.h ${D}${includedir}/dc/
install -m 640 ${S}/quickassist/include/lac/*.h ${D}${includedir}/lac/
install -m 640 ${S}/quickassist/lookaside/access_layer/include/*.h ${D}${includedir}
install -m 0755 ${SAMPLE_CODE_DIR}/performance/compression/calgary ${D}${base_libdir}/firmware
install -m 0755 ${SAMPLE_CODE_DIR}/performance/compression/canterbury ${D}${base_libdir}/firmware
install -m 660 ${S}/quickassist/config/dh* ${D}${sysconfdir}/dh895xcc
}
PACKAGES += "${PN}-app"
FILES_${PN}-dev = "${includedir}"
FILES_${PN} += "\
${base_libdir}/firmware/ \
${sysconfdir}/ \
${sysconfdir}/udev/rules.d/ \
${sysconfdir}/init.d/ \
${libdir}/ \
"
FILES_${PN}-dbg += "${sysconfdir}/init.d/.debug"
FILES_${PN}-app += "${bindir}/*"
EXCLUDE_FROM_WORLD_core2-32-intel-common = "1"

View File

@ -1,27 +0,0 @@
From f83ac703a6babfa7f177b8f14ff3263a08fd8871 Mon Sep 17 00:00:00 2001
From: Saul Wold <sgw@linux.intel.com>
Date: Thu, 9 Feb 2017 14:35:57 -0800
Subject: [PATCH] OsalServices: Only use bits/time with GLIBC
Upstream-Status: Pending
Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
quickassist/utilities/osal/src/linux/user_space/OsalServices.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/quickassist/utilities/osal/src/linux/user_space/OsalServices.c b/quickassist/utilities/osal/src/linux/user_space/OsalServices.c
index 49fde45..5f50aaa 100755
--- a/quickassist/utilities/osal/src/linux/user_space/OsalServices.c
+++ b/quickassist/utilities/osal/src/linux/user_space/OsalServices.c
@@ -41,7 +41,7 @@
#include <stdarg.h>
#include <stdio.h>
-#ifdef __linux__
+#if defined(__linux__) && defined(__GLIBC__)
#include <bits/time.h>
#endif
#include <sched.h>
--
2.7.4

View File

@ -1,30 +0,0 @@
From 83f465ee776868875f6c19c2110eed4db6c547ce Mon Sep 17 00:00:00 2001
From: Anuj Mittal <anujx.mittal@intel.com>
Date: Thu, 10 Sep 2015 11:58:44 +0800
Subject: [PATCH] qat: make sure CFLAGS are correct
Upstream-Status: Submitted
Ensure that all the CFLAGS values are being considered.
Signed-off-by: Anuj Mittal <anujx.mittal@intel.com>
---
quickassist/adf/user/user_proxy/src/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/quickassist/adf/user/user_proxy/src/Makefile b/quickassist/adf/user/user_proxy/src/Makefile
index 868313a..efd352c 100644
--- a/quickassist/adf/user/user_proxy/src/Makefile
+++ b/quickassist/adf/user/user_proxy/src/Makefile
@@ -133,7 +133,7 @@ INCLUDES+= -I$(ADF_DIR)/include \
-I$(ADF_PLATFORM_DIR)/include \
-I$(ADF_CTL_DIR)/include
-CFLAGS = -D_GNU_SOURCE -O2 $(INCLUDES)
+CFLAGS += -D_GNU_SOURCE -O2 $(INCLUDES)
#needed by SAL
EXTRA_CFLAGS += -fPIC -fno-strict-aliasing
#include your $(ICP_OS)_$(ICP_OS_LEVEL).mk file
--
1.7.9.5

View File

@ -1,40 +0,0 @@
From 340701a0f44e70eafd9029e9186b74e8783f2afd Mon Sep 17 00:00:00 2001
From: venkatasubramanian pattu <venkatasubramanianx.pattu@intel.com>
Date: Mon, 6 Jul 2015 15:57:20 +0800
Subject: [PATCH] qat: fix for cross-compilation issue
Upstream-Status: Inappropriate [Configuration]
Ensure that we are not using host compiler.
Signed-off-by: venkatasubramanian pattu <venkatasubramanianx.pattu@intel.com>
Signed-off-by: Anuj Mittal <anujx.mittal@intel.com>
---
.../dc/stateless_multi_op_checksum_sample/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/quickassist/lookaside/access_layer/src/sample_code/functional/dc/stateless_multi_op_checksum_sample/Makefile b/quickassist/lookaside/access_layer/src/sample_code/functional/dc/stateless_multi_op_checksum_sample/Makefile
index 01590c3..315fca7 100644
--- a/quickassist/lookaside/access_layer/src/sample_code/functional/dc/stateless_multi_op_checksum_sample/Makefile
+++ b/quickassist/lookaside/access_layer/src/sample_code/functional/dc/stateless_multi_op_checksum_sample/Makefile
@@ -111,7 +111,7 @@ else
ADDITIONAL_OBJECTS += $(ICP_BUILD_OUTPUT)/libicp_qa_al_s.so
endif
-ADDITIONAL_OBJECTS += -L/usr/Lib -lpthread -lcrypto
+ADDITIONAL_OBJECTS += -lpthread -lcrypto
USER_SOURCE_FILES = ../../common/cpa_sample_utils.c cpa_dc_stateless_multi_op_checksum_sample.c
USER_SOURCE_FILES += ../stateless_sample/cpa_dc_sample_user.c
@@ -127,7 +127,7 @@ else
endif
default: clean
- gcc -Wall -O1 $(USER_INCLUDES) -DUSER_SPACE $(EXTRA_CFLAGS) \
+ $(CC) -Wall -O1 $(USER_INCLUDES) -DUSER_SPACE $(EXTRA_CFLAGS) \
$(USER_SOURCE_FILES) $(ADDITIONAL_OBJECTS) -o $(OUTPUT_NAME)
clean:
--
1.7.9.5

View File

@ -1,31 +0,0 @@
From 5044a14a6b4192b771f16aa834f688c1fd1287dd Mon Sep 17 00:00:00 2001
From: Anuj Mittal <anujx.mittal@intel.com>
Date: Wed, 8 Jul 2015 11:11:32 +0800
Subject: [PATCH] qat: remove local path from makefile
Upstream-Status: Inappropriate [Configuration]
Remove the host machine /usr/include path from makefile.
Signed-off-by: Anuj Mittal <anujx.mittal@intel.com>
---
.../build_files/env_files/linux_2.6_user_space.mk | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/quickassist/build_system/build_files/env_files/linux_2.6_user_space.mk b/quickassist/build_system/build_files/env_files/linux_2.6_user_space.mk
index 1451f4a..719d1bb 100755
--- a/quickassist/build_system/build_files/env_files/linux_2.6_user_space.mk
+++ b/quickassist/build_system/build_files/env_files/linux_2.6_user_space.mk
@@ -72,8 +72,7 @@
#
#-------------------------------------------------------------
-INCLUDES+=-I/usr/include \
- -I$(API_DIR) \
+INCLUDES+=-I$(API_DIR) \
-I$(OSAL_DIR)/include \
-I$(OSAL_DIR)/src/linux/user_space/include
--
1.7.9.5

View File

@ -1,30 +0,0 @@
From 142bf81912701d94985ad656c2250650113d00de Mon Sep 17 00:00:00 2001
From: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
Date: Tue, 22 Mar 2016 01:44:09 +0800
Subject: [PATCH 2/2] qat: Added include dir path
Upstream-Status: Inappropriate [Configuration]
Make sure that we point to the correct include path to the local
headers.
Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
---
quickassist/build_system/build_files/env_files/linux_2.6_user_space.mk | 1 +
1 file changed, 1 insertion(+)
diff --git a/quickassist/build_system/build_files/env_files/linux_2.6_user_space.mk b/quickassist/build_system/build_files/env_files/linux_2.6_user_space.mk
index b504f7f..a75f152 100755
--- a/quickassist/build_system/build_files/env_files/linux_2.6_user_space.mk
+++ b/quickassist/build_system/build_files/env_files/linux_2.6_user_space.mk
@@ -84,6 +84,7 @@ INCLUDES+=-I$(API_DIR) \
EXTRA_CFLAGS += $(cmd_line_cflags)
EXTRA_CFLAGS += -fno-strict-aliasing
+EXTRA_CFLAGS += $(INCLUDES)
EXTRA_LDFLAGS +=-whole-archive
ifeq ($(ARCH), i386)
--
1.9.1

View File

@ -1,387 +0,0 @@
From 803fd66d6a7e6dccc420f925106da0f05766a2f6 Mon Sep 17 00:00:00 2001
From: Anuj Mittal <anujx.mittal@intel.com>
Date: Wed, 9 Sep 2015 16:58:55 +0800
Subject: [PATCH] qat: add-install-target-to-makefiles
Upstream-Status: Inappropriate [Configuration]
Add install target to makefile to help install
ingredients at the proper location.
Signed-off-by: Anuj Mittal <anujx.mittal@intel.com>
---
quickassist/Makefile | 36 ++++++----
.../access_layer/src/sample_code/Makefile | 18 +++--
.../src/sample_code/functional/Makefile | 73 +++++++++++---------
3 files changed, 73 insertions(+), 54 deletions(-)
diff --git a/quickassist/Makefile b/quickassist/Makefile
index 339d410..b23a409 100644
--- a/quickassist/Makefile
+++ b/quickassist/Makefile
@@ -108,7 +108,7 @@ export DRBG_POLL_AND_WAIT=1
ifdef WITH_CPA_MUX
ALL_TARGETS = clean lac_lib_dir libosal libosal_user qat_mux hal adf adf_user lac lac_user qat-fw install_scripts
else
-ALL_TARGETS = clean lac_lib_dir libosal libosal_user hal adf adf_user lac lac_user qat-fw install_scripts
+ALL_TARGETS = clean lac_lib_dir libosal libosal_user hal adf adf_user lac lac_user
endif
ICP_ARCH_USER?=`uname -m`
@@ -120,7 +120,16 @@ all: $(ALL_TARGETS)
@echo 'Build Done';
user: lac_lib_dir libosal_user adf_user lac_user
-kernel: lac_lib_dir libosal hal adf lac qat-fw install_scripts
+kernel: lac_lib_dir libosal hal adf lac qat-fw
+
+install: qat-fw install_scripts
+ @cp $(OSAL_PATH)/src/build/linux_2.6/user_space/libosal.a $(ICP_BUILD_OUTPUT)/$(DEST_LIBDIR);
+ @cp $(OSAL_PATH)/src/build/linux_2.6/user_space/libosal.a $(ICP_BUILD_OUTPUT)/$(DEST_LIBDIR);
+ @cp $(ADF_PATH)/build/linux_2.6/libadf_proxy.a $(ICP_BUILD_OUTPUT)/$(DEST_LIBDIR);
+ @cp $(ADF_PATH)/build/linux_2.6/adf_ctl $(ICP_BUILD_OUTPUT)/etc/init.d/;
+ @cp $(LAC_PATH)/src/build/linux_2.6/kernel_space/$(DRIVER) $(ICP_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers;
+ @cp $(LAC_PATH)/src/build/linux_2.6/user_space/lib$(BASENAME).a $(ICP_BUILD_OUTPUT)/$(DEST_LIBDIR);
+ @cp $(LAC_PATH)/src/build/linux_2.6/user_space/lib$(BASENAME)_s.so $(ICP_BUILD_OUTPUT)/$(DEST_LIBDIR);
install_scripts:
@echo ; echo 'Copying Install Scripts';
@@ -128,10 +137,10 @@ ifdef WITH_CPA_MUX
@cp $(ICP_BUILDSYSTEM_PATH)/build_files/qat_service_mux $(ICP_BUILD_OUTPUT)/qat_service;
endif
ifndef WITH_CPA_MUX
- @cp $(ICP_BUILDSYSTEM_PATH)/build_files/qat_service $(ICP_BUILD_OUTPUT)/;
+ @cp $(ICP_BUILDSYSTEM_PATH)/build_files/qat_service $(ICP_BUILD_OUTPUT)/etc/init.d;
endif
- @chmod 750 $(ICP_BUILD_OUTPUT)/qat_service;
- @cp $(CONFIG_PATH)/dh895xcc_qa_dev0.conf $(ICP_BUILD_OUTPUT)/;
+ @chmod 750 $(ICP_BUILD_OUTPUT)/etc/init.d/qat_service;
+ @cp $(CONFIG_PATH)/dh895xcc_qa_dev0.conf $(ICP_BUILD_OUTPUT)/etc/;
# @cp $(CONFIG_PATH)/dh89xxcc_qa_dev1.conf $(ICP_BUILD_OUTPUT)/;
# @cp $(CONFIG_PATH)/dh89xxcc_qa_dev0_single_accel.conf $(ICP_BUILD_OUTPUT)/;
@@ -150,7 +159,6 @@ libosal_user: output_dir lac_lib_dir
@echo ; echo 'Building OSAL for user space';
@cd $(OSAL_PATH)/src && $(MAKE) ARCH=$(ICP_ARCH_USER) ICP_ENV_DIR=$(ICP_TOP_ENV) OS_LEVEL=linux ICP_OS_LEVEL=user_space lib;\
echo ; echo 'Copying OSAL library';
- cp $(OSAL_PATH)/src/build/linux_2.6/user_space/libosal.a $(ICP_BUILD_OUTPUT)/;
hal: output_dir libosal
@echo ; echo 'Building Hal Libs';
@@ -175,7 +183,6 @@ libosal_uservf: output_dir lac_lib_dir
@echo ; echo 'Building OSAL for user space';
@cd $(OSAL_PATH)/src && export ICP_WITHOUT_IOMMU=1 && $(MAKE) ICP_ENV_DIR=$(ICP_TOP_ENV) OS_LEVEL=linux ICP_OS_LEVEL=user_space lib;\
echo ; echo 'Copying OSAL library';
- cp $(OSAL_PATH)/src/build/linux_2.6/user_space/libosal.a $(ICP_BUILD_OUTPUT)/;
adfvf: output_dir lac_lib_dir libosalvf
@echo ; echo 'Building ADFVF';
@@ -185,13 +192,10 @@ adfvf: output_dir lac_lib_dir libosalvf
adf_user: output_dir lac_lib_dir libosal_user
@echo ; echo 'Building user ADF';
@cd $(ADF_PATH) && export ADF_PLATFORM=ACCELDEV && export ICP_ENV_DIR=$(ICP_TOP_ENV) && export ONE_KO_RELEASE_PACKAGE=1 && ICP_OS_LEVEL=user_space && $(MAKE) ARCH=$(ICP_ARCH_USER) adf_user;
- cp $(ADF_PATH)/build/linux_2.6/libadf_proxy.a $(ICP_BUILD_OUTPUT)/;
- cp $(ADF_PATH)/build/linux_2.6/adf_ctl $(ICP_BUILD_OUTPUT)/;
lac: output_dir libosal hal adf
@echo ; echo 'Building LAC';
@cd $(LAC_PATH) && export ICP_ENV_DIR=$(ICP_TOP_ENV) && export ONE_KO_RELEASE_PACKAGE=1 && cd src && $(MAKE) ICP_OS_LEVEL=kernel_space OS_LEVEL=linux;
- @cp $(LAC_PATH)/src/build/linux_2.6/kernel_space/$(DRIVER) $(ICP_BUILD_OUTPUT)/;
lacvf: output_dir libosalvf adfvf
@echo ; echo 'Building LACVF';
@@ -199,20 +203,18 @@ ifdef WITH_CPA_MUX
@cp $(CPA_MUX_PATH)/Module.symvers $(LAC_PATH)/src/
endif
@cd $(LAC_PATH) && export ADF_PLATFORM=ACCELDEVVF && export ICP_ENV_DIR=$(ICP_TOP_ENV) && export ONE_KO_RELEASE_PACKAGE=1 && cd src && $(MAKE) ICP_OS_LEVEL=kernel_space OS_LEVEL=linux;
- @cp $(LAC_PATH)/src/build/linux_2.6/kernel_space/$(BASENAME)_vf.ko $(ICP_BUILD_OUTPUT)/;
lac_user: output_dir libosal_user adf_user
@echo ; echo 'Building LAC in user space';
@cd $(LAC_PATH) && export ICP_ENV_DIR=$(ICP_TOP_ENV) && export ONE_KO_RELEASE_PACKAGE=1 && cd src && $(MAKE) ARCH=$(ICP_ARCH_USER) lib_static ICP_OS_LEVEL=user_space;
- cp $(LAC_PATH)/src/build/linux_2.6/user_space/lib$(BASENAME).a $(ICP_BUILD_OUTPUT)/;
@cd $(LAC_PATH) && export ICP_ENV_DIR=$(ICP_TOP_ENV) && export ONE_KO_RELEASE_PACKAGE=1 && cd src && $(MAKE) ARCH=$(ICP_ARCH_USER) lib_shared ICP_OS_LEVEL=user_space;
- cp $(LAC_PATH)/src/build/linux_2.6/user_space/lib$(BASENAME)_s.so $(ICP_BUILD_OUTPUT)/;
+ cp $(LAC_PATH)/src/build/linux_2.6/user_space/lib$(BASENAME)_s.so $(ICP_BUILD_OUTPUT);
qat-fw: output_dir
@echo ; echo 'Copying QAT-FW Binary';
- @cp -f $(QAT_FW_PATH)/icp_qat_ae.mof $(ICP_BUILD_OUTPUT)/mof_firmware.bin;
+ @cp -f $(QAT_FW_PATH)/icp_qat_ae.mof $(ICP_BUILD_OUTPUT)/lib/firmware/$(ICP_FIRMWARE_DIR)/mof_firmware.bin;
@echo ; echo 'Copying MMP Binary';
- @cp -f $(QAT_FW_PATH)/icp_qat_pke.mof $(ICP_BUILD_OUTPUT)/mmp_firmware.bin;
+ @cp -f $(QAT_FW_PATH)/icp_qat_pke.mof $(ICP_BUILD_OUTPUT)/lib/firmware/$(ICP_FIRMWARE_DIR)/mmp_firmware.bin;
qat_mux: output_dir libosal
@echo ; echo 'Building qat_mux module'
@@ -248,6 +250,10 @@ endif
output_dir:
test -d $(ICP_BUILD_OUTPUT) || mkdir -p $(ICP_BUILD_OUTPUT);
+ test -d $(ICP_BUILD_OUTPUT)$(DEST_LIBDIR) || mkdir -p $(ICP_BUILD_OUTPUT)$(DEST_LIBDIR);
+ test -d $(ICP_BUILD_OUTPUT)/lib/firmware/$(ICP_FIRMWARE_DIR) || mkdir -p $(ICP_BUILD_OUTPUT)/lib/firmware/$(ICP_FIRMWARE_DIR);
+ test -d $(ICP_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers || mkdir -p $(ICP_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers;
+ test -d $(ICP_BUILD_OUTPUT)/etc/init.d || mkdir -p $(ICP_BUILD_OUTPUT)/etc/init.d;
lac_lib_dir:
test -d $(LAC_LIB_DIR) || mkdir -p $(LAC_LIB_DIR);
diff --git a/quickassist/lookaside/access_layer/src/sample_code/Makefile b/quickassist/lookaside/access_layer/src/sample_code/Makefile
index e13bbf0..fbc575e 100644
--- a/quickassist/lookaside/access_layer/src/sample_code/Makefile
+++ b/quickassist/lookaside/access_layer/src/sample_code/Makefile
@@ -95,6 +95,7 @@ SAMPLE_PATH?=$(ICP_ROOT)/quickassist/lookaside/access_layer/src/sample_code
PERF_PATH?=$(ICP_ROOT)/quickassist/lookaside/access_layer/src/sample_code/performance
FIPS_PATH?=$(ICP_ROOT)/quickassist/lookaside/access_layer/src/sample_code/fips
FUNC_PATH=$(SAMPLE_PATH)/functional
+FIPS_OUTPUT_NAME=fips_sample
#include the makefile with all the default and common Make variable definitions
include $(ICP_BUILDSYSTEM_PATH)/build_files/common.mk
@@ -106,6 +107,8 @@ SAMPLE_BUILD_OUTPUT?=$(SAMPLE_PATH)/build
output_dir:
test -d $(SAMPLE_BUILD_OUTPUT) || mkdir $(SAMPLE_BUILD_OUTPUT);
+ test -d $(SAMPLE_BUILD_OUTPUT)$(DEST_BINDIR) || mkdir -p $(SAMPLE_BUILD_OUTPUT)$(DEST_BINDIR)
+
fips_code:
@if test -d $(FIPS_PATH); then echo ; echo 'Building FIPS Code'; fi;
@if test -d $(FIPS_PATH); \
@@ -162,17 +165,13 @@ endif
perf_all: $(PERF_ALL)
@echo ; echo "Build output location $(SAMPLE_BUILD_OUTPUT)";
-
perf_user: output_dir
@echo ; echo "Building perf_user";
@cd $(PERF_PATH) && $(MAKE) clean ICP_OS_LEVEL=user_space && $(MAKE) ICP_OS_LEVEL=user_space lib_shared exe
- @cp $(PERF_PATH)/build/linux_2.6/user_space/$(PERF_OUTPUT_NAME)_s.so $(SAMPLE_BUILD_OUTPUT)/;
- @cp $(PERF_PATH)/build/linux_2.6/user_space/$(PERF_OUTPUT_NAME) $(SAMPLE_BUILD_OUTPUT)/;
perf_kernel: output_dir
@echo ; echo "Building perf_kernel";
@cd $(PERF_PATH) && $(MAKE) ICP_OS_LEVEL=kernel_space
- @cp $(PERF_PATH)/build/linux_2.6/$(ICP_OS_LEVEL)/$(PERF_OUTPUT_NAME).ko $(SAMPLE_BUILD_OUTPUT)/;
common_mem_drv_kernel: output_dir
@echo ; echo "Building common_mem_drv kernel space";
@@ -187,12 +186,19 @@ common_mem_drv_user: output_dir
perf_qae: output_dir
@echo ; echo "Building perf_qae";
@cd $(CMN_ROOT)/linux/kernel_space && $(MAKE) ICP_OS_LEVEL=kernel_space
- @cp $(CMN_ROOT)/linux/kernel_space/build/linux_2.6/$(ICP_OS_LEVEL)/$(CMN_MODULE_NAME).ko $(SAMPLE_BUILD_OUTPUT)/;
-
func: output_dir
@cd $(FUNC_PATH) && $(MAKE) all;
+install: output_dir
+ @cp $(PERF_PATH)/build/linux_2.6/user_space/$(PERF_OUTPUT_NAME)_s.so $(SAMPLE_BUILD_OUTPUT)$(DEST_LIBDIR);
+ @cp $(PERF_PATH)/build/linux_2.6/user_space/$(PERF_OUTPUT_NAME) $(SAMPLE_BUILD_OUTPUT)$(DEST_BINDIR);
+ @cp $(PERF_PATH)/build/linux_2.6/$(ICP_OS_LEVEL)/$(PERF_OUTPUT_NAME).ko $(ICP_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers;
+ @cp $(CMN_ROOT)/linux/kernel_space/build/linux_2.6/$(ICP_OS_LEVEL)/$(CMN_MODULE_NAME).ko $(ICP_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers;
+ @cp $(FIPS_PATH)/build/linux_2.6/$(ICP_OS_LEVEL)/$(FIPS_OUTPUT_NAME).ko $(ICP_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers;
+ @cp $(FIPS_PATH)/build/linux_2.6/user_space/$(FIPS_OUTPUT_NAME)_s.so $(SAMPLE_BUILD_OUTPUT)$(DEST_LIBDIR);
+ @cp $(FIPS_PATH)/build/linux_2.6/user_space/$(FIPS_OUTPUT_NAME).a $(SAMPLE_BUILD_OUTPUT)$(DEST_LIBDIR);
+ @cd $(FUNC_PATH) && $(MAKE) install;
all: $(MEM_DRIVER) fips_code perf_user perf_kernel func
perf: $(MEM_DRIVER) perf_kernel
diff --git a/quickassist/lookaside/access_layer/src/sample_code/functional/Makefile b/quickassist/lookaside/access_layer/src/sample_code/functional/Makefile
index 3625637..322622b 100644
--- a/quickassist/lookaside/access_layer/src/sample_code/functional/Makefile
+++ b/quickassist/lookaside/access_layer/src/sample_code/functional/Makefile
@@ -64,6 +64,8 @@ SYM_PATH?=$(SAMPLE_PATH)/sym
ASYM_PATH?=$(SAMPLE_PATH)/asym
ICP_API_DIR?=$(ICP_ROOT)/quickassist/include/
ICP_LAC_DIR?=$(ICP_ROOT)/quickassist/lookaside/access_layer/
+BIN_INSTALLPATH=$(SAMPLE_BUILD_OUTPUT)$(DEST_BINDIR)/
+MODULE_INSTALLPATH=$(SAMPLE_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers
ifeq ($(WITH_CMDRV),1)
CMN_ROOT?=$(ICP_ROOT)/quickassist/utilities/libqae_mem/
@@ -110,6 +112,7 @@ SAMPLE_BUILD_OUTPUT?=$(SAMPLE_PATH)/build
output_dir:
test -d $(SAMPLE_BUILD_OUTPUT) || mkdir $(SAMPLE_BUILD_OUTPUT);
+ test -d $(BIN_INSTALLPATH) || mkdir -p $(BIN_INSTALLPATH);
BUILD_DC=dc_dp_sample stateless_sample stateful_sample \
stateless_multi_op_checksum_sample
@@ -119,31 +122,23 @@ dc: $(BUILD_DC)
dc_dp_sample: output_dir
@cd $(DC_PATH)/dc_dp_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
- @cp $(DC_PATH)/dc_dp_sample/dc_dp_sample $(SAMPLE_BUILD_OUTPUT)/;
ifneq ($(WITH_UPSTREAM),1)
@cd $(DC_PATH)/dc_dp_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
- @cp $(DC_PATH)/dc_dp_sample/dc_dp_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
endif
stateless_sample: output_dir
@cd $(DC_PATH)/stateless_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
- @cp $(DC_PATH)/stateless_sample/dc_stateless_sample $(SAMPLE_BUILD_OUTPUT)/;
ifneq ($(WITH_UPSTREAM),1)
@cd $(DC_PATH)/stateless_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
- @cp $(DC_PATH)/stateless_sample/dc_stateless_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
endif
stateful_sample: output_dir
@cd $(DC_PATH)/stateful_sample && $(MAKE) clean ICP_OS_LEVEL=user_space && $(MAKE) ICP_OS_LEVEL=user_space
- @cp $(DC_PATH)/stateful_sample/dc_stateful_sample $(SAMPLE_BUILD_OUTPUT)/;
- @cp $(DC_PATH)/stateful_sample/paper4 $(SAMPLE_BUILD_OUTPUT)/;
stateless_multi_op_checksum_sample: output_dir
@cd $(DC_PATH)/stateless_multi_op_checksum_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
- @cp $(DC_PATH)/stateless_multi_op_checksum_sample/dc_stateless_multi_op_sample $(SAMPLE_BUILD_OUTPUT)/;
ifneq ($(WITH_UPSTREAM),1)
@cd $(DC_PATH)/stateless_multi_op_checksum_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
- @cp $(DC_PATH)/stateless_multi_op_checksum_sample/dc_stateless_multi_op_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
endif
BUILD_SYN=algchaining_sample ccm_sample cipher_sample \
@@ -159,86 +154,65 @@ sym:$(BUILD_SYN)
@echo ; echo "Build sym component";
algchaining_sample: output_dir
@cd $(SYM_PATH)/alg_chaining_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
- @cp $(SYM_PATH)/alg_chaining_sample/algchaining_sample $(SAMPLE_BUILD_OUTPUT)/;
ifneq ($(WITH_UPSTREAM),1)
@cd $(SYM_PATH)/alg_chaining_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
- @cp $(SYM_PATH)/alg_chaining_sample/algchaining_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
endif
ccm_sample: output_dir
@cd $(SYM_PATH)/ccm_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
- @cp $(SYM_PATH)/ccm_sample/ccm_sample $(SAMPLE_BUILD_OUTPUT)/;
ifneq ($(WITH_UPSTREAM),1)
@cd $(SYM_PATH)/ccm_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
- @cp $(SYM_PATH)/ccm_sample/ccm_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
endif
cipher_sample: output_dir
@cd $(SYM_PATH)/cipher_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
- @cp $(SYM_PATH)/cipher_sample/cipher_sample $(SAMPLE_BUILD_OUTPUT)/;
ifneq ($(WITH_UPSTREAM),1)
@cd $(SYM_PATH)/cipher_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
- @cp $(SYM_PATH)/cipher_sample/cipher_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
endif
drbg_sample: output_dir
@cd $(SYM_PATH)/drbg_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
- @cp $(SYM_PATH)/drbg_sample/drbg_sample $(SAMPLE_BUILD_OUTPUT)/;
ifneq ($(WITH_UPSTREAM),1)
@cd $(SYM_PATH)/drbg_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
- @cp $(SYM_PATH)/drbg_sample/drbg_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
endif
gcm_sample: output_dir
@cd $(SYM_PATH)/gcm_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
- @cp $(SYM_PATH)/gcm_sample/gcm_sample $(SAMPLE_BUILD_OUTPUT)/;
ifneq ($(WITH_UPSTREAM),1)
@cd $(SYM_PATH)/gcm_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
- @cp $(SYM_PATH)/gcm_sample/gcm_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
endif
hash_file_sample: output_dir
@cd $(SYM_PATH)/hash_file_sample && $(MAKE) clean ICP_OS_LEVEL=user_space&& $(MAKE) ICP_OS_LEVEL=user_space
- @cp $(SYM_PATH)/hash_file_sample/hash_file_sample $(SAMPLE_BUILD_OUTPUT)/;
hash_sample: output_dir
@cd $(SYM_PATH)/hash_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
- @cp $(SYM_PATH)/hash_sample/hash_sample $(SAMPLE_BUILD_OUTPUT)/;
ifneq ($(WITH_UPSTREAM),1)
@cd $(SYM_PATH)/hash_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
- @cp $(SYM_PATH)/hash_sample/hash_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
endif
ipsec_sample: output_dir
@cd $(SYM_PATH)/ipsec_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
- @cp $(SYM_PATH)/ipsec_sample/ipsec_sample $(SAMPLE_BUILD_OUTPUT)/;
ifneq ($(WITH_UPSTREAM),1)
@cd $(SYM_PATH)/ipsec_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
- @cp $(SYM_PATH)/ipsec_sample/ipsec_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
endif
nrbg_sample: output_dir
@cd $(SYM_PATH)/nrbg_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
- @cp $(SYM_PATH)/nrbg_sample/nrbg_sample $(SAMPLE_BUILD_OUTPUT)/;
ifneq ($(WITH_UPSTREAM),1)
@cd $(SYM_PATH)/nrbg_sample && $(MAKE) && $(MAKE) ICP_OS_LEVEL=kernel_space
- @cp $(SYM_PATH)/nrbg_sample/nrbg_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
endif
ssl_sample: output_dir
@cd $(SYM_PATH)/ssl_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
- @cp $(SYM_PATH)/ssl_sample/ssl_sample $(SAMPLE_BUILD_OUTPUT)/;
ifneq ($(WITH_UPSTREAM),1)
@cd $(SYM_PATH)/ssl_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
- @cp $(SYM_PATH)/ssl_sample/ssl_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
endif
sym_dp_sample: output_dir
@cd $(SYM_PATH)/symdp_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
- @cp $(SYM_PATH)/symdp_sample/sym_dp_sample $(SAMPLE_BUILD_OUTPUT)/;
ifneq ($(WITH_UPSTREAM),1)
@cd $(SYM_PATH)/symdp_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
- @cp $(SYM_PATH)/symdp_sample/sym_dp_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
endif
BUILD_ASYM=diffie_hellman_sample prime_sample
@@ -248,18 +222,51 @@ asym: $(BUILD_ASYM)
diffie_hellman_sample: output_dir
@cd $(ASYM_PATH)/diffie_hellman_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
- @cp $(ASYM_PATH)/diffie_hellman_sample/dh_sample $(SAMPLE_BUILD_OUTPUT)/;
ifneq ($(WITH_UPSTREAM),1)
@cd $(ASYM_PATH)/diffie_hellman_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
- @cp $(ASYM_PATH)/diffie_hellman_sample/dh_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
endif
prime_sample: output_dir
@cd $(ASYM_PATH)/prime_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
- @cp $(ASYM_PATH)/prime_sample/prime_sample $(SAMPLE_BUILD_OUTPUT)/;
ifneq ($(WITH_UPSTREAM),1)
@cd $(ASYM_PATH)/prime_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
- @cp $(ASYM_PATH)/prime_sample/prime_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
+endif
+
+install: output_dir
+ @cp $(DC_PATH)/dc_dp_sample/dc_dp_sample $(BIN_INSTALLPATH);
+ @cp $(DC_PATH)/stateless_sample/dc_stateless_sample $(BIN_INSTALLPATH);
+ @cp $(DC_PATH)/stateful_sample/dc_stateful_sample $(BIN_INSTALLPATH);
+ @cp $(DC_PATH)/stateful_sample/paper4 $(BIN_INSTALLPATH);
+ @cp $(DC_PATH)/stateless_multi_op_checksum_sample/dc_stateless_multi_op_sample $(BIN_INSTALLPATH);
+ @cp $(SYM_PATH)/alg_chaining_sample/algchaining_sample $(BIN_INSTALLPATH);
+ @cp $(SYM_PATH)/ccm_sample/ccm_sample $(BIN_INSTALLPATH);
+ @cp $(SYM_PATH)/cipher_sample/cipher_sample $(BIN_INSTALLPATH);
+ @cp $(SYM_PATH)/drbg_sample/drbg_sample $(BIN_INSTALLPATH);
+ @cp $(SYM_PATH)/gcm_sample/gcm_sample $(BIN_INSTALLPATH);
+ @cp $(SYM_PATH)/hash_file_sample/hash_file_sample $(BIN_INSTALLPATH);
+ @cp $(SYM_PATH)/hash_sample/hash_sample $(BIN_INSTALLPATH);
+ @cp $(SYM_PATH)/ipsec_sample/ipsec_sample $(BIN_INSTALLPATH);
+ @cp $(SYM_PATH)/nrbg_sample/nrbg_sample $(BIN_INSTALLPATH);
+ @cp $(SYM_PATH)/ssl_sample/ssl_sample $(BIN_INSTALLPATH);
+ @cp $(SYM_PATH)/symdp_sample/sym_dp_sample $(BIN_INSTALLPATH);
+ @cp $(ASYM_PATH)/diffie_hellman_sample/dh_sample $(BIN_INSTALLPATH);
+ @cp $(ASYM_PATH)/prime_sample/prime_sample $(BIN_INSTALLPATH);
+ifneq ($(WITH_UPSTREAM),1)
+ @cp $(DC_PATH)/dc_dp_sample/dc_dp_sample.ko $(MODULE_INSTALLPATH);
+ @cp $(DC_PATH)/stateless_sample/dc_stateless_sample.ko $(MODULE_INSTALLPATH);
+ @cp $(DC_PATH)/stateless_multi_op_checksum_sample/dc_stateless_multi_op_sample.ko $(MODULE_INSTALLPATH);
+ @cp $(SYM_PATH)/alg_chaining_sample/algchaining_sample.ko $(MODULE_INSTALLPATH);
+ @cp $(SYM_PATH)/ccm_sample/ccm_sample.ko $(MODULE_INSTALLPATH);
+ @cp $(SYM_PATH)/cipher_sample/cipher_sample.ko $(MODULE_INSTALLPATH);
+ @cp $(SYM_PATH)/drbg_sample/drbg_sample.ko $(MODULE_INSTALLPATH);
+ @cp $(SYM_PATH)/gcm_sample/gcm_sample.ko $(MODULE_INSTALLPATH);
+ @cp $(SYM_PATH)/hash_sample/hash_sample.ko $(MODULE_INSTALLPATH);
+ @cp $(SYM_PATH)/ipsec_sample/ipsec_sample.ko $(MODULE_INSTALLPATH);
+ @cp $(SYM_PATH)/nrbg_sample/nrbg_sample.ko $(MODULE_INSTALLPATH);
+ @cp $(SYM_PATH)/ssl_sample/ssl_sample.ko $(MODULE_INSTALLPATH);
+ @cp $(SYM_PATH)/symdp_sample/sym_dp_sample.ko $(MODULE_INSTALLPATH);
+ @cp $(ASYM_PATH)/diffie_hellman_sample/dh_sample.ko $(MODULE_INSTALLPATH);
+ @cp $(ASYM_PATH)/prime_sample/prime_sample.ko $(MODULE_INSTALLPATH);
endif
CLEAN_DC=clean_dc_dp_sample clean_stateless_sample \
--
1.7.9.5

View File

@ -1,40 +0,0 @@
From f056dbedd106e03860de66d5c84cd018da087dda Mon Sep 17 00:00:00 2001
From: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
Date: Tue, 22 Mar 2016 00:59:36 +0800
Subject: [PATCH 1/2] qat: change in return type of func in kernel v4.4
Upstream-Status: Submitted
The function 'seq_puts' return type is changed from 'int' to 'void'.
Now use of 'ret' variable is not valid. So used another condition to check
for overflow.
Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
---
quickassist/adf/drivers/common/linux/src/adf_proc_debug.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/quickassist/adf/drivers/common/linux/src/adf_proc_debug.c b/quickassist/adf/drivers/common/linux/src/adf_proc_debug.c
index 7d81eaa..a1dd917 100755
--- a/quickassist/adf/drivers/common/linux/src/adf_proc_debug.c
+++ b/quickassist/adf/drivers/common/linux/src/adf_proc_debug.c
@@ -132,13 +132,13 @@ static int adf_debug_show(struct seq_file *sfile, void *v)
{
debug_file_info_t* file_info = sfile->private;
if (file_info && file_info->seq_read && file_info->page) {
- int ret = 0, old_offset = file_info->offset;
+ int old_offset = file_info->offset;
file_info->offset =
file_info->seq_read(file_info->private_data,
file_info->page, PAGE_SIZE - 1,
file_info->offset);
- ret = seq_puts(sfile, (char*)file_info->page);
- if (ret) {
+ seq_puts(sfile, (char*)file_info->page);
+ if (sfile->count == sfile->size) {
/* run out of space - need to reprint */
file_info->offset = old_offset;
}
--
1.9.1

View File

@ -1,353 +0,0 @@
From f53aeef0ae6a89066cca8c9a9154e70408f6ef68 Mon Sep 17 00:00:00 2001
From: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
Date: Thu, 24 Mar 2016 01:11:02 +0800
Subject: [PATCH] qat: add install target to makefiles
Upstream-Status: Inappropriate [Configuration]
Added an install target to makefiles to help
install ingredients at a proper path.
Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
---
quickassist/Makefile | 29 ++++++---
.../access_layer/src/sample_code/Makefile | 19 ++++--
.../src/sample_code/functional/Makefile | 74 ++++++++++++----------
3 files changed, 75 insertions(+), 47 deletions(-)
diff --git a/quickassist/Makefile b/quickassist/Makefile
index 6c5d436..0a1ee4c 100644
--- a/quickassist/Makefile
+++ b/quickassist/Makefile
@@ -109,7 +109,7 @@ ifdef WITH_CPA_MUX
ALL_TARGETS = clean lac_lib_dir libosal libosal_user qat_mux hal adf adf_user lac lac_user qat-fw install_scripts
ALL_TARGETS_CI = lac_lib_dir qat_mux_ci lac_ci lac_user_ci qat-fw install_scripts
else
-ALL_TARGETS = clean lac_lib_dir libosal libosal_user hal adf adf_user lac lac_user qat-fw install_scripts
+ALL_TARGETS = clean lac_lib_dir libosal libosal_user hal adf adf_user lac lac_user
ALL_TARGETS_CI = lac_lib_dir lac_ci lac_user_ci qat-fw install_scripts
endif
ICP_ARCH_USER?=`uname -m`
@@ -125,7 +125,16 @@ all_ci: $(ALL_TARGETS_CI)
@echo 'Build Done';
user: lac_lib_dir libosal_user adf_user lac_user
-kernel: lac_lib_dir libosal hal adf lac qat-fw install_scripts
+kernel: lac_lib_dir libosal hal adf lac qat-fw
+
+install: qat-fw install_scripts
+ @cp $(OSAL_PATH)/src/build/linux_2.6/user_space/libosal.a $(ICP_BUILD_OUTPUT)/$(DEST_LIBDIR);
+ @cp $(OSAL_PATH)/src/build/linux_2.6/user_space/libosal.a $(ICP_BUILD_OUTPUT)/$(DEST_LIBDIR);
+ @cp $(ADF_PATH)/build/linux_2.6/libadf_proxy.a $(ICP_BUILD_OUTPUT)/$(DEST_LIBDIR);
+ @cp $(ADF_PATH)/build/linux_2.6/adf_ctl $(ICP_BUILD_OUTPUT)/etc/init.d/;
+ @cp $(LAC_PATH)/src/build/linux_2.6/kernel_space/$(DRIVER) $(ICP_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers;
+ @cp $(LAC_PATH)/src/build/linux_2.6/user_space/lib$(BASENAME).a $(ICP_BUILD_OUTPUT)/$(DEST_LIBDIR);
+ @cp $(LAC_PATH)/src/build/linux_2.6/user_space/lib$(BASENAME)_s.so $(ICP_BUILD_OUTPUT)/$(DEST_LIBDIR);
install_scripts:
@echo ; echo 'Copying Install Scripts';
@@ -133,10 +142,10 @@ ifdef WITH_CPA_MUX
@cp $(ICP_BUILDSYSTEM_PATH)/build_files/qat_service_mux $(ICP_BUILD_OUTPUT)/qat_service;
endif
ifndef WITH_CPA_MUX
- @cp $(ICP_BUILDSYSTEM_PATH)/build_files/qat_service $(ICP_BUILD_OUTPUT)/;
+ @cp $(ICP_BUILDSYSTEM_PATH)/build_files/qat_service $(ICP_BUILD_OUTPUT)/etc/init.d;
endif
- @chmod 750 $(ICP_BUILD_OUTPUT)/qat_service;
- @cp $(CONFIG_PATH)/dh895xcc_qa_dev0.conf $(ICP_BUILD_OUTPUT)/;
+ @chmod 750 $(ICP_BUILD_OUTPUT)/etc/init.d/qat_service;
+ @cp $(CONFIG_PATH)/dh895xcc_qa_dev0.conf $(ICP_BUILD_OUTPUT)/etc/;
# @cp $(CONFIG_PATH)/dh89xxcc_qa_dev1.conf $(ICP_BUILD_OUTPUT)/;
# @cp $(CONFIG_PATH)/dh89xxcc_qa_dev0_single_accel.conf $(ICP_BUILD_OUTPUT)/;
@@ -233,7 +242,7 @@ lac_user: output_dir libosal_user adf_user
@cd $(LAC_PATH) && export ICP_ENV_DIR=$(ICP_TOP_ENV) && export ONE_KO_RELEASE_PACKAGE=1 && cd src && $(MAKE) ARCH=$(ICP_ARCH_USER) lib_static ICP_OS_LEVEL=user_space;
cp $(LAC_PATH)/src/build/linux_2.6/user_space/lib$(BASENAME).a $(ICP_BUILD_OUTPUT)/;
@cd $(LAC_PATH) && export ICP_ENV_DIR=$(ICP_TOP_ENV) && export ONE_KO_RELEASE_PACKAGE=1 && cd src && $(MAKE) ARCH=$(ICP_ARCH_USER) lib_shared ICP_OS_LEVEL=user_space;
- cp $(LAC_PATH)/src/build/linux_2.6/user_space/lib$(BASENAME)_s.so $(ICP_BUILD_OUTPUT)/;
+ cp $(LAC_PATH)/src/build/linux_2.6/user_space/lib$(BASENAME)_s.so $(ICP_BUILD_OUTPUT);
lac_user_ci: output_dir
@echo ; echo 'Building LAC in user space';
@@ -244,9 +253,9 @@ lac_user_ci: output_dir
qat-fw: output_dir
@echo ; echo 'Copying QAT-FW Binary';
- @cp -f $(QAT_FW_PATH)/icp_qat_ae.mof $(ICP_BUILD_OUTPUT)/mof_firmware.bin;
+ @cp -f $(QAT_FW_PATH)/icp_qat_ae.mof $(ICP_BUILD_OUTPUT)/lib/firmware/$(ICP_FIRMWARE_DIR)/mof_firmware.bin;
@echo ; echo 'Copying MMP Binary';
- @cp -f $(QAT_FW_PATH)/icp_qat_pke.mof $(ICP_BUILD_OUTPUT)/mmp_firmware.bin;
+ @cp -f $(QAT_FW_PATH)/icp_qat_pke.mof $(ICP_BUILD_OUTPUT)/lib/firmware/$(ICP_FIRMWARE_DIR)/mmp_firmware.bin;
qat_mux: output_dir libosal
@echo ; echo 'Building qat_mux module'
@@ -306,6 +315,10 @@ endif
output_dir:
test -d $(ICP_BUILD_OUTPUT) || mkdir -p $(ICP_BUILD_OUTPUT);
+ test -d $(ICP_BUILD_OUTPUT)$(DEST_LIBDIR) || mkdir -p $(ICP_BUILD_OUTPUT)$(DEST_LIBDIR);
+ test -d $(ICP_BUILD_OUTPUT)/lib/firmware/$(ICP_FIRMWARE_DIR) || mkdir -p $(ICP_BUILD_OUTPUT)/lib/firmware/$(ICP_FIRMWARE_DIR);
+ test -d $(ICP_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers || mkdir -p $(ICP_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers;
+ test -d $(ICP_BUILD_OUTPUT)/etc/init.d || mkdir -p $(ICP_BUILD_OUTPUT)/etc/init.d;
lac_lib_dir:
test -d $(LAC_LIB_DIR) || mkdir -p $(LAC_LIB_DIR);
diff --git a/quickassist/lookaside/access_layer/src/sample_code/Makefile b/quickassist/lookaside/access_layer/src/sample_code/Makefile
index c66ecfb..4cc3dbf 100644
--- a/quickassist/lookaside/access_layer/src/sample_code/Makefile
+++ b/quickassist/lookaside/access_layer/src/sample_code/Makefile
@@ -89,6 +89,7 @@ SAMPLE_PATH?=$(ICP_ROOT)/quickassist/lookaside/access_layer/src/sample_code
PERF_PATH?=$(ICP_ROOT)/quickassist/lookaside/access_layer/src/sample_code/performance
FIPS_PATH?=$(ICP_ROOT)/quickassist/lookaside/access_layer/src/sample_code/fips
FUNC_PATH=$(SAMPLE_PATH)/functional
+FIPS_OUTPUT_NAME=fips_sample
#include the makefile with all the default and common Make variable definitions
include $(ICP_BUILDSYSTEM_PATH)/build_files/common.mk
@@ -100,6 +101,8 @@ SAMPLE_BUILD_OUTPUT?=$(SAMPLE_PATH)/build
output_dir:
test -d $(SAMPLE_BUILD_OUTPUT) || mkdir $(SAMPLE_BUILD_OUTPUT);
+ test -d $(SAMPLE_BUILD_OUTPUT)$(DEST_BINDIR) || mkdir -p $(SAMPLE_BUILD_OUTPUT)$(DEST_BINDIR)
+
fips_code:
@if test -d $(FIPS_PATH); then echo ; echo 'Building FIPS Code'; fi;
@if test -d $(FIPS_PATH); \
@@ -154,14 +157,11 @@ perf_all: $(PERF_ALL)
perf_user: output_dir
@echo ; echo "Building perf_user";
@cd $(PERF_PATH) && $(MAKE) clean ICP_OS_LEVEL=user_space && $(MAKE) ARCH=$(ICP_ARCH_USER) ICP_OS_LEVEL=user_space lib_shared exe
- @cp $(PERF_PATH)/build/linux_2.6/user_space/$(PERF_OUTPUT_NAME)_s.so $(SAMPLE_BUILD_OUTPUT)/;
- @cp $(PERF_PATH)/build/linux_2.6/user_space/$(PERF_OUTPUT_NAME) $(SAMPLE_BUILD_OUTPUT)/;
perf_kernel: output_dir
@echo ; echo "Building perf_kernel";
@cd $(PERF_PATH) && $(MAKE) ICP_OS_LEVEL=kernel_space
- @cp $(PERF_PATH)/build/linux_2.6/$(ICP_OS_LEVEL)/$(PERF_OUTPUT_NAME).ko $(SAMPLE_BUILD_OUTPUT)/;
-
+
common_mem_drv_kernel: output_dir
@echo ; echo "Building common_mem_drv kernel space";
@cd $(CMN_ROOT) && $(MAKE) ICP_OS_LEVEL=user_space cm_kernel
@@ -175,12 +175,19 @@ common_mem_drv_user: output_dir
perf_qae: output_dir
@echo ; echo "Building perf_qae";
@cd $(CMN_ROOT)/linux/kernel_space && $(MAKE) ICP_OS_LEVEL=kernel_space
- @cp $(CMN_ROOT)/linux/kernel_space/build/linux_2.6/$(ICP_OS_LEVEL)/$(CMN_MODULE_NAME).ko $(SAMPLE_BUILD_OUTPUT)/;
-
func: output_dir
@cd $(FUNC_PATH) && $(MAKE) all;
+install: output_dir
+ @cp $(PERF_PATH)/build/linux_2.6/user_space/$(PERF_OUTPUT_NAME)_s.so $(SAMPLE_BUILD_OUTPUT)$(DEST_LIBDIR);
+ @cp $(PERF_PATH)/build/linux_2.6/user_space/$(PERF_OUTPUT_NAME) $(SAMPLE_BUILD_OUTPUT)$(DEST_BINDIR);
+ @cp $(PERF_PATH)/build/linux_2.6/$(ICP_OS_LEVEL)/$(PERF_OUTPUT_NAME).ko $(ICP_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers;
+ @cp $(CMN_ROOT)/linux/kernel_space/build/linux_2.6/$(ICP_OS_LEVEL)/$(CMN_MODULE_NAME).ko $(ICP_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers;
+ @cp $(FIPS_PATH)/build/linux_2.6/$(ICP_OS_LEVEL)/$(FIPS_OUTPUT_NAME).ko $(ICP_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers;
+ @cp $(FIPS_PATH)/build/linux_2.6/user_space/$(FIPS_OUTPUT_NAME)_s.so $(SAMPLE_BUILD_OUTPUT)$(DEST_LIBDIR);
+ @cp $(FIPS_PATH)/build/linux_2.6/user_space/$(FIPS_OUTPUT_NAME).a $(SAMPLE_BUILD_OUTPUT)$(DEST_LIBDIR);
+ @cd $(FUNC_PATH) && $(MAKE) install;
all: $(MEM_DRIVER) fips_code perf_user perf_kernel func
perf: $(MEM_DRIVER) perf_kernel
diff --git a/quickassist/lookaside/access_layer/src/sample_code/functional/Makefile b/quickassist/lookaside/access_layer/src/sample_code/functional/Makefile
index 3208acf..41754e8 100644
--- a/quickassist/lookaside/access_layer/src/sample_code/functional/Makefile
+++ b/quickassist/lookaside/access_layer/src/sample_code/functional/Makefile
@@ -64,6 +64,8 @@ SYM_PATH?=$(SAMPLE_PATH)/sym
ASYM_PATH?=$(SAMPLE_PATH)/asym
ICP_API_DIR?=$(ICP_ROOT)/quickassist/include/
ICP_LAC_DIR?=$(ICP_ROOT)/quickassist/lookaside/access_layer/
+BIN_INSTALLPATH=$(SAMPLE_BUILD_OUTPUT)$(DEST_BINDIR)/
+MODULE_INSTALLPATH=$(SAMPLE_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers
CMN_ROOT?=$(ICP_ROOT)/quickassist/lookaside/access_layer/src/sample_code/performance/qae/
CMN_MODULE_NAME?=qaeMemDrv
@@ -105,6 +107,7 @@ SAMPLE_BUILD_OUTPUT?=$(SAMPLE_PATH)/build
output_dir:
test -d $(SAMPLE_BUILD_OUTPUT) || mkdir $(SAMPLE_BUILD_OUTPUT);
+ test -d $(BIN_INSTALLPATH) || mkdir -p $(BIN_INSTALLPATH);
BUILD_DC=dc_dp_sample stateless_sample stateful_sample \
stateless_multi_op_checksum_sample
@@ -114,31 +117,23 @@ dc: $(BUILD_DC)
dc_dp_sample: output_dir
@cd $(DC_PATH)/dc_dp_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
- @cp $(DC_PATH)/dc_dp_sample/dc_dp_sample $(SAMPLE_BUILD_OUTPUT)/;
ifneq ($(WITH_UPSTREAM),1)
@cd $(DC_PATH)/dc_dp_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
- @cp $(DC_PATH)/dc_dp_sample/dc_dp_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
endif
stateless_sample: output_dir
@cd $(DC_PATH)/stateless_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
- @cp $(DC_PATH)/stateless_sample/dc_stateless_sample $(SAMPLE_BUILD_OUTPUT)/;
ifneq ($(WITH_UPSTREAM),1)
@cd $(DC_PATH)/stateless_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
- @cp $(DC_PATH)/stateless_sample/dc_stateless_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
endif
stateful_sample: output_dir
@cd $(DC_PATH)/stateful_sample && $(MAKE) clean ICP_OS_LEVEL=user_space && $(MAKE) ICP_OS_LEVEL=user_space
- @cp $(DC_PATH)/stateful_sample/dc_stateful_sample $(SAMPLE_BUILD_OUTPUT)/;
- @cp $(DC_PATH)/stateful_sample/paper4 $(SAMPLE_BUILD_OUTPUT)/;
stateless_multi_op_checksum_sample: output_dir
@cd $(DC_PATH)/stateless_multi_op_checksum_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
- @cp $(DC_PATH)/stateless_multi_op_checksum_sample/dc_stateless_multi_op_sample $(SAMPLE_BUILD_OUTPUT)/;
ifneq ($(WITH_UPSTREAM),1)
@cd $(DC_PATH)/stateless_multi_op_checksum_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
- @cp $(DC_PATH)/stateless_multi_op_checksum_sample/dc_stateless_multi_op_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
endif
BUILD_SYN=algchaining_sample ccm_sample cipher_sample \
@@ -154,86 +149,65 @@ sym:$(BUILD_SYN)
@echo ; echo "Build sym component";
algchaining_sample: output_dir
@cd $(SYM_PATH)/alg_chaining_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
- @cp $(SYM_PATH)/alg_chaining_sample/algchaining_sample $(SAMPLE_BUILD_OUTPUT)/;
ifneq ($(WITH_UPSTREAM),1)
@cd $(SYM_PATH)/alg_chaining_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
- @cp $(SYM_PATH)/alg_chaining_sample/algchaining_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
endif
ccm_sample: output_dir
@cd $(SYM_PATH)/ccm_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
- @cp $(SYM_PATH)/ccm_sample/ccm_sample $(SAMPLE_BUILD_OUTPUT)/;
ifneq ($(WITH_UPSTREAM),1)
@cd $(SYM_PATH)/ccm_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
- @cp $(SYM_PATH)/ccm_sample/ccm_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
endif
cipher_sample: output_dir
@cd $(SYM_PATH)/cipher_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
- @cp $(SYM_PATH)/cipher_sample/cipher_sample $(SAMPLE_BUILD_OUTPUT)/;
ifneq ($(WITH_UPSTREAM),1)
@cd $(SYM_PATH)/cipher_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
- @cp $(SYM_PATH)/cipher_sample/cipher_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
endif
drbg_sample: output_dir
@cd $(SYM_PATH)/drbg_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
- @cp $(SYM_PATH)/drbg_sample/drbg_sample $(SAMPLE_BUILD_OUTPUT)/;
ifneq ($(WITH_UPSTREAM),1)
@cd $(SYM_PATH)/drbg_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
- @cp $(SYM_PATH)/drbg_sample/drbg_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
endif
gcm_sample: output_dir
@cd $(SYM_PATH)/gcm_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
- @cp $(SYM_PATH)/gcm_sample/gcm_sample $(SAMPLE_BUILD_OUTPUT)/;
ifneq ($(WITH_UPSTREAM),1)
@cd $(SYM_PATH)/gcm_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
- @cp $(SYM_PATH)/gcm_sample/gcm_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
endif
hash_file_sample: output_dir
@cd $(SYM_PATH)/hash_file_sample && $(MAKE) clean ICP_OS_LEVEL=user_space&& $(MAKE) ICP_OS_LEVEL=user_space
- @cp $(SYM_PATH)/hash_file_sample/hash_file_sample $(SAMPLE_BUILD_OUTPUT)/;
hash_sample: output_dir
@cd $(SYM_PATH)/hash_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
- @cp $(SYM_PATH)/hash_sample/hash_sample $(SAMPLE_BUILD_OUTPUT)/;
ifneq ($(WITH_UPSTREAM),1)
@cd $(SYM_PATH)/hash_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
- @cp $(SYM_PATH)/hash_sample/hash_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
endif
ipsec_sample: output_dir
@cd $(SYM_PATH)/ipsec_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
- @cp $(SYM_PATH)/ipsec_sample/ipsec_sample $(SAMPLE_BUILD_OUTPUT)/;
ifneq ($(WITH_UPSTREAM),1)
@cd $(SYM_PATH)/ipsec_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
- @cp $(SYM_PATH)/ipsec_sample/ipsec_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
endif
nrbg_sample: output_dir
@cd $(SYM_PATH)/nrbg_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
- @cp $(SYM_PATH)/nrbg_sample/nrbg_sample $(SAMPLE_BUILD_OUTPUT)/;
ifneq ($(WITH_UPSTREAM),1)
@cd $(SYM_PATH)/nrbg_sample && $(MAKE) && $(MAKE) ICP_OS_LEVEL=kernel_space
- @cp $(SYM_PATH)/nrbg_sample/nrbg_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
endif
ssl_sample: output_dir
@cd $(SYM_PATH)/ssl_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
- @cp $(SYM_PATH)/ssl_sample/ssl_sample $(SAMPLE_BUILD_OUTPUT)/;
ifneq ($(WITH_UPSTREAM),1)
@cd $(SYM_PATH)/ssl_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
- @cp $(SYM_PATH)/ssl_sample/ssl_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
endif
sym_dp_sample: output_dir
@cd $(SYM_PATH)/symdp_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
- @cp $(SYM_PATH)/symdp_sample/sym_dp_sample $(SAMPLE_BUILD_OUTPUT)/;
ifneq ($(WITH_UPSTREAM),1)
@cd $(SYM_PATH)/symdp_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
- @cp $(SYM_PATH)/symdp_sample/sym_dp_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
endif
BUILD_ASYM=diffie_hellman_sample prime_sample
@@ -243,18 +217,52 @@ asym: $(BUILD_ASYM)
diffie_hellman_sample: output_dir
@cd $(ASYM_PATH)/diffie_hellman_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
- @cp $(ASYM_PATH)/diffie_hellman_sample/dh_sample $(SAMPLE_BUILD_OUTPUT)/;
ifneq ($(WITH_UPSTREAM),1)
@cd $(ASYM_PATH)/diffie_hellman_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
- @cp $(ASYM_PATH)/diffie_hellman_sample/dh_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
endif
prime_sample: output_dir
@cd $(ASYM_PATH)/prime_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
- @cp $(ASYM_PATH)/prime_sample/prime_sample $(SAMPLE_BUILD_OUTPUT)/;
ifneq ($(WITH_UPSTREAM),1)
@cd $(ASYM_PATH)/prime_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
- @cp $(ASYM_PATH)/prime_sample/prime_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
+endif
+
+install: output_dir
+ @cp $(DC_PATH)/stateless_multi_op_checksum_sample/dc_stateless_multi_op_sample $(BIN_INSTALLPATH);
+ @cp $(DC_PATH)/stateful_sample/dc_stateful_sample $(BIN_INSTALLPATH);
+ @cp $(DC_PATH)/stateful_sample/paper4 $(BIN_INSTALLPATH);
+ @cp $(DC_PATH)/dc_dp_sample/dc_dp_sample $(BIN_INSTALLPATH);
+ @cp $(DC_PATH)/stateless_sample/dc_stateless_sample $(BIN_INSTALLPATH);
+ @cp $(ASYM_PATH)/prime_sample/prime_sample $(BIN_INSTALLPATH);
+ @cp $(ASYM_PATH)/diffie_hellman_sample/dh_sample $(BIN_INSTALLPATH);
+ @cp $(SYM_PATH)/symdp_sample/sym_dp_sample $(BIN_INSTALLPATH);
+ @cp $(SYM_PATH)/ssl_sample/ssl_sample $(BIN_INSTALLPATH);
+ @cp $(SYM_PATH)/nrbg_sample/nrbg_sample $(BIN_INSTALLPATH);
+ @cp $(SYM_PATH)/hash_file_sample/hash_file_sample $(BIN_INSTALLPATH);
+ @cp $(SYM_PATH)/ipsec_sample/ipsec_sample $(BIN_INSTALLPATH);
+ @cp $(SYM_PATH)/hash_sample/hash_sample $(BIN_INSTALLPATH);
+ @cp $(SYM_PATH)/gcm_sample/gcm_sample $(BIN_INSTALLPATH);
+ @cp $(SYM_PATH)/alg_chaining_sample/algchaining_sample $(BIN_INSTALLPATH);
+ @cp $(SYM_PATH)/ccm_sample/ccm_sample $(BIN_INSTALLPATH);
+ @cp $(SYM_PATH)/drbg_sample/drbg_sample $(BIN_INSTALLPATH);
+ @cp $(SYM_PATH)/cipher_sample/cipher_sample $(BIN_INSTALLPATH);
+
+ifneq ($(WITH_UPSTREAM),1)
+ @cp $(DC_PATH)/stateless_multi_op_checksum_sample/dc_stateless_multi_op_sample.ko $(MODULE_INSTALLPATH);
+ @cp $(DC_PATH)/dc_dp_sample/dc_dp_sample.ko $(MODULE_INSTALLPATH);
+ @cp $(DC_PATH)/stateless_sample/dc_stateless_sample.ko $(MODULE_INSTALLPATH);
+ @cp $(ASYM_PATH)/prime_sample/prime_sample.ko $(MODULE_INSTALLPATH);
+ @cp $(ASYM_PATH)/diffie_hellman_sample/dh_sample.ko $(MODULE_INSTALLPATH);
+ @cp $(SYM_PATH)/symdp_sample/sym_dp_sample.ko $(MODULE_INSTALLPATH);
+ @cp $(SYM_PATH)/ssl_sample/ssl_sample.ko $(MODULE_INSTALLPATH);
+ @cp $(SYM_PATH)/nrbg_sample/nrbg_sample.ko $(MODULE_INSTALLPATH);
+ @cp $(SYM_PATH)/ipsec_sample/ipsec_sample.ko $(MODULE_INSTALLPATH);
+ @cp $(SYM_PATH)/hash_sample/hash_sample.ko $(MODULE_INSTALLPATH);
+ @cp $(SYM_PATH)/gcm_sample/gcm_sample.ko $(MODULE_INSTALLPATH);
+ @cp $(SYM_PATH)/alg_chaining_sample/algchaining_sample.ko $(MODULE_INSTALLPATH);
+ @cp $(SYM_PATH)/ccm_sample/ccm_sample.ko $(MODULE_INSTALLPATH);
+ @cp $(SYM_PATH)/drbg_sample/drbg_sample.ko $(MODULE_INSTALLPATH);
+ @cp $(SYM_PATH)/cipher_sample/cipher_sample.ko $(MODULE_INSTALLPATH);
endif
CLEAN_DC=clean_dc_dp_sample clean_stateless_sample \
--
1.9.1

View File

@ -1,35 +0,0 @@
From b21929c42aca4bc80f6c48b5ac31bf20165b2f3e Mon Sep 17 00:00:00 2001
From: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
Date: Fri, 25 Mar 2016 18:02:37 +0800
Subject: [PATCH] qat: override CC LD AR only when it is not define
Upstream-Status: Inappropriate [Configuration]
To make sure that compiler linker and archiver will override only when
it is not defined by the environment.
Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
---
quickassist/build_system/build_files/Core/ia.mk | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/quickassist/build_system/build_files/Core/ia.mk b/quickassist/build_system/build_files/Core/ia.mk
index 4a4d123..f9aca23 100755
--- a/quickassist/build_system/build_files/Core/ia.mk
+++ b/quickassist/build_system/build_files/Core/ia.mk
@@ -67,9 +67,9 @@
# e.g. setenv CROSS_COMPILE x86_64-linux
ifdef CROSS_COMPILE
ifdef MACHINE
-CC = $(CROSS_COMPILE)gcc
-LD = $(CROSS_COMPILE)ld
-AR = $(CROSS_COMPILE)ar
+CC ?= $(CROSS_COMPILE)gcc
+LD ?= $(CROSS_COMPILE)ld
+AR ?= $(CROSS_COMPILE)ar
else
$(error MACHINE is undefined. Please set your target i.e. x86_64 \
"-> setenv MACHINE x86_64 or export MACHINE=x86_64")
--
1.9.1

View File

@ -1,17 +0,0 @@
Use CC to do the linking, helps in linking with gold or bfd linker
Upstream-Status: Inappropriate [OE-Specific]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Index: QAT1.6/quickassist/build_system/build_files/OS/linux_2.6.mk
===================================================================
--- QAT1.6.orig/quickassist/build_system/build_files/OS/linux_2.6.mk
+++ QAT1.6/quickassist/build_system/build_files/OS/linux_2.6.mk
@@ -89,7 +89,7 @@ EXTRA_CFLAGS+= -Wno-div-by-zero -Wfloat-
endif
-LIB_SHARED_FLAGS+=-shared -soname $(LIB_SHARED)
+LIB_SHARED_FLAGS+=-shared -Wl,-soname,$(LIB_SHARED)
LIB_STATIC_FLAGS=
EXE_FLAGS?=

View File

@ -1,12 +0,0 @@
include qat16.inc
SRC_URI += "https://01.org/sites/default/files/page/qatmux.l.${PV}.tgz;name=qat \
file://qat16_2.5.0-80-qat-add-install-target-to-makefiles.patch \
"
SRC_URI[qat.md5sum] = "e3c2ceeec7ed8b36d75682742caff81e"
SRC_URI[qat.sha256sum] = "e9e47cd9cbd98c2ceac5cc31570e443680649be682068126df6d749120a3697d"
do_install_append() {
install -m 0755 ${SAMPLE_CODE_DIR}/performance/compression/calgary32 ${D}${base_libdir}/firmware
}

View File

@ -1,16 +0,0 @@
include qat16.inc
SRC_URI += "https://01.org/sites/default/files/page/qatmux.l.2.6.0-60.tgz;name=qat \
file://qat16_2.6.0-65-qat-add-install-target-to-makefiles.patch \
file://qat16_2.6.0-65-qat-override-CC-LD-AR-only-when-it-is-not-define.patch \
file://use-CC-for-LD.patch \
"
SRC_URI_append_libc-musl = " file://0001-OsalServices-Only-use-bits-time-with-GLIBC.patch"
SRC_URI[qat.md5sum] = "c54e877fb9fbb4690a9bd50793268bcf"
SRC_URI[qat.sha256sum] = "872046ffdf02f664d12a56cdb880403d65b914b303b75875707a9eebd9c841f5"
do_install_append() {
install -m 0755 ${SAMPLE_CODE_DIR}/performance/compression/calgary32 ${D}${base_libdir}/firmware
}

View File

@ -1,29 +0,0 @@
From 30c4a1181cbe696dd1b9f52c8e9422ef8c331e8f Mon Sep 17 00:00:00 2001
From: Saul Wold <sgw@linux.intel.com>
Date: Thu, 9 Feb 2017 12:40:47 -0800
Subject: [PATCH] qat_zlib.h: Add pthread.h for MUSL
MUSL is stricter when it comes to header file inclusion, so add
the additional header thats needed to compile with MUSL.
Upstream-Status: Pending
Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
qat_zlib.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/qat_zlib.h b/qat_zlib.h
index 2747f84..d9ac312 100644
--- a/qat_zlib.h
+++ b/qat_zlib.h
@@ -8,6 +8,7 @@
#include <stdlib.h>
#include <assert.h>
#include <time.h>
+#include <pthread.h>
#include "cpa_dc.h"
#ifdef USE_QAE_MEM
--
2.7.4

View File

@ -1,51 +0,0 @@
From aa65d69632142d24ec44ed4c2d66371e1a1be7b4 Mon Sep 17 00:00:00 2001
From: Anuj Mittal <anujx.mittal@intel.com>
Date: Thu, 18 Jun 2015 11:56:08 +0800
Subject: [PATCH] qat_mem: build qat_mem ko against yocto kernel src
Upstream-Status: Inappropriate [Configuration]
This tweaks the kernel source and build path in the makefile
to make sure the module is built against the right source.
Signed-off-by: Anuj Mittal <anujx.mittal@intel.com>
---
contrib/qat/qat_mem/Makefile | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/contrib/qat/qat_mem/Makefile b/contrib/qat/qat_mem/Makefile
index ddf5b59..ad6d4a4 100644
--- a/contrib/qat/qat_mem/Makefile
+++ b/contrib/qat/qat_mem/Makefile
@@ -61,16 +61,10 @@
#########################################################################
MODULENAME := qat_mem
-KDIR := /lib/modules/$(shell uname -r)/build
+KDIR := $(KERNEL_SOURCE_ROOT)
PWD := $(shell pwd)
-ifeq ($(shell uname -r|grep -c grsec-WR), 1)
-AUTO_CONF=/lib/modules/$(shell uname -r)/build/include/generated/autoconf.h
-else
-AUTO_CONF=/usr/src/kernels/$(shell uname -r)/include/linux/autoconf.h
-endif
-
-CC := gcc -Wall -imacros $(AUTO_CONF)
+CC := ${CC} -Wall -imacros $(KERNEL_BUILDDIR)/include/generated/autoconf.h
ifeq ($(KERNELRELEASE),)
all: $(MODULENAME)_test
@@ -80,6 +74,9 @@ else
obj-m := $(MODULENAME).o
endif
+modules_install:
+ $(MAKE) -C $(KDIR) M=$(PWD) modules_install
+
$(MODULENAME)_test: $(MODULENAME)_test.c
$(CC) -g -o $(MODULENAME)_test $(MODULENAME)_test.c
--
1.7.9.5

View File

@ -1,52 +0,0 @@
From aad2675c7bb635d8b7be47fa89a3ee87ba19d2e8 Mon Sep 17 00:00:00 2001
From: Anuj Mittal <anujx.mittal@intel.com>
Date: Thu, 18 Jun 2015 11:46:17 +0800
Subject: [PATCH] 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: Anuj Mittal <anujx.mittal@intel.com>
---
Makefile.in | 4 ++--
contrib/qat/qat_zlib_test/Makefile | 3 ---
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 94d8a80..cba5291 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -59,12 +59,12 @@ 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
+#ADDITIONAL_LDFLAGS+=-Wl,-rpath,$(ZLIB_ROOT) -lz
SHARED_APP_FLAGS=-Wl,-rpath,$(ZLIB_ROOT) -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 ZLIB_DH895XCC
diff --git a/contrib/qat/qat_zlib_test/Makefile b/contrib/qat/qat_zlib_test/Makefile
index 8a29a92..ca31dd2 100644
--- a/contrib/qat/qat_zlib_test/Makefile
+++ b/contrib/qat/qat_zlib_test/Makefile
@@ -84,9 +84,6 @@ OBJS = $(SRCS:%.c=%.o)
COVERAGE_OBJS =
EXE=
LIBQAT=
-ifdef ICP_BUILD_OUTPUT
- LIBQAT+= -Wl,-rpath,$(ICP_BUILD_OUTPUT) -L$(ICP_BUILD_OUTPUT)
-endif
DRIVER=icp_qa_al
ifdef WITH_CPA_MUX
--
1.7.9.5

View File

@ -1,46 +0,0 @@
From d78121d790c4a248bc47d1c662791fe57ac4af38 Mon Sep 17 00:00:00 2001
From: Anuj Mittal <anujx.mittal@intel.com>
Date: Thu, 18 Jun 2015 11:53:23 +0800
Subject: [PATCH] zlib-qat: add a install target to makefile
Upstream-Status: Inappropriate [Configuration]
This adds an install target to qat_zlib_test and qat_mem makefiles
to facilitate the installation of test binaries to {D}.
Signed-off-by: Anuj Mittal <anujx.mittal@intel.com>
---
contrib/qat/qat_mem/Makefile | 3 +++
contrib/qat/qat_zlib_test/Makefile | 3 +++
2 files changed, 6 insertions(+)
diff --git a/contrib/qat/qat_mem/Makefile b/contrib/qat/qat_mem/Makefile
index ad6d4a4..e4d77b6 100644
--- a/contrib/qat/qat_mem/Makefile
+++ b/contrib/qat/qat_mem/Makefile
@@ -74,6 +74,9 @@ else
obj-m := $(MODULENAME).o
endif
+install: modules_install
+ cp qat_mem_test $(INSTALL_MOD_PATH)$(bindir)
+
modules_install:
$(MAKE) -C $(KDIR) M=$(PWD) modules_install
diff --git a/contrib/qat/qat_zlib_test/Makefile b/contrib/qat/qat_zlib_test/Makefile
index ca31dd2..7da5ddd 100644
--- a/contrib/qat/qat_zlib_test/Makefile
+++ b/contrib/qat/qat_zlib_test/Makefile
@@ -112,5 +112,8 @@ comptestappsh$(EXE): $(OBJS) Makefile
$(CC) -o comptestappsh $(OBJS) $(COVERAGE) \
$(SHAREDLIBQAT)
+install:
+ cp comptestapp $(DESTDIR)$(bindir)
+
clean:
rm -f $(OBJS) $(COVERAGE_OBJS) comptestapp comptestappsh
--
1.7.9.5

View File

@ -1,133 +0,0 @@
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 \
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}"
inherit module
MEM_PATH = "${S}/contrib/qat"
zlibqat_do_patch() {
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
cp -f zlib-${ZLIB_VERSION}-qat.patch ${WORKDIR}
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
}
# 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() {
unset CFLAGS CXXFLAGS
oe_runmake
cd ${S}/contrib/qat/qat_mem
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 ${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/
}
PACKAGES += "${PN}-app"
FILES_${PN} += " \
${sysconfdir}/zlib_conf/ \
"
FILES_${PN}-app += " \
${bindir}/* \
"
FILES_${PN}-dbg += " \
${bindir}/.debug \
"
EXCLUDE_FROM_WORLD_core2-32-intel-common = "1"