diff options
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.inc | 110 |
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 @@ | |||
1 | SUMMARY = "libcrypto* (OpenSSL*) QAT_MEM Memory Management Module \ | ||
2 | for Intel Quick Assist Technology" | ||
3 | DESCRIPTION = "This software adds an engine that accelerates some of \ | ||
4 | the libcrypto algorithms via the Intel QuickAssist Technology \ | ||
5 | implemented on Intel Communications Chipset 89xx Series based platforms." | ||
6 | |||
7 | HOMEPAGE = "http://www.openssl.org/" | ||
8 | SECTION = "libs/network" | ||
9 | LICENSE = "openssl & GPLv2 & BSD" | ||
10 | |||
11 | LIC_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 | |||
16 | SRC_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 | |||
24 | DEPENDS += " qat16 zlib" | ||
25 | RDEPENDS_${PN} += " qat16 zlib zlib-qat" | ||
26 | |||
27 | inherit pkgconfig module | ||
28 | |||
29 | PACKAGES =+ "${PN}-misc" | ||
30 | PARALLEL_MAKE = "" | ||
31 | |||
32 | AR_append = " r" | ||
33 | EXTRA_OECONF = " -no-ssl3" | ||
34 | |||
35 | export ICP_ROOT = "${WORKDIR}/git" | ||
36 | export ICP_BUILD_OUTPUT = "${STAGING_DIR_TARGET}" | ||
37 | export OPENSSL_ROOT = "${ICP_ROOT}" | ||
38 | export OPENSSL_PREFIX = "/usr/local" | ||
39 | export AS = "${CC} -c" | ||
40 | export OE_LDFLAGS="${LDFLAGS} -L${OPENSSL_PREFIX}{base_libdir}" | ||
41 | export ICP_API_PATH = "${STAGING_DIR_TARGET}${includedir}/lac" | ||
42 | export KERNEL_SOURCE_ROOT = "${STAGING_KERNEL_DIR}" | ||
43 | export KERNEL_BUILDDIR = "${STAGING_KERNEL_BUILDDIR}" | ||
44 | |||
45 | S = "${WORKDIR}/git" | ||
46 | |||
47 | do_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 | |||
55 | addtask unpack2 after do_unpack before do_patch_prepend | ||
56 | |||
57 | do_prepatch() { | ||
58 | cd ${S} | ||
59 | patch -p1 < ${WORKDIR}/openssl-${OPENSSL_VERSION}-qat.patch | ||
60 | } | ||
61 | |||
62 | addtask prepatch after do_unpack2 before do_patch | ||
63 | |||
64 | do_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 | |||
71 | do_compile() { | ||
72 | oe_runmake | ||
73 | } | ||
74 | |||
75 | do_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 | |||
87 | FILES_${PN}-misc += "\ | ||
88 | ${OPENSSL_PREFIX}${base_libdir}/ssl/misc \ | ||
89 | ${bindir}/c_rehash \ | ||
90 | " | ||
91 | |||
92 | FILES_${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 | |||
99 | FILES_${PN}-dev = "${OPENSSL_PREFIX}/include" | ||
100 | |||
101 | FILES_${PN}-staticdev += "${OPENSSL_PREFIX}${base_libdir}/*.a" | ||
102 | |||
103 | FILES_${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 | " | ||