diff options
Diffstat (limited to 'recipes-extended/qat/qat17.inc')
-rw-r--r-- | recipes-extended/qat/qat17.inc | 146 |
1 files changed, 146 insertions, 0 deletions
diff --git a/recipes-extended/qat/qat17.inc b/recipes-extended/qat/qat17.inc new file mode 100644 index 0000000..7793336 --- /dev/null +++ b/recipes-extended/qat/qat17.inc | |||
@@ -0,0 +1,146 @@ | |||
1 | DESCRIPTION = "Intel(r) QuickAssist Technology API" | ||
2 | HOMEPAGE = "https://01.org/packet-processing/intel%C2%AE-quickassist-technology-drivers-and-patches" | ||
3 | |||
4 | #Dual BSD and GPLv2 License | ||
5 | LICENSE = "BSD & GPLv2" | ||
6 | LIC_FILES_CHKSUM = "\ | ||
7 | file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6 \ | ||
8 | file://${COMMON_LICENSE_DIR}/BSD;md5=3775480a712fc46a69647678acb234cb \ | ||
9 | " | ||
10 | DEPENDS += "boost" | ||
11 | DEPENDS += "udev" | ||
12 | DEPENDS += "zlib openssl" | ||
13 | PROVIDES += "virtual/qat" | ||
14 | |||
15 | SRC_URI="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 | #https://01.org/sites/default/files/page/qatmux.l.${PV}.tgz;name=qat | ||
20 | COMPATIBLE_MACHINE = "crystalforest|intel-corei7-64|intel-core2-32" | ||
21 | |||
22 | S = "${WORKDIR}" | ||
23 | ICP_TOOLS = "accelcomp" | ||
24 | SAMPLE_CODE_DIR = "${S}/quickassist/lookaside/access_layer/src/sample_code" | ||
25 | export INSTALL_MOD_PATH = "${D}" | ||
26 | export ICP_DRIVER_TYPE = "QAT1.7" | ||
27 | export ICP_FIRMWARE_DIR="c3xxx" | ||
28 | export ICP_ROOT = "${S}" | ||
29 | export ICP_ENV_DIR = "${S}/quickassist/build_system/build_files/env_files" | ||
30 | export ICP_BUILDSYSTEM_PATH = "${S}/quickassist/build_system" | ||
31 | export ICP_TOOLS_TARGET = "${ICP_TOOLS}" | ||
32 | export FUNC_PATH = "${ICP_ROOT}/quickassist/lookaside/access_layer/src/sample_code/functional" | ||
33 | export INSTALL_FW_PATH = "${D}${base_libdir}/firmware" | ||
34 | export KERNEL_SOURCE_ROOT = "${STAGING_KERNEL_DIR}" | ||
35 | export ICP_BUILD_OUTPUT = "${D}" | ||
36 | export DEST_LIBDIR = "${libdir}" | ||
37 | export DEST_BINDIR = "${bindir}" | ||
38 | export QAT_KERNEL_VER = "${KERNEL_VERSION}" | ||
39 | export SAMPLE_BUILD_OUTPUT = "${D}" | ||
40 | export MODULE_DIR = "${base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers" | ||
41 | export INSTALL_MOD_DIR = "${D}${base_libdir}/modules/${KERNEL_VERSION}" | ||
42 | export KERNEL_BUILDDIR = "${STAGING_KERNEL_BUILDDIR}" | ||
43 | export SC_EPOLL_DISABLED = "1" | ||
44 | export WITH_UPSTREAM = "1" | ||
45 | export WITH_CMDRV = "1" | ||
46 | export KERNEL_SOURCE_DIR = "${ICP_ROOT}/quickassist/qat/" | ||
47 | |||
48 | export BIN_LIST="qat_c3xxx.bin qat_c3xxx_a0.bin qat_c3xxx_mmp.bin qat_c62x.bin qat_c62x_mmp.bin" | ||
49 | export BIN_DH895XCC="qat_895xcc.bin qat_mmp.bin" | ||
50 | export BIN_C62X="qat_c62x.bin qat_c62x_mmp.bin" | ||
51 | export BIN_C3XXX="qat_c3xxx.bin qat_c3xxx_mmp.bin" | ||
52 | |||
53 | export KO_INTEL_QAT="${S}/quickassist/qat/drivers/crypto/qat/qat_common" | ||
54 | export KO_QAT_DH895XCC="${S}/quickassist/qat/drivers/crypto/qat/qat_dh895xcc" | ||
55 | export KO_QAT_DH895XCCVF="${S}/quickassist/qat/drivers/crypto/qat/qat_dh895xccvf" | ||
56 | export KO_QAT_C62X="${S}/quickassist/qat/drivers/crypto/qat/qat_c62x" | ||
57 | export KO_QAT_C62XVF="${S}/quickassist/qat/drivers/crypto/qat/qat_c62xvf" | ||
58 | export KO_QAT_C3XXX="${S}/quickassist/qat/drivers/crypto/qat/qat_c3xxx" | ||
59 | export KO_QAT_C3XXXVF="${S}/quickassist/qat/drivers/crypto/qat/qat_c3xxxvf" | ||
60 | |||
61 | inherit module | ||
62 | inherit update-rc.d | ||
63 | INITSCRIPT_NAME = "qat_service" | ||
64 | |||
65 | PARALLEL_MAKE = "" | ||
66 | |||
67 | #To get around the double slashes in paths in QAT makefiles | ||
68 | PACKAGE_DEBUG_SPLIT_STYLE = "debug-without-src" | ||
69 | |||
70 | EXTRA_OEMAKE_append = " CFLAGS+='-fgnu89-inline -fPIC'" | ||
71 | EXTRA_OEMAKE = "-e MAKEFLAGS=" | ||
72 | |||
73 | do_compile () { | ||
74 | export LD="${LD} --hash-style=gnu" | ||
75 | export MACHINE="${TARGET_ARCH}" | ||
76 | |||
77 | cd ${S}/quickassist | ||
78 | oe_runmake | ||
79 | |||
80 | cd ${S}/quickassist/qat | ||
81 | oe_runmake 'clean' | ||
82 | oe_runmake 'modules_install' | ||
83 | |||
84 | cd ${S}/quickassist/utilities/adf_ctl | ||
85 | oe_runmake | ||
86 | |||
87 | cd ${S}/quickassist/utilities/libusdm_drv | ||
88 | oe_runmake | ||
89 | |||
90 | #build the whole sample code: per_user only | ||
91 | cd ${SAMPLE_CODE_DIR} | ||
92 | oe_runmake 'perf_user' | ||
93 | } | ||
94 | |||
95 | do_install() { | ||
96 | cp ${TOPDIR}/downloads/qat1.7.upstream.l.${PV}.tar.gz ${S} | ||
97 | export MACHINE="${TARGET_ARCH}" | ||
98 | |||
99 | cd ${S}/quickassist | ||
100 | oe_runmake install | ||
101 | |||
102 | install -d ${D}/etc/udev/rules.d | ||
103 | install -d ${D}${sbindir} | ||
104 | install -d ${D}${sysconfdir}/conf_files | ||
105 | install -d ${D}${prefix}/qat | ||
106 | |||
107 | echo 'KERNEL=="icp_adf_ctl" MODE="0600"' > ${D}/etc/udev/rules.d/00-dh895xcc_qa.rules | ||
108 | echo 'KERNEL=="icp_dev[0-9]*" MODE="0600"' >> ${D}/etc/udev/rules.d/00-dh895xcc_qa.rules | ||
109 | echo 'KERNEL=="icp_dev_mem?" MODE="0600"' >> ${D}/etc/udev/rules.d/00-dh895xcc_qa.rules | ||
110 | |||
111 | install -m 0755 ${S}/qat1.7.upstream.l.${PV}.tar.gz ${D}${prefix}/qat | ||
112 | |||
113 | install -D -m 0755 ${S}/quickassist/lookaside/access_layer/src/build/linux_2.6/user_space/*.so ${D}${base_libdir} | ||
114 | install -D -m 0755 ${S}/quickassist/utilities/libusdm_drv/libusdm_drv_s.so ${D}${base_libdir} | ||
115 | install -D -m 0750 ${S}/quickassist/utilities/adf_ctl/adf_ctl ${D}${sbindir} | ||
116 | install -D -m 640 ${S}/quickassist/utilities/adf_ctl/conf_files/c3xxx_dev0.conf ${D}${sysconfdir} | ||
117 | install -D -m 640 ${S}/quickassist/utilities/adf_ctl/conf_files/c3xxx_dev0.conf ${D}${sysconfdir}/conf_files | ||
118 | install -D -m 640 ${S}/quickassist/utilities/adf_ctl/conf_files/c3xxxvf_dev0.conf.vm ${D}${sysconfdir}/conf_files | ||
119 | install -m 0755 ${S}/quickassist/qat/fw/qat_c3xxx.bin ${D}${base_libdir}/firmware | ||
120 | install -m 0755 ${S}/quickassist/qat/fw/qat_c3xxx_a0.bin ${D}${base_libdir}/firmware | ||
121 | install -m 0755 ${S}/quickassist/qat/fw/qat_c3xxx_mmp.bin ${D}${base_libdir}/firmware | ||
122 | install -m 0755 ${S}/quickassist/qat/fw/qat_c62x.bin ${D}${base_libdir}/firmware | ||
123 | install -m 0755 ${S}/quickassist/qat/fw/qat_c62x_mmp.bin ${D}${base_libdir}/firmware | ||
124 | install -m 0755 ${S}/quickassist/lookaside/access_layer/src/sample_code/performance/compression/calgary ${D}${base_libdir}/firmware | ||
125 | install -m 0755 ${S}/quickassist/lookaside/access_layer/src/sample_code/performance/compression/calgary32 ${D}${base_libdir}/firmware | ||
126 | install -m 0755 ${S}/quickassist/lookaside/access_layer/src/sample_code/performance/compression/canterbury ${D}${base_libdir}/firmware | ||
127 | } | ||
128 | |||
129 | PACKAGES += "${PN}-app" | ||
130 | |||
131 | FILES_${PN}-dev = "${includedir}/ \ | ||
132 | " | ||
133 | FILES_${PN} += "\ | ||
134 | ${libdir}/ \ | ||
135 | ${base_libdir}/firmware \ | ||
136 | ${sysconfdir}/ \ | ||
137 | ${sbindir}/ \ | ||
138 | ${base_libdir}/*.so \ | ||
139 | " | ||
140 | |||
141 | FILES_${PN}-dbg += "${sysconfdir}/init.d/.debug/ \ | ||
142 | " | ||
143 | |||
144 | FILES_${PN}-app += "${bindir}/* \ | ||
145 | ${prefix}/qat \ | ||
146 | " | ||