summaryrefslogtreecommitdiffstats
path: root/meta-isg
diff options
context:
space:
mode:
authorAnuj Mittal <anujx.mittal@intel.com>2015-09-01 10:42:34 (GMT)
committerSaul Wold <sgw@linux.intel.com>2015-09-01 16:25:13 (GMT)
commitcea00968b858b60222d68103491f076067d73876 (patch)
tree4428c3f371f1398555c203d1cb32088b41aceda4 /meta-isg
parentef677f1d302f7d9277b5c18b899be78317c87b37 (diff)
downloadmeta-intel-cea00968b858b60222d68103491f076067d73876.tar.gz
meta-crystalforest: move qat and zlib-qat to meta-isg
Move qat and zlib-qat recipes from meta-crystalforest to meta-isg. This allows us to utilize these common components across all the supported platforms. 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/qat16_2.3.0-34-qat-add-install-target-to-makefiles.patch343
-rw-r--r--meta-isg/common/recipes-extended/qat/qat16/qat16_2.3.0-34-qat-fix-for-cross-compilation-issue.patch40
-rw-r--r--meta-isg/common/recipes-extended/qat/qat16/qat16_2.3.0-34-qat-remove-local-path-from-makefile.patch31
-rw-r--r--meta-isg/common/recipes-extended/qat/qat16_2.3.0-34.bb118
-rw-r--r--meta-isg/common/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-qat_mem-build-qat_mem-ko-against-yocto-kernel-src.patch51
-rw-r--r--meta-isg/common/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-Remove-rpaths-from-makefile.patch52
-rw-r--r--meta-isg/common/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-qat-add-a-install-target-to-makefile.patch46
-rw-r--r--meta-isg/common/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb113
8 files changed, 794 insertions, 0 deletions
diff --git a/meta-isg/common/recipes-extended/qat/qat16/qat16_2.3.0-34-qat-add-install-target-to-makefiles.patch b/meta-isg/common/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-isg/common/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-isg/common/recipes-extended/qat/qat16/qat16_2.3.0-34-qat-fix-for-cross-compilation-issue.patch b/meta-isg/common/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-isg/common/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-isg/common/recipes-extended/qat/qat16/qat16_2.3.0-34-qat-remove-local-path-from-makefile.patch b/meta-isg/common/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-isg/common/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-isg/common/recipes-extended/qat/qat16_2.3.0-34.bb b/meta-isg/common/recipes-extended/qat/qat16_2.3.0-34.bb
new file mode 100644
index 0000000..83ccbfb
--- /dev/null
+++ b/meta-isg/common/recipes-extended/qat/qat16_2.3.0-34.bb
@@ -0,0 +1,118 @@
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"
12PROVIDES += "virtual/qat"
13
14SRC_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
20SRC_URI[qat.md5sum] = "9614bf598bc8e7eedc8adb6d29109033"
21SRC_URI[qat.sha256sum] = "1f9708de3c132258eaa488c82760f374b6b6838c85cafef2e8c61034fe0f7031"
22
23COMPATIBLE_MACHINE = "crystalforest"
24
25S = "${WORKDIR}/${ICP_DRIVER_TYPE}"
26ICP_TOOLS = "accelcomp"
27SAMPLE_CODE_DIR = "${S}/quickassist/lookaside/access_layer/src/sample_code"
28
29export ICP_DRIVER_TYPE = "QAT1.6"
30export ICP_FIRMWARE_DIR="dh895xcc"
31export ICP_ROOT = "${S}"
32export ICP_ENV_DIR = "${S}/quickassist/build_system/build_files/env_files"
33export ICP_BUILDSYSTEM_PATH = "${S}/quickassist/build_system"
34export ICP_TOOLS_TARGET = "${ICP_TOOLS}"
35export FUNC_PATH = "${ICP_ROOT}/quickassist/lookaside/access_layer/src/sample_code/functional"
36export KERNEL_SOURCE_ROOT = "${STAGING_KERNEL_DIR}"
37export ICP_BUILD_OUTPUT = "${D}"
38export DEST_LIBDIR = "${libdir}"
39export DEST_BINDIR = "${bindir}"
40export QAT_KERNEL_VER = "${KERNEL_VERSION}"
41export SAMPLE_BUILD_OUTPUT = "${D}"
42export MODULE_DIR = "${base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers"
43
44inherit module
45inherit update-rc.d
46INITSCRIPT_NAME = "qat_service"
47
48PARALLEL_MAKE = ""
49
50#To get around the double slashes in paths in QAT makefiles
51PACKAGE_DEBUG_SPLIT_STYLE = "debug-without-src"
52
53do_unpack2() {
54 cd ${S}/
55 tar xzvf ${ICP_DRIVER_TYPE}.L.${PV}.tar.gz
56}
57
58addtask unpack2 after do_unpack before do_patch
59
60do_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
75do_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
104PACKAGES += "${PN}-app"
105
106FILES_${PN}-dev = "${includedir}"
107
108FILES_${PN} += "\
109 ${base_libdir}/firmware/ \
110 ${sysconfdir}/ \
111 ${sysconfdir}/udev/rules.d/ \
112 ${sysconfdir}/init.d/ \
113 ${libdir}/ \
114 "
115
116FILES_${PN}-dbg += "${sysconfdir}/init.d/.debug"
117
118FILES_${PN}-app += "${bindir}/*"
diff --git a/meta-isg/common/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-qat_mem-build-qat_mem-ko-against-yocto-kernel-src.patch b/meta-isg/common/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-qat_mem-build-qat_mem-ko-against-yocto-kernel-src.patch
new file mode 100644
index 0000000..9e774db
--- /dev/null
+++ b/meta-isg/common/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-qat_mem-build-qat_mem-ko-against-yocto-kernel-src.patch
@@ -0,0 +1,51 @@
1From aa65d69632142d24ec44ed4c2d66371e1a1be7b4 Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anujx.mittal@intel.com>
3Date: Thu, 18 Jun 2015 11:56:08 +0800
4Subject: [PATCH] qat_mem: build qat_mem ko against yocto kernel src
5
6Upstream-Status: Inappropriate [Configuration]
7
8This tweaks the kernel source and build path in the makefile
9to make sure the module is built against the right source.
10
11Signed-off-by: Anuj Mittal <anujx.mittal@intel.com>
12---
13 contrib/qat/qat_mem/Makefile | 13 +++++--------
14 1 file changed, 5 insertions(+), 8 deletions(-)
15
16diff --git a/contrib/qat/qat_mem/Makefile b/contrib/qat/qat_mem/Makefile
17index ddf5b59..ad6d4a4 100644
18--- a/contrib/qat/qat_mem/Makefile
19+++ b/contrib/qat/qat_mem/Makefile
20@@ -61,16 +61,10 @@
21 #########################################################################
22
23 MODULENAME := qat_mem
24-KDIR := /lib/modules/$(shell uname -r)/build
25+KDIR := $(KERNEL_SOURCE_ROOT)
26 PWD := $(shell pwd)
27
28-ifeq ($(shell uname -r|grep -c grsec-WR), 1)
29-AUTO_CONF=/lib/modules/$(shell uname -r)/build/include/generated/autoconf.h
30-else
31-AUTO_CONF=/usr/src/kernels/$(shell uname -r)/include/linux/autoconf.h
32-endif
33-
34-CC := gcc -Wall -imacros $(AUTO_CONF)
35+CC := ${CC} -Wall -imacros $(KERNEL_BUILDDIR)/include/generated/autoconf.h
36
37 ifeq ($(KERNELRELEASE),)
38 all: $(MODULENAME)_test
39@@ -80,6 +74,9 @@ else
40 obj-m := $(MODULENAME).o
41 endif
42
43+modules_install:
44+ $(MAKE) -C $(KDIR) M=$(PWD) modules_install
45+
46 $(MODULENAME)_test: $(MODULENAME)_test.c
47 $(CC) -g -o $(MODULENAME)_test $(MODULENAME)_test.c
48
49--
501.7.9.5
51
diff --git a/meta-isg/common/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-Remove-rpaths-from-makefile.patch b/meta-isg/common/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-Remove-rpaths-from-makefile.patch
new file mode 100644
index 0000000..c360511
--- /dev/null
+++ b/meta-isg/common/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-Remove-rpaths-from-makefile.patch
@@ -0,0 +1,52 @@
1From aad2675c7bb635d8b7be47fa89a3ee87ba19d2e8 Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anujx.mittal@intel.com>
3Date: Thu, 18 Jun 2015 11:46:17 +0800
4Subject: [PATCH] zlib: Remove rpaths from makefile
5
6Upstream-Status: Inappropriate [configuration]
7
8This removes references to RPATHS that are no longer
9necesary when building using bitbake.
10
11Signed-off-by: Anuj Mittal <anujx.mittal@intel.com>
12---
13 Makefile.in | 4 ++--
14 contrib/qat/qat_zlib_test/Makefile | 3 ---
15 2 files changed, 2 insertions(+), 5 deletions(-)
16
17diff --git a/Makefile.in b/Makefile.in
18index 94d8a80..cba5291 100644
19--- a/Makefile.in
20+++ b/Makefile.in
21@@ -59,12 +59,12 @@ ICP_LAC_API_DIR=$(ICP_API_DIR)/lac/
22 ICP_DC_API_DIR=$(ICP_API_DIR)/dc/
23 CFLAGS+=-D_GNU_SOURCE -I$(ICP_API_DIR) -I$(ICP_DC_API_DIR) -I$(ICP_LAC_API_DIR) -I$(ICP_SAL_API_DIR)
24 SFLAGS+=-D_GNU_SOURCE -I$(ICP_API_DIR) -I$(ICP_DC_API_DIR) -I$(ICP_LAC_API_DIR) -I$(ICP_SAL_API_DIR)
25-ADDITIONAL_LDFLAGS+=-Wl,-rpath,$(ZLIB_ROOT) -lz
26+#ADDITIONAL_LDFLAGS+=-Wl,-rpath,$(ZLIB_ROOT) -lz
27 SHARED_APP_FLAGS=-Wl,-rpath,$(ZLIB_ROOT) -L$(ZLIB_ROOT) -lz
28
29 ifdef ICP_BUILD_OUTPUT
30 TEST_LDFLAGS+=-L$(ICP_BUILD_OUTPUT)
31- ADDITIONAL_LDFLAGS+=-Wl,-rpath,$(ICP_BUILD_OUTPUT) -L$(ICP_BUILD_OUTPUT)
32+# ADDITIONAL_LDFLAGS+=-Wl,-rpath,$(ICP_BUILD_OUTPUT) -L$(ICP_BUILD_OUTPUT)
33 endif
34
35 ifdef ZLIB_DH895XCC
36diff --git a/contrib/qat/qat_zlib_test/Makefile b/contrib/qat/qat_zlib_test/Makefile
37index 8a29a92..ca31dd2 100644
38--- a/contrib/qat/qat_zlib_test/Makefile
39+++ b/contrib/qat/qat_zlib_test/Makefile
40@@ -84,9 +84,6 @@ OBJS = $(SRCS:%.c=%.o)
41 COVERAGE_OBJS =
42 EXE=
43 LIBQAT=
44-ifdef ICP_BUILD_OUTPUT
45- LIBQAT+= -Wl,-rpath,$(ICP_BUILD_OUTPUT) -L$(ICP_BUILD_OUTPUT)
46-endif
47
48 DRIVER=icp_qa_al
49 ifdef WITH_CPA_MUX
50--
511.7.9.5
52
diff --git a/meta-isg/common/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-qat-add-a-install-target-to-makefile.patch b/meta-isg/common/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-qat-add-a-install-target-to-makefile.patch
new file mode 100644
index 0000000..c7aec55
--- /dev/null
+++ b/meta-isg/common/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-qat-add-a-install-target-to-makefile.patch
@@ -0,0 +1,46 @@
1From d78121d790c4a248bc47d1c662791fe57ac4af38 Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anujx.mittal@intel.com>
3Date: Thu, 18 Jun 2015 11:53:23 +0800
4Subject: [PATCH] zlib-qat: add a install target to makefile
5
6Upstream-Status: Inappropriate [Configuration]
7
8This adds an install target to qat_zlib_test and qat_mem makefiles
9to facilitate the installation of test binaries to {D}.
10
11Signed-off-by: Anuj Mittal <anujx.mittal@intel.com>
12---
13 contrib/qat/qat_mem/Makefile | 3 +++
14 contrib/qat/qat_zlib_test/Makefile | 3 +++
15 2 files changed, 6 insertions(+)
16
17diff --git a/contrib/qat/qat_mem/Makefile b/contrib/qat/qat_mem/Makefile
18index ad6d4a4..e4d77b6 100644
19--- a/contrib/qat/qat_mem/Makefile
20+++ b/contrib/qat/qat_mem/Makefile
21@@ -74,6 +74,9 @@ else
22 obj-m := $(MODULENAME).o
23 endif
24
25+install: modules_install
26+ cp qat_mem_test $(INSTALL_MOD_PATH)$(bindir)
27+
28 modules_install:
29 $(MAKE) -C $(KDIR) M=$(PWD) modules_install
30
31diff --git a/contrib/qat/qat_zlib_test/Makefile b/contrib/qat/qat_zlib_test/Makefile
32index ca31dd2..7da5ddd 100644
33--- a/contrib/qat/qat_zlib_test/Makefile
34+++ b/contrib/qat/qat_zlib_test/Makefile
35@@ -112,5 +112,8 @@ comptestappsh$(EXE): $(OBJS) Makefile
36 $(CC) -o comptestappsh $(OBJS) $(COVERAGE) \
37 $(SHAREDLIBQAT)
38
39+install:
40+ cp comptestapp $(DESTDIR)$(bindir)
41+
42 clean:
43 rm -f $(OBJS) $(COVERAGE_OBJS) comptestapp comptestappsh
44--
451.7.9.5
46
diff --git a/meta-isg/common/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb b/meta-isg/common/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb
new file mode 100644
index 0000000..b3dc19c
--- /dev/null
+++ b/meta-isg/common/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb
@@ -0,0 +1,113 @@
1SUMMARY = "Zlib QAT_MEM Memory Management Module for Intel Quick Assist \
2Technology"
3
4DESCRIPTION = "This software acelerates the data compression algorithm \
5in the zlib software library via the Intel QuickAssist Technology \
6implemented on Intel Communications Chipset 89xx and 895x Series based platforms."
7
8HOMEPAGE = "http://zlib.net/"
9SECTION = "libs"
10LICENSE = "Zlib & GPLv2 & BSD"
11LIC_FILES_CHKSUM = "file://${WORKDIR}/zlib-${ZLIB_VERSION}/zlib.h;beginline=4;endline=23;md5=fde612df1e5933c428b73844a0c494fd \
12 file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6 \
13 file://${COMMON_LICENSE_DIR}/BSD;md5=3775480a712fc46a69647678acb234cb"
14
15# For target side versions of openssl enable support for OCF Linux driver
16# if they are available.
17DEPENDS += "cryptodev-linux pkgconfig virtual/qat"
18
19SRC_URI = "http://www.zlib.net/zlib-${ZLIB_VERSION}.tar.gz;name=zlib \
20 https://01.org/sites/default/files/page/zlib_shim_0.4.7-002_withdocumentation.zip;name=zlibqat \
21 file://zlib-qat-0.4.7-002-qat_mem-build-qat_mem-ko-against-yocto-kernel-src.patch \
22 file://zlib-qat-0.4.7-002-zlib-qat-add-a-install-target-to-makefile.patch \
23 file://zlib-qat-0.4.7-002-zlib-Remove-rpaths-from-makefile.patch \
24 "
25
26SRC_URI[zlib.md5sum] = "44d667c142d7cda120332623eab69f40"
27SRC_URI[zlib.sha256sum] = "36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d"
28
29SRC_URI[zlibqat.md5sum] = "dfde8618198aa8d35ecc00d10dcc7000"
30SRC_URI[zlibqat.sha256sum] = "8e5786400bbc2a879ae705c864ec63b53ae019b4f2d1c94524a97223847b6e46"
31
32COMPATIBLE_MACHINE = "crystalforest"
33
34ZLIB_VERSION = "1.2.8"
35ZLIB_QAT_VERSION = "0.4.7-002"
36
37S = "${WORKDIR}/zlib-${ZLIB_VERSION}"
38
39export ICP_ROOT = "${S}"
40export ZLIB_ROOT = "${S}"
41export KERNEL_SOURCE_ROOT = "${STAGING_KERNEL_DIR}"
42export KERNEL_BUILDDIR = "${STAGING_KERNEL_BUILDDIR}"
43export ICP_LAC_API_DIR = "${STAGING_DIR_TARGET}${includedir}/lac"
44export ICP_DC_API_DIR = "${STAGING_DIR_TARGET}${includedir}/dc"
45export ZLIB_DH895XCC = "1"
46export ZLIB_MEMORY_DRIVER = "qat_mem"
47export ICP_BUILD_OUTPUT = "${STAGING_DIR_TARGET}"
48
49inherit module
50MEM_PATH = "${S}/contrib/qat"
51
52do_unpack2(){
53 cd ${WORKDIR}/
54 unzip zlib_quickassist_patch_l.0.4.7_002_stable.zip
55 cd zlib_quickassist_patch_l.0.4.7_002_devbranch
56 tar -xvzf zlib-1.2.8-qat.L.0.4.7-002.tar.gz
57 cp zlib-1.2.8-qat.patch ${WORKDIR}
58}
59
60addtask unpack2 after do_unpack before do_patch
61
62do_patch() {
63 cd ${S}
64 patch -p1 < ${WORKDIR}/zlib-1.2.8-qat.patch
65 patch -p1 < ${WORKDIR}/zlib-qat-0.4.7-002-qat_mem-build-qat_mem-ko-against-yocto-kernel-src.patch
66 patch -p1 < ${WORKDIR}/zlib-qat-0.4.7-002-zlib-qat-add-a-install-target-to-makefile.patch
67 patch -p1 < ${WORKDIR}/zlib-qat-0.4.7-002-zlib-Remove-rpaths-from-makefile.patch
68}
69
70do_configure() {
71 ./configure --prefix=${prefix} --shared --libdir=${libdir}
72}
73
74do_compile() {
75 unset CFLAGS CXXFLAGS
76 oe_runmake
77
78 cd ${S}/contrib/qat/qat_mem
79 oe_runmake
80
81 cd ${S}/contrib/qat/qat_zlib_test
82 oe_runmake
83}
84
85do_install() {
86 install -m 0755 -d ${D}${bindir}/
87 install -m 0755 -d ${D}${sysconfdir}/zlib_conf/
88
89 install -m 0755 zpipe ${D}${bindir}
90 install -m 0755 minigzip ${D}${bindir}
91
92 cd ${MEM_PATH}/qat_mem
93 oe_runmake INSTALL_MOD_PATH=${D} INSTALL_MOD_DIR="kernel/drivers" install
94
95 cd ${S}/contrib/qat/qat_zlib_test
96 oe_runmake DESTDIR=${D} install
97
98 install -m 660 ${MEM_PATH}/config/dh895xcc/multi_thread_optimized/* ${D}${sysconfdir}/zlib_conf/
99}
100
101PACKAGES += "${PN}-app"
102
103FILES_${PN} += " \
104 ${sysconfdir}/zlib_conf/ \
105 "
106
107FILES_${PN}-app += " \
108 ${bindir}/* \
109 "
110
111FILES_${PN}-dbg += " \
112 ${bindir}/.debug \
113 "