summaryrefslogtreecommitdiffstats
path: root/meta-isg/common/recipes-extended/openssl-qat/openssl-qat.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta-isg/common/recipes-extended/openssl-qat/openssl-qat.inc')
-rw-r--r--meta-isg/common/recipes-extended/openssl-qat/openssl-qat.inc110
1 files changed, 110 insertions, 0 deletions
diff --git a/meta-isg/common/recipes-extended/openssl-qat/openssl-qat.inc b/meta-isg/common/recipes-extended/openssl-qat/openssl-qat.inc
new file mode 100644
index 00000000..8eb85583
--- /dev/null
+++ b/meta-isg/common/recipes-extended/openssl-qat/openssl-qat.inc
@@ -0,0 +1,110 @@
1SUMMARY = "libcrypto* (OpenSSL*) QAT_MEM Memory Management Module \
2for Intel Quick Assist Technology"
3DESCRIPTION = "This software adds an engine that accelerates some of \
4the libcrypto algorithms via the Intel QuickAssist Technology \
5implemented on Intel Communications Chipset 89xx Series based platforms."
6
7HOMEPAGE = "http://www.openssl.org/"
8SECTION = "libs/network"
9LICENSE = "openssl & GPLv2 & BSD"
10
11LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSE;md5=f9a8f968107345e0b75aa8c2ecaa7ec8 \
12 file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6 \
13 file://${COMMON_LICENSE_DIR}/BSD;md5=3775480a712fc46a69647678acb234cb \
14 "
15
16SRC_URI = "https://01.org/sites/default/files/page/libcrypto_shim_${PV}_withdocumentation.zip;name=openssl_qat;subdir=openssl_qat-${PV} \
17 file://openssl_qat-environment-variables-to-have-precedence.patch \
18 file://openssl_qat-pass-oe_ldflags-to-linker.patch \
19 file://openssl_qat-remove-redundant-rpaths.patch \
20 file://openssl_qat-build-qat_mem-ko-against-yocto-kernel.patch \
21 file://openssl_qat-install-engines-in-libdir-ssl.patch \
22 "
23
24DEPENDS += " qat16 zlib"
25RDEPENDS_${PN} += " qat16 zlib zlib-qat"
26
27inherit pkgconfig module
28
29PACKAGES =+ "${PN}-misc"
30PARALLEL_MAKE = ""
31
32AR_append = " r"
33EXTRA_OECONF = " -no-ssl3"
34
35export ICP_ROOT = "${WORKDIR}/git"
36export ICP_BUILD_OUTPUT = "${STAGING_DIR_TARGET}"
37export OPENSSL_ROOT = "${ICP_ROOT}"
38export OPENSSL_PREFIX = "/usr/local"
39export AS = "${CC} -c"
40export OE_LDFLAGS="${LDFLAGS} -L${OPENSSL_PREFIX}{base_libdir}"
41export ICP_API_PATH = "${STAGING_DIR_TARGET}${includedir}/lac"
42export KERNEL_SOURCE_ROOT = "${STAGING_KERNEL_DIR}"
43export KERNEL_BUILDDIR = "${STAGING_KERNEL_BUILDDIR}"
44
45S = "${WORKDIR}/git"
46
47do_unpack2() {
48 cd ${WORKDIR}/openssl_qat-${PV}
49 cd libcrypto_shim_${PV}_*
50 tar -zxof libCrypto_Shim_${PV}.tar.gz
51 tar -zxof libcrypto-openssl-${OPENSSL_VERSION}-qat.L.${PV}.tar.gz
52 mv openssl-${OPENSSL_VERSION}-qat.patch ${WORKDIR}
53}
54
55addtask unpack2 after do_unpack before do_patch_prepend
56
57do_prepatch() {
58 cd ${S}
59 patch -p1 < ${WORKDIR}/openssl-${OPENSSL_VERSION}-qat.patch
60}
61
62addtask prepatch after do_unpack2 before do_patch
63
64do_configure () {
65 os=linux
66 target=linux-x86_64
67
68 ./Configure ${EXTRA_OECONF} enable-hw-qat --prefix=$OPENSSL_PREFIX --openssldir="${OPENSSL_PREFIX}${base_libdir}/ssl" --libdir="${base_libdir}" $target
69}
70
71do_compile() {
72 oe_runmake
73}
74
75do_install() {
76 install -m 0755 -d ${D}${bindir} \
77 ${D}${OPENSSL_PREFIX}/include \
78 ${D}${sysconfdir}/openssl_conf
79
80 oe_runmake INSTALL_PREFIX="${D}" install
81
82 cp --dereference -R include/openssl ${D}${OPENSSL_PREFIX}/include
83
84 cp ${WORKDIR}/openssl_qat-${PV}/libcrypto_shim_${PV}_withdocumentation/qat/config/dh895xcc/multi_process_optimized/* ${D}${sysconfdir}/openssl_conf/
85}
86
87FILES_${PN}-misc += "\
88 ${OPENSSL_PREFIX}${base_libdir}/ssl/misc \
89 ${bindir}/c_rehash \
90 "
91
92FILES_${PN}-dbg += "\
93 ${OPENSSL_PREFIX}${base_libdir}/ssl/engines/.debug \
94 ${OPENSSL_PREFIX}${base_libdir}/engines/.debug \
95 ${OPENSSL_PREFIX}${base_libdir}/.debug \
96 ${OPENSSL_PREFIX}/bin/.debug \
97 "
98
99FILES_${PN}-dev = "${OPENSSL_PREFIX}/include"
100
101FILES_${PN}-staticdev += "${OPENSSL_PREFIX}${base_libdir}/*.a"
102
103FILES_${PN} =+ "\
104 ${bindir} \
105 ${sysconfdir}/openssl_conf \
106 ${OPENSSL_PREFIX}/bin \
107 ${OPENSSL_PREFIX}${base_libdir} \
108 ${OPENSSL_PREFIX}${base_libdir}/ssl \
109 ${OPENSSL_PREFIX}${base_libdir}/ssl/openssl.cnf \
110 "