summaryrefslogtreecommitdiffstats
path: root/meta-isg/common/recipes-extended/qat/qat16.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta-isg/common/recipes-extended/qat/qat16.inc')
-rw-r--r--meta-isg/common/recipes-extended/qat/qat16.inc117
1 files changed, 117 insertions, 0 deletions
diff --git a/meta-isg/common/recipes-extended/qat/qat16.inc b/meta-isg/common/recipes-extended/qat/qat16.inc
new file mode 100644
index 00000000..90765ea0
--- /dev/null
+++ b/meta-isg/common/recipes-extended/qat/qat16.inc
@@ -0,0 +1,117 @@
1DESCRIPTION = "Intel(r) QuickAssist Technology API"
2HOMEPAGE = "https://01.org/packet-processing/intel%C2%AE-quickassist-technology-drivers-and-patches"
3
4#Dual BSD and GPLv2 License
5LICENSE = "BSD & GPLv2"
6LIC_FILES_CHKSUM = "\
7 file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6 \
8 file://${COMMON_LICENSE_DIR}/BSD;md5=3775480a712fc46a69647678acb234cb \
9 "
10
11DEPENDS += "zlib openssl"
12PROVIDES += "virtual/qat"
13
14SRC_URI="https://01.org/sites/default/files/page/qatmux.l.${PV}.tgz;name=qat \
15 file://qat16_2.3.0-34-qat-fix-for-cross-compilation-issue.patch \
16 file://qat16_2.3.0-34-qat-remove-local-path-from-makefile.patch \
17 file://qat16_2.3.0-34-make-sure-CFLAGS-are-correct.patch \
18 "
19
20COMPATIBLE_MACHINE = "crystalforest|intel-corei7-64"
21
22S = "${WORKDIR}/${ICP_DRIVER_TYPE}"
23ICP_TOOLS = "accelcomp"
24SAMPLE_CODE_DIR = "${S}/quickassist/lookaside/access_layer/src/sample_code"
25
26export ICP_DRIVER_TYPE = "QAT1.6"
27export ICP_FIRMWARE_DIR="dh895xcc"
28export ICP_ROOT = "${S}"
29export ICP_ENV_DIR = "${S}/quickassist/build_system/build_files/env_files"
30export ICP_BUILDSYSTEM_PATH = "${S}/quickassist/build_system"
31export ICP_TOOLS_TARGET = "${ICP_TOOLS}"
32export FUNC_PATH = "${ICP_ROOT}/quickassist/lookaside/access_layer/src/sample_code/functional"
33export KERNEL_SOURCE_ROOT = "${STAGING_KERNEL_DIR}"
34export ICP_BUILD_OUTPUT = "${D}"
35export DEST_LIBDIR = "${libdir}"
36export DEST_BINDIR = "${bindir}"
37export QAT_KERNEL_VER = "${KERNEL_VERSION}"
38export SAMPLE_BUILD_OUTPUT = "${D}"
39export MODULE_DIR = "${base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers"
40
41inherit module
42inherit update-rc.d
43INITSCRIPT_NAME = "qat_service"
44
45PARALLEL_MAKE = ""
46
47#To get around the double slashes in paths in QAT makefiles
48PACKAGE_DEBUG_SPLIT_STYLE = "debug-without-src"
49
50EXTRA_OEMAKE_append = " CFLAGS+=-fgnu89-inline"
51
52do_unpack2() {
53 cd ${S}/
54 tar xzvf ${ICP_DRIVER_TYPE}.L.${PV}.tar.gz
55}
56
57addtask unpack2 after do_unpack before do_patch
58
59do_compile () {
60 export LD="${LD} --hash-style=gnu"
61 export MACHINE="${TARGET_ARCH}"
62 cd ${S}/quickassist
63 oe_runmake EXTRA_OEMAKE="'CFLAGS=${CFLAGS} -fPIC'"
64
65 cd ${SAMPLE_CODE_DIR}
66 touch ${SAMPLE_CODE_DIR}/performance/compression/calgary
67 touch ${SAMPLE_CODE_DIR}/performance/compression/canterbury
68
69 #build the whole sample code: fips, functional, performance
70 oe_runmake 'all'
71 oe_runmake 'fips_user_code'
72}
73
74do_install() {
75 cd ${S}/quickassist
76 oe_runmake install
77
78 cd ${SAMPLE_CODE_DIR}
79 oe_runmake install
80
81 install -d ${D}/etc/udev/rules.d \
82 ${D}${includedir} \
83 ${D}${includedir}/dc \
84 ${D}${includedir}/lac \
85 ${D}${sysconfdir}/dh895xcc \
86 ${D}${base_libdir}/firmware
87
88 echo 'KERNEL=="icp_adf_ctl" MODE="0600"' > ${D}/etc/udev/rules.d/00-dh895xcc_qa.rules
89 echo 'KERNEL=="icp_dev[0-9]*" MODE="0600"' >> ${D}/etc/udev/rules.d/00-dh895xcc_qa.rules
90 echo 'KERNEL=="icp_dev_mem?" MODE="0600"' >> ${D}/etc/udev/rules.d/00-dh895xcc_qa.rules
91
92 install -m 640 ${S}/quickassist/include/*.h ${D}${includedir}
93 install -m 640 ${S}/quickassist/include/dc/*.h ${D}${includedir}/dc/
94 install -m 640 ${S}/quickassist/include/lac/*.h ${D}${includedir}/lac/
95 install -m 640 ${S}/quickassist/lookaside/access_layer/include/*.h ${D}${includedir}
96
97 install -m 0755 ${SAMPLE_CODE_DIR}/performance/compression/calgary ${D}${base_libdir}/firmware
98 install -m 0755 ${SAMPLE_CODE_DIR}/performance/compression/canterbury ${D}${base_libdir}/firmware
99
100 install -m 660 ${S}/quickassist/config/dh* ${D}${sysconfdir}/dh895xcc
101}
102
103PACKAGES += "${PN}-app"
104
105FILES_${PN}-dev = "${includedir}"
106
107FILES_${PN} += "\
108 ${base_libdir}/firmware/ \
109 ${sysconfdir}/ \
110 ${sysconfdir}/udev/rules.d/ \
111 ${sysconfdir}/init.d/ \
112 ${libdir}/ \
113 "
114
115FILES_${PN}-dbg += "${sysconfdir}/init.d/.debug"
116
117FILES_${PN}-app += "${bindir}/*"