summaryrefslogtreecommitdiffstats
path: root/meta-crystalforest/recipes-extended/qat/qat16_2.3.0-34.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-crystalforest/recipes-extended/qat/qat16_2.3.0-34.bb')
-rw-r--r--meta-crystalforest/recipes-extended/qat/qat16_2.3.0-34.bb116
1 files changed, 116 insertions, 0 deletions
diff --git a/meta-crystalforest/recipes-extended/qat/qat16_2.3.0-34.bb b/meta-crystalforest/recipes-extended/qat/qat16_2.3.0-34.bb
new file mode 100644
index 00000000..e6556cbe
--- /dev/null
+++ b/meta-crystalforest/recipes-extended/qat/qat16_2.3.0-34.bb
@@ -0,0 +1,116 @@
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 "
10PV = "2.3.0-34"
11DEPENDS += "zlib openssl"
12SRC_URI="https://01.org/sites/default/files/page/qatmux.l.${PV}.tgz;name=qat \
13 file://qat16_2.3.0-34-qat-add-install-target-to-makefiles.patch \
14 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 "
17
18SRC_URI[qat.md5sum] = "9614bf598bc8e7eedc8adb6d29109033"
19SRC_URI[qat.sha256sum] = "1f9708de3c132258eaa488c82760f374b6b6838c85cafef2e8c61034fe0f7031"
20
21COMPATIBLE_MACHINE = "crystalforest"
22
23S = "${WORKDIR}/${ICP_DRIVER_TYPE}"
24ICP_TOOLS = "accelcomp"
25SAMPLE_CODE_DIR = "${S}/quickassist/lookaside/access_layer/src/sample_code"
26
27export ICP_DRIVER_TYPE = "QAT1.6"
28export ICP_FIRMWARE_DIR="dh895xcc"
29export ICP_ROOT = "${S}"
30export ICP_ENV_DIR = "${S}/quickassist/build_system/build_files/env_files"
31export ICP_BUILDSYSTEM_PATH = "${S}/quickassist/build_system"
32export ICP_TOOLS_TARGET = "${ICP_TOOLS}"
33export FUNC_PATH = "${ICP_ROOT}/quickassist/lookaside/access_layer/src/sample_code/functional"
34export KERNEL_SOURCE_ROOT = "${STAGING_KERNEL_DIR}"
35export ICP_BUILD_OUTPUT = "${D}"
36export DEST_LIBDIR = "${libdir}"
37export DEST_BINDIR = "${bindir}"
38export QAT_KERNEL_VER = "${KERNEL_VERSION}"
39export SAMPLE_BUILD_OUTPUT = "${D}"
40export MODULE_DIR = "${base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers"
41
42inherit module
43inherit update-rc.d
44INITSCRIPT_NAME = "qat_service"
45
46PARALLEL_MAKE = ""
47
48#To get around the double slashes in paths in QAT makefiles
49PACKAGE_DEBUG_SPLIT_STYLE = "debug-without-src"
50
51do_unpack2() {
52 cd ${S}/
53 tar xzvf ${ICP_DRIVER_TYPE}.L.${PV}.tar.gz
54}
55
56addtask unpack2 after do_unpack before do_patch
57
58do_compile () {
59 export LD="${LD} --hash-style=gnu"
60 export MACHINE="${TARGET_ARCH}"
61 cd ${S}/quickassist
62 oe_runmake EXTRA_OEMAKE="'CFLAGS=${CFLAGS} -fPIC'"
63
64 cd ${SAMPLE_CODE_DIR}
65 touch ${SAMPLE_CODE_DIR}/performance/compression/calgary
66 touch ${SAMPLE_CODE_DIR}/performance/compression/canterbury
67
68 #build the whole sample code: fips, functional, performance
69 oe_runmake 'all'
70 oe_runmake 'fips_user_code'
71}
72
73do_install() {
74 cd ${S}/quickassist
75 oe_runmake install
76
77 cd ${SAMPLE_CODE_DIR}
78 oe_runmake install
79
80 install -d ${D}/etc/udev/rules.d \
81 ${D}${includedir} \
82 ${D}${includedir}/dc \
83 ${D}${includedir}/lac \
84 ${D}${sysconfdir}/dh895xcc \
85 ${D}${base_libdir}/firmware
86
87 echo 'KERNEL=="icp_adf_ctl" MODE="0600"' > ${D}/etc/udev/rules.d/00-dh895xcc_qa.rules
88 echo 'KERNEL=="icp_dev[0-9]*" MODE="0600"' >> ${D}/etc/udev/rules.d/00-dh895xcc_qa.rules
89 echo 'KERNEL=="icp_dev_mem?" MODE="0600"' >> ${D}/etc/udev/rules.d/00-dh895xcc_qa.rules
90
91 install -m 640 ${S}/quickassist/include/*.h ${D}${includedir}
92 install -m 640 ${S}/quickassist/include/dc/*.h ${D}${includedir}/dc/
93 install -m 640 ${S}/quickassist/include/lac/*.h ${D}${includedir}/lac/
94 install -m 640 ${S}/quickassist/lookaside/access_layer/include/*.h ${D}${includedir}
95
96 install -m 0755 ${SAMPLE_CODE_DIR}/performance/compression/calgary ${D}${base_libdir}/firmware
97 install -m 0755 ${SAMPLE_CODE_DIR}/performance/compression/canterbury ${D}${base_libdir}/firmware
98
99 install -m 660 ${S}/quickassist/config/dh* ${D}${sysconfdir}/dh895xcc
100}
101
102PACKAGES += "${PN}-app"
103
104FILES_${PN}-dev = "${includedir}"
105
106FILES_${PN} += "\
107 ${base_libdir}/firmware/ \
108 ${sysconfdir}/ \
109 ${sysconfdir}/udev/rules.d/ \
110 ${sysconfdir}/init.d/ \
111 ${libdir}/ \
112 "
113
114FILES_${PN}-dbg += "${sysconfdir}/init.d/.debug"
115
116FILES_${PN}-app += "${bindir}/*"