summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKishore Bodke <kishore.k.bodke@intel.com>2012-10-18 10:49:31 -0700
committerTom Zanussi <tom.zanussi@intel.com>2012-10-22 08:07:16 -0500
commitbfe4894bc37cda9339fdc510139d2a3d8242a0a3 (patch)
tree1bdbaba41d59a6bf70234ca842c81976f51f732b
parent60e70a60888f8f29066a4c92b69b66f16f38955e (diff)
downloadmeta-intel-bfe4894bc37cda9339fdc510139d2a3d8242a0a3.tar.gz
meta-intel/common: Add new recipe for libcrypto module.
This adds a new recipe to include the Intel Quick Assist Technology libcrypto Memory Management Module. Signed-off-by: Kishore Bodke <kishore.k.bodke@intel.com> Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
-rw-r--r--common/recipes-connectivity/openssl-qat-module/openssl-qat-module.bb54
-rw-r--r--common/recipes-connectivity/openssl-qat-module/openssl-qat-module/openssl_qat_module.patch43
2 files changed, 97 insertions, 0 deletions
diff --git a/common/recipes-connectivity/openssl-qat-module/openssl-qat-module.bb b/common/recipes-connectivity/openssl-qat-module/openssl-qat-module.bb
new file mode 100644
index 00000000..a4fe3c57
--- /dev/null
+++ b/common/recipes-connectivity/openssl-qat-module/openssl-qat-module.bb
@@ -0,0 +1,54 @@
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"
9
10LICENSE = "openssl"
11LIC_FILES_CHKSUM = "file://${WORKDIR}/openssl-${PV}/LICENSE;md5=f9a8f968107345e0b75aa8c2ecaa7ec8"
12
13PV = "1.0.1"
14PR = "r0"
15
16OPENSSL_QAT_VERSION = "0.4.0-012"
17
18SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz;name=openssl \
19 http://downloadmirror.intel.com/19368/eng/libcrypto-openssl-${PV}-qat.L.${OPENSSL_QAT_VERSION}.tar.gz;name=libcrypto \
20 file://openssl_qat_module.patch"
21
22SRC_URI[openssl.md5sum]="134f168bc2a8333f19f81d684841710b"
23SRC_URI[openssl.sha256sum]="4d9f0a594a9a89b28e1a04a9504c04104f6508ee27ad1e0efdd17a7a6dbbeeee"
24
25SRC_URI[libcrypto.md5sum] = "e4e131fa56d3aa1a52b5bdb9f8fe5a69"
26SRC_URI[libcrypto.sha256sum] = "19a80ae6e78548934295d312148e4254c18dabd25e2fd72de5796d8ac15b1cfb"
27
28S = "${WORKDIR}/openssl-${PV}/engines/qat_engine/qat_mem"
29
30export KERNEL_SOURCE_ROOT = "${STAGING_KERNEL_DIR}"
31inherit module
32
33do_patch() {
34 cd ${WORKDIR}/openssl-${PV}
35 patch -p2 < ${WORKDIR}/libcrypto-openssl-${PV}-qat.L.${OPENSSL_QAT_VERSION}.patch
36
37 cd ${WORKDIR}
38 patch -p1 <${WORKDIR}/openssl_qat_module.patch
39}
40
41do_compile() {
42 cd ${S}
43 oe_runmake KERNEL_CC="${KERNEL_CC}"
44}
45
46do_install_append() {
47 install -m 0755 -d ${D}${bindir} \
48 ${D}${includedir}/engines/qat_engine/qat_mem
49
50 install -m 0755 ${S}/qat_mem_test ${D}${bindir}
51 install -m 0750 ${S}/*.h ${D}${includedir}/engines/qat_engine/qat_mem/
52}
53
54FILES_${PN} += "${bindir}/qat_mem_test"
diff --git a/common/recipes-connectivity/openssl-qat-module/openssl-qat-module/openssl_qat_module.patch b/common/recipes-connectivity/openssl-qat-module/openssl-qat-module/openssl_qat_module.patch
new file mode 100644
index 00000000..dfed3c08
--- /dev/null
+++ b/common/recipes-connectivity/openssl-qat-module/openssl-qat-module/openssl_qat_module.patch
@@ -0,0 +1,43 @@
1Index: openssl-qat-module-1.0.1-r0/openssl-1.0.1/engines/qat_engine/qat_mem/Makefile
2===================================================================
3--- openssl-qat-module-1.0.1-r0.orig/openssl-1.0.1/engines/qat_engine/qat_mem/Makefile 2012-10-17 13:31:27.932376960 -0700
4+++ openssl-qat-module-1.0.1-r0/openssl-1.0.1/engines/qat_engine/qat_mem/Makefile 2012-10-17 13:35:40.396389410 -0700
5@@ -9,13 +9,9 @@
6 MODULENAME := qat_mem
7 ### should not need to change stuff below ######################
8
9-
10-KDIR := /lib/modules/$(shell uname -r)/build
11-#KDIR := /exports/linux-2.6.12.2/
12+KDIR := $(KERNEL_SOURCE_ROOT)
13 PWD := $(shell pwd)
14-
15-CC := gcc -Wall -imacros /usr/src/kernels/$(shell uname -r)/include/linux/autoconf.h
16-
17+CC := $(KERNEL_CC) -Wall -imacros $(KERNEL_SOURCE_ROOT)/include/generated/autoconf.h
18 ifeq ($(KERNELRELEASE),)
19 all: $(MODULENAME)_test
20 all:
21@@ -23,20 +19,15 @@
22 else
23 obj-m := $(MODULENAME).o
24 endif
25-
26 $(MODULENAME)_test: $(MODULENAME)_test.c
27 $(CC) -g -o $(MODULENAME)_test $(MODULENAME)_test.c
28-
29-
30+modules_install:
31+ $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules_install
32 load:
33 insmod ./$(MODULENAME).ko
34-
35 unload:
36 rmmod $(MODULENAME)
37-
38 test: all
39 ./$(MODULENAME)_test.sh
40-
41 clean:
42 rm -f *.o *.ko Modules.symvers *.mod.c .*.cmd $(MODULENAME)_test
43-