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