summaryrefslogtreecommitdiffstats
path: root/common/recipes-extended/qat/qat16.inc
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-extended/qat/qat16.inc')
-rw-r--r--common/recipes-extended/qat/qat16.inc120
1 files changed, 120 insertions, 0 deletions
diff --git a/common/recipes-extended/qat/qat16.inc b/common/recipes-extended/qat/qat16.inc
new file mode 100644
index 00000000..381d734e
--- /dev/null
+++ b/common/recipes-extended/qat/qat16.inc
@@ -0,0 +1,120 @@
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="file://qat16_2.3.0-34-qat-fix-for-cross-compilation-issue.patch \
15 file://qat16_2.3.0-34-qat-remove-local-path-from-makefile.patch \
16 file://qat16_2.3.0-34-make-sure-CFLAGS-are-correct.patch \
17 file://qat16_2.5.0-80-qat-change-in-return-type-of-func-in-kernel-v4.4.patch \
18 file://qat16_2.5.0-80-qat-Added-include-dir-path.patch \
19 "
20
21COMPATIBLE_MACHINE = "crystalforest|intel-corei7-64"
22
23S = "${WORKDIR}/${ICP_DRIVER_TYPE}"
24ICP_TOOLS = "accelcomp"
25SAMPLE_CODE_DIR = "${S}/quickassist/lookaside/access_layer/src/sample_code"
26TARGET_CC_ARCH += "$(LDFLAGS)"
27
28export ICP_DRIVER_TYPE = "QAT1.6"
29export ICP_FIRMWARE_DIR="dh895xcc"
30export ICP_ROOT = "${S}"
31export ICP_ENV_DIR = "${S}/quickassist/build_system/build_files/env_files"
32export ICP_BUILDSYSTEM_PATH = "${S}/quickassist/build_system"
33export ICP_TOOLS_TARGET = "${ICP_TOOLS}"
34export FUNC_PATH = "${ICP_ROOT}/quickassist/lookaside/access_layer/src/sample_code/functional"
35export KERNEL_SOURCE_ROOT = "${STAGING_KERNEL_DIR}"
36export ICP_BUILD_OUTPUT = "${D}"
37export DEST_LIBDIR = "${libdir}"
38export DEST_BINDIR = "${bindir}"
39export QAT_KERNEL_VER = "${KERNEL_VERSION}"
40export SAMPLE_BUILD_OUTPUT = "${D}"
41export MODULE_DIR = "${base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers"
42
43inherit module
44inherit update-rc.d
45INITSCRIPT_NAME = "qat_service"
46
47PARALLEL_MAKE = ""
48
49#To get around the double slashes in paths in QAT makefiles
50PACKAGE_DEBUG_SPLIT_STYLE = "debug-without-src"
51
52EXTRA_OEMAKE_append = " CFLAGS+='-fgnu89-inline -fPIC'"
53EXTRA_OEMAKE = "-e MAKEFLAGS="
54do_unpack2() {
55 cd ${S}/
56 tar xzvf ${ICP_DRIVER_TYPE}.L.${PV}.tar.gz
57}
58
59addtask unpack2 after do_unpack before do_patch
60
61do_compile () {
62 export LD="${LD} --hash-style=gnu"
63 export MACHINE="${TARGET_ARCH}"
64 cd ${S}/quickassist
65 oe_runmake
66
67 cd ${SAMPLE_CODE_DIR}
68 touch ${SAMPLE_CODE_DIR}/performance/compression/calgary
69 touch ${SAMPLE_CODE_DIR}/performance/compression/canterbury
70
71 #build the whole sample code: fips, functional, performance
72 oe_runmake 'all'
73 oe_runmake 'fips_user_code'
74}
75
76do_install() {
77 export MACHINE="${TARGET_ARCH}"
78 cd ${S}/quickassist
79 oe_runmake install
80
81 cd ${SAMPLE_CODE_DIR}
82 oe_runmake install
83
84 install -d ${D}/etc/udev/rules.d \
85 ${D}${includedir} \
86 ${D}${includedir}/dc \
87 ${D}${includedir}/lac \
88 ${D}${sysconfdir}/dh895xcc \
89 ${D}${base_libdir}/firmware
90
91 echo 'KERNEL=="icp_adf_ctl" MODE="0600"' > ${D}/etc/udev/rules.d/00-dh895xcc_qa.rules
92 echo 'KERNEL=="icp_dev[0-9]*" MODE="0600"' >> ${D}/etc/udev/rules.d/00-dh895xcc_qa.rules
93 echo 'KERNEL=="icp_dev_mem?" MODE="0600"' >> ${D}/etc/udev/rules.d/00-dh895xcc_qa.rules
94
95 install -m 640 ${S}/quickassist/include/*.h ${D}${includedir}
96 install -m 640 ${S}/quickassist/include/dc/*.h ${D}${includedir}/dc/
97 install -m 640 ${S}/quickassist/include/lac/*.h ${D}${includedir}/lac/
98 install -m 640 ${S}/quickassist/lookaside/access_layer/include/*.h ${D}${includedir}
99
100 install -m 0755 ${SAMPLE_CODE_DIR}/performance/compression/calgary ${D}${base_libdir}/firmware
101 install -m 0755 ${SAMPLE_CODE_DIR}/performance/compression/canterbury ${D}${base_libdir}/firmware
102
103 install -m 660 ${S}/quickassist/config/dh* ${D}${sysconfdir}/dh895xcc
104}
105
106PACKAGES += "${PN}-app"
107
108FILES_${PN}-dev = "${includedir}"
109
110FILES_${PN} += "\
111 ${base_libdir}/firmware/ \
112 ${sysconfdir}/ \
113 ${sysconfdir}/udev/rules.d/ \
114 ${sysconfdir}/init.d/ \
115 ${libdir}/ \
116 "
117
118FILES_${PN}-dbg += "${sysconfdir}/init.d/.debug"
119
120FILES_${PN}-app += "${bindir}/*"