summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnuj Mittal <anujx.mittal@intel.com>2015-07-10 10:23:56 (GMT)
committerSaul Wold <sgw@linux.intel.com>2015-07-10 20:52:27 (GMT)
commite9e51dc8928389cdb6a59e3969cf4d53aa9e8233 (patch)
tree643b666ff978cda0d74596517c1bd04b74484953
parent28e8017ab8ba4f4d9e3fe5a5346bf31b3334bbbb (diff)
downloadmeta-intel-e9e51dc8928389cdb6a59e3969cf4d53aa9e8233.tar.gz
meta-crystalforest: qat recipe for riverforest
This recipe implements the support for Intel QAT 2.3.0-34 for Intel RiverForest platforms. Signed-off-by: Anuj Mittal <anujx.mittal@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
-rw-r--r--meta-crystalforest/recipes-extended/qat/qat16/qat16_2.3.0-34-qat-add-install-target-to-makefiles.patch343
-rw-r--r--meta-crystalforest/recipes-extended/qat/qat16/qat16_2.3.0-34-qat-fix-for-cross-compilation-issue.patch40
-rw-r--r--meta-crystalforest/recipes-extended/qat/qat16/qat16_2.3.0-34-qat-remove-local-path-from-makefile.patch31
-rw-r--r--meta-crystalforest/recipes-extended/qat/qat16_2.3.0-34.bb116
4 files changed, 530 insertions, 0 deletions
diff --git a/meta-crystalforest/recipes-extended/qat/qat16/qat16_2.3.0-34-qat-add-install-target-to-makefiles.patch b/meta-crystalforest/recipes-extended/qat/qat16/qat16_2.3.0-34-qat-add-install-target-to-makefiles.patch
new file mode 100644
index 0000000..13e933e
--- /dev/null
+++ b/meta-crystalforest/recipes-extended/qat/qat16/qat16_2.3.0-34-qat-add-install-target-to-makefiles.patch
@@ -0,0 +1,343 @@
1From 5c47f906182b19eee7a26c5f76b31c9bd5f29c78 Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anujx.mittal@intel.com>
3Date: Wed, 8 Jul 2015 11:35:27 +0800
4Subject: [PATCH] qat: add install target to makefiles
5
6Upstream-Status: Inappropriate [Configuration]
7
8Added an install target to makefiles to help
9install ingredients at a proper path.
10
11Signed-off-by: Anuj Mittal <anujx.mittal@intel.com>
12---
13 quickassist/Makefile | 36 +++++-----
14 .../access_layer/src/sample_code/Makefile | 18 +++--
15 .../src/sample_code/functional/Makefile | 71 +++++++++++---------
16 3 files changed, 71 insertions(+), 54 deletions(-)
17
18diff --git a/quickassist/Makefile b/quickassist/Makefile
19index dcea692..01848e6 100644
20--- a/quickassist/Makefile
21+++ b/quickassist/Makefile
22@@ -104,7 +104,7 @@ export DRBG_POLL_AND_WAIT=1
23 ifdef WITH_CPA_MUX
24 ALL_TARGETS = clean lac_lib_dir libosal libosal_user qat_mux hal adf adf_user lac lac_user qat-fw install_scripts
25 else
26-ALL_TARGETS = clean lac_lib_dir libosal libosal_user hal adf adf_user lac lac_user qat-fw install_scripts
27+ALL_TARGETS = clean lac_lib_dir libosal libosal_user hal adf adf_user lac lac_user
28 endif
29 ICP_ARCH_USER?=`uname -m`
30
31@@ -116,7 +116,16 @@ all: $(ALL_TARGETS)
32 @echo 'Build Done';
33
34 user: lac_lib_dir libosal_user adf_user lac_user
35-kernel: lac_lib_dir libosal hal adf lac qat-fw install_scripts
36+kernel: lac_lib_dir libosal hal adf lac qat-fw
37+
38+install: qat-fw install_scripts
39+ @cp $(OSAL_PATH)/src/build/linux_2.6/user_space/libosal.a $(ICP_BUILD_OUTPUT)/$(DEST_LIBDIR);
40+ @cp $(OSAL_PATH)/src/build/linux_2.6/user_space/libosal.a $(ICP_BUILD_OUTPUT)/$(DEST_LIBDIR);
41+ @cp $(ADF_PATH)/build/linux_2.6/libadf_proxy.a $(ICP_BUILD_OUTPUT)/$(DEST_LIBDIR);
42+ @cp $(ADF_PATH)/build/linux_2.6/adf_ctl $(ICP_BUILD_OUTPUT)/etc/init.d/;
43+ @cp $(LAC_PATH)/src/build/linux_2.6/kernel_space/$(DRIVER) $(ICP_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers;
44+ @cp $(LAC_PATH)/src/build/linux_2.6/user_space/lib$(BASENAME).a $(ICP_BUILD_OUTPUT)/$(DEST_LIBDIR);
45+ @cp $(LAC_PATH)/src/build/linux_2.6/user_space/lib$(BASENAME)_s.so $(ICP_BUILD_OUTPUT)/$(DEST_LIBDIR);
46
47 install_scripts:
48 @echo ; echo 'Copying Install Scripts';
49@@ -124,10 +133,10 @@ ifdef WITH_CPA_MUX
50 @cp $(ICP_BUILDSYSTEM_PATH)/build_files/qat_service_mux $(ICP_BUILD_OUTPUT)/qat_service;
51 endif
52 ifndef WITH_CPA_MUX
53- @cp $(ICP_BUILDSYSTEM_PATH)/build_files/qat_service $(ICP_BUILD_OUTPUT)/;
54+ @cp $(ICP_BUILDSYSTEM_PATH)/build_files/qat_service $(ICP_BUILD_OUTPUT)/etc/init.d;
55 endif
56- @chmod 750 $(ICP_BUILD_OUTPUT)/qat_service;
57- @cp $(CONFIG_PATH)/dh895xcc_qa_dev0.conf $(ICP_BUILD_OUTPUT)/;
58+ @chmod 750 $(ICP_BUILD_OUTPUT)/etc/init.d/qat_service;
59+ @cp $(CONFIG_PATH)/dh895xcc_qa_dev0.conf $(ICP_BUILD_OUTPUT)/etc/;
60 # @cp $(CONFIG_PATH)/dh89xxcc_qa_dev1.conf $(ICP_BUILD_OUTPUT)/;
61 # @cp $(CONFIG_PATH)/dh89xxcc_qa_dev0_single_accel.conf $(ICP_BUILD_OUTPUT)/;
62
63@@ -146,7 +155,6 @@ libosal_user: output_dir lac_lib_dir
64 @echo ; echo 'Building OSAL for user space';
65 @cd $(OSAL_PATH)/src && $(MAKE) ARCH=$(ICP_ARCH_USER) ICP_ENV_DIR=$(ICP_TOP_ENV) OS_LEVEL=linux ICP_OS_LEVEL=user_space lib;\
66 echo ; echo 'Copying OSAL library';
67- cp $(OSAL_PATH)/src/build/linux_2.6/user_space/libosal.a $(ICP_BUILD_OUTPUT)/;
68
69 hal: output_dir libosal
70 @echo ; echo 'Building Hal Libs';
71@@ -171,7 +179,6 @@ libosal_uservf: output_dir lac_lib_dir
72 @echo ; echo 'Building OSAL for user space';
73 @cd $(OSAL_PATH)/src && export ICP_WITHOUT_IOMMU=1 && $(MAKE) ICP_ENV_DIR=$(ICP_TOP_ENV) OS_LEVEL=linux ICP_OS_LEVEL=user_space lib;\
74 echo ; echo 'Copying OSAL library';
75- cp $(OSAL_PATH)/src/build/linux_2.6/user_space/libosal.a $(ICP_BUILD_OUTPUT)/;
76
77 adfvf: output_dir lac_lib_dir libosalvf
78 @echo ; echo 'Building ADFVF';
79@@ -181,13 +188,10 @@ adfvf: output_dir lac_lib_dir libosalvf
80 adf_user: output_dir lac_lib_dir libosal_user
81 @echo ; echo 'Building user ADF';
82 @cd $(ADF_PATH) && export ADF_PLATFORM=ACCELDEV && export ICP_ENV_DIR=$(ICP_TOP_ENV) && export ONE_KO_RELEASE_PACKAGE=1 && ICP_OS_LEVEL=user_space && $(MAKE) ARCH=$(ICP_ARCH_USER) adf_user;
83- cp $(ADF_PATH)/build/linux_2.6/libadf_proxy.a $(ICP_BUILD_OUTPUT)/;
84- cp $(ADF_PATH)/build/linux_2.6/adf_ctl $(ICP_BUILD_OUTPUT)/;
85
86 lac: output_dir libosal hal adf
87 @echo ; echo 'Building LAC';
88 @cd $(LAC_PATH) && export ICP_ENV_DIR=$(ICP_TOP_ENV) && export ONE_KO_RELEASE_PACKAGE=1 && cd src && $(MAKE) ICP_OS_LEVEL=kernel_space OS_LEVEL=linux;
89- @cp $(LAC_PATH)/src/build/linux_2.6/kernel_space/$(DRIVER) $(ICP_BUILD_OUTPUT)/;
90
91 lacvf: output_dir libosalvf adfvf
92 @echo ; echo 'Building LACVF';
93@@ -195,20 +199,18 @@ ifdef WITH_CPA_MUX
94 @cp $(CPA_MUX_PATH)/Module.symvers $(LAC_PATH)/src/
95 endif
96 @cd $(LAC_PATH) && export ADF_PLATFORM=ACCELDEVVF && export ICP_ENV_DIR=$(ICP_TOP_ENV) && export ONE_KO_RELEASE_PACKAGE=1 && cd src && $(MAKE) ICP_OS_LEVEL=kernel_space OS_LEVEL=linux;
97- @cp $(LAC_PATH)/src/build/linux_2.6/kernel_space/$(BASENAME)_vf.ko $(ICP_BUILD_OUTPUT)/;
98
99 lac_user: output_dir libosal_user adf_user
100 @echo ; echo 'Building LAC in user space';
101 @cd $(LAC_PATH) && export ICP_ENV_DIR=$(ICP_TOP_ENV) && export ONE_KO_RELEASE_PACKAGE=1 && cd src && $(MAKE) ARCH=$(ICP_ARCH_USER) lib_static ICP_OS_LEVEL=user_space;
102- cp $(LAC_PATH)/src/build/linux_2.6/user_space/lib$(BASENAME).a $(ICP_BUILD_OUTPUT)/;
103 @cd $(LAC_PATH) && export ICP_ENV_DIR=$(ICP_TOP_ENV) && export ONE_KO_RELEASE_PACKAGE=1 && cd src && $(MAKE) ARCH=$(ICP_ARCH_USER) lib_shared ICP_OS_LEVEL=user_space;
104- cp $(LAC_PATH)/src/build/linux_2.6/user_space/lib$(BASENAME)_s.so $(ICP_BUILD_OUTPUT)/;
105+ cp $(LAC_PATH)/src/build/linux_2.6/user_space/lib$(BASENAME)_s.so $(ICP_BUILD_OUTPUT);
106
107 qat-fw: output_dir
108 @echo ; echo 'Copying QAT-FW Binary';
109- @cp -f $(QAT_FW_PATH)/icp_qat_ae.mof $(ICP_BUILD_OUTPUT)/mof_firmware.bin;
110+ @cp -f $(QAT_FW_PATH)/icp_qat_ae.mof $(ICP_BUILD_OUTPUT)/lib/firmware/$(ICP_FIRMWARE_DIR)/mof_firmware.bin;
111 @echo ; echo 'Copying MMP Binary';
112- @cp -f $(QAT_FW_PATH)/icp_qat_pke.mof $(ICP_BUILD_OUTPUT)/mmp_firmware.bin;
113+ @cp -f $(QAT_FW_PATH)/icp_qat_pke.mof $(ICP_BUILD_OUTPUT)/lib/firmware/$(ICP_FIRMWARE_DIR)/mmp_firmware.bin;
114
115 qat_mux: output_dir libosal
116 @echo ; echo 'Building qat_mux module'
117@@ -244,6 +246,10 @@ endif
118
119 output_dir:
120 test -d $(ICP_BUILD_OUTPUT) || mkdir -p $(ICP_BUILD_OUTPUT);
121+ test -d $(ICP_BUILD_OUTPUT)$(DEST_LIBDIR) || mkdir -p $(ICP_BUILD_OUTPUT)$(DEST_LIBDIR);
122+ test -d $(ICP_BUILD_OUTPUT)/lib/firmware/$(ICP_FIRMWARE_DIR) || mkdir -p $(ICP_BUILD_OUTPUT)/lib/firmware/$(ICP_FIRMWARE_DIR);
123+ test -d $(ICP_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers || mkdir -p $(ICP_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers;
124+ test -d $(ICP_BUILD_OUTPUT)/etc/init.d || mkdir -p $(ICP_BUILD_OUTPUT)/etc/init.d;
125
126 lac_lib_dir:
127 test -d $(LAC_LIB_DIR) || mkdir -p $(LAC_LIB_DIR);
128diff --git a/quickassist/lookaside/access_layer/src/sample_code/Makefile b/quickassist/lookaside/access_layer/src/sample_code/Makefile
129index 91c7373..8c6901a 100644
130--- a/quickassist/lookaside/access_layer/src/sample_code/Makefile
131+++ b/quickassist/lookaside/access_layer/src/sample_code/Makefile
132@@ -95,6 +95,7 @@ SAMPLE_PATH?=$(ICP_ROOT)/quickassist/lookaside/access_layer/src/sample_code
133 PERF_PATH?=$(ICP_ROOT)/quickassist/lookaside/access_layer/src/sample_code/performance
134 FIPS_PATH?=$(ICP_ROOT)/quickassist/lookaside/access_layer/src/sample_code/fips
135 FUNC_PATH=$(SAMPLE_PATH)/functional
136+FIPS_OUTPUT_NAME=fips_sample
137
138 #include the makefile with all the default and common Make variable definitions
139 include $(ICP_BUILDSYSTEM_PATH)/build_files/common.mk
140@@ -106,6 +107,8 @@ SAMPLE_BUILD_OUTPUT?=$(SAMPLE_PATH)/build
141
142 output_dir:
143 test -d $(SAMPLE_BUILD_OUTPUT) || mkdir $(SAMPLE_BUILD_OUTPUT);
144+ test -d $(SAMPLE_BUILD_OUTPUT)$(DEST_BINDIR) || mkdir -p $(SAMPLE_BUILD_OUTPUT)$(DEST_BINDIR)
145+
146 fips_code:
147 @if test -d $(FIPS_PATH); then echo ; echo 'Building FIPS Code'; fi;
148 @if test -d $(FIPS_PATH); \
149@@ -157,17 +160,13 @@ PERF_ALL=$(MEM_DRIVER) perf_user perf_kernel
150 perf_all: $(PERF_ALL)
151 @echo ; echo "Build output location $(SAMPLE_BUILD_OUTPUT)";
152
153-
154 perf_user: output_dir
155 @echo ; echo "Building perf_user";
156 @cd $(PERF_PATH) && $(MAKE) clean ICP_OS_LEVEL=user_space && $(MAKE) ICP_OS_LEVEL=user_space lib_shared exe
157- @cp $(PERF_PATH)/build/linux_2.6/user_space/$(PERF_OUTPUT_NAME)_s.so $(SAMPLE_BUILD_OUTPUT)/;
158- @cp $(PERF_PATH)/build/linux_2.6/user_space/$(PERF_OUTPUT_NAME) $(SAMPLE_BUILD_OUTPUT)/;
159
160 perf_kernel: output_dir
161 @echo ; echo "Building perf_kernel";
162 @cd $(PERF_PATH) && $(MAKE) ICP_OS_LEVEL=kernel_space
163- @cp $(PERF_PATH)/build/linux_2.6/$(ICP_OS_LEVEL)/$(PERF_OUTPUT_NAME).ko $(SAMPLE_BUILD_OUTPUT)/;
164
165 common_mem_drv: output_dir
166 @echo ; echo "Building common_mem_drv kernel space";
167@@ -180,12 +179,19 @@ common_mem_drv: output_dir
168 perf_qae: output_dir
169 @echo ; echo "Building perf_qae";
170 @cd $(CMN_ROOT)/linux/kernel_space && $(MAKE) ICP_OS_LEVEL=kernel_space
171- @cp $(CMN_ROOT)/linux/kernel_space/build/linux_2.6/$(ICP_OS_LEVEL)/$(CMN_MODULE_NAME).ko $(SAMPLE_BUILD_OUTPUT)/;
172-
173
174 func: output_dir
175 @cd $(FUNC_PATH) && $(MAKE) all;
176
177+install: output_dir
178+ @cp $(PERF_PATH)/build/linux_2.6/user_space/$(PERF_OUTPUT_NAME)_s.so $(SAMPLE_BUILD_OUTPUT)$(DEST_LIBDIR);
179+ @cp $(PERF_PATH)/build/linux_2.6/user_space/$(PERF_OUTPUT_NAME) $(SAMPLE_BUILD_OUTPUT)$(DEST_BINDIR);
180+ @cp $(PERF_PATH)/build/linux_2.6/$(ICP_OS_LEVEL)/$(PERF_OUTPUT_NAME).ko $(ICP_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers;
181+ @cp $(CMN_ROOT)/linux/kernel_space/build/linux_2.6/$(ICP_OS_LEVEL)/$(CMN_MODULE_NAME).ko $(ICP_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers;
182+ @cp $(FIPS_PATH)/build/linux_2.6/$(ICP_OS_LEVEL)/$(FIPS_OUTPUT_NAME).ko $(ICP_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers;
183+ @cp $(FIPS_PATH)/build/linux_2.6/user_space/$(FIPS_OUTPUT_NAME)_s.so $(SAMPLE_BUILD_OUTPUT)$(DEST_LIBDIR);
184+ @cp $(FIPS_PATH)/build/linux_2.6/user_space/$(FIPS_OUTPUT_NAME).a $(SAMPLE_BUILD_OUTPUT)$(DEST_LIBDIR);
185+ @cd $(FUNC_PATH) && $(MAKE) install;
186
187 all: $(MEM_DRIVER) fips_code perf_user perf_kernel func
188 perf: $(MEM_DRIVER) perf_kernel
189diff --git a/quickassist/lookaside/access_layer/src/sample_code/functional/Makefile b/quickassist/lookaside/access_layer/src/sample_code/functional/Makefile
190index 8944883..0355a70 100644
191--- a/quickassist/lookaside/access_layer/src/sample_code/functional/Makefile
192+++ b/quickassist/lookaside/access_layer/src/sample_code/functional/Makefile
193@@ -64,6 +64,8 @@ SYM_PATH?=$(SAMPLE_PATH)/sym
194 ASYM_PATH?=$(SAMPLE_PATH)/asym
195 ICP_API_DIR?=$(ICP_ROOT)/quickassist/include/
196 ICP_LAC_DIR?=$(ICP_ROOT)/quickassist/lookaside/access_layer/
197+BIN_INSTALLPATH=$(SAMPLE_BUILD_OUTPUT)$(DEST_BINDIR)/
198+MODULE_INSTALLPATH=$(SAMPLE_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers
199
200 ifeq ($(WITH_CMDRV),1)
201 CMN_ROOT?=$(ICP_ROOT)/quickassist/utilities/libqae_mem/
202@@ -110,6 +112,7 @@ SAMPLE_BUILD_OUTPUT?=$(SAMPLE_PATH)/build
203
204 output_dir:
205 test -d $(SAMPLE_BUILD_OUTPUT) || mkdir $(SAMPLE_BUILD_OUTPUT);
206+ test -d $(BIN_INSTALLPATH) || mkdir -p $(BIN_INSTALLPATH);
207
208 BUILD_DC=dc_dp_sample stateless_sample stateful_sample \
209 stateless_multi_op_checksum_sample
210@@ -119,23 +122,15 @@ dc: $(BUILD_DC)
211
212 dc_dp_sample: output_dir
213 @cd $(DC_PATH)/dc_dp_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space && $(MAKE) ICP_OS_LEVEL=kernel_space
214- @cp $(DC_PATH)/dc_dp_sample/dc_dp_sample $(SAMPLE_BUILD_OUTPUT)/;
215- @cp $(DC_PATH)/dc_dp_sample/dc_dp_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
216
217 stateless_sample: output_dir
218 @cd $(DC_PATH)/stateless_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space && $(MAKE) ICP_OS_LEVEL=kernel_space
219- @cp $(DC_PATH)/stateless_sample/dc_stateless_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
220- @cp $(DC_PATH)/stateless_sample/dc_stateless_sample $(SAMPLE_BUILD_OUTPUT)/;
221
222 stateful_sample: output_dir
223 @cd $(DC_PATH)/stateful_sample && $(MAKE) clean ICP_OS_LEVEL=user_space && $(MAKE) ICP_OS_LEVEL=user_space
224- @cp $(DC_PATH)/stateful_sample/dc_stateful_sample $(SAMPLE_BUILD_OUTPUT)/;
225- @cp $(DC_PATH)/stateful_sample/paper4 $(SAMPLE_BUILD_OUTPUT)/;
226
227 stateless_multi_op_checksum_sample: output_dir
228 @cd $(DC_PATH)/stateless_multi_op_checksum_sample && $(MAKE) ICP_OS_LEVEL=user_space && $(MAKE) ICP_OS_LEVEL=kernel_space
229- @cp $(DC_PATH)/stateless_multi_op_checksum_sample/dc_stateless_multi_op_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
230- @cp $(DC_PATH)/stateless_multi_op_checksum_sample/dc_stateless_multi_op_sample $(SAMPLE_BUILD_OUTPUT)/;
231
232 BUILD_SYN=algchaining_sample ccm_sample cipher_sample \
233 drbg_sample gcm_sample hash_file_sample \
234@@ -146,57 +141,36 @@ sym:$(BUILD_SYN)
235 @echo ; echo "Build sym component";
236 algchaining_sample: output_dir
237 @cd $(SYM_PATH)/alg_chaining_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space && $(MAKE) ICP_OS_LEVEL=kernel_space
238- @cp $(SYM_PATH)/alg_chaining_sample/algchaining_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
239- @cp $(SYM_PATH)/alg_chaining_sample/algchaining_sample $(SAMPLE_BUILD_OUTPUT)/;
240
241 ccm_sample: output_dir
242 @cd $(SYM_PATH)/ccm_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space && $(MAKE) ICP_OS_LEVEL=kernel_space
243- @cp $(SYM_PATH)/ccm_sample/ccm_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
244- @cp $(SYM_PATH)/ccm_sample/ccm_sample $(SAMPLE_BUILD_OUTPUT)/;
245
246 cipher_sample: output_dir
247 @cd $(SYM_PATH)/cipher_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space && $(MAKE) ICP_OS_LEVEL=kernel_space
248- @cp $(SYM_PATH)/cipher_sample/cipher_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
249- @cp $(SYM_PATH)/cipher_sample/cipher_sample $(SAMPLE_BUILD_OUTPUT)/;
250
251 drbg_sample: output_dir
252 @cd $(SYM_PATH)/drbg_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space && $(MAKE) ICP_OS_LEVEL=kernel_space
253- @cp $(SYM_PATH)/drbg_sample/drbg_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
254- @cp $(SYM_PATH)/drbg_sample/drbg_sample $(SAMPLE_BUILD_OUTPUT)/;
255
256 gcm_sample: output_dir
257 @cd $(SYM_PATH)/gcm_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space && $(MAKE) ICP_OS_LEVEL=kernel_space
258- @cp $(SYM_PATH)/gcm_sample/gcm_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
259- @cp $(SYM_PATH)/gcm_sample/gcm_sample $(SAMPLE_BUILD_OUTPUT)/;
260
261 hash_file_sample: output_dir
262 @cd $(SYM_PATH)/hash_file_sample && $(MAKE) clean ICP_OS_LEVEL=user_space&& $(MAKE) ICP_OS_LEVEL=user_space
263- @cp $(SYM_PATH)/hash_file_sample/hash_file_sample $(SAMPLE_BUILD_OUTPUT)/;
264
265 hash_sample: output_dir
266 @cd $(SYM_PATH)/hash_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space && $(MAKE) ICP_OS_LEVEL=kernel_space
267- @cp $(SYM_PATH)/hash_sample/hash_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
268- @cp $(SYM_PATH)/hash_sample/hash_sample $(SAMPLE_BUILD_OUTPUT)/;
269
270 ipsec_sample: output_dir
271 @cd $(SYM_PATH)/ipsec_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space && $(MAKE) ICP_OS_LEVEL=kernel_space
272- @cp $(SYM_PATH)/ipsec_sample/ipsec_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
273- @cp $(SYM_PATH)/ipsec_sample/ipsec_sample $(SAMPLE_BUILD_OUTPUT)/;
274
275 nrbg_sample: output_dir
276 @cd $(SYM_PATH)/nrbg_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space && $(MAKE) ICP_OS_LEVEL=kernel_space
277- @cp $(SYM_PATH)/nrbg_sample/nrbg_sample $(SAMPLE_BUILD_OUTPUT)/;
278- @cp $(SYM_PATH)/nrbg_sample/nrbg_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
279
280 ssl_sample: output_dir
281 @cd $(SYM_PATH)/ssl_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space && $(MAKE) ICP_OS_LEVEL=kernel_space
282- @cp $(SYM_PATH)/ssl_sample/ssl_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
283- @cp $(SYM_PATH)/ssl_sample/ssl_sample $(SAMPLE_BUILD_OUTPUT)/;
284
285 sym_dp_sample: output_dir
286 @cd $(SYM_PATH)/symdp_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space && $(MAKE) ICP_OS_LEVEL=kernel_space
287- @cp $(SYM_PATH)/symdp_sample/sym_dp_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
288- @cp $(SYM_PATH)/symdp_sample/sym_dp_sample $(SAMPLE_BUILD_OUTPUT)/;
289
290 BUILD_ASYM=diffie_hellman_sample prime_sample
291
292@@ -205,13 +179,44 @@ asym: $(BUILD_ASYM)
293
294 diffie_hellman_sample: output_dir
295 @cd $(ASYM_PATH)/diffie_hellman_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space && $(MAKE) ICP_OS_LEVEL=kernel_space
296- @cp $(ASYM_PATH)/diffie_hellman_sample/dh_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
297- @cp $(ASYM_PATH)/diffie_hellman_sample/dh_sample $(SAMPLE_BUILD_OUTPUT)/;
298
299 prime_sample: output_dir
300 @cd $(ASYM_PATH)/prime_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space && $(MAKE) ICP_OS_LEVEL=kernel_space
301- @cp $(ASYM_PATH)/prime_sample/prime_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
302- @cp $(ASYM_PATH)/prime_sample/prime_sample $(SAMPLE_BUILD_OUTPUT)/;
303+
304+install: output_dir
305+ @cp $(DC_PATH)/stateless_multi_op_checksum_sample/dc_stateless_multi_op_sample.ko $(MODULE_INSTALLPATH);
306+ @cp $(DC_PATH)/stateless_multi_op_checksum_sample/dc_stateless_multi_op_sample $(BIN_INSTALLPATH);
307+ @cp $(DC_PATH)/stateful_sample/dc_stateful_sample $(BIN_INSTALLPATH);
308+ @cp $(DC_PATH)/stateful_sample/paper4 $(BIN_INSTALLPATH);
309+ @cp $(DC_PATH)/dc_dp_sample/dc_dp_sample $(BIN_INSTALLPATH);
310+ @cp $(DC_PATH)/dc_dp_sample/dc_dp_sample.ko $(MODULE_INSTALLPATH);
311+ @cp $(DC_PATH)/stateless_sample/dc_stateless_sample.ko $(MODULE_INSTALLPATH);
312+ @cp $(DC_PATH)/stateless_sample/dc_stateless_sample $(BIN_INSTALLPATH);
313+ @cp $(ASYM_PATH)/prime_sample/prime_sample.ko $(MODULE_INSTALLPATH);
314+ @cp $(ASYM_PATH)/prime_sample/prime_sample $(BIN_INSTALLPATH);
315+ @cp $(ASYM_PATH)/diffie_hellman_sample/dh_sample.ko $(MODULE_INSTALLPATH);
316+ @cp $(ASYM_PATH)/diffie_hellman_sample/dh_sample $(BIN_INSTALLPATH);
317+ @cp $(SYM_PATH)/symdp_sample/sym_dp_sample.ko $(MODULE_INSTALLPATH);
318+ @cp $(SYM_PATH)/symdp_sample/sym_dp_sample $(BIN_INSTALLPATH);
319+ @cp $(SYM_PATH)/ssl_sample/ssl_sample.ko $(MODULE_INSTALLPATH);
320+ @cp $(SYM_PATH)/ssl_sample/ssl_sample $(BIN_INSTALLPATH);
321+ @cp $(SYM_PATH)/nrbg_sample/nrbg_sample $(BIN_INSTALLPATH);
322+ @cp $(SYM_PATH)/nrbg_sample/nrbg_sample.ko $(MODULE_INSTALLPATH);
323+ @cp $(SYM_PATH)/ipsec_sample/ipsec_sample.ko $(MODULE_INSTALLPATH);
324+ @cp $(SYM_PATH)/hash_file_sample/hash_file_sample $(BIN_INSTALLPATH);
325+ @cp $(SYM_PATH)/ipsec_sample/ipsec_sample $(BIN_INSTALLPATH);
326+ @cp $(SYM_PATH)/hash_sample/hash_sample.ko $(MODULE_INSTALLPATH);
327+ @cp $(SYM_PATH)/hash_sample/hash_sample $(BIN_INSTALLPATH);
328+ @cp $(SYM_PATH)/gcm_sample/gcm_sample.ko $(MODULE_INSTALLPATH);
329+ @cp $(SYM_PATH)/gcm_sample/gcm_sample $(BIN_INSTALLPATH);
330+ @cp $(SYM_PATH)/alg_chaining_sample/algchaining_sample.ko $(MODULE_INSTALLPATH);
331+ @cp $(SYM_PATH)/alg_chaining_sample/algchaining_sample $(BIN_INSTALLPATH);
332+ @cp $(SYM_PATH)/ccm_sample/ccm_sample.ko $(MODULE_INSTALLPATH);
333+ @cp $(SYM_PATH)/ccm_sample/ccm_sample $(BIN_INSTALLPATH);
334+ @cp $(SYM_PATH)/drbg_sample/drbg_sample.ko $(MODULE_INSTALLPATH);
335+ @cp $(SYM_PATH)/drbg_sample/drbg_sample $(BIN_INSTALLPATH);
336+ @cp $(SYM_PATH)/cipher_sample/cipher_sample.ko $(MODULE_INSTALLPATH);
337+ @cp $(SYM_PATH)/cipher_sample/cipher_sample $(BIN_INSTALLPATH);
338
339 CLEAN_DC=clean_dc_dp_sample clean_stateless_sample \
340 clean_stateful_sample \
341--
3421.7.9.5
343
diff --git a/meta-crystalforest/recipes-extended/qat/qat16/qat16_2.3.0-34-qat-fix-for-cross-compilation-issue.patch b/meta-crystalforest/recipes-extended/qat/qat16/qat16_2.3.0-34-qat-fix-for-cross-compilation-issue.patch
new file mode 100644
index 0000000..b7b77d0
--- /dev/null
+++ b/meta-crystalforest/recipes-extended/qat/qat16/qat16_2.3.0-34-qat-fix-for-cross-compilation-issue.patch
@@ -0,0 +1,40 @@
1From 340701a0f44e70eafd9029e9186b74e8783f2afd Mon Sep 17 00:00:00 2001
2From: venkatasubramanian pattu <venkatasubramanianx.pattu@intel.com>
3Date: Mon, 6 Jul 2015 15:57:20 +0800
4Subject: [PATCH] qat: fix for cross-compilation issue
5
6Upstream-Status: Inappropriate [Configuration]
7
8Ensure that we are not using host compiler.
9
10Signed-off-by: venkatasubramanian pattu <venkatasubramanianx.pattu@intel.com>
11Signed-off-by: Anuj Mittal <anujx.mittal@intel.com>
12---
13 .../dc/stateless_multi_op_checksum_sample/Makefile | 4 ++--
14 1 file changed, 2 insertions(+), 2 deletions(-)
15
16diff --git a/quickassist/lookaside/access_layer/src/sample_code/functional/dc/stateless_multi_op_checksum_sample/Makefile b/quickassist/lookaside/access_layer/src/sample_code/functional/dc/stateless_multi_op_checksum_sample/Makefile
17index 01590c3..315fca7 100644
18--- a/quickassist/lookaside/access_layer/src/sample_code/functional/dc/stateless_multi_op_checksum_sample/Makefile
19+++ b/quickassist/lookaside/access_layer/src/sample_code/functional/dc/stateless_multi_op_checksum_sample/Makefile
20@@ -111,7 +111,7 @@ else
21 ADDITIONAL_OBJECTS += $(ICP_BUILD_OUTPUT)/libicp_qa_al_s.so
22 endif
23
24-ADDITIONAL_OBJECTS += -L/usr/Lib -lpthread -lcrypto
25+ADDITIONAL_OBJECTS += -lpthread -lcrypto
26
27 USER_SOURCE_FILES = ../../common/cpa_sample_utils.c cpa_dc_stateless_multi_op_checksum_sample.c
28 USER_SOURCE_FILES += ../stateless_sample/cpa_dc_sample_user.c
29@@ -127,7 +127,7 @@ else
30 endif
31
32 default: clean
33- gcc -Wall -O1 $(USER_INCLUDES) -DUSER_SPACE $(EXTRA_CFLAGS) \
34+ $(CC) -Wall -O1 $(USER_INCLUDES) -DUSER_SPACE $(EXTRA_CFLAGS) \
35 $(USER_SOURCE_FILES) $(ADDITIONAL_OBJECTS) -o $(OUTPUT_NAME)
36
37 clean:
38--
391.7.9.5
40
diff --git a/meta-crystalforest/recipes-extended/qat/qat16/qat16_2.3.0-34-qat-remove-local-path-from-makefile.patch b/meta-crystalforest/recipes-extended/qat/qat16/qat16_2.3.0-34-qat-remove-local-path-from-makefile.patch
new file mode 100644
index 0000000..0021c0d
--- /dev/null
+++ b/meta-crystalforest/recipes-extended/qat/qat16/qat16_2.3.0-34-qat-remove-local-path-from-makefile.patch
@@ -0,0 +1,31 @@
1From 5044a14a6b4192b771f16aa834f688c1fd1287dd Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anujx.mittal@intel.com>
3Date: Wed, 8 Jul 2015 11:11:32 +0800
4Subject: [PATCH] qat: remove local path from makefile
5
6Upstream-Status: Inappropriate [Configuration]
7
8Remove the host machine /usr/include path from makefile.
9
10Signed-off-by: Anuj Mittal <anujx.mittal@intel.com>
11---
12 .../build_files/env_files/linux_2.6_user_space.mk | 3 +--
13 1 file changed, 1 insertion(+), 2 deletions(-)
14
15diff --git a/quickassist/build_system/build_files/env_files/linux_2.6_user_space.mk b/quickassist/build_system/build_files/env_files/linux_2.6_user_space.mk
16index 1451f4a..719d1bb 100755
17--- a/quickassist/build_system/build_files/env_files/linux_2.6_user_space.mk
18+++ b/quickassist/build_system/build_files/env_files/linux_2.6_user_space.mk
19@@ -72,8 +72,7 @@
20 #
21 #-------------------------------------------------------------
22
23-INCLUDES+=-I/usr/include \
24- -I$(API_DIR) \
25+INCLUDES+=-I$(API_DIR) \
26 -I$(OSAL_DIR)/include \
27 -I$(OSAL_DIR)/src/linux/user_space/include
28
29--
301.7.9.5
31
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 0000000..e6556cb
--- /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}/*"