diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2021-10-15 12:02:01 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-15 12:02:01 -0300 |
commit | 9d05232d9a12a52d17039003f8d4b23ac001d378 (patch) | |
tree | 9eea3870c4a5af37b4b7613517008d050bda0738 | |
parent | 2cdfab64a588c7570fe87c0fc3d05f061f2b692c (diff) | |
parent | 93d26c3d784f38b5629f31eb08ae7169c44ccb31 (diff) | |
download | meta-freescale-9d05232d9a12a52d17039003f8d4b23ac001d378.tar.gz |
Merge pull request #888 from ting-liu/master
updates for Layerscape machines
50 files changed, 1027 insertions, 1569 deletions
diff --git a/conf/machine/lx2160ardb.conf b/conf/machine/lx2160ardb.conf index e1a24f84..1945ad31 100644 --- a/conf/machine/lx2160ardb.conf +++ b/conf/machine/lx2160ardb.conf | |||
@@ -28,9 +28,9 @@ SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyS1 115200;ttyAMA0" | |||
28 | SERIAL_CONSOLES_CHECK ?= "${SERIAL_CONSOLES}" | 28 | SERIAL_CONSOLES_CHECK ?= "${SERIAL_CONSOLES}" |
29 | 29 | ||
30 | UEFI_XSPIBOOT ?= "LX2160ARDB_EFI_NORBOOT.fd" | 30 | UEFI_XSPIBOOT ?= "LX2160ARDB_EFI_NORBOOT.fd" |
31 | RCWXSPI ?= "XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2900_19_5_2" | 31 | RCWXSPI ?= "XGGFF_PP_HHHH_RR_19_5_2/rcw_2200_750_3200_19_5_2" |
32 | RCWSD ?= "XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2900_19_5_2" | 32 | RCWSD ?= "XGGFF_PP_HHHH_RR_19_5_2/rcw_2200_750_3200_19_5_2" |
33 | RCWEMMC ?= "XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2900_19_5_2" | 33 | RCWEMMC ?= "XGGFF_PP_HHHH_RR_19_5_2/rcw_2200_750_3200_19_5_2" |
34 | 34 | ||
35 | EXTRA_IMAGEDEPENDS += "management-complex mc-utils rcw ls2-phy ddr-phy uefi qoriq-atf inphi" | 35 | EXTRA_IMAGEDEPENDS += "management-complex mc-utils rcw ls2-phy ddr-phy uefi qoriq-atf inphi" |
36 | USE_VT = "0" | 36 | USE_VT = "0" |
diff --git a/recipes-bsp/atf/files/0001-Clean-usage-of-void-pointers-to-access-symbols.patch b/recipes-bsp/atf/files/0001-Clean-usage-of-void-pointers-to-access-symbols.patch deleted file mode 100644 index e3b6f860..00000000 --- a/recipes-bsp/atf/files/0001-Clean-usage-of-void-pointers-to-access-symbols.patch +++ /dev/null | |||
@@ -1,709 +0,0 @@ | |||
1 | From 9f85f9e3796f1c351bbc4c8436dc66d83c140b71 Mon Sep 17 00:00:00 2001 | ||
2 | From: Joel Hutton <Joel.Hutton@Arm.com> | ||
3 | Date: Wed, 21 Mar 2018 11:40:57 +0000 | ||
4 | Subject: [PATCH] Clean usage of void pointers to access symbols | ||
5 | |||
6 | Void pointers have been used to access linker symbols, by declaring an | ||
7 | extern pointer, then taking the address of it. This limits symbols | ||
8 | values to aligned pointer values. To remove this restriction an | ||
9 | IMPORT_SYM macro has been introduced, which declares it as a char | ||
10 | pointer and casts it to the required type. | ||
11 | |||
12 | Upstream-Status: Backport | ||
13 | |||
14 | Change-Id: I89877fc3b13ed311817bb8ba79d4872b89bfd3b0 | ||
15 | Signed-off-by: Joel Hutton <Joel.Hutton@Arm.com> | ||
16 | --- | ||
17 | bl1/bl1_private.h | 12 +++---- | ||
18 | common/runtime_svc.c | 4 +-- | ||
19 | drivers/auth/img_parser_mod.c | 9 +++--- | ||
20 | include/common/bl_common.h | 32 ++++++++++++------- | ||
21 | include/common/runtime_svc.h | 4 +-- | ||
22 | include/lib/utils_def.h | 19 ++++++++++- | ||
23 | include/plat/common/common_def.h | 24 ++------------ | ||
24 | include/services/secure_partition.h | 12 +++---- | ||
25 | lib/locks/bakery/bakery_lock_normal.c | 6 ++-- | ||
26 | lib/pmf/pmf_main.c | 19 +++++------ | ||
27 | plat/hisilicon/hikey/hikey_bl1_setup.c | 21 ++----------- | ||
28 | plat/hisilicon/hikey960/hikey960_bl1_setup.c | 16 ++-------- | ||
29 | plat/hisilicon/poplar/bl1_plat_setup.c | 13 ++------ | ||
30 | plat/mediatek/mt6795/bl31_plat_setup.c | 11 +++---- | ||
31 | plat/mediatek/mt8173/bl31_plat_setup.c | 28 +++-------------- | ||
32 | plat/nvidia/tegra/common/tegra_bl31_setup.c | 33 +++++++------------- | ||
33 | plat/rockchip/common/bl31_plat_setup.c | 13 ++------ | ||
34 | services/std_svc/spm/spm_shim_private.h | 14 +++------ | ||
35 | 18 files changed, 103 insertions(+), 187 deletions(-) | ||
36 | |||
37 | diff --git a/bl1/bl1_private.h b/bl1/bl1_private.h | ||
38 | index 6ac3b8c67..42a74d22f 100644 | ||
39 | --- a/bl1/bl1_private.h | ||
40 | +++ b/bl1/bl1_private.h | ||
41 | @@ -1,5 +1,5 @@ | ||
42 | /* | ||
43 | - * Copyright (c) 2013-2016, ARM Limited and Contributors. All rights reserved. | ||
44 | + * Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved. | ||
45 | * | ||
46 | * SPDX-License-Identifier: BSD-3-Clause | ||
47 | */ | ||
48 | @@ -8,18 +8,16 @@ | ||
49 | #define __BL1_PRIVATE_H__ | ||
50 | |||
51 | #include <types.h> | ||
52 | +#include <utils_def.h> | ||
53 | |||
54 | /******************************************************************************* | ||
55 | * Declarations of linker defined symbols which will tell us where BL1 lives | ||
56 | * in Trusted ROM and RAM | ||
57 | ******************************************************************************/ | ||
58 | -extern uintptr_t __BL1_ROM_END__; | ||
59 | -#define BL1_ROM_END (uintptr_t)(&__BL1_ROM_END__) | ||
60 | +IMPORT_SYM(uintptr_t, __BL1_ROM_END__, BL1_ROM_END); | ||
61 | |||
62 | -extern uintptr_t __BL1_RAM_START__; | ||
63 | -extern uintptr_t __BL1_RAM_END__; | ||
64 | -#define BL1_RAM_BASE (uintptr_t)(&__BL1_RAM_START__) | ||
65 | -#define BL1_RAM_LIMIT (uintptr_t)(&__BL1_RAM_END__) | ||
66 | +IMPORT_SYM(uintptr_t, __BL1_RAM_START__, BL1_RAM_BASE); | ||
67 | +IMPORT_SYM(uintptr_t, __BL1_RAM_END__, BL1_RAM_LIMIT); | ||
68 | |||
69 | /****************************************** | ||
70 | * Function prototypes | ||
71 | diff --git a/common/runtime_svc.c b/common/runtime_svc.c | ||
72 | index 0ea4cd093..de80f30c2 100644 | ||
73 | --- a/common/runtime_svc.c | ||
74 | +++ b/common/runtime_svc.c | ||
75 | @@ -1,5 +1,5 @@ | ||
76 | /* | ||
77 | - * Copyright (c) 2013-2017, ARM Limited and Contributors. All rights reserved. | ||
78 | + * Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved. | ||
79 | * | ||
80 | * SPDX-License-Identifier: BSD-3-Clause | ||
81 | */ | ||
82 | @@ -19,8 +19,6 @@ | ||
83 | * 'rt_svc_descs_indices' array. This gives the index of the descriptor in the | ||
84 | * 'rt_svc_descs' array which contains the SMC handler. | ||
85 | ******************************************************************************/ | ||
86 | -#define RT_SVC_DESCS_START ((uintptr_t) (&__RT_SVC_DESCS_START__)) | ||
87 | -#define RT_SVC_DESCS_END ((uintptr_t) (&__RT_SVC_DESCS_END__)) | ||
88 | uint8_t rt_svc_descs_indices[MAX_RT_SVCS]; | ||
89 | static rt_svc_desc_t *rt_svc_descs; | ||
90 | |||
91 | diff --git a/drivers/auth/img_parser_mod.c b/drivers/auth/img_parser_mod.c | ||
92 | index 6a0107115..63160141d 100644 | ||
93 | --- a/drivers/auth/img_parser_mod.c | ||
94 | +++ b/drivers/auth/img_parser_mod.c | ||
95 | @@ -1,5 +1,5 @@ | ||
96 | /* | ||
97 | - * Copyright (c) 2015, ARM Limited and Contributors. All rights reserved. | ||
98 | + * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved. | ||
99 | * | ||
100 | * SPDX-License-Identifier: BSD-3-Clause | ||
101 | */ | ||
102 | @@ -12,11 +12,10 @@ | ||
103 | #include <limits.h> | ||
104 | #include <stdint.h> | ||
105 | #include <string.h> | ||
106 | +#include <utils_def.h> | ||
107 | |||
108 | -extern uintptr_t __PARSER_LIB_DESCS_START__; | ||
109 | -extern uintptr_t __PARSER_LIB_DESCS_END__; | ||
110 | -#define PARSER_LIB_DESCS_START ((uintptr_t) (&__PARSER_LIB_DESCS_START__)) | ||
111 | -#define PARSER_LIB_DESCS_END ((uintptr_t) (&__PARSER_LIB_DESCS_END__)) | ||
112 | +IMPORT_SYM(uintptr_t, __PARSER_LIB_DESCS_START__, PARSER_LIB_DESCS_START); | ||
113 | +IMPORT_SYM(uintptr_t, __PARSER_LIB_DESCS_END__, PARSER_LIB_DESCS_END); | ||
114 | static unsigned int parser_lib_indices[IMG_MAX_TYPES]; | ||
115 | static img_parser_lib_desc_t *parser_lib_descs; | ||
116 | |||
117 | diff --git a/include/common/bl_common.h b/include/common/bl_common.h | ||
118 | index 4ef916f53..09a394dd1 100644 | ||
119 | --- a/include/common/bl_common.h | ||
120 | +++ b/include/common/bl_common.h | ||
121 | @@ -64,33 +64,41 @@ | ||
122 | #include <types.h> | ||
123 | #include <utils_def.h> /* To retain compatibility */ | ||
124 | |||
125 | + | ||
126 | /* | ||
127 | * Declarations of linker defined symbols to help determine memory layout of | ||
128 | * BL images | ||
129 | */ | ||
130 | #if SEPARATE_CODE_AND_RODATA | ||
131 | -extern uintptr_t __TEXT_START__; | ||
132 | -extern uintptr_t __TEXT_END__; | ||
133 | -extern uintptr_t __RODATA_START__; | ||
134 | -extern uintptr_t __RODATA_END__; | ||
135 | +IMPORT_SYM(unsigned long, __TEXT_START__, BL_CODE_BASE); | ||
136 | +IMPORT_SYM(unsigned long, __TEXT_END__, BL_CODE_END); | ||
137 | +IMPORT_SYM(unsigned long, __RODATA_START__, BL_RO_DATA_BASE); | ||
138 | +IMPORT_SYM(unsigned long, __RODATA_END__, BL_RO_DATA_END); | ||
139 | #else | ||
140 | -extern uintptr_t __RO_START__; | ||
141 | -extern uintptr_t __RO_END__; | ||
142 | +IMPORT_SYM(unsigned long, __RO_START__, BL_CODE_BASE); | ||
143 | +IMPORT_SYM(unsigned long, __RO_END__, BL_CODE_END); | ||
144 | #endif | ||
145 | |||
146 | #if defined(IMAGE_BL2) | ||
147 | -extern uintptr_t __BL2_END__; | ||
148 | +IMPORT_SYM(unsigned long, __BL2_END__, BL2_END); | ||
149 | #elif defined(IMAGE_BL2U) | ||
150 | -extern uintptr_t __BL2U_END__; | ||
151 | +IMPORT_SYM(unsigned long, __BL2U_END__, BL2U_END); | ||
152 | #elif defined(IMAGE_BL31) | ||
153 | -extern uintptr_t __BL31_END__; | ||
154 | +IMPORT_SYM(unsigned long, __BL31_END__, BL31_END); | ||
155 | #elif defined(IMAGE_BL32) | ||
156 | -extern uintptr_t __BL32_END__; | ||
157 | +IMPORT_SYM(unsigned long, __BL32_END__, BL32_END); | ||
158 | #endif /* IMAGE_BLX */ | ||
159 | |||
160 | +/* | ||
161 | + * The next 2 constants identify the extents of the coherent memory region. | ||
162 | + * These addresses are used by the MMU setup code and therefore they must be | ||
163 | + * page-aligned. It is the responsibility of the linker script to ensure that | ||
164 | + * __COHERENT_RAM_START__ and __COHERENT_RAM_END__ linker symbols refer to | ||
165 | + * page-aligned addresses. | ||
166 | + */ | ||
167 | #if USE_COHERENT_MEM | ||
168 | -extern uintptr_t __COHERENT_RAM_START__; | ||
169 | -extern uintptr_t __COHERENT_RAM_END__; | ||
170 | +IMPORT_SYM(unsigned long, __COHERENT_RAM_START__, BL_COHERENT_RAM_BASE); | ||
171 | +IMPORT_SYM(unsigned long, __COHERENT_RAM_END__, BL_COHERENT_RAM_END); | ||
172 | #endif | ||
173 | |||
174 | /******************************************************************************* | ||
175 | diff --git a/include/common/runtime_svc.h b/include/common/runtime_svc.h | ||
176 | index d12af227e..5d9fa3908 100644 | ||
177 | --- a/include/common/runtime_svc.h | ||
178 | +++ b/include/common/runtime_svc.h | ||
179 | @@ -122,8 +122,8 @@ CASSERT(RT_SVC_DESC_HANDLE == __builtin_offsetof(rt_svc_desc_t, handle), \ | ||
180 | void runtime_svc_init(void); | ||
181 | uintptr_t handle_runtime_svc(uint32_t smc_fid, void *cookie, void *handle, | ||
182 | unsigned int flags); | ||
183 | -extern uintptr_t __RT_SVC_DESCS_START__; | ||
184 | -extern uintptr_t __RT_SVC_DESCS_END__; | ||
185 | +IMPORT_SYM(uintptr_t, __RT_SVC_DESCS_START__, RT_SVC_DESCS_START); | ||
186 | +IMPORT_SYM(uintptr_t, __RT_SVC_DESCS_END__, RT_SVC_DESCS_END); | ||
187 | void init_crash_reporting(void); | ||
188 | |||
189 | extern uint8_t rt_svc_descs_indices[MAX_RT_SVCS]; | ||
190 | diff --git a/include/lib/utils_def.h b/include/lib/utils_def.h | ||
191 | index 4a5c3e0bc..8abc73c09 100644 | ||
192 | --- a/include/lib/utils_def.h | ||
193 | +++ b/include/lib/utils_def.h | ||
194 | @@ -1,5 +1,5 @@ | ||
195 | /* | ||
196 | - * Copyright (c) 2016-2017, ARM Limited and Contributors. All rights reserved. | ||
197 | + * Copyright (c) 2016-2018, ARM Limited and Contributors. All rights reserved. | ||
198 | * | ||
199 | * SPDX-License-Identifier: BSD-3-Clause | ||
200 | */ | ||
201 | @@ -99,4 +99,21 @@ | ||
202 | ((ARM_ARCH_MAJOR > _maj) || \ | ||
203 | ((ARM_ARCH_MAJOR == _maj) && (ARM_ARCH_MINOR >= _min))) | ||
204 | |||
205 | +/* | ||
206 | + * Import an assembly or linker symbol as a C expression with the specified | ||
207 | + * type | ||
208 | + */ | ||
209 | +#define IMPORT_SYM(type, sym, name) \ | ||
210 | + extern char sym[];\ | ||
211 | + static const __attribute__((unused)) type name = (type) sym; | ||
212 | + | ||
213 | +/* | ||
214 | + * When the symbol is used to hold a pointer, its alignment can be asserted | ||
215 | + * with this macro. For example, if there is a linker symbol that is going to | ||
216 | + * be used as a 64-bit pointer, the value of the linker symbol must also be | ||
217 | + * aligned to 64 bit. This macro makes sure this is the case. | ||
218 | + */ | ||
219 | +#define ASSERT_SYM_PTR_ALIGN(sym) assert(((size_t)(sym) % __alignof__(*(sym))) == 0) | ||
220 | + | ||
221 | + | ||
222 | #endif /* __UTILS_DEF_H__ */ | ||
223 | diff --git a/include/plat/common/common_def.h b/include/plat/common/common_def.h | ||
224 | index a841c3dbf..84923b9a7 100644 | ||
225 | --- a/include/plat/common/common_def.h | ||
226 | +++ b/include/plat/common/common_def.h | ||
227 | @@ -1,5 +1,5 @@ | ||
228 | /* | ||
229 | - * Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved. | ||
230 | + * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved. | ||
231 | * | ||
232 | * SPDX-License-Identifier: BSD-3-Clause | ||
233 | */ | ||
234 | @@ -74,33 +74,13 @@ | ||
235 | * page of it with the right memory attributes. | ||
236 | */ | ||
237 | #if SEPARATE_CODE_AND_RODATA | ||
238 | -#define BL_CODE_BASE (unsigned long)(&__TEXT_START__) | ||
239 | -#define BL_CODE_END (unsigned long)(&__TEXT_END__) | ||
240 | -#define BL_RO_DATA_BASE (unsigned long)(&__RODATA_START__) | ||
241 | -#define BL_RO_DATA_END (unsigned long)(&__RODATA_END__) | ||
242 | |||
243 | #define BL1_CODE_END BL_CODE_END | ||
244 | -#define BL1_RO_DATA_BASE (unsigned long)(&__RODATA_START__) | ||
245 | +#define BL1_RO_DATA_BASE BL_RO_DATA_BASE | ||
246 | #define BL1_RO_DATA_END round_up(BL1_ROM_END, PAGE_SIZE) | ||
247 | #else | ||
248 | -#define BL_CODE_BASE (unsigned long)(&__RO_START__) | ||
249 | -#define BL_CODE_END (unsigned long)(&__RO_END__) | ||
250 | #define BL_RO_DATA_BASE 0 | ||
251 | #define BL_RO_DATA_END 0 | ||
252 | - | ||
253 | #define BL1_CODE_END round_up(BL1_ROM_END, PAGE_SIZE) | ||
254 | -#define BL1_RO_DATA_BASE 0 | ||
255 | -#define BL1_RO_DATA_END 0 | ||
256 | #endif /* SEPARATE_CODE_AND_RODATA */ | ||
257 | - | ||
258 | -/* | ||
259 | - * The next 2 constants identify the extents of the coherent memory region. | ||
260 | - * These addresses are used by the MMU setup code and therefore they must be | ||
261 | - * page-aligned. It is the responsibility of the linker script to ensure that | ||
262 | - * __COHERENT_RAM_START__ and __COHERENT_RAM_END__ linker symbols refer to | ||
263 | - * page-aligned addresses. | ||
264 | - */ | ||
265 | -#define BL_COHERENT_RAM_BASE (unsigned long)(&__COHERENT_RAM_START__) | ||
266 | -#define BL_COHERENT_RAM_END (unsigned long)(&__COHERENT_RAM_END__) | ||
267 | - | ||
268 | #endif /* __COMMON_DEF_H__ */ | ||
269 | diff --git a/include/services/secure_partition.h b/include/services/secure_partition.h | ||
270 | index 93df2a137..f68f711be 100644 | ||
271 | --- a/include/services/secure_partition.h | ||
272 | +++ b/include/services/secure_partition.h | ||
273 | @@ -1,5 +1,5 @@ | ||
274 | /* | ||
275 | - * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. | ||
276 | + * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved. | ||
277 | * | ||
278 | * SPDX-License-Identifier: BSD-3-Clause | ||
279 | */ | ||
280 | @@ -11,15 +11,11 @@ | ||
281 | #include <types.h> | ||
282 | #include <utils_def.h> | ||
283 | |||
284 | -/* Linker symbols */ | ||
285 | -extern uintptr_t __SP_IMAGE_XLAT_TABLES_START__; | ||
286 | -extern uintptr_t __SP_IMAGE_XLAT_TABLES_END__; | ||
287 | +/* Import linker symbols */ | ||
288 | +IMPORT_SYM(uintptr_t, __SP_IMAGE_XLAT_TABLES_START__, SP_IMAGE_XLAT_TABLES_START); | ||
289 | +IMPORT_SYM(uintptr_t, __SP_IMAGE_XLAT_TABLES_END__, SP_IMAGE_XLAT_TABLES_END); | ||
290 | |||
291 | /* Definitions */ | ||
292 | -#define SP_IMAGE_XLAT_TABLES_START \ | ||
293 | - (uintptr_t)(&__SP_IMAGE_XLAT_TABLES_START__) | ||
294 | -#define SP_IMAGE_XLAT_TABLES_END \ | ||
295 | - (uintptr_t)(&__SP_IMAGE_XLAT_TABLES_END__) | ||
296 | #define SP_IMAGE_XLAT_TABLES_SIZE \ | ||
297 | (SP_IMAGE_XLAT_TABLES_END - SP_IMAGE_XLAT_TABLES_START) | ||
298 | |||
299 | diff --git a/lib/locks/bakery/bakery_lock_normal.c b/lib/locks/bakery/bakery_lock_normal.c | ||
300 | index 8f59215e3..37697f521 100644 | ||
301 | --- a/lib/locks/bakery/bakery_lock_normal.c | ||
302 | +++ b/lib/locks/bakery/bakery_lock_normal.c | ||
303 | @@ -1,5 +1,5 @@ | ||
304 | /* | ||
305 | - * Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved. | ||
306 | + * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved. | ||
307 | * | ||
308 | * SPDX-License-Identifier: BSD-3-Clause | ||
309 | */ | ||
310 | @@ -10,6 +10,7 @@ | ||
311 | #include <cpu_data.h> | ||
312 | #include <platform.h> | ||
313 | #include <string.h> | ||
314 | +#include <utils_def.h> | ||
315 | |||
316 | /* | ||
317 | * Functions in this file implement Bakery Algorithm for mutual exclusion with the | ||
318 | @@ -49,8 +50,7 @@ CASSERT((PLAT_PERCPU_BAKERY_LOCK_SIZE & (CACHE_WRITEBACK_GRANULE - 1)) == 0, \ | ||
319 | * Use the linker defined symbol which has evaluated the size reqiurement. | ||
320 | * This is not as efficient as using a platform defined constant | ||
321 | */ | ||
322 | -extern void *__PERCPU_BAKERY_LOCK_SIZE__; | ||
323 | -#define PERCPU_BAKERY_LOCK_SIZE ((uintptr_t)&__PERCPU_BAKERY_LOCK_SIZE__) | ||
324 | +IMPORT_SYM(uintptr_t, __PERCPU_BAKERY_LOCK_SIZE__, PERCPU_BAKERY_LOCK_SIZE); | ||
325 | #endif | ||
326 | |||
327 | #define get_bakery_info(cpu_ix, lock) \ | ||
328 | diff --git a/lib/pmf/pmf_main.c b/lib/pmf/pmf_main.c | ||
329 | index 2cf260ec1..0208948fe 100644 | ||
330 | --- a/lib/pmf/pmf_main.c | ||
331 | +++ b/lib/pmf/pmf_main.c | ||
332 | @@ -1,5 +1,5 @@ | ||
333 | /* | ||
334 | - * Copyright (c) 2016, ARM Limited and Contributors. All rights reserved. | ||
335 | + * Copyright (c) 2016-2018, ARM Limited and Contributors. All rights reserved. | ||
336 | * | ||
337 | * SPDX-License-Identifier: BSD-3-Clause | ||
338 | */ | ||
339 | @@ -11,6 +11,7 @@ | ||
340 | #include <platform.h> | ||
341 | #include <pmf.h> | ||
342 | #include <string.h> | ||
343 | +#include <utils_def.h> | ||
344 | |||
345 | /******************************************************************************* | ||
346 | * The 'pmf_svc_descs' array holds the PMF service descriptors exported by | ||
347 | @@ -21,16 +22,12 @@ | ||
348 | * index of the descriptor in the 'pmf_svc_descs' array which contains the | ||
349 | * service function pointers. | ||
350 | ******************************************************************************/ | ||
351 | -extern uintptr_t __PMF_SVC_DESCS_START__; | ||
352 | -extern uintptr_t __PMF_SVC_DESCS_END__; | ||
353 | -#define PMF_SVC_DESCS_START ((uintptr_t)(&__PMF_SVC_DESCS_START__)) | ||
354 | -#define PMF_SVC_DESCS_END ((uintptr_t)(&__PMF_SVC_DESCS_END__)) | ||
355 | -extern void *__PERCPU_TIMESTAMP_SIZE__; | ||
356 | -#define PMF_PERCPU_TIMESTAMP_SIZE ((uintptr_t)&__PERCPU_TIMESTAMP_SIZE__) | ||
357 | -extern uintptr_t __PMF_TIMESTAMP_START__; | ||
358 | -#define PMF_TIMESTAMP_ARRAY_START ((uintptr_t)&__PMF_TIMESTAMP_START__) | ||
359 | -extern uintptr_t __PMF_TIMESTAMP_END__; | ||
360 | -#define PMF_TIMESTAMP_ARRAY_END ((uintptr_t)&__PMF_TIMESTAMP_END__) | ||
361 | + | ||
362 | +IMPORT_SYM(uintptr_t, __PMF_SVC_DESCS_START__, PMF_SVC_DESCS_START); | ||
363 | +IMPORT_SYM(uintptr_t, __PMF_SVC_DESCS_END__, PMF_SVC_DESCS_END); | ||
364 | +IMPORT_SYM(uintptr_t, __PERCPU_TIMESTAMP_SIZE__, PMF_PERCPU_TIMESTAMP_SIZE); | ||
365 | +IMPORT_SYM(intptr_t, __PMF_TIMESTAMP_START__, PMF_TIMESTAMP_ARRAY_START); | ||
366 | +IMPORT_SYM(uintptr_t, __PMF_TIMESTAMP_END__, PMF_TIMESTAMP_ARRAY_END); | ||
367 | |||
368 | #define PMF_SVC_DESCS_MAX 10 | ||
369 | |||
370 | diff --git a/plat/hisilicon/hikey/hikey_bl1_setup.c b/plat/hisilicon/hikey/hikey_bl1_setup.c | ||
371 | index 69b194a53..9ede1dbc7 100644 | ||
372 | --- a/plat/hisilicon/hikey/hikey_bl1_setup.c | ||
373 | +++ b/plat/hisilicon/hikey/hikey_bl1_setup.c | ||
374 | @@ -23,23 +23,6 @@ | ||
375 | #include "hikey_def.h" | ||
376 | #include "hikey_private.h" | ||
377 | |||
378 | -/* | ||
379 | - * Declarations of linker defined symbols which will help us find the layout | ||
380 | - * of trusted RAM | ||
381 | - */ | ||
382 | -extern unsigned long __COHERENT_RAM_START__; | ||
383 | -extern unsigned long __COHERENT_RAM_END__; | ||
384 | - | ||
385 | -/* | ||
386 | - * The next 2 constants identify the extents of the coherent memory region. | ||
387 | - * These addresses are used by the MMU setup code and therefore they must be | ||
388 | - * page-aligned. It is the responsibility of the linker script to ensure that | ||
389 | - * __COHERENT_RAM_START__ and __COHERENT_RAM_END__ linker symbols refer to | ||
390 | - * page-aligned addresses. | ||
391 | - */ | ||
392 | -#define BL1_COHERENT_RAM_BASE (unsigned long)(&__COHERENT_RAM_START__) | ||
393 | -#define BL1_COHERENT_RAM_LIMIT (unsigned long)(&__COHERENT_RAM_END__) | ||
394 | - | ||
395 | /* Data structure which holds the extents of the trusted RAM for BL1 */ | ||
396 | static meminfo_t bl1_tzram_layout; | ||
397 | |||
398 | @@ -103,8 +86,8 @@ void bl1_plat_arch_setup(void) | ||
399 | bl1_tzram_layout.total_size, | ||
400 | BL1_RO_BASE, | ||
401 | BL1_RO_LIMIT, | ||
402 | - BL1_COHERENT_RAM_BASE, | ||
403 | - BL1_COHERENT_RAM_LIMIT); | ||
404 | + BL_COHERENT_RAM_BASE, | ||
405 | + BL_COHERENT_RAM_END); | ||
406 | } | ||
407 | |||
408 | /* | ||
409 | diff --git a/plat/hisilicon/hikey960/hikey960_bl1_setup.c b/plat/hisilicon/hikey960/hikey960_bl1_setup.c | ||
410 | index 9cadba0bb..6a07f0924 100644 | ||
411 | --- a/plat/hisilicon/hikey960/hikey960_bl1_setup.c | ||
412 | +++ b/plat/hisilicon/hikey960/hikey960_bl1_setup.c | ||
413 | @@ -37,18 +37,6 @@ enum { | ||
414 | * Declarations of linker defined symbols which will help us find the layout | ||
415 | * of trusted RAM | ||
416 | */ | ||
417 | -extern unsigned long __COHERENT_RAM_START__; | ||
418 | -extern unsigned long __COHERENT_RAM_END__; | ||
419 | - | ||
420 | -/* | ||
421 | - * The next 2 constants identify the extents of the coherent memory region. | ||
422 | - * These addresses are used by the MMU setup code and therefore they must be | ||
423 | - * page-aligned. It is the responsibility of the linker script to ensure that | ||
424 | - * __COHERENT_RAM_START__ and __COHERENT_RAM_END__ linker symbols refer to | ||
425 | - * page-aligned addresses. | ||
426 | - */ | ||
427 | -#define BL1_COHERENT_RAM_BASE (unsigned long)(&__COHERENT_RAM_START__) | ||
428 | -#define BL1_COHERENT_RAM_LIMIT (unsigned long)(&__COHERENT_RAM_END__) | ||
429 | |||
430 | /* Data structure which holds the extents of the trusted RAM for BL1 */ | ||
431 | static meminfo_t bl1_tzram_layout; | ||
432 | @@ -131,8 +119,8 @@ void bl1_plat_arch_setup(void) | ||
433 | bl1_tzram_layout.total_size, | ||
434 | BL1_RO_BASE, | ||
435 | BL1_RO_LIMIT, | ||
436 | - BL1_COHERENT_RAM_BASE, | ||
437 | - BL1_COHERENT_RAM_LIMIT); | ||
438 | + BL_COHERENT_RAM_BASE, | ||
439 | + BL_COHERENT_RAM_END); | ||
440 | } | ||
441 | |||
442 | static void hikey960_ufs_reset(void) | ||
443 | diff --git a/plat/hisilicon/poplar/bl1_plat_setup.c b/plat/hisilicon/poplar/bl1_plat_setup.c | ||
444 | index 39551135f..25eed5938 100644 | ||
445 | --- a/plat/hisilicon/poplar/bl1_plat_setup.c | ||
446 | +++ b/plat/hisilicon/poplar/bl1_plat_setup.c | ||
447 | @@ -1,5 +1,5 @@ | ||
448 | /* | ||
449 | - * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. | ||
450 | + * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved. | ||
451 | * | ||
452 | * SPDX-License-Identifier: BSD-3-Clause | ||
453 | */ | ||
454 | @@ -23,13 +23,6 @@ | ||
455 | #include "hi3798cv200.h" | ||
456 | #include "plat_private.h" | ||
457 | |||
458 | -/* Symbols from link script for conherent section */ | ||
459 | -extern unsigned long __COHERENT_RAM_START__; | ||
460 | -extern unsigned long __COHERENT_RAM_END__; | ||
461 | - | ||
462 | -#define BL1_COHERENT_RAM_BASE (unsigned long)(&__COHERENT_RAM_START__) | ||
463 | -#define BL1_COHERENT_RAM_LIMIT (unsigned long)(&__COHERENT_RAM_END__) | ||
464 | - | ||
465 | /* Data structure which holds the extents of the trusted RAM for BL1 */ | ||
466 | static meminfo_t bl1_tzram_layout; | ||
467 | |||
468 | @@ -92,8 +85,8 @@ void bl1_plat_arch_setup(void) | ||
469 | bl1_tzram_layout.total_size, | ||
470 | BL1_RO_BASE, /* l-loader and BL1 ROM */ | ||
471 | BL1_RO_LIMIT, | ||
472 | - BL1_COHERENT_RAM_BASE, | ||
473 | - BL1_COHERENT_RAM_LIMIT); | ||
474 | + BL_COHERENT_RAM_BASE, | ||
475 | + BL_COHERENT_RAM_END); | ||
476 | } | ||
477 | |||
478 | void bl1_platform_setup(void) | ||
479 | diff --git a/plat/mediatek/mt6795/bl31_plat_setup.c b/plat/mediatek/mt6795/bl31_plat_setup.c | ||
480 | index 803f1ed85..32f015721 100644 | ||
481 | --- a/plat/mediatek/mt6795/bl31_plat_setup.c | ||
482 | +++ b/plat/mediatek/mt6795/bl31_plat_setup.c | ||
483 | @@ -1,5 +1,5 @@ | ||
484 | /* | ||
485 | - * Copyright (c) 2016-2017, ARM Limited and Contributors. All rights reserved. | ||
486 | + * Copyright (c) 2016-2018, ARM Limited and Contributors. All rights reserved. | ||
487 | * | ||
488 | * SPDX-License-Identifier: BSD-3-Clause | ||
489 | */ | ||
490 | @@ -21,22 +21,21 @@ | ||
491 | #include <plat_private.h> | ||
492 | #include <platform.h> | ||
493 | #include <string.h> | ||
494 | +#include <utils_def.h> | ||
495 | #include <xlat_tables.h> | ||
496 | + | ||
497 | /******************************************************************************* | ||
498 | * Declarations of linker defined symbols which will help us find the layout | ||
499 | * of trusted SRAM | ||
500 | ******************************************************************************/ | ||
501 | -unsigned long __RO_START__; | ||
502 | -unsigned long __RO_END__; | ||
503 | - | ||
504 | /* | ||
505 | * The next 2 constants identify the extents of the code & RO data region. | ||
506 | * These addresses are used by the MMU setup code and therefore they must be | ||
507 | * page-aligned. It is the responsibility of the linker script to ensure that | ||
508 | * __RO_START__ and __RO_END__ linker symbols refer to page-aligned addresses. | ||
509 | */ | ||
510 | -#define BL31_RO_BASE (unsigned long)(&__RO_START__) | ||
511 | -#define BL31_RO_LIMIT (unsigned long)(&__RO_END__) | ||
512 | +IMPORT_SYM(unsigned long, __RO_START__, BL31_RO_BASE); | ||
513 | +IMPORT_SYM(unsigned long, __RO_END__, BL31_RO_LIMIT); | ||
514 | |||
515 | /* | ||
516 | * Placeholder variables for copying the arguments that have been passed to | ||
517 | diff --git a/plat/mediatek/mt8173/bl31_plat_setup.c b/plat/mediatek/mt8173/bl31_plat_setup.c | ||
518 | index 7b2930771..e51bdbb9e 100644 | ||
519 | --- a/plat/mediatek/mt8173/bl31_plat_setup.c | ||
520 | +++ b/plat/mediatek/mt8173/bl31_plat_setup.c | ||
521 | @@ -1,5 +1,5 @@ | ||
522 | /* | ||
523 | - * Copyright (c) 2013-2016, ARM Limited and Contributors. All rights reserved. | ||
524 | + * Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved. | ||
525 | * | ||
526 | * SPDX-License-Identifier: BSD-3-Clause | ||
527 | */ | ||
528 | @@ -17,24 +17,6 @@ | ||
529 | #include <platform.h> | ||
530 | #include <spm.h> | ||
531 | |||
532 | -/******************************************************************************* | ||
533 | - * Declarations of linker defined symbols which will help us find the layout | ||
534 | - * of trusted SRAM | ||
535 | - ******************************************************************************/ | ||
536 | -unsigned long __RO_START__; | ||
537 | -unsigned long __RO_END__; | ||
538 | - | ||
539 | -/* | ||
540 | - * The next 3 constants identify the extents of the code, RO data region and the | ||
541 | - * limit of the BL31 image. These addresses are used by the MMU setup code and | ||
542 | - * therefore they must be page-aligned. It is the responsibility of the linker | ||
543 | - * script to ensure that __RO_START__, __RO_END__ & __BL31_END__ linker symbols | ||
544 | - * refer to page-aligned addresses. | ||
545 | - */ | ||
546 | -#define BL31_RO_BASE (unsigned long)(&__RO_START__) | ||
547 | -#define BL31_RO_LIMIT (unsigned long)(&__RO_END__) | ||
548 | -#define BL31_END (unsigned long)(&__BL31_END__) | ||
549 | - | ||
550 | static entry_point_info_t bl32_ep_info; | ||
551 | static entry_point_info_t bl33_ep_info; | ||
552 | |||
553 | @@ -156,10 +138,10 @@ void bl31_plat_arch_setup(void) | ||
554 | plat_cci_init(); | ||
555 | plat_cci_enable(); | ||
556 | |||
557 | - plat_configure_mmu_el3(BL31_RO_BASE, | ||
558 | - BL_COHERENT_RAM_END - BL31_RO_BASE, | ||
559 | - BL31_RO_BASE, | ||
560 | - BL31_RO_LIMIT, | ||
561 | + plat_configure_mmu_el3(BL_CODE_BASE, | ||
562 | + BL_COHERENT_RAM_END - BL_CODE_BASE, | ||
563 | + BL_CODE_BASE, | ||
564 | + BL_CODE_END, | ||
565 | BL_COHERENT_RAM_BASE, | ||
566 | BL_COHERENT_RAM_END); | ||
567 | } | ||
568 | diff --git a/plat/nvidia/tegra/common/tegra_bl31_setup.c b/plat/nvidia/tegra/common/tegra_bl31_setup.c | ||
569 | index d89ad7b94..2fe4e7dbc 100644 | ||
570 | --- a/plat/nvidia/tegra/common/tegra_bl31_setup.c | ||
571 | +++ b/plat/nvidia/tegra/common/tegra_bl31_setup.c | ||
572 | @@ -1,5 +1,5 @@ | ||
573 | /* | ||
574 | - * Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved. | ||
575 | + * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved. | ||
576 | * | ||
577 | * SPDX-License-Identifier: BSD-3-Clause | ||
578 | */ | ||
579 | @@ -23,6 +23,7 @@ | ||
580 | #include <string.h> | ||
581 | #include <tegra_def.h> | ||
582 | #include <tegra_private.h> | ||
583 | +#include <utils_def.h> | ||
584 | |||
585 | /* length of Trusty's input parameters (in bytes) */ | ||
586 | #define TRUSTY_PARAMS_LEN_BYTES (4096*2) | ||
587 | @@ -33,29 +34,17 @@ extern void zeromem16(void *mem, unsigned int length); | ||
588 | * Declarations of linker defined symbols which will help us find the layout | ||
589 | * of trusted SRAM | ||
590 | ******************************************************************************/ | ||
591 | -extern unsigned long __TEXT_START__; | ||
592 | -extern unsigned long __TEXT_END__; | ||
593 | -extern unsigned long __RW_START__; | ||
594 | -extern unsigned long __RW_END__; | ||
595 | -extern unsigned long __RODATA_START__; | ||
596 | -extern unsigned long __RODATA_END__; | ||
597 | -extern unsigned long __BL31_END__; | ||
598 | + | ||
599 | +IMPORT_SYM(unsigned long, __RW_START__, BL31_RW_START); | ||
600 | +IMPORT_SYM(unsigned long, __RW_END__, BL31_RW_END); | ||
601 | +IMPORT_SYM(unsigned long, __RODATA_START__, BL31_RODATA_BASE); | ||
602 | +IMPORT_SYM(unsigned long, __RODATA_END__, BL31_RODATA_END); | ||
603 | +IMPORT_SYM(unsigned long, __TEXT_START__, TEXT_START); | ||
604 | +IMPORT_SYM(unsigned long, __TEXT_END__, TEXT_END); | ||
605 | |||
606 | extern uint64_t tegra_bl31_phys_base; | ||
607 | extern uint64_t tegra_console_base; | ||
608 | |||
609 | -/* | ||
610 | - * The next 3 constants identify the extents of the code, RO data region and the | ||
611 | - * limit of the BL3-1 image. These addresses are used by the MMU setup code and | ||
612 | - * therefore they must be page-aligned. It is the responsibility of the linker | ||
613 | - * script to ensure that __RO_START__, __RO_END__ & __BL31_END__ linker symbols | ||
614 | - * refer to page-aligned addresses. | ||
615 | - */ | ||
616 | -#define BL31_RW_START (unsigned long)(&__RW_START__) | ||
617 | -#define BL31_RW_END (unsigned long)(&__RW_END__) | ||
618 | -#define BL31_RODATA_BASE (unsigned long)(&__RODATA_START__) | ||
619 | -#define BL31_RODATA_END (unsigned long)(&__RODATA_END__) | ||
620 | -#define BL31_END (unsigned long)(&__BL31_END__) | ||
621 | |||
622 | static entry_point_info_t bl33_image_ep_info, bl32_image_ep_info; | ||
623 | static plat_params_from_bl2_t plat_bl31_params_from_bl2 = { | ||
624 | @@ -311,8 +300,8 @@ void bl31_plat_arch_setup(void) | ||
625 | unsigned long rw_size = BL31_RW_END - BL31_RW_START; | ||
626 | unsigned long rodata_start = BL31_RODATA_BASE; | ||
627 | unsigned long rodata_size = BL31_RODATA_END - BL31_RODATA_BASE; | ||
628 | - unsigned long code_base = (unsigned long)(&__TEXT_START__); | ||
629 | - unsigned long code_size = (unsigned long)(&__TEXT_END__) - code_base; | ||
630 | + unsigned long code_base = TEXT_START; | ||
631 | + unsigned long code_size = TEXT_END - TEXT_START; | ||
632 | const mmap_region_t *plat_mmio_map = NULL; | ||
633 | #if USE_COHERENT_MEM | ||
634 | unsigned long coh_start, coh_size; | ||
635 | diff --git a/plat/rockchip/common/bl31_plat_setup.c b/plat/rockchip/common/bl31_plat_setup.c | ||
636 | index 6199edae2..e5ee68f14 100644 | ||
637 | --- a/plat/rockchip/common/bl31_plat_setup.c | ||
638 | +++ b/plat/rockchip/common/bl31_plat_setup.c | ||
639 | @@ -1,5 +1,5 @@ | ||
640 | /* | ||
641 | - * Copyright (c) 2016, ARM Limited and Contributors. All rights reserved. | ||
642 | + * Copyright (c) 2016-2018, ARM Limited and Contributors. All rights reserved. | ||
643 | * | ||
644 | * SPDX-License-Identifier: BSD-3-Clause | ||
645 | */ | ||
646 | @@ -17,21 +17,14 @@ | ||
647 | #include <platform_def.h> | ||
648 | #include <uart_16550.h> | ||
649 | |||
650 | -/******************************************************************************* | ||
651 | - * Declarations of linker defined symbols which will help us find the layout | ||
652 | - * of trusted SRAM | ||
653 | - ******************************************************************************/ | ||
654 | -unsigned long __RO_START__; | ||
655 | -unsigned long __RO_END__; | ||
656 | - | ||
657 | /* | ||
658 | * The next 2 constants identify the extents of the code & RO data region. | ||
659 | * These addresses are used by the MMU setup code and therefore they must be | ||
660 | * page-aligned. It is the responsibility of the linker script to ensure that | ||
661 | * __RO_START__ and __RO_END__ linker symbols refer to page-aligned addresses. | ||
662 | */ | ||
663 | -#define BL31_RO_BASE (unsigned long)(&__RO_START__) | ||
664 | -#define BL31_RO_LIMIT (unsigned long)(&__RO_END__) | ||
665 | +IMPORT_SYM(unsigned long, __RO_START__, BL31_RO_BASE); | ||
666 | +IMPORT_SYM(unsigned long, __RO_END__, BL31_RO_LIMIT); | ||
667 | |||
668 | static entry_point_info_t bl32_ep_info; | ||
669 | static entry_point_info_t bl33_ep_info; | ||
670 | diff --git a/services/std_svc/spm/spm_shim_private.h b/services/std_svc/spm/spm_shim_private.h | ||
671 | index ad953cde7..8408d1e04 100644 | ||
672 | --- a/services/std_svc/spm/spm_shim_private.h | ||
673 | +++ b/services/std_svc/spm/spm_shim_private.h | ||
674 | @@ -1,5 +1,5 @@ | ||
675 | /* | ||
676 | - * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. | ||
677 | + * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved. | ||
678 | * | ||
679 | * SPDX-License-Identifier: BSD-3-Clause | ||
680 | */ | ||
681 | @@ -8,21 +8,17 @@ | ||
682 | #define __SPM_SHIM_PRIVATE__ | ||
683 | |||
684 | #include <types.h> | ||
685 | +#include <utils_def.h> | ||
686 | |||
687 | /* Assembly source */ | ||
688 | -extern uintptr_t spm_shim_exceptions_ptr; | ||
689 | +IMPORT_SYM(uintptr_t, spm_shim_exceptions_ptr, SPM_SHIM_EXCEPTIONS_PTR); | ||
690 | |||
691 | /* Linker symbols */ | ||
692 | -extern uintptr_t __SPM_SHIM_EXCEPTIONS_START__; | ||
693 | -extern uintptr_t __SPM_SHIM_EXCEPTIONS_END__; | ||
694 | +IMPORT_SYM(uintptr_t, __SPM_SHIM_EXCEPTIONS_START__, SPM_SHIM_EXCEPTIONS_START); | ||
695 | +IMPORT_SYM(uintptr_t, __SPM_SHIM_EXCEPTIONS_END__, SPM_SHIM_EXCEPTIONS_END); | ||
696 | |||
697 | /* Definitions */ | ||
698 | -#define SPM_SHIM_EXCEPTIONS_PTR (uintptr_t)(&spm_shim_exceptions_ptr) | ||
699 | |||
700 | -#define SPM_SHIM_EXCEPTIONS_START \ | ||
701 | - (uintptr_t)(&__SPM_SHIM_EXCEPTIONS_START__) | ||
702 | -#define SPM_SHIM_EXCEPTIONS_END \ | ||
703 | - (uintptr_t)(&__SPM_SHIM_EXCEPTIONS_END__) | ||
704 | #define SPM_SHIM_EXCEPTIONS_SIZE \ | ||
705 | (SPM_SHIM_EXCEPTIONS_END - SPM_SHIM_EXCEPTIONS_START) | ||
706 | |||
707 | -- | ||
708 | 2.25.1 | ||
709 | |||
diff --git a/recipes-bsp/atf/qoriq-atf-2.3.inc b/recipes-bsp/atf/qoriq-atf-2.3.inc deleted file mode 100644 index bc8b912a..00000000 --- a/recipes-bsp/atf/qoriq-atf-2.3.inc +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | LICENSE = "BSD" | ||
2 | LIC_FILES_CHKSUM = "file://license.rst;md5=1dd070c98a281d18d9eefd938729b031" | ||
3 | |||
4 | PV = "2.3+git${SRCPV}" | ||
5 | |||
6 | SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/atf;nobranch=1 \ | ||
7 | git://github.com/ARMmbed/mbedtls;nobranch=1;destsuffix=git/mbedtls;name=mbedtls \ | ||
8 | " | ||
9 | SRCREV = "4e40e24590ab908773ef842cd0e17faf233767d4" | ||
10 | SRCREV_mbedtls = "85da85555e5b086b0250780693c3ee584f63e79f" | ||
11 | SRCREV_FORMAT = "atf" | ||
12 | |||
13 | S = "${WORKDIR}/git" | ||
diff --git a/recipes-bsp/atf/qoriq-atf-2.4.inc b/recipes-bsp/atf/qoriq-atf-2.4.inc new file mode 100644 index 00000000..28045c7c --- /dev/null +++ b/recipes-bsp/atf/qoriq-atf-2.4.inc | |||
@@ -0,0 +1,10 @@ | |||
1 | DESCRIPTION = "ARM Trusted Firmware" | ||
2 | |||
3 | LICENSE = "BSD" | ||
4 | LIC_FILES_CHKSUM = "file://license.rst;md5=1dd070c98a281d18d9eefd938729b031" | ||
5 | |||
6 | SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/atf.git;nobranch=1" | ||
7 | SRCREV = "bb4957067d4b96a6ee197a333425948e409e990d" | ||
8 | |||
9 | S = "${WORKDIR}/git" | ||
10 | |||
diff --git a/recipes-bsp/atf/qoriq-atf-tools_2.3.bb b/recipes-bsp/atf/qoriq-atf-tools_2.4.bb index d4be32be..eccf12c8 100644 --- a/recipes-bsp/atf/qoriq-atf-tools_2.3.bb +++ b/recipes-bsp/atf/qoriq-atf-tools_2.4.bb | |||
@@ -1,6 +1,4 @@ | |||
1 | require qoriq-atf-${PV}.inc | 1 | require recipes-bsp/atf/qoriq-atf-2.4.inc |
2 | |||
3 | SUMMARY = "Tools for ARM Trusted Firmware, e.g. FIP image creation tool" | ||
4 | 2 | ||
5 | DEPENDS += "openssl" | 3 | DEPENDS += "openssl" |
6 | 4 | ||
@@ -12,3 +10,4 @@ do_install () { | |||
12 | } | 10 | } |
13 | 11 | ||
14 | BBCLASSEXTEND = "native" | 12 | BBCLASSEXTEND = "native" |
13 | |||
diff --git a/recipes-bsp/atf/qoriq-atf_1.5.bb b/recipes-bsp/atf/qoriq-atf_1.5.bb deleted file mode 100644 index fb686c94..00000000 --- a/recipes-bsp/atf/qoriq-atf_1.5.bb +++ /dev/null | |||
@@ -1,248 +0,0 @@ | |||
1 | DESCRIPTION = "ARM Trusted Firmware" | ||
2 | |||
3 | LICENSE = "BSD" | ||
4 | LIC_FILES_CHKSUM = "file://license.rst;md5=e927e02bca647e14efd87e9e914b2443" | ||
5 | |||
6 | PV = "1.5+git${SRCPV}" | ||
7 | |||
8 | inherit deploy | ||
9 | |||
10 | DEPENDS += "u-boot-mkimage-native u-boot openssl openssl-native mbedtls rcw cst-native" | ||
11 | DEPENDS:append:lx2160a = " ddr-phy" | ||
12 | do_compile[depends] += "u-boot:do_deploy rcw:do_deploy uefi:do_deploy" | ||
13 | |||
14 | S = "${WORKDIR}/git" | ||
15 | |||
16 | SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/atf;nobranch=1 \ | ||
17 | file://0001-Clean-usage-of-void-pointers-to-access-symbols.patch \ | ||
18 | " | ||
19 | SRCREV = "5ae5233c064e94a8bd1b4a1652a03b87b0be63f6" | ||
20 | |||
21 | COMPATIBLE_MACHINE = "(qoriq)" | ||
22 | |||
23 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
24 | |||
25 | PLATFORM = "${MACHINE}" | ||
26 | PLATFORM:ls1088ardb-pb = "ls1088ardb" | ||
27 | PLATFORM_ADDITIONAL_TARGET ??= "" | ||
28 | PLATFORM_ADDITIONAL_TARGET:ls1012afrwy = "ls1012afrwy_512mb" | ||
29 | |||
30 | RCW_FOLDER ?= "${MACHINE}" | ||
31 | RCW_FOLDER:ls1088ardb-pb = "ls1088ardb" | ||
32 | |||
33 | # requires CROSS_COMPILE set by hand as there is no configure script | ||
34 | export CROSS_COMPILE="${TARGET_PREFIX}" | ||
35 | export ARCH="arm64" | ||
36 | |||
37 | # Let the Makefile handle setting up the CFLAGS and LDFLAGS as it is | ||
38 | # a standalone application | ||
39 | CFLAGS[unexport] = "1" | ||
40 | LDFLAGS[unexport] = "1" | ||
41 | AS[unexport] = "1" | ||
42 | LD[unexport] = "1" | ||
43 | |||
44 | EXTRA_OEMAKE += "HOSTCC='${BUILD_CC} ${BUILD_CPPFLAGS} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}'" | ||
45 | |||
46 | BOOTTYPE ?= "nor nand qspi flexspi_nor sd emmc" | ||
47 | OTABOOTTYPE ?= "nor qspi flexspi_nor" | ||
48 | BUILD_SECURE = "${@bb.utils.contains('DISTRO_FEATURES', 'secure', 'true', 'false', d)}" | ||
49 | BUILD_OPTEE = "${@bb.utils.contains('COMBINED_FEATURES', 'optee', 'true', 'false', d)}" | ||
50 | BUILD_FUSE = "${@bb.utils.contains('DISTRO_FEATURES', 'fuse', 'true', 'false', d)}" | ||
51 | BUILD_OTA = "${@bb.utils.contains('DISTRO_FEATURES', 'ota', 'true', 'false', d)}" | ||
52 | |||
53 | PACKAGECONFIG ??= " \ | ||
54 | ${@bb.utils.filter('COMBINED_FEATURES', 'optee', d)} \ | ||
55 | " | ||
56 | PACKAGECONFIG[optee] = ",,optee-os-qoriq" | ||
57 | |||
58 | uboot_boot_sec ?= "${DEPLOY_DIR_IMAGE}/u-boot.bin-tfa-secure-boot" | ||
59 | uboot_boot ?= "${DEPLOY_DIR_IMAGE}/u-boot.bin-tfa" | ||
60 | rcw ?= "" | ||
61 | rcw:ls1012a = "_default" | ||
62 | rcwsec ?= "_sben" | ||
63 | |||
64 | chassistype ?= "ls2088_1088" | ||
65 | chassistype:ls1012a = "ls104x_1012" | ||
66 | chassistype:ls1043a = "ls104x_1012" | ||
67 | chassistype:ls1046a = "ls104x_1012" | ||
68 | |||
69 | ddrphyopt ?= "" | ||
70 | ddrphyopt:lx2160a = "fip_ddr_sec" | ||
71 | |||
72 | do_configure[noexec] = "1" | ||
73 | |||
74 | do_compile() { | ||
75 | export LIBPATH="${RECIPE_SYSROOT_NATIVE}" | ||
76 | install -d ${S}/include/tools_share/openssl | ||
77 | cp -r ${RECIPE_SYSROOT}/usr/include/openssl/* ${S}/include/tools_share/openssl | ||
78 | if [ ! -f ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/srk.pri ]; then | ||
79 | ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/gen_keys 1024 | ||
80 | else | ||
81 | cp ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/srk.pri ${S} | ||
82 | cp ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/srk.pub ${S} | ||
83 | fi | ||
84 | |||
85 | if [ "${BUILD_FUSE}" = "true" ]; then | ||
86 | ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/gen_fusescr ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/input_files/gen_fusescr/${chassistype}/input_fuse_file | ||
87 | fuseopt="fip_fuse FUSE_PROG=1 FUSE_PROV_FILE=fuse_scr.bin" | ||
88 | fi | ||
89 | if [ "${BUILD_SECURE}" = "true" ]; then | ||
90 | secureopt="TRUSTED_BOARD_BOOT=1 ${ddrphyopt} CST_DIR=${RECIPE_SYSROOT_NATIVE}/usr/bin/cst" | ||
91 | secext="_sec" | ||
92 | bl33="${uboot_boot_sec}" | ||
93 | if [ ${chassistype} = ls104x_1012 ]; then | ||
94 | rcwtemp="${rcwsec}" | ||
95 | else | ||
96 | rcwtemp="${rcw}" | ||
97 | fi | ||
98 | else | ||
99 | bl33="${uboot_boot}" | ||
100 | rcwtemp="${rcw}" | ||
101 | fi | ||
102 | |||
103 | if [ "${BUILD_OPTEE}" = "true" ]; then | ||
104 | bl32="${RECIPE_SYSROOT}${nonarch_base_libdir}/firmware/tee_${MACHINE}.bin" | ||
105 | bl32opt="BL32=${bl32}" | ||
106 | spdopt="SPD=opteed" | ||
107 | fi | ||
108 | |||
109 | if [ "${BUILD_OTA}" = "true" ]; then | ||
110 | otaopt="POLICY_OTA=1" | ||
111 | btype="${OTABOOTTYPE}" | ||
112 | else | ||
113 | btype="${BOOTTYPE}" | ||
114 | fi | ||
115 | |||
116 | if [ -f ${DEPLOY_DIR_IMAGE}/ddr-phy/ddr4_pmu_train_dmem.bin ]; then | ||
117 | cp ${DEPLOY_DIR_IMAGE}/ddr-phy/*.bin ${S}/ | ||
118 | fi | ||
119 | |||
120 | for d in ${btype}; do | ||
121 | case $d in | ||
122 | nor) | ||
123 | rcwimg="${RCWNOR}${rcwtemp}.bin" | ||
124 | uefiboot="${UEFI_NORBOOT}" | ||
125 | ;; | ||
126 | nand) | ||
127 | rcwimg="${RCWNAND}${rcwtemp}.bin" | ||
128 | ;; | ||
129 | qspi) | ||
130 | rcwimg="${RCWQSPI}${rcwtemp}.bin" | ||
131 | uefiboot="${UEFI_QSPIBOOT}" | ||
132 | if [ "${BUILD_SECURE}" = "true" ] && [ ${MACHINE} = ls1046ardb ]; then | ||
133 | rcwimg="RR_FFSSPPPH_1133_5559/rcw_1600_qspiboot_sben.bin" | ||
134 | fi | ||
135 | ;; | ||
136 | auto) | ||
137 | rcwimg="${RCWAUTO}${rcwtemp}.bin" | ||
138 | ;; | ||
139 | sd) | ||
140 | rcwimg="${RCWSD}${rcwtemp}.bin" | ||
141 | ;; | ||
142 | emmc) | ||
143 | rcwimg="${RCWEMMC}${rcwtemp}.bin" | ||
144 | ;; | ||
145 | flexspi_nor) | ||
146 | rcwimg="${RCWXSPI}${rcwtemp}.bin" | ||
147 | uefiboot="${UEFI_XSPIBOOT}" | ||
148 | ;; | ||
149 | esac | ||
150 | |||
151 | if [ -f "${DEPLOY_DIR_IMAGE}/rcw/${RCW_FOLDER}/${rcwimg}" ]; then | ||
152 | oe_runmake V=1 -C ${S} realclean | ||
153 | oe_runmake V=1 -C ${S} all fip pbl PLAT=${PLATFORM} BOOT_MODE=${d} RCW=${DEPLOY_DIR_IMAGE}/rcw/${RCW_FOLDER}/${rcwimg} BL33=${bl33} ${bl32opt} ${spdopt} ${secureopt} ${fuseopt} ${otaopt} | ||
154 | cp -r ${S}/build/${PLATFORM}/release/bl2_${d}*.pbl ${S} | ||
155 | cp -r ${S}/build/${PLATFORM}/release/fip.bin ${S} | ||
156 | if [ "${BUILD_FUSE}" = "true" ]; then | ||
157 | cp -f ${S}/build/${PLATFORM}/release/fuse_fip.bin ${S} | ||
158 | fi | ||
159 | |||
160 | if [ -n "${PLATFORM_ADDITIONAL_TARGET}" ]; then | ||
161 | oe_runmake V=1 -C ${S} realclean | ||
162 | oe_runmake V=1 -C ${S} all fip pbl PLAT=${PLATFORM_ADDITIONAL_TARGET} BOOT_MODE=${d} RCW=${DEPLOY_DIR_IMAGE}/rcw/${RCW_FOLDER}/${rcwimg} BL33=${bl33} ${bl32opt} ${spdopt} ${secureopt} ${fuseopt} ${otaopt} | ||
163 | cp -r ${S}/build/${PLATFORM_ADDITIONAL_TARGET}/release/bl2_qspi${secext}.pbl ${S}/bl2_${d}${secext}_${PLATFORM_ADDITIONAL_TARGET}.pbl | ||
164 | cp -r ${S}/build/${PLATFORM_ADDITIONAL_TARGET}/release/fip.bin ${S}/fip_${PLATFORM_ADDITIONAL_TARGET}.bin | ||
165 | if [ "${BUILD_FUSE}" = "true" ]; then | ||
166 | cp -r ${S}/build/${PLATFORM_ADDITIONAL_TARGET}/release/fuse_fip.bin ${S}/fuse_fip_${PLATFORM_ADDITIONAL_TARGET}.bin | ||
167 | fi | ||
168 | fi | ||
169 | if [ -n "${uefiboot}" -a -f "${DEPLOY_DIR_IMAGE}/uefi/${PLATFORM}/${uefiboot}" ]; then | ||
170 | oe_runmake V=1 -C ${S} realclean | ||
171 | oe_runmake V=1 -C ${S} all fip pbl PLAT=${PLATFORM} BOOT_MODE=${d} RCW=${DEPLOY_DIR_IMAGE}/rcw/${RCW_FOLDER}/${rcwimg} BL33=${DEPLOY_DIR_IMAGE}/uefi/${PLATFORM}/${uefiboot} ${bl32opt} ${spdopt} ${secureopt} ${fuseopt} ${otaopt} | ||
172 | cp -r ${S}/build/${PLATFORM}/release/fip.bin ${S}/fip_uefi.bin | ||
173 | fi | ||
174 | fi | ||
175 | rcwimg="" | ||
176 | uefiboot="" | ||
177 | done | ||
178 | } | ||
179 | |||
180 | do_install() { | ||
181 | install -d ${D}/boot/atf | ||
182 | cp -r ${S}/srk.pri ${D}/boot/atf | ||
183 | cp -r ${S}/srk.pub ${D}/boot/atf | ||
184 | if [ "${BUILD_SECURE}" = "true" ]; then | ||
185 | secext="_sec" | ||
186 | fi | ||
187 | if [ -f "${S}/fip_uefi.bin" ]; then | ||
188 | cp -r ${S}/fip_uefi.bin ${D}/boot/atf/fip_uefi.bin | ||
189 | fi | ||
190 | if [ -f "${S}/fuse_fip.bin" ]; then | ||
191 | cp -r ${S}/fuse_fip.bin ${D}/boot/atf/fuse_fip.bin | ||
192 | fi | ||
193 | if [ -f "${S}/fip.bin" ]; then | ||
194 | cp -r ${S}/fip.bin ${D}/boot/atf/fip.bin | ||
195 | fi | ||
196 | for d in ${BOOTTYPE}; do | ||
197 | if [ -e ${S}/bl2_${d}${secext}.pbl ]; then | ||
198 | cp -r ${S}/bl2_${d}${secext}.pbl ${D}/boot/atf/bl2_${d}${secext}.pbl | ||
199 | fi | ||
200 | done | ||
201 | if [ -n "${PLATFORM_ADDITIONAL_TARGET}" ]; then | ||
202 | cp -r ${S}/fip_${PLATFORM_ADDITIONAL_TARGET}.bin ${D}/boot/atf/fip_${PLATFORM_ADDITIONAL_TARGET}.bin | ||
203 | cp -r ${S}/bl2_qspi${secext}_${PLATFORM_ADDITIONAL_TARGET}.pbl ${D}/boot/atf/bl2_qspi${secext}_${PLATFORM_ADDITIONAL_TARGET}.pbl | ||
204 | if [ -f "${S}/fuse_fip_${PLATFORM_ADDITIONAL_TARGET}.bin" ]; then | ||
205 | cp -r ${S}/fuse_fip_${PLATFORM_ADDITIONAL_TARGET}.bin ${D}/boot/atf/fuse_fip_${PLATFORM_ADDITIONAL_TARGET}.bin | ||
206 | fi | ||
207 | fi | ||
208 | chown -R root:root ${D} | ||
209 | if [ -f "${S}/fip_ddr_sec.bin" ]; then | ||
210 | cp -r ${S}/fip_ddr_sec.bin ${D}/boot/atf/fip_ddr_sec.bin | ||
211 | fi | ||
212 | } | ||
213 | |||
214 | do_deploy() { | ||
215 | install -d ${DEPLOYDIR}/atf | ||
216 | cp -r ${D}/boot/atf/srk.pri ${DEPLOYDIR}/atf | ||
217 | cp -r ${D}/boot/atf/srk.pub ${DEPLOYDIR}/atf | ||
218 | if [ "${BUILD_SECURE}" = "true" ]; then | ||
219 | secext="_sec" | ||
220 | fi | ||
221 | |||
222 | if [ -f "${S}/fuse_fip.bin" ]; then | ||
223 | cp -r ${D}/boot/atf/fuse_fip.bin ${DEPLOYDIR}/atf/fuse_fip${secext}.bin | ||
224 | fi | ||
225 | |||
226 | if [ -e ${D}/boot/atf/fip_uefi.bin ]; then | ||
227 | cp -r ${D}/boot/atf/fip_uefi.bin ${DEPLOYDIR}/atf/fip_uefi.bin | ||
228 | fi | ||
229 | cp -r ${D}/boot/atf/fip.bin ${DEPLOYDIR}/atf/fip_uboot${secext}.bin | ||
230 | for d in ${BOOTTYPE}; do | ||
231 | if [ -e ${D}/boot/atf/bl2_${d}${secext}.pbl ]; then | ||
232 | cp -r ${D}/boot/atf/bl2_${d}${secext}.pbl ${DEPLOYDIR}/atf/bl2_${d}${secext}.pbl | ||
233 | fi | ||
234 | done | ||
235 | if [ -n "${PLATFORM_ADDITIONAL_TARGET}" ]; then | ||
236 | cp -r ${S}/bl2_qspi${secext}_${PLATFORM_ADDITIONAL_TARGET}.pbl ${DEPLOYDIR}/atf/ | ||
237 | cp -r ${S}/fip_${PLATFORM_ADDITIONAL_TARGET}.bin ${DEPLOYDIR}/atf/fip_uboot${secext}_${PLATFORM_ADDITIONAL_TARGET}.bin | ||
238 | if [ -f "${S}/fuse_fip_${PLATFORM_ADDITIONAL_TARGET}.bin" ]; then | ||
239 | cp -r ${S}/fuse_fip_${PLATFORM_ADDITIONAL_TARGET}.bin ${D}/boot/atf/fuse_fip_${PLATFORM_ADDITIONAL_TARGET}${secext}.bin | ||
240 | fi | ||
241 | fi | ||
242 | if [ -f "${S}/fip_ddr_sec.bin" ]; then | ||
243 | cp -r ${D}/boot/atf/fip_ddr_sec.bin ${DEPLOYDIR}/atf/fip_ddr_sec.bin | ||
244 | fi | ||
245 | } | ||
246 | addtask deploy after do_install | ||
247 | FILES:${PN} += "/boot" | ||
248 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/recipes-bsp/atf/qoriq-atf_2.3.bb b/recipes-bsp/atf/qoriq-atf_2.3.bb deleted file mode 100644 index f2922c91..00000000 --- a/recipes-bsp/atf/qoriq-atf_2.3.bb +++ /dev/null | |||
@@ -1,175 +0,0 @@ | |||
1 | require qoriq-atf-${PV}.inc | ||
2 | |||
3 | DESCRIPTION = "ARM Trusted Firmware" | ||
4 | |||
5 | inherit deploy | ||
6 | |||
7 | DEPENDS += "cst-native" | ||
8 | do_compile[depends] += "u-boot:do_deploy rcw:do_deploy ddr-phy:do_deploy" | ||
9 | |||
10 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
11 | |||
12 | PLATFORM = "${MACHINE}" | ||
13 | MBEDTLS_FOLDER ?= "${S}/mbedtls" | ||
14 | RCW_FOLDER ?= "${MACHINE}" | ||
15 | |||
16 | # requires CROSS_COMPILE set by hand as there is no configure script | ||
17 | export CROSS_COMPILE="${TARGET_PREFIX}" | ||
18 | export ARCH="arm64" | ||
19 | |||
20 | # Let the Makefile handle setting up the CFLAGS and LDFLAGS as it is | ||
21 | # a standalone application | ||
22 | CFLAGS[unexport] = "1" | ||
23 | LDFLAGS[unexport] = "1" | ||
24 | AS[unexport] = "1" | ||
25 | LD[unexport] = "1" | ||
26 | |||
27 | EXTRA_OEMAKE += "HOSTCC='${BUILD_CC} ${BUILD_CPPFLAGS} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}'" | ||
28 | |||
29 | BOOTTYPE ?= "flexspi_nor sd emmc" | ||
30 | ARM_COT = "${@bb.utils.contains('DISTRO_FEATURES', 'arm-cot', 'true', 'false', d)}" | ||
31 | NXP_COT = "${@bb.utils.contains('DISTRO_FEATURES', 'secure', 'true', 'false', d)}" | ||
32 | BUILD_OPTEE = "${@bb.utils.contains('COMBINED_FEATURES', 'optee', 'true', 'false', d)}" | ||
33 | |||
34 | PACKAGECONFIG ??= " \ | ||
35 | ${@bb.utils.contains('DISTRO_FEATURES', 'arm-cot', 'optee', '', d)} \ | ||
36 | ${@bb.utils.contains('DISTRO_FEATURES', 'secure', 'optee', '', d)} \ | ||
37 | ${@bb.utils.filter('COMBINED_FEATURES', 'optee', d)} \ | ||
38 | " | ||
39 | PACKAGECONFIG[optee] = ",,optee-os-qoriq" | ||
40 | |||
41 | uboot_sec ?= "${DEPLOY_DIR_IMAGE}/u-boot.bin-tfa-secure-boot" | ||
42 | uboot ?= "${DEPLOY_DIR_IMAGE}/u-boot.bin-tfa" | ||
43 | |||
44 | do_configure[noexec] = "1" | ||
45 | |||
46 | do_compile() { | ||
47 | if [ "${NXP_COT}" = "true" -a "${ARM_COT}" = "true" ]; then | ||
48 | bbfatal " \ | ||
49 | Error!, Both ARM CoT and NXP CoT are enabled. Only one CoT is built in a yocto build, \ | ||
50 | Don't add nxp-cot and arm-cot into DISTRO_FEATURES:append at the same time." | ||
51 | fi | ||
52 | |||
53 | if [ "${NXP_COT}" = "true" ]; then | ||
54 | rm -fr ${S}/nxp-cot | ||
55 | mkdir -p ${S}/nxp-cot | ||
56 | outputdir="${S}/nxp-cot" | ||
57 | elif [ "${ARM_COT}" = "true" ]; then | ||
58 | rm -fr ${S}/arm-cot | ||
59 | mkdir -p ${S}/arm-cot | ||
60 | outputdir="${S}/arm-cot" | ||
61 | else | ||
62 | outputdir="${S}" | ||
63 | fi | ||
64 | |||
65 | if [ "${NXP_COT}" = "true" -o "${ARM_COT}" = "true" ]; then | ||
66 | if [ ! -f ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/srk.pri ]; then | ||
67 | ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/gen_keys 1024 | ||
68 | else | ||
69 | cp ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/srk.pri ${S} | ||
70 | cp ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/srk.pub ${S} | ||
71 | fi | ||
72 | |||
73 | bl32="${RECIPE_SYSROOT}${nonarch_base_libdir}/firmware/tee_${MACHINE}.bin" | ||
74 | bl33="${uboot_sec}" | ||
75 | secext="_sec" | ||
76 | else | ||
77 | bl33="${uboot}" | ||
78 | fi | ||
79 | |||
80 | for d in ${BOOTTYPE}; do | ||
81 | case $d in | ||
82 | sd) | ||
83 | rcwimg="${RCWSD}.bin" | ||
84 | ;; | ||
85 | emmc) | ||
86 | rcwimg="${RCWEMMC}.bin" | ||
87 | ;; | ||
88 | flexspi_nor) | ||
89 | rcwimg="${RCWXSPI}.bin" | ||
90 | ;; | ||
91 | esac | ||
92 | |||
93 | if [ -f "${DEPLOY_DIR_IMAGE}/rcw/${RCW_FOLDER}/${rcwimg}" ]; then | ||
94 | oe_runmake V=1 -C ${S} realclean | ||
95 | if [ "${ARM_COT}" = "true" ]; then | ||
96 | mkdir -p ${S}/build/${PLATFORM}/release | ||
97 | if [ -f ${outputdir}/rot_key.pem ]; then | ||
98 | cp -fr ${outputdir}/*.pem ${S}/build/${PLATFORM}/release | ||
99 | fi | ||
100 | oe_runmake V=1 -C ${S} fip pbl PLAT=${PLATFORM} BOOT_MODE=${d} SPD=opteed BL32=${bl32} \ | ||
101 | BL33=${bl33} RCW=${DEPLOY_DIR_IMAGE}/rcw/${RCW_FOLDER}/${rcwimg} TRUSTED_BOARD_BOOT=1 \ | ||
102 | GENERATE_COT=1 MBEDTLS_DIR=${MBEDTLS_FOLDER} CST_DIR=${RECIPE_SYSROOT_NATIVE}/usr/bin/cst | ||
103 | |||
104 | if [ ! -f ${outputdir}/ddr_fip_sec.bin ]; then | ||
105 | oe_runmake V=1 -C ${S} fip_ddr PLAT=${PLATFORM} TRUSTED_BOARD_BOOT=1 GENERATE_COT=1 \ | ||
106 | MBEDTLS_DIR=${MBEDTLS_FOLDER} DDR_PHY_BIN_PATH=${DEPLOY_DIR_IMAGE}/ddr-phy | ||
107 | cp -r ${S}/build/${PLATFORM}/release/ddr_fip_sec.bin ${outputdir} | ||
108 | cp -r ${S}/build/${PLATFORM}/release/*.pem ${outputdir} | ||
109 | fi | ||
110 | elif [ "${NXP_COT}" = "true" ]; then | ||
111 | oe_runmake V=1 -C ${S} fip pbl PLAT=${PLATFORM} BOOT_MODE=${d} SPD=opteed BL32=${bl32} \ | ||
112 | BL33=${bl33} RCW=${DEPLOY_DIR_IMAGE}/rcw/${RCW_FOLDER}/${rcwimg} TRUSTED_BOARD_BOOT=1 \ | ||
113 | CST_DIR=${RECIPE_SYSROOT_NATIVE}/usr/bin/cst | ||
114 | |||
115 | if [ ! -f ${outputdir}/ddr_fip_sec.bin ]; then | ||
116 | oe_runmake V=1 -C ${S} fip_ddr PLAT=${PLATFORM} TRUSTED_BOARD_BOOT=1 \ | ||
117 | CST_DIR=${RECIPE_SYSROOT_NATIVE}/usr/bin/cst DDR_PHY_BIN_PATH=${DEPLOY_DIR_IMAGE}/ddr-phy | ||
118 | cp -r ${S}/build/${PLATFORM}/release/ddr_fip_sec.bin ${outputdir} | ||
119 | fi | ||
120 | elif [ "${BUILD_OPTEE}" = "true" ]; then | ||
121 | bl32="${RECIPE_SYSROOT}${nonarch_base_libdir}/firmware/tee_${MACHINE}.bin" | ||
122 | oe_runmake V=1 -C ${S} all fip pbl PLAT=${PLATFORM} BOOT_MODE=${d} SPD=opteed BL32=${bl32} \ | ||
123 | RCW=${DEPLOY_DIR_IMAGE}/rcw/${RCW_FOLDER}/${rcwimg} BL33=${bl33} | ||
124 | else | ||
125 | oe_runmake V=1 -C ${S} all fip pbl PLAT=${PLATFORM} BOOT_MODE=${d} \ | ||
126 | RCW=${DEPLOY_DIR_IMAGE}/rcw/${RCW_FOLDER}/${rcwimg} BL33=${bl33} | ||
127 | fi | ||
128 | |||
129 | cp -r ${S}/build/${PLATFORM}/release/bl2_${d}${secext}.pbl ${outputdir} | ||
130 | cp -r ${S}/build/${PLATFORM}/release/fip.bin ${outputdir} | ||
131 | fi | ||
132 | rcwimg="" | ||
133 | done | ||
134 | } | ||
135 | |||
136 | do_install() { | ||
137 | install -d ${D}/boot/atf | ||
138 | if [ "${ARM_COT}" = "true" ]; then | ||
139 | outputdir="${S}/arm-cot" | ||
140 | secext="_sec" | ||
141 | elif [ "${NXP_COT}" = "true" ]; then | ||
142 | outputdir="${S}/nxp-cot" | ||
143 | secext="_sec" | ||
144 | else | ||
145 | outputdir="${S}" | ||
146 | fi | ||
147 | if [ -f "${outputdir}/fip.bin" ]; then | ||
148 | cp -r ${outputdir}/fip.bin ${D}/boot/atf/fip_uboot${secext}.bin | ||
149 | fi | ||
150 | if [ -f "${outputdir}/ddr_fip_sec.bin" ]; then | ||
151 | cp -r ${outputdir}/ddr_fip_sec.bin ${D}/boot/atf/ | ||
152 | fi | ||
153 | for d in ${BOOTTYPE}; do | ||
154 | if [ -e ${outputdir}/bl2_${d}${secext}.pbl ]; then | ||
155 | cp -r ${outputdir}/bl2_${d}${secext}.pbl ${D}/boot/atf/bl2_${d}${secext}.pbl | ||
156 | fi | ||
157 | done | ||
158 | chown -R root:root ${D} | ||
159 | } | ||
160 | |||
161 | do_deploy() { | ||
162 | if [ "${ARM_COT}" = "true" ]; then | ||
163 | outputdir="atf:arm-cot" | ||
164 | elif [ "${NXP_COT}" = "true" ]; then | ||
165 | outputdir="atf_nxp-cot" | ||
166 | else | ||
167 | outputdir="atf" | ||
168 | fi | ||
169 | |||
170 | install -d ${DEPLOYDIR}/${outputdir} | ||
171 | cp -fr ${D}/boot/atf/* ${DEPLOYDIR}/${outputdir}/ | ||
172 | } | ||
173 | addtask deploy after do_install | ||
174 | FILES:${PN} += "/boot" | ||
175 | COMPATIBLE_MACHINE = "(lx2160a|lx2162a)" | ||
diff --git a/recipes-bsp/atf/qoriq-atf_2.4.bb b/recipes-bsp/atf/qoriq-atf_2.4.bb new file mode 100644 index 00000000..9c8937a2 --- /dev/null +++ b/recipes-bsp/atf/qoriq-atf_2.4.bb | |||
@@ -0,0 +1,186 @@ | |||
1 | require recipes-bsp/atf/qoriq-atf-2.4.inc | ||
2 | |||
3 | inherit deploy | ||
4 | |||
5 | DEPENDS += "u-boot-mkimage-native u-boot openssl openssl-native mbedtls rcw cst-native bc-native" | ||
6 | DEPENDS:append:lx2160a += "ddr-phy" | ||
7 | DEPENDS:append:lx2162a += "ddr-phy" | ||
8 | do_compile[depends] += "u-boot:do_deploy rcw:do_deploy uefi:do_deploy" | ||
9 | |||
10 | SRC_URI += "git://github.com/ARMmbed/mbedtls;nobranch=1;destsuffix=git/mbedtls;name=mbedtls" | ||
11 | SRCREV_mbedtls = "0795874acdf887290b2571b193cafd3c4041a708" | ||
12 | SRCREV_FORMAT = "atf" | ||
13 | |||
14 | COMPATIBLE_MACHINE = "(qoriq)" | ||
15 | |||
16 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
17 | |||
18 | PLATFORM = "${MACHINE}" | ||
19 | PLATFORM:ls1088ardb-pb = "ls1088ardb" | ||
20 | PLATFORM_ADDITIONAL_TARGET ??= "" | ||
21 | PLATFORM_ADDITIONAL_TARGET:ls1012afrwy = "ls1012afrwy_512mb" | ||
22 | |||
23 | RCW_FOLDER ?= "${MACHINE}" | ||
24 | RCW_FOLDER:ls1088ardb-pb = "ls1088ardb" | ||
25 | RCW_FOLDER:lx2160ardb = "lx2160ardb_rev2" | ||
26 | |||
27 | RCW_SUFFIX ?= ".bin" | ||
28 | RCW_SUFFIX:ls1012a = "${@bb.utils.contains('DISTRO_FEATURES', 'secure', '_sben.bin', '_default.bin', d)}" | ||
29 | RCW_SUFFIX:ls1043a = "${@bb.utils.contains('DISTRO_FEATURES', 'secure', '_sben.bin', '.bin', d)}" | ||
30 | RCW_SUFFIX:ls1046a = "${@bb.utils.contains('DISTRO_FEATURES', 'secure', '_sben.bin', '.bin', d)}" | ||
31 | |||
32 | UBOOT_BINARY ?= "${@bb.utils.contains('DISTRO_FEATURES', 'secure', '${DEPLOY_DIR_IMAGE}/u-boot.bin-tfa-secure-boot', '${DEPLOY_DIR_IMAGE}/u-boot.bin-tfa', d)}" | ||
33 | |||
34 | SECURE_EXTENTION ?= "${@bb.utils.contains('DISTRO_FEATURES', 'secure', '_sec', '', d)}" | ||
35 | |||
36 | BOOTTYPE ?= "nor nand qspi flexspi_nor sd emmc" | ||
37 | |||
38 | chassistype ?= "ls2088_1088" | ||
39 | chassistype:ls1012a = "ls104x_1012" | ||
40 | chassistype:ls1043a = "ls104x_1012" | ||
41 | chassistype:ls1046a = "ls104x_1012" | ||
42 | |||
43 | DDR_PHY_BIN_PATH ?= "" | ||
44 | DDR_PHY_BIN_PATH:lx2160a = "${DEPLOY_DIR_IMAGE}/ddr-phy" | ||
45 | DDR_PHY_BIN_PATH:lx2162a = "${DEPLOY_DIR_IMAGE}/ddr-phy" | ||
46 | |||
47 | # requires CROSS_COMPILE set by hand as there is no configure script | ||
48 | export CROSS_COMPILE="${TARGET_PREFIX}" | ||
49 | export ARCH="arm64" | ||
50 | |||
51 | # Let the Makefile handle setting up the CFLAGS and LDFLAGS as it is | ||
52 | # a standalone application | ||
53 | CFLAGS[unexport] = "1" | ||
54 | LDFLAGS[unexport] = "1" | ||
55 | AS[unexport] = "1" | ||
56 | LD[unexport] = "1" | ||
57 | |||
58 | EXTRA_OEMAKE += "HOSTCC='${BUILD_CC} ${BUILD_CPPFLAGS} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}'" | ||
59 | EXTRA_OEMAKE += "\ | ||
60 | ${@bb.utils.contains('COMBINED_FEATURES', 'optee', 'BL32=${RECIPE_SYSROOT}${nonarch_base_libdir}/firmware/tee_${MACHINE}.bin SPD=opteed', '', d)} \ | ||
61 | ${@bb.utils.contains('DISTRO_FEATURES', 'secure', 'TRUSTED_BOARD_BOOT=1 CST_DIR=${RECIPE_SYSROOT_NATIVE}/usr/bin/cst', '', d)} \ | ||
62 | ${@bb.utils.contains('DISTRO_FEATURES', 'arm-cot', 'GENERATE_COT=1 MBEDTLS_DIR=${S}/mbedtls', '', d)} \ | ||
63 | ${@bb.utils.contains('DISTRO_FEATURES', 'fuse', 'fip_fuse FUSE_PROG=1 FUSE_PROV_FILE=fuse_scr.bin', '', d)} \ | ||
64 | " | ||
65 | |||
66 | PACKAGECONFIG ??= " \ | ||
67 | ${@bb.utils.filter('COMBINED_FEATURES', 'optee', d)} \ | ||
68 | " | ||
69 | PACKAGECONFIG[optee] = ",,optee-os-qoriq" | ||
70 | |||
71 | python() { | ||
72 | if bb.utils.contains("DISTRO_FEATURES", "arm-cot", True, False, d): | ||
73 | if not bb.utils.contains("DISTRO_FEATURES", "secure", True, False, d): | ||
74 | bb.fatal("arm-cot needs 'secure' being set in DISTRO_FEATURES") | ||
75 | } | ||
76 | |||
77 | do_configure[noexec] = "1" | ||
78 | |||
79 | do_compile() { | ||
80 | if [ ! -f ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/srk.pri ]; then | ||
81 | ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/gen_keys 1024 | ||
82 | else | ||
83 | cp ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/srk.pri . | ||
84 | cp ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/srk.pub . | ||
85 | fi | ||
86 | |||
87 | ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/gen_fusescr \ | ||
88 | ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/input_files/gen_fusescr/${chassistype}/input_fuse_file | ||
89 | |||
90 | for d in ${BOOTTYPE}; do | ||
91 | case $d in | ||
92 | nor) | ||
93 | rcwimg="${RCWNOR}${RCW_SUFFIX}" | ||
94 | uefiboot="${UEFI_NORBOOT}" | ||
95 | ;; | ||
96 | nand) | ||
97 | rcwimg="${RCWNAND}${RCW_SUFFIX}" | ||
98 | ;; | ||
99 | qspi) | ||
100 | rcwimg="${RCWQSPI}${RCW_SUFFIX}" | ||
101 | uefiboot="${UEFI_QSPIBOOT}" | ||
102 | if [ -n "${SECURE_EXTENTION}" ] && [ "${MACHINE}" = ls1046ardb ]; then | ||
103 | rcwimg="RR_FFSSPPPH_1133_5559/rcw_1600_qspiboot_sben.bin" | ||
104 | fi | ||
105 | ;; | ||
106 | auto) | ||
107 | rcwimg="${RCWAUTO}${RCW_SUFFIX}" | ||
108 | ;; | ||
109 | sd) | ||
110 | rcwimg="${RCWSD}${RCW_SUFFIX}" | ||
111 | ;; | ||
112 | emmc) | ||
113 | rcwimg="${RCWEMMC}${RCW_SUFFIX}" | ||
114 | ;; | ||
115 | flexspi_nor) | ||
116 | rcwimg="${RCWXSPI}${RCW_SUFFIX}" | ||
117 | uefiboot="${UEFI_XSPIBOOT}" | ||
118 | ;; | ||
119 | esac | ||
120 | |||
121 | if [ -f ${DEPLOY_DIR_IMAGE}/rcw/${RCW_FOLDER}/$rcwimg ]; then | ||
122 | make V=1 realclean | ||
123 | if [ -f rot_key.pem ];then | ||
124 | mkdir -p build/${PLATFORM}/release/ | ||
125 | cp *.pem build/${PLATFORM}/release/ | ||
126 | fi | ||
127 | |||
128 | oe_runmake V=1 all fip pbl PLAT=${PLATFORM} BOOT_MODE=${d} RCW=${DEPLOY_DIR_IMAGE}/rcw/${RCW_FOLDER}/${rcwimg} BL33=${UBOOT_BINARY} | ||
129 | cp build/${PLATFORM}/release/bl2_${d}${SECURE_EXTENTION}.pbl . | ||
130 | cp build/${PLATFORM}/release/fip.bin fip_uboot${SECURE_EXTENTION}.bin | ||
131 | if [ -e build/${PLATFORM}/release/fuse_fip.bin ]; then | ||
132 | cp build/${PLATFORM}/release/fuse_fip.bin . | ||
133 | fi | ||
134 | |||
135 | if [ -n "${SECURE_EXTENTION}" -a -n "${DDR_PHY_BIN_PATH}" -a ! -f ddr_fip_sec.bin ]; then | ||
136 | oe_runmake V=1 fip_ddr PLAT=${PLATFORM} DDR_PHY_BIN_PATH=${DDR_PHY_BIN_PATH} | ||
137 | if [ -e build/${PLATFORM}/release/ddr_fip_sec.bin ]; then | ||
138 | cp build/${PLATFORM}/release/ddr_fip_sec.bin . | ||
139 | fi | ||
140 | fi | ||
141 | |||
142 | if [ -e build/${PLATFORM}/release/rot_key.pem ] && [ ! -f rot_key.pem ]; then | ||
143 | cp build/${PLATFORM}/release/*.pem . | ||
144 | fi | ||
145 | |||
146 | if [ -n "${PLATFORM_ADDITIONAL_TARGET}" ]; then | ||
147 | make V=1 realclean | ||
148 | oe_runmake V=1 all fip pbl PLAT=${PLATFORM_ADDITIONAL_TARGET} BOOT_MODE=${d} RCW=${DEPLOY_DIR_IMAGE}/rcw/${RCW_FOLDER}/${rcwimg} BL33=${UBOOT_BINARY} | ||
149 | cp build/${PLATFORM_ADDITIONAL_TARGET}/release/bl2_${d}${SECURE_EXTENTION}.pbl bl2_${d}${SECURE_EXTENTION}_${PLATFORM_ADDITIONAL_TARGET}.pbl | ||
150 | cp build/${PLATFORM_ADDITIONAL_TARGET}/release/fip.bin fip_uboot${SECURE_EXTENTION}_${PLATFORM_ADDITIONAL_TARGET}.bin | ||
151 | if [ -e build/${PLATFORM_ADDITIONAL_TARGET}/release/fuse_fip.bin ]; then | ||
152 | cp build/${PLATFORM_ADDITIONAL_TARGET}/release/fuse_fip.bin fuse_fip_${PLATFORM_ADDITIONAL_TARGET}.bin | ||
153 | fi | ||
154 | fi | ||
155 | |||
156 | if [ -z "${SECURE_EXTENTION}" -a -f "${DEPLOY_DIR_IMAGE}/uefi/${PLATFORM}/${uefiboot}" ]; then | ||
157 | make V=1 realclean | ||
158 | oe_runmake V=1 all fip pbl PLAT=${PLATFORM} BOOT_MODE=${d} RCW=${DEPLOY_DIR_IMAGE}/rcw/${RCW_FOLDER}/${rcwimg} BL33=${DEPLOY_DIR_IMAGE}/uefi/${PLATFORM}/${uefiboot} | ||
159 | cp build/${PLATFORM}/release/fip.bin fip_uefi.bin | ||
160 | fi | ||
161 | fi | ||
162 | rcwimg="" | ||
163 | uefiboot="" | ||
164 | done | ||
165 | } | ||
166 | |||
167 | do_install() { | ||
168 | install -d ${D}/boot/atf/ | ||
169 | cp srk.pri ${D}/boot/atf/ | ||
170 | cp srk.pub ${D}/boot/atf/ | ||
171 | cp *.pbl ${D}/boot/atf/ | ||
172 | if [ ! -e fuse_fip.bin ]; then | ||
173 | rm -f fuse_scr.bin | ||
174 | fi | ||
175 | cp *.bin ${D}/boot/atf/ | ||
176 | chown -R root:root ${D} | ||
177 | } | ||
178 | |||
179 | do_deploy() { | ||
180 | install -d ${DEPLOYDIR}/atf/ | ||
181 | cp ${D}/boot/atf/* ${DEPLOYDIR}/atf/ | ||
182 | } | ||
183 | addtask deploy after do_install | ||
184 | |||
185 | FILES:${PN} += "/boot" | ||
186 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/recipes-bsp/mc-utils/mc-utils_git.bb b/recipes-bsp/mc-utils/mc-utils_git.bb index b725af7f..97bbd7e7 100644 --- a/recipes-bsp/mc-utils/mc-utils_git.bb +++ b/recipes-bsp/mc-utils/mc-utils_git.bb | |||
@@ -1,16 +1,14 @@ | |||
1 | DESCRIPTION = "The Management Complex (MC) is a key component of DPAA" | 1 | DESCRIPTION = "The Management Complex (MC) is a key component of DPAA" |
2 | SECTION = "mc-utils" | 2 | SECTION = "mc-utils" |
3 | LICENSE = "BSD" | 3 | LICENSE = "BSD" |
4 | 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=386a6287daa6504b7e7e5014ddfb3987" | |
5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=386a6287daa6504b7e7e5014ddfb3987 \ | ||
6 | " | ||
7 | 5 | ||
8 | DEPENDS += "dtc-native" | 6 | DEPENDS += "dtc-native" |
9 | 7 | ||
10 | inherit deploy | 8 | inherit deploy |
11 | 9 | ||
12 | SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/mc-utils;nobranch=1" | 10 | SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/mc-utils;nobranch=1" |
13 | SRCREV = "8e0b863693fc2ccbc62a62c79b4e3db6da88c16e" | 11 | SRCREV = "12ffee82d210cb6b5c8fa30fbc6f5d29e4be2e6f" |
14 | 12 | ||
15 | S = "${WORKDIR}/git" | 13 | S = "${WORKDIR}/git" |
16 | 14 | ||
@@ -18,10 +16,10 @@ MC_CFG ?= "" | |||
18 | MC_CFG:ls1088a = "ls1088a" | 16 | MC_CFG:ls1088a = "ls1088a" |
19 | MC_CFG:ls2088a = "ls2088a" | 17 | MC_CFG:ls2088a = "ls2088a" |
20 | MC_CFG:lx2160a = "lx2160a" | 18 | MC_CFG:lx2160a = "lx2160a" |
21 | MC_CFG:lx2162aqds = "lx2162aqds" | 19 | MC_CFG:lx2162a = "lx2162a" |
22 | 20 | ||
23 | MC_FLAVOUR ?= "RDB" | 21 | MC_FLAVOUR ?= "${@oe.utils.ifelse(d.getVar('MACHINE').endswith('qds'), 'QDS', 'RDB')}" |
24 | MC_FLAVOUR:lx2162a = "" | 22 | MC_FOLDER ?= "${@d.getVar('MC_CFG').upper() + '-' + d.getVar('MC_FLAVOUR')}" |
25 | 23 | ||
26 | do_compile () { | 24 | do_compile () { |
27 | oe_runmake -C config | 25 | oe_runmake -C config |
@@ -29,23 +27,19 @@ do_compile () { | |||
29 | 27 | ||
30 | do_install () { | 28 | do_install () { |
31 | install -d ${D}/boot/mc-utils | 29 | install -d ${D}/boot/mc-utils |
32 | cp -r ${S}/config/${MC_CFG}/${MC_FLAVOUR}/*.dtb ${D}/boot/mc-utils | 30 | if [ -e ${S}/config/${MC_CFG}/${MC_FOLDER} ]; then |
33 | if [ -d ${S}/config/${MC_CFG}/${MC_FLAVOUR}/custom/ ]; then | 31 | cp -r ${S}/config/${MC_CFG}/${MC_FOLDER}/* ${D}/boot/mc-utils/ |
34 | install -d ${D}/boot/mc-utils/custom | ||
35 | cp -r ${S}/config/${MC_CFG}/${MC_FLAVOUR}/custom/*.dtb ${D}/boot/mc-utils/custom | ||
36 | fi | 32 | fi |
33 | find ${D}/boot/mc-utils/ ! -name "*.dtb" ! -type d -exec rm {} \; | ||
37 | } | 34 | } |
38 | 35 | ||
39 | do_deploy () { | 36 | do_deploy () { |
40 | install -d ${DEPLOYDIR}/mc-utils | 37 | install -d ${DEPLOYDIR}/mc-utils |
41 | cp -r ${S}/config/${MC_CFG}/${MC_FLAVOUR}/*.dtb ${DEPLOYDIR}/mc-utils | 38 | cp -r ${D}/boot/mc-utils/* ${DEPLOYDIR}/mc-utils/ |
42 | if [ -d ${S}/config/${MC_CFG}/${MC_FLAVOUR}/custom/ ]; then | ||
43 | install -d ${DEPLOYDIR}/mc-utils/custom | ||
44 | cp -r ${S}/config/${MC_CFG}/${MC_FLAVOUR}/custom/*.dtb ${DEPLOYDIR}/mc-utils/custom | ||
45 | fi | ||
46 | } | 39 | } |
47 | addtask deploy after do_install | 40 | addtask deploy after do_install |
48 | 41 | ||
49 | PACKAGES += "${PN}-image" | 42 | PACKAGES += "${PN}-image" |
50 | FILES:${PN}-image += "/boot" | 43 | FILES:${PN}-image += "/boot" |
44 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
51 | COMPATIBLE_MACHINE = "(qoriq-arm64)" | 45 | COMPATIBLE_MACHINE = "(qoriq-arm64)" |
diff --git a/recipes-bsp/rcw/rcw_git.bb b/recipes-bsp/rcw/rcw_git.bb index 88b7b995..04f71ba3 100644 --- a/recipes-bsp/rcw/rcw_git.bb +++ b/recipes-bsp/rcw/rcw_git.bb | |||
@@ -8,7 +8,7 @@ DEPENDS += "tcl-native" | |||
8 | inherit deploy siteinfo | 8 | inherit deploy siteinfo |
9 | 9 | ||
10 | SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/rcw;nobranch=1" | 10 | SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/rcw;nobranch=1" |
11 | SRCREV = "1caebba96b6fd8eac9ef4246c181f2b47c448c4f" | 11 | SRCREV = "1f431891c7f0e7d4f52327f1fe19504a284491c4" |
12 | 12 | ||
13 | S = "${WORKDIR}/git" | 13 | S = "${WORKDIR}/git" |
14 | 14 | ||
diff --git a/recipes-bsp/u-boot/u-boot-qoriq_2020.04.bb b/recipes-bsp/u-boot/u-boot-qoriq_2021.04.bb index 69b03de1..db93710d 100644 --- a/recipes-bsp/u-boot/u-boot-qoriq_2020.04.bb +++ b/recipes-bsp/u-boot/u-boot-qoriq_2021.04.bb | |||
@@ -15,7 +15,7 @@ LIC_FILES_CHKSUM = " \ | |||
15 | " | 15 | " |
16 | 16 | ||
17 | SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/u-boot;nobranch=1" | 17 | SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/u-boot;nobranch=1" |
18 | SRCREV= "f46a944f715f284aff1d42c009680ffe0be4058f" | 18 | SRCREV= "1c0116f3da250c5a52858c53efb8b38c0963f477" |
19 | 19 | ||
20 | S = "${WORKDIR}/git" | 20 | S = "${WORKDIR}/git" |
21 | B = "${WORKDIR}/build" | 21 | B = "${WORKDIR}/build" |
diff --git a/recipes-bsp/uefi/uefi_git.bb b/recipes-bsp/uefi/uefi_git.bb index df77b420..6174e258 100644 --- a/recipes-bsp/uefi/uefi_git.bb +++ b/recipes-bsp/uefi/uefi_git.bb | |||
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://NXP-Binary-EULA;md5=343ec8f06efc37467a6de53686fa6315" | |||
6 | inherit deploy | 6 | inherit deploy |
7 | 7 | ||
8 | SRC_URI = "git://github.com/NXP/qoriq-uefi-binary.git;nobranch=1" | 8 | SRC_URI = "git://github.com/NXP/qoriq-uefi-binary.git;nobranch=1" |
9 | SRCREV= "06e960829ba204f35979440364b9ac7e51ed996b" | 9 | SRCREV= "1b28cad962a3f7b61baae2229cb3b84926941cfa" |
10 | 10 | ||
11 | S = "${WORKDIR}/git" | 11 | S = "${WORKDIR}/git" |
12 | 12 | ||
diff --git a/recipes-devtools/cst/cst_git.bb b/recipes-devtools/cst/cst_git.bb index 71df0a35..d4a9a859 100644 --- a/recipes-devtools/cst/cst_git.bb +++ b/recipes-devtools/cst/cst_git.bb | |||
@@ -24,6 +24,7 @@ SRCREV = "dfe30d3f05cfe281896482839e57ed49c52f2088" | |||
24 | S = "${WORKDIR}/git" | 24 | S = "${WORKDIR}/git" |
25 | 25 | ||
26 | EXTRA_OEMAKE = 'CC="${CC}" LD="${CC}"' | 26 | EXTRA_OEMAKE = 'CC="${CC}" LD="${CC}"' |
27 | CFLAGS:append = ' -Wno-deprecated-declarations' | ||
27 | 28 | ||
28 | PARALLEL_MAKE = "" | 29 | PARALLEL_MAKE = "" |
29 | 30 | ||
diff --git a/recipes-devtools/qemu/qemu-qoriq/0001-linux-user-remove-host-stime-syscall.patch b/recipes-devtools/qemu/qemu-qoriq/0001-linux-user-remove-host-stime-syscall.patch deleted file mode 100644 index 2d3bd7e0..00000000 --- a/recipes-devtools/qemu/qemu-qoriq/0001-linux-user-remove-host-stime-syscall.patch +++ /dev/null | |||
@@ -1,67 +0,0 @@ | |||
1 | From 0f1f2d4596aee037d3ccbcf10592466daa54107f Mon Sep 17 00:00:00 2001 | ||
2 | From: Laurent Vivier <laurent@vivier.eu> | ||
3 | Date: Tue, 12 Nov 2019 15:25:56 +0100 | ||
4 | Subject: [PATCH] linux-user: remove host stime() syscall | ||
5 | |||
6 | stime() has been withdrawn from glibc | ||
7 | (12cbde1dae6f "Use clock_settime to implement stime; withdraw stime.") | ||
8 | |||
9 | Implement the target stime() syscall using host | ||
10 | clock_settime(CLOCK_REALTIME, ...) as it is done internally in glibc. | ||
11 | |||
12 | Tested qemu-ppc/x86_64 with: | ||
13 | |||
14 | #include <time.h> | ||
15 | #include <stdio.h> | ||
16 | |||
17 | int main(void) | ||
18 | { | ||
19 | time_t t; | ||
20 | int ret; | ||
21 | |||
22 | /* date -u -d"2019-11-12T15:11:00" "+%s" */ | ||
23 | t = 1573571460; | ||
24 | ret = stime(&t); | ||
25 | printf("ret %d\n", ret); | ||
26 | return 0; | ||
27 | } | ||
28 | |||
29 | # date; ./stime; date | ||
30 | Tue Nov 12 14:18:32 UTC 2019 | ||
31 | ret 0 | ||
32 | Tue Nov 12 15:11:00 UTC 2019 | ||
33 | |||
34 | Upstream-Status: Backport | ||
35 | |||
36 | Buglink: https://bugs.launchpad.net/qemu/+bug/1852115 | ||
37 | Reported-by: Cole Robinson <crobinso@redhat.com> | ||
38 | Signed-off-by: Laurent Vivier <laurent@vivier.eu> | ||
39 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> | ||
40 | Message-Id: <20191112142556.6335-1-laurent@vivier.eu> | ||
41 | --- | ||
42 | linux-user/syscall.c | 8 +++++--- | ||
43 | 1 file changed, 5 insertions(+), 3 deletions(-) | ||
44 | |||
45 | diff --git a/linux-user/syscall.c b/linux-user/syscall.c | ||
46 | index 4e97bcf1e5..ce399a55f0 100644 | ||
47 | --- a/linux-user/syscall.c | ||
48 | +++ b/linux-user/syscall.c | ||
49 | @@ -7764,10 +7764,12 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, | ||
50 | #ifdef TARGET_NR_stime /* not on alpha */ | ||
51 | case TARGET_NR_stime: | ||
52 | { | ||
53 | - time_t host_time; | ||
54 | - if (get_user_sal(host_time, arg1)) | ||
55 | + struct timespec ts; | ||
56 | + ts.tv_nsec = 0; | ||
57 | + if (get_user_sal(ts.tv_sec, arg1)) { | ||
58 | return -TARGET_EFAULT; | ||
59 | - return get_errno(stime(&host_time)); | ||
60 | + } | ||
61 | + return get_errno(clock_settime(CLOCK_REALTIME, &ts)); | ||
62 | } | ||
63 | #endif | ||
64 | #ifdef TARGET_NR_alarm /* not on alpha */ | ||
65 | -- | ||
66 | 2.24.0 | ||
67 | |||
diff --git a/recipes-devtools/qemu/qemu-qoriq_4.1.0.bb b/recipes-devtools/qemu/qemu-qoriq_4.2.bb index 26c78639..f788f724 100644 --- a/recipes-devtools/qemu/qemu-qoriq_4.1.0.bb +++ b/recipes-devtools/qemu/qemu-qoriq_4.2.bb | |||
@@ -13,10 +13,9 @@ SRC_URI = "gitsm://source.codeaurora.org/external/qoriq/qoriq-components/qemu;no | |||
13 | file://powerpc_rom.bin \ | 13 | file://powerpc_rom.bin \ |
14 | file://run-ptest \ | 14 | file://run-ptest \ |
15 | file://0002-Add-subpackage-ptest-which-runs-all-unit-test-cases-.patch \ | 15 | file://0002-Add-subpackage-ptest-which-runs-all-unit-test-cases-.patch \ |
16 | file://0001-linux-user-remove-host-stime-syscall.patch \ | ||
17 | " | 16 | " |
18 | 17 | ||
19 | SRCREV = "0b88a503e43ca629d6e8165638ac6b312e5c66bd" | 18 | SRCREV = "14fda5a42df6c72e890d6a97ff88c5852172604b" |
20 | 19 | ||
21 | S = "${WORKDIR}/git" | 20 | S = "${WORKDIR}/git" |
22 | 21 | ||
@@ -53,7 +52,7 @@ do_install_ptest() { | |||
53 | } | 52 | } |
54 | 53 | ||
55 | PACKAGECONFIG ??= " \ | 54 | PACKAGECONFIG ??= " \ |
56 | fdt sdl kvm aio libusb vhost \ | 55 | fdt sdl kvm aio libusb vhost numa \ |
57 | ${@bb.utils.filter('DISTRO_FEATURES', 'alsa xen', d)} \ | 56 | ${@bb.utils.filter('DISTRO_FEATURES', 'alsa xen', d)} \ |
58 | " | 57 | " |
59 | PACKAGECONFIG:class-nativesdk ??= "fdt sdl kvm" | 58 | PACKAGECONFIG:class-nativesdk ??= "fdt sdl kvm" |
diff --git a/recipes-dpaa2/management-complex/management-complex_10.29.0.bb b/recipes-dpaa2/management-complex/management-complex_10.29.0.bb new file mode 100644 index 00000000..ba43b761 --- /dev/null +++ b/recipes-dpaa2/management-complex/management-complex_10.29.0.bb | |||
@@ -0,0 +1,41 @@ | |||
1 | SUMMARY = "DPAA2 Management Complex Firmware" | ||
2 | LICENSE = "NXP-Binary-EULA" | ||
3 | LIC_FILES_CHKSUM = "file://NXP-Binary-EULA.txt;md5=2cb2fee5d3558ee2a81331ed121647ad" | ||
4 | |||
5 | inherit deploy | ||
6 | |||
7 | INHIBIT_DEFAULT_DEPS = "1" | ||
8 | |||
9 | SRC_URI = "git://github.com/nxp/qoriq-mc-binary;nobranch=1" | ||
10 | SRCREV = "d21bc22000a14b0b6eeafc017fb93bc70499f74a" | ||
11 | |||
12 | S = "${WORKDIR}/git" | ||
13 | |||
14 | REGLEX:ls2088a = "ls2088a" | ||
15 | REGLEX:ls2080a = "ls2080a" | ||
16 | REGLEX:ls1088a = "ls1088a" | ||
17 | REGLEX:lx2160a = "lx216xa" | ||
18 | REGLEX:lx2162a = "lx216xa" | ||
19 | |||
20 | do_install () { | ||
21 | install -d ${D}/boot | ||
22 | install -m 755 ${S}/${REGLEX}/*.itb ${D}/boot | ||
23 | } | ||
24 | |||
25 | do_deploy () { | ||
26 | install -d ${DEPLOYDIR}/mc_app | ||
27 | install -m 755 ${S}/${REGLEX}/*.itb ${DEPLOYDIR}/mc_app | ||
28 | # make a symlink to the latest binary | ||
29 | for mc_binary in `find ${DEPLOYDIR}/mc_app -type f -printf "%f\n" |sort`;do | ||
30 | ln -sfT ${mc_binary} ${DEPLOYDIR}/mc_app/mc.itb | ||
31 | done | ||
32 | } | ||
33 | addtask deploy before do_build after do_install | ||
34 | |||
35 | PACKAGES += "${PN}-image" | ||
36 | FILES:${PN}-image += "/boot" | ||
37 | |||
38 | INHIBIT_PACKAGE_STRIP = "1" | ||
39 | |||
40 | COMPATIBLE_MACHINE = "(qoriq-arm64)" | ||
41 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
diff --git a/recipes-dpaa2/restool/files/disable-manpage-generation.patch b/recipes-dpaa2/restool/files/disable-manpage-generation.patch new file mode 100644 index 00000000..ec512830 --- /dev/null +++ b/recipes-dpaa2/restool/files/disable-manpage-generation.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | From 5392152e704ff001c41de03445d668227237a87e Mon Sep 17 00:00:00 2001 | ||
2 | From: Ting Liu <ting.liu@nxp.com> | ||
3 | Date: Fri, 15 Oct 2021 09:36:04 +0530 | ||
4 | Subject: [PATCH] disable manpage generation | ||
5 | |||
6 | Signed-off-by: Ting Liu <ting.liu@nxp.com> | ||
7 | --- | ||
8 | Makefile | 1 - | ||
9 | 1 file changed, 1 deletion(-) | ||
10 | |||
11 | diff --git a/Makefile b/Makefile | ||
12 | index ee669ae..ab6e499 100644 | ||
13 | --- a/Makefile | ||
14 | +++ b/Makefile | ||
15 | @@ -60,7 +60,6 @@ install: restool scripts/ls-main scripts/ls-append-dpl scripts/ls-debug scripts/ | ||
16 | install -D -m 755 scripts/ls-debug $(DESTDIR)$(bindir)/ls-debug | ||
17 | $(foreach symlink, $(RESTOOL_SCRIPT_SYMLINKS), sh -c "cd $(DESTDIR)$(bindir) && ln -sf ls-main $(symlink)" ;) | ||
18 | install -D -m 755 scripts/restool_completion.sh $(DESTDIR)$(bindir_completion)/restool | ||
19 | - install -m 0644 -D $(MANPAGE) $(call get_manpage_destination,$(MANPAGE)) | ||
20 | |||
21 | clean: | ||
22 | rm -f $(OBJ) $(MANPAGE) \ | ||
23 | -- | ||
24 | 2.25.1 | ||
25 | |||
diff --git a/recipes-dpaa2/restool/restool_git.bb b/recipes-dpaa2/restool/restool_git.bb index 5376d8f7..3ff5afd8 100644 --- a/recipes-dpaa2/restool/restool_git.bb +++ b/recipes-dpaa2/restool/restool_git.bb | |||
@@ -2,14 +2,16 @@ SUMMARY = "DPAA2 Resource Manager Tool" | |||
2 | LICENSE = "BSD" | 2 | LICENSE = "BSD" |
3 | LIC_FILES_CHKSUM = "file://COPYING;md5=ec8d84e9cd4de287e290275d09db27f0" | 3 | LIC_FILES_CHKSUM = "file://COPYING;md5=ec8d84e9cd4de287e290275d09db27f0" |
4 | 4 | ||
5 | RDEPENDS:${PN} += "bash dtc" | 5 | SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/restool;nobranch=1 \ |
6 | 6 | file://disable-manpage-generation.patch \ | |
7 | SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/restool;nobranch=1" | 7 | " |
8 | SRCREV = "8ddbe4c9559ffad5d7e5dd3cd5f00ceeff7f05d4" | 8 | SRCREV = "d29522aef9f92ff2557978d5d3979b771a9576fe" |
9 | 9 | ||
10 | S = "${WORKDIR}/git" | 10 | S = "${WORKDIR}/git" |
11 | 11 | ||
12 | EXTRA_OEMAKE = 'CC="${CC}" EXTRA_CFLAGS="-O2 -Wno-missing-field-initializers -Wno-missing-braces"' | 12 | inherit bash-completion |
13 | |||
14 | EXTRA_OEMAKE = 'CC="${CC}" MANPAGE= EXTRA_CFLAGS="-O2 -Wno-missing-field-initializers -Wno-missing-braces -Wno-maybe-uninitialized -Wno-date-time"' | ||
13 | 15 | ||
14 | do_install () { | 16 | do_install () { |
15 | oe_runmake install DESTDIR=${D} | 17 | oe_runmake install DESTDIR=${D} |
@@ -18,3 +20,6 @@ do_install () { | |||
18 | COMPATIBLE_MACHINE = "(qoriq-arm64)" | 20 | COMPATIBLE_MACHINE = "(qoriq-arm64)" |
19 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 21 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
20 | 22 | ||
23 | RDEPENDS:${PN} += "bash dtc" | ||
24 | RDEPENDS:${PN}-bash-completion += "bash" | ||
25 | |||
diff --git a/recipes-dpaa2/spc/spc_git.bb b/recipes-dpaa2/spc/spc_git.bb index 3e68ae89..2ef1d01d 100644 --- a/recipes-dpaa2/spc/spc_git.bb +++ b/recipes-dpaa2/spc/spc_git.bb | |||
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=163b09a1c249a6ff2b28da1ceca2e0a8" | |||
5 | DEPENDS = "libxml2 fmlib tclap" | 5 | DEPENDS = "libxml2 fmlib tclap" |
6 | 6 | ||
7 | SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/spc;nobranch=1" | 7 | SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/spc;nobranch=1" |
8 | SRCREV = "be7dd8e346a934aae1e4bdd6b579f2aa4bb5cd86" | 8 | SRCREV = "398138687a3d3d6ef174501221711de74ff7bc40" |
9 | 9 | ||
10 | S = "${WORKDIR}/git" | 10 | S = "${WORKDIR}/git" |
11 | 11 | ||
diff --git a/recipes-extended/dpdk/dpdk-20.11.inc b/recipes-extended/dpdk/dpdk-20.11.inc new file mode 100644 index 00000000..00aed60d --- /dev/null +++ b/recipes-extended/dpdk/dpdk-20.11.inc | |||
@@ -0,0 +1,15 @@ | |||
1 | DESCRIPTION = "Data Plane Development Kit" | ||
2 | HOMEPAGE = "http://dpdk.org" | ||
3 | LICENSE = "BSD-3-Clause & LGPLv2.1 & GPLv2" | ||
4 | LIC_FILES_CHKSUM = "file://license/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
5 | file://license/lgpl-2.1.txt;md5=4b54a1fd55a448865a0b32d41598759d \ | ||
6 | file://license/bsd-3-clause.txt;md5=0f00d99239d922ffd13cabef83b33444" | ||
7 | |||
8 | SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/dpdk;nobranch=1" | ||
9 | SRCREV = "f74b8bd5ab1c6ff76e956fc202a56aea2d200270" | ||
10 | |||
11 | S = "${WORKDIR}/git" | ||
12 | |||
13 | COMPATIBLE_MACHINE = "(qoriq-arm64)" | ||
14 | |||
15 | CVE_PRODUCT = "data_plane_development_kit" | ||
diff --git a/recipes-extended/dpdk/dpdk-20.11/0001-Makefile-add-makefile.patch b/recipes-extended/dpdk/dpdk-20.11/0001-Makefile-add-makefile.patch new file mode 100644 index 00000000..18b75fb6 --- /dev/null +++ b/recipes-extended/dpdk/dpdk-20.11/0001-Makefile-add-makefile.patch | |||
@@ -0,0 +1,74 @@ | |||
1 | From 768cef60957d5e840071d1d6514d4add3f3c2904 Mon Sep 17 00:00:00 2001 | ||
2 | From: Naveen Saini <naveen.kumar.saini@intel.com> | ||
3 | Date: Wed, 14 Apr 2021 17:25:53 +0800 | ||
4 | Subject: [PATCH] Makefile: add makefile | ||
5 | |||
6 | Current meson build for kernel module build does not fit in Yocto. | ||
7 | So added Makefile to build rte_kni.ko | ||
8 | |||
9 | Upstream-Status: Inappropriate | ||
10 | |||
11 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
12 | --- | ||
13 | kernel/linux/kni/Kbuild | 6 ------ | ||
14 | kernel/linux/kni/Makefile | 35 +++++++++++++++++++++++++++++++++++ | ||
15 | 2 files changed, 35 insertions(+), 6 deletions(-) | ||
16 | delete mode 100644 kernel/linux/kni/Kbuild | ||
17 | create mode 100644 kernel/linux/kni/Makefile | ||
18 | |||
19 | diff --git a/kernel/linux/kni/Kbuild b/kernel/linux/kni/Kbuild | ||
20 | deleted file mode 100644 | ||
21 | index e5452d6c00..0000000000 | ||
22 | --- a/kernel/linux/kni/Kbuild | ||
23 | +++ /dev/null | ||
24 | @@ -1,6 +0,0 @@ | ||
25 | -# SPDX-License-Identifier: BSD-3-Clause | ||
26 | -# Copyright(c) 2018 Luca Boccassi <bluca@debian.org> | ||
27 | - | ||
28 | -ccflags-y := $(MODULE_CFLAGS) | ||
29 | -obj-m := rte_kni.o | ||
30 | -rte_kni-y := $(patsubst $(src)/%.c,%.o,$(wildcard $(src)/*.c)) | ||
31 | diff --git a/kernel/linux/kni/Makefile b/kernel/linux/kni/Makefile | ||
32 | new file mode 100644 | ||
33 | index 0000000000..19897ee06e | ||
34 | --- /dev/null | ||
35 | +++ b/kernel/linux/kni/Makefile | ||
36 | @@ -0,0 +1,35 @@ | ||
37 | +# | ||
38 | +# Makefile for building rte_kni.ko | ||
39 | +# | ||
40 | +MODULE_CFLAGS += -include $(S)/config/rte_config.h | ||
41 | +MODULE_CFLAGS += -I$(S)/lib/librte_eal/include | ||
42 | +MODULE_CFLAGS += -I$(S)/lib/librte_kni | ||
43 | +MODULE_CFLAGS += -I$(S)/kernel/linux/kni | ||
44 | +MODULE_CFLAGS += -I$(S) | ||
45 | +MODULE_CFLAGS += -I$(STAGING_INCDIR) | ||
46 | + | ||
47 | +rte_kni-objs = kni_misc.o kni_net.o | ||
48 | + | ||
49 | +ccflags-y := $(MODULE_CFLAGS) | ||
50 | +cflags-y := $(MODULE_CFLAGS) | ||
51 | +obj-m := rte_kni.o | ||
52 | + | ||
53 | + | ||
54 | +KERNEL_MAKE_OPTS := -C $(STAGING_KERNEL_DIR) M=$(CURDIR) | ||
55 | +ifneq ($(ARCH),) | ||
56 | +KERNEL_MAKE_OPTS += ARCH=$(ARCH) | ||
57 | +endif | ||
58 | +ifneq ($(CROSS_COMPILE),) | ||
59 | +KERNEL_MAKE_OPTS += CROSS_COMPILE=$(CROSS_COMPILE) | ||
60 | +endif | ||
61 | + | ||
62 | +build: | ||
63 | + $(MAKE) $(KERNEL_MAKE_OPTS) modules | ||
64 | + | ||
65 | +install: modules_install | ||
66 | + | ||
67 | +modules_install: | ||
68 | + $(MAKE) $(KERNEL_MAKE_OPTS) modules_install | ||
69 | + | ||
70 | +clean: | ||
71 | + $(MAKE) $(KERNEL_MAKE_OPTS) clean | ||
72 | -- | ||
73 | 2.17.1 | ||
74 | |||
diff --git a/recipes-extended/dpdk/dpdk-20.11/0001-drivers-net-enetfec-enet_uio.c-fix-multiple-definiti.patch b/recipes-extended/dpdk/dpdk-20.11/0001-drivers-net-enetfec-enet_uio.c-fix-multiple-definiti.patch new file mode 100644 index 00000000..f19b2b32 --- /dev/null +++ b/recipes-extended/dpdk/dpdk-20.11/0001-drivers-net-enetfec-enet_uio.c-fix-multiple-definiti.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | From 6fe85f3a12d15e25345ef0547035a929351a179c Mon Sep 17 00:00:00 2001 | ||
2 | From: Ting Liu <ting.liu@nxp.com> | ||
3 | Date: Fri, 17 Sep 2021 12:53:53 +0530 | ||
4 | Subject: [PATCH] drivers/net/enetfec/enet_uio.c: fix multiple definition | ||
5 | |||
6 | .../drivers/net/enetfec/enet_uio.c:22: multiple definition of `count'; | ||
7 | .../examples/flow_classify/flow_classify.c:170: first defined here | ||
8 | collect2: error: ld returned 1 exit status | ||
9 | |||
10 | Signed-off-by: Ting Liu <ting.liu@nxp.com> | ||
11 | --- | ||
12 | drivers/net/enetfec/enet_uio.c | 2 +- | ||
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/drivers/net/enetfec/enet_uio.c b/drivers/net/enetfec/enet_uio.c | ||
16 | index b64dc522e8..9e09f9beb6 100644 | ||
17 | --- a/drivers/net/enetfec/enet_uio.c | ||
18 | +++ b/drivers/net/enetfec/enet_uio.c | ||
19 | @@ -19,7 +19,7 @@ | ||
20 | #include "enet_uio.h" | ||
21 | |||
22 | static struct uio_job enetfec_uio_job; | ||
23 | -int count; | ||
24 | +static int count; | ||
25 | |||
26 | /** @brief Reads first line from a file. | ||
27 | * Composes file name as: root/subdir/filename | ||
28 | -- | ||
29 | 2.25.1 | ||
30 | |||
diff --git a/recipes-extended/dpdk/dpdk-20.11/0001-ifpga-meson-Fix-finding-librt-using-find_library.patch b/recipes-extended/dpdk/dpdk-20.11/0001-ifpga-meson-Fix-finding-librt-using-find_library.patch new file mode 100644 index 00000000..4df28c40 --- /dev/null +++ b/recipes-extended/dpdk/dpdk-20.11/0001-ifpga-meson-Fix-finding-librt-using-find_library.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From 308409d72671b7978b20d40748ad985a235b6c86 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mohamad Noor Alim Hussin <mohamad.noor.alim.hussin@intel.com> | ||
3 | Date: Thu, 24 Jun 2021 11:30:09 +0800 | ||
4 | Subject: [PATCH] ifpga/meson: Fix finding librt using find_library() | ||
5 | |||
6 | Finding with "librt" keyword would give the output | ||
7 | with full path of librt such as /usr/lib/librt.so | ||
8 | instead of -lrt. | ||
9 | |||
10 | Assume find_library() will prepend "lib", thus remove | ||
11 | "lib" from "librt" keyword. The output will shows as | ||
12 | -lrt. | ||
13 | |||
14 | Upstream-Status: Submitted [https://mails.dpdk.org/archives/stable/2021-June/031840.html] | ||
15 | |||
16 | Signed-off-by: Mohamad Noor Alim Hussin <mohamad.noor.alim.hussin@intel.com> | ||
17 | --- | ||
18 | drivers/raw/ifpga/base/meson.build | 2 +- | ||
19 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
20 | |||
21 | diff --git a/drivers/raw/ifpga/base/meson.build b/drivers/raw/ifpga/base/meson.build | ||
22 | index da2d6e33c..949f7f127 100644 | ||
23 | --- a/drivers/raw/ifpga/base/meson.build | ||
24 | +++ b/drivers/raw/ifpga/base/meson.build | ||
25 | @@ -25,7 +25,7 @@ sources = [ | ||
26 | |||
27 | rtdep = dependency('librt', required: false) | ||
28 | if not rtdep.found() | ||
29 | - rtdep = cc.find_library('librt', required: false) | ||
30 | + rtdep = cc.find_library('rt', required: false) | ||
31 | endif | ||
32 | if not rtdep.found() | ||
33 | build = false | ||
34 | -- | ||
35 | 2.32.0 | ||
diff --git a/recipes-extended/dpdk/dpdk-20.11/0001-meson.build-march-and-mcpu-already-passed-by-Yocto.patch b/recipes-extended/dpdk/dpdk-20.11/0001-meson.build-march-and-mcpu-already-passed-by-Yocto.patch new file mode 100644 index 00000000..bef1f45b --- /dev/null +++ b/recipes-extended/dpdk/dpdk-20.11/0001-meson.build-march-and-mcpu-already-passed-by-Yocto.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From cf8f15824dc2dd306d9c7e111641bef045d623c2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Naveen Saini <naveen.kumar.saini@intel.com> | ||
3 | Date: Wed, 14 Apr 2021 16:03:10 +0800 | ||
4 | Subject: [PATCH] meson.build:-march and -mcpu already passed by Yocto | ||
5 | |||
6 | Upstream-Status: Inappropriate | ||
7 | |||
8 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
9 | --- | ||
10 | config/meson.build | 12 ++++++------ | ||
11 | 1 file changed, 6 insertions(+), 6 deletions(-) | ||
12 | |||
13 | diff --git a/config/meson.build b/config/meson.build | ||
14 | index 2f150de3b8..41bb3e9ec4 100644 | ||
15 | --- a/config/meson.build | ||
16 | +++ b/config/meson.build | ||
17 | @@ -94,12 +94,12 @@ dpdk_conf.set('RTE_MACHINE', machine) | ||
18 | machine_args = [] | ||
19 | |||
20 | # ppc64 does not support -march= at all, use -mcpu and -mtune for that | ||
21 | -if host_machine.cpu_family().startswith('ppc') | ||
22 | - machine_args += '-mcpu=' + machine | ||
23 | - machine_args += '-mtune=' + machine | ||
24 | -else | ||
25 | - machine_args += '-march=' + machine | ||
26 | -endif | ||
27 | +#if host_machine.cpu_family().startswith('ppc') | ||
28 | +# machine_args += '-mcpu=' + machine | ||
29 | +# machine_args += '-mtune=' + machine | ||
30 | +#else | ||
31 | +# machine_args += '-march=' + machine | ||
32 | +#endif | ||
33 | |||
34 | toolchain = cc.get_id() | ||
35 | dpdk_conf.set_quoted('RTE_TOOLCHAIN', toolchain) | ||
36 | -- | ||
37 | 2.17.1 | ||
38 | |||
diff --git a/recipes-extended/dpdk/dpdk-module_20.11.bb b/recipes-extended/dpdk/dpdk-module_20.11.bb new file mode 100644 index 00000000..180b140b --- /dev/null +++ b/recipes-extended/dpdk/dpdk-module_20.11.bb | |||
@@ -0,0 +1,41 @@ | |||
1 | include dpdk-20.11.inc | ||
2 | |||
3 | FILESEXTRAPATHS:prepend := "${THISDIR}/dpdk-${PV}:" | ||
4 | |||
5 | SRC_URI += " \ | ||
6 | file://0001-Makefile-add-makefile.patch \ | ||
7 | " | ||
8 | |||
9 | inherit module | ||
10 | |||
11 | #kernel module needs 'rte_build_config.h', which is generated at buid time | ||
12 | DEPENDS += "dpdk" | ||
13 | |||
14 | export S | ||
15 | export STAGING_KERNEL_DIR | ||
16 | export STAGING_INCDIR | ||
17 | export INSTALL_MOD_DIR="dpdk" | ||
18 | |||
19 | do_configure[noexec] = "1" | ||
20 | |||
21 | do_compile() { | ||
22 | cd ${S}/kernel/linux/kni | ||
23 | unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS | ||
24 | oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \ | ||
25 | KERNEL_VERSION=${KERNEL_VERSION} \ | ||
26 | CC="${KERNEL_CC}" LD="${KERNEL_LD}" \ | ||
27 | AR="${KERNEL_AR}" \ | ||
28 | O=${STAGING_KERNEL_BUILDDIR} \ | ||
29 | KBUILD_EXTRA_SYMBOLS="${KBUILD_EXTRA_SYMBOLS}" \ | ||
30 | ${MAKE_TARGETS} | ||
31 | } | ||
32 | |||
33 | do_install() { | ||
34 | cd ${S}/kernel/linux/kni | ||
35 | unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS | ||
36 | oe_runmake DEPMOD=echo MODLIB="${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}" \ | ||
37 | INSTALL_FW_PATH="${D}${nonarch_base_libdir}/firmware" \ | ||
38 | CC="${KERNEL_CC}" LD="${KERNEL_LD}" \ | ||
39 | O=${STAGING_KERNEL_BUILDDIR} \ | ||
40 | ${MODULES_INSTALL_TARGET} | ||
41 | } | ||
diff --git a/recipes-extended/dpdk/dpdk_20.11.bb b/recipes-extended/dpdk/dpdk_20.11.bb new file mode 100644 index 00000000..2d27adc5 --- /dev/null +++ b/recipes-extended/dpdk/dpdk_20.11.bb | |||
@@ -0,0 +1,93 @@ | |||
1 | include dpdk-20.11.inc | ||
2 | |||
3 | SRC_URI += " \ | ||
4 | file://0001-meson.build-march-and-mcpu-already-passed-by-Yocto.patch \ | ||
5 | file://0001-ifpga-meson-Fix-finding-librt-using-find_library.patch \ | ||
6 | file://0001-drivers-net-enetfec-enet_uio.c-fix-multiple-definiti.patch \ | ||
7 | " | ||
8 | |||
9 | MESON_BUILDTYPE = "release" | ||
10 | |||
11 | # kernel module is provide by dpdk-module recipe, so disable here | ||
12 | EXTRA_OEMESON = " -Denable_kmods=false \ | ||
13 | -Dexamples=all \ | ||
14 | -Doptimization=3 \ | ||
15 | " | ||
16 | |||
17 | PACKAGECONFIG ??= "openssl" | ||
18 | PACKAGECONFIG[afxdp] = ",,libbpf" | ||
19 | PACKAGECONFIG[libvirt] = ",,libvirt" | ||
20 | PACKAGECONFIG[openssl] = ",,openssl" | ||
21 | |||
22 | RDEPENDS:${PN} += "bash pciutils python3-core" | ||
23 | RDEPENDS:${PN}-examples += "bash" | ||
24 | DEPENDS = "numactl" | ||
25 | |||
26 | inherit meson | ||
27 | |||
28 | INSTALL_PATH = "${prefix}/share/dpdk" | ||
29 | |||
30 | do_configure:prepend() { | ||
31 | sed -i "/implementor_/d" ${WORKDIR}/meson.cross | ||
32 | sed -i "/\[properties]/aimplementor_id = 'dpaa'" ${WORKDIR}/meson.cross | ||
33 | sed -i "/\[properties]/aimplementor_pn = 'default'" ${WORKDIR}/meson.cross | ||
34 | sed -i "s/cpu =.*/cpu = 'armv8-a'/" ${WORKDIR}/meson.cross | ||
35 | } | ||
36 | |||
37 | do_install:append(){ | ||
38 | # remove source files | ||
39 | rm -rf ${D}/${INSTALL_PATH}/examples/* | ||
40 | |||
41 | # Install examples | ||
42 | install -m 0755 -d ${D}/${INSTALL_PATH}/examples/ | ||
43 | for dirname in ${B}/examples/dpdk-* | ||
44 | do | ||
45 | if [ ! -d ${dirname} ] && [ -x ${dirname} ]; then | ||
46 | install -m 0755 ${dirname} ${D}/${INSTALL_PATH}/examples/ | ||
47 | fi | ||
48 | done | ||
49 | cp -rf ${S}/nxp/* ${D}/${INSTALL_PATH}/ | ||
50 | } | ||
51 | |||
52 | PACKAGES =+ "${PN}-tools ${PN}-examples ${PN}-misc" | ||
53 | |||
54 | FILES:${PN}-tools = " \ | ||
55 | ${bindir}/dpdk-testpmd \ | ||
56 | ${INSTALL_PATH}/examples/dpdk-l2fwd \ | ||
57 | ${INSTALL_PATH}/examples/dpdk-l2fwd-crypto \ | ||
58 | ${INSTALL_PATH}/examples/dpdk-l3fwd \ | ||
59 | ${INSTALL_PATH}/examples/dpdk-ipsec-secgw \ | ||
60 | " | ||
61 | |||
62 | FILES:${PN}-examples = " \ | ||
63 | ${bindir}/dpdk-proc-info \ | ||
64 | ${bindir}/dpdk-test \ | ||
65 | ${bindir}/dpdk-test-crypto-perf \ | ||
66 | ${bindir}/dpdk-*.py \ | ||
67 | ${INSTALL_PATH}/examples/dpdk-cmdif \ | ||
68 | ${INSTALL_PATH}/examples/dpdk-cmdline \ | ||
69 | ${INSTALL_PATH}/examples/dpdk-ethtool \ | ||
70 | ${INSTALL_PATH}/examples/dpdk-ip_fragmentation \ | ||
71 | ${INSTALL_PATH}/examples/dpdk-ip_reassembly \ | ||
72 | ${INSTALL_PATH}/examples/dpdk-kni \ | ||
73 | ${INSTALL_PATH}/examples/dpdk-l2fwd-keepalive \ | ||
74 | ${INSTALL_PATH}/examples/dpdk-l2fwd-qdma \ | ||
75 | ${INSTALL_PATH}/examples/dpdk-l3fwd-acl \ | ||
76 | ${INSTALL_PATH}/examples/dpdk-link_status_interrupt \ | ||
77 | ${INSTALL_PATH}/examples/dpdk-mp_client \ | ||
78 | ${INSTALL_PATH}/examples/dpdk-mp_server \ | ||
79 | ${INSTALL_PATH}/examples/dpdk-qdma_demo \ | ||
80 | ${INSTALL_PATH}/examples/dpdk-simple_mp \ | ||
81 | ${INSTALL_PATH}/examples/dpdk-symmetric_mp \ | ||
82 | ${INSTALL_PATH}/examples/dpdk-symmetric_mp_qdma \ | ||
83 | ${INSTALL_PATH}/examples/dpdk-timer \ | ||
84 | " | ||
85 | |||
86 | FILES:${PN}-misc = " \ | ||
87 | ${bindir}/dpdk-pdump \ | ||
88 | ${bindir}/dpdk-test-* \ | ||
89 | ${bindir}/dpdk-*.py \ | ||
90 | ${INSTALL_PATH}/examples/* \ | ||
91 | " | ||
92 | |||
93 | INSANE_SKIP:${PN} = "dev-so" | ||
diff --git a/recipes-extended/libpkcs11/libpkcs11_git.bb b/recipes-extended/libpkcs11/libpkcs11_git.bb index 5496b09c..42b48779 100644 --- a/recipes-extended/libpkcs11/libpkcs11_git.bb +++ b/recipes-extended/libpkcs11/libpkcs11_git.bb | |||
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=803852533e29eb1d6d5e55ad3078b625" | |||
5 | SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/libpkcs11;nobranch=1 \ | 5 | SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/libpkcs11;nobranch=1 \ |
6 | file://0001-fix-multiple-definition-error.patch \ | 6 | file://0001-fix-multiple-definition-error.patch \ |
7 | " | 7 | " |
8 | SRCREV = "a243fb21772f1bd434d8bc1ac45feb36571afadb" | 8 | SRCREV = "8d85182b7a7cd393ab6dd72930f8d1b69468f741" |
9 | 9 | ||
10 | DEPENDS = "openssl secure-obj" | 10 | DEPENDS = "openssl secure-obj" |
11 | 11 | ||
@@ -30,6 +30,7 @@ do_install(){ | |||
30 | mkdir -p ${D}/${includedir} ${D}/${bindir} | 30 | mkdir -p ${D}/${includedir} ${D}/${bindir} |
31 | cp ${S}/out/export/lib/libpkcs11.so ${D}/${libdir} | 31 | cp ${S}/out/export/lib/libpkcs11.so ${D}/${libdir} |
32 | cp ${S}/out/export/include/*.h ${D}/${includedir} | 32 | cp ${S}/out/export/include/*.h ${D}/${includedir} |
33 | rm -f ${D}${includedir}/pkcs11.h | ||
33 | cp ${S}/out/export/app/* ${D}/${bindir} | 34 | cp ${S}/out/export/app/* ${D}/${bindir} |
34 | } | 35 | } |
35 | 36 | ||
diff --git a/recipes-extended/ovs-dpdk/ovs-dpdk_2.13.0.bb b/recipes-extended/ovs-dpdk/ovs-dpdk_2.13.0.bb deleted file mode 100644 index f9d32773..00000000 --- a/recipes-extended/ovs-dpdk/ovs-dpdk_2.13.0.bb +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | DESCRIPTION = "OVS DPDK" | ||
2 | LICENSE = "BSD" | ||
3 | LIC_FILES_CHKSUM = "file://LICENSE;md5=1ce5d23a6429dff345518758f13aaeab" | ||
4 | |||
5 | DEPENDS = "dpdk python3-six-native coreutils-native" | ||
6 | RDEPENDS:${PN} = "bash libcrypto libssl python3" | ||
7 | |||
8 | inherit python3native | ||
9 | |||
10 | SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/ovs-dpdk;nobranch=1" | ||
11 | SRCREV = "072130412196029bcc284e353023d81019a8daa7" | ||
12 | |||
13 | S = "${WORKDIR}/git" | ||
14 | |||
15 | DPAA_VER ?= "dpaa" | ||
16 | export RTE_TARGET = "${ARCH}-${DPAA_VER}-linuxapp-gcc" | ||
17 | |||
18 | EXTRA_OEMAKE += 'ARCH="${ARCH}" CROSS="${TARGET_PREFIX}" \ | ||
19 | CPU_CFLAGS="--sysroot=${STAGING_DIR_HOST}" RTE_SDK="${S}" \ | ||
20 | OPENSSL_PATH="${STAGING_DIR_HOST}" RTE_KERNELDIR="${STAGING_KERNEL_DIR}" \ | ||
21 | RTE_KERNELDIR_OUT="${STAGING_KERNEL_BUILDDIR}" \ | ||
22 | ' | ||
23 | |||
24 | do_configure() { | ||
25 | export SYSROOT_DPDK=${PKG_CONFIG_SYSROOT_DIR} | ||
26 | ${S}/boot.sh | ||
27 | ${S}/configure --host aarch64-fsl-linux --with-dpdk=${SYSROOT_DPDK}/usr/share/${RTE_TARGET} --with-openssl=${SYSROOT_DPDK}/usr CFLAGS="-g -Wno-cast-align -Ofast" | ||
28 | } | ||
29 | |||
30 | do_compile() { | ||
31 | oe_runmake O="${RTE_TARGET}" T="${RTE_TARGET}" | ||
32 | } | ||
33 | |||
34 | do_install() { | ||
35 | install -d ${D}${bindir}/ovs-dpdk | ||
36 | cp -rf ${S}/ovsdb/ovsdb-tool ${D}${bindir}/ovs-dpdk | ||
37 | cp -rf ${S}/ovsdb/ovsdb-server ${D}${bindir}/ovs-dpdk | ||
38 | cp -rf ${S}/vswitchd/vswitch.ovsschema ${D}${bindir}/ovs-dpdk | ||
39 | cp -rf ${S}/vswitchd/ovs-vswitchd ${D}${bindir}/ovs-dpdk | ||
40 | cp -rf ${S}/utilities/ovs-vsctl ${D}${bindir}/ovs-dpdk | ||
41 | cp -rf ${S}/utilities/ovs-ofctl ${D}${bindir}/ovs-dpdk | ||
42 | chmod 777 -R ${D}${bindir}/ovs-dpdk/* | ||
43 | } | ||
44 | |||
45 | ALLOW_EMPTY:${PN} = "1" | ||
46 | INHIBIT_PACKAGE_STRIP = "1" | ||
47 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
48 | COMPATIBLE_MACHINE = "(qoriq-arm64)" | ||
diff --git a/recipes-extended/ovs-dpdk/ovs-dpdk_2.15.bb b/recipes-extended/ovs-dpdk/ovs-dpdk_2.15.bb new file mode 100644 index 00000000..fb41b457 --- /dev/null +++ b/recipes-extended/ovs-dpdk/ovs-dpdk_2.15.bb | |||
@@ -0,0 +1,36 @@ | |||
1 | DESCRIPTION = "OVS DPDK" | ||
2 | LICENSE = "BSD" | ||
3 | LIC_FILES_CHKSUM = "file://LICENSE;md5=1ce5d23a6429dff345518758f13aaeab" | ||
4 | |||
5 | DEPENDS = "dpdk python3-six-native coreutils-native autoconf-native automake-native" | ||
6 | RDEPENDS:${PN} = "bash libcrypto libssl python3" | ||
7 | |||
8 | inherit python3native pkgconfig | ||
9 | |||
10 | SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/ovs-dpdk;nobranch=1" | ||
11 | SRCREV = "f2c0744d2f68c4cd2840d6e409d7b0520e4caf99" | ||
12 | |||
13 | S = "${WORKDIR}/git" | ||
14 | |||
15 | do_configure() { | ||
16 | export SYSROOT_DPDK=${PKG_CONFIG_SYSROOT_DIR} | ||
17 | ${S}/boot.sh | ||
18 | ${S}/configure --host aarch64-fsl-linux --with-dpdk=static --with-openssl=${SYSROOT_DPDK}/usr CFLAGS="-g -Wno-cast-align -Ofast" | ||
19 | } | ||
20 | |||
21 | do_install:append() { | ||
22 | install -d ${D}${bindir}/ovs-dpdk | ||
23 | cp -rf ${S}/ovsdb/ovsdb-tool ${D}${bindir}/ovs-dpdk | ||
24 | cp -rf ${S}/ovsdb/ovsdb-server ${D}${bindir}/ovs-dpdk | ||
25 | cp -rf ${S}/ovsdb/ovsdb-client ${D}${bindir}/ovs-dpdk | ||
26 | cp -rf ${S}/vswitchd/vswitch.ovsschema ${D}${bindir}/ovs-dpdk | ||
27 | cp -rf ${S}/vswitchd/ovs-vswitchd ${D}${bindir}/ovs-dpdk | ||
28 | cp -rf ${S}/utilities/ovs-vsctl ${D}${bindir}/ovs-dpdk | ||
29 | cp -rf ${S}/utilities/ovs-ofctl ${D}${bindir}/ovs-dpdk | ||
30 | chmod 777 -R ${D}${bindir}/ovs-dpdk/* | ||
31 | } | ||
32 | |||
33 | ALLOW_EMPTY:${PN} = "1" | ||
34 | INHIBIT_PACKAGE_STRIP = "1" | ||
35 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
36 | COMPATIBLE_MACHINE = "(qoriq-arm64)" | ||
diff --git a/recipes-extended/pktgen-dpdk/files/fix-gcc11-mismatched-dealloc-error.patch b/recipes-extended/pktgen-dpdk/files/fix-gcc11-mismatched-dealloc-error.patch new file mode 100644 index 00000000..a2befbd6 --- /dev/null +++ b/recipes-extended/pktgen-dpdk/files/fix-gcc11-mismatched-dealloc-error.patch | |||
@@ -0,0 +1,72 @@ | |||
1 | From 530fbb2e2deb6b9214466933df221910c2c50b7c Mon Sep 17 00:00:00 2001 | ||
2 | From: Ting Liu <ting.liu@nxp.com> | ||
3 | Date: Fri, 15 Oct 2021 08:01:15 +0530 | ||
4 | Subject: [PATCH] fix gcc11 mismatched-dealloc error | ||
5 | |||
6 | Fix build error with gcc 11: | ||
7 | | FAILED: lib/common/libcommon.a.p/lscpu.c.o | ||
8 | | aarch64-poky-linux-gcc -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -Wdate-time --sysroot=/opt/ci/yocto/honister/build-lx2162aqds/tmp/work/lx2162aqds-poky-linux/pktgen-dpdk/21.05.0-r0/recipe-sysroot -Ilib/common/libcommon.a.p -Ilib/common -I../git/lib/common -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O3 -DALLOW_EXPERIMENTAL_API -D_GNU_SOURCE -Wno-pedantic -Wno-format-truncation -DRTE_FORCE_INTRINSICS -fPIC -include rte_config.h -march=armv8-a+crc -moutline-atomics -MD -MQ lib/common/libcommon.a.p/lscpu.c.o -MF lib/common/libcommon.a.p/lscpu.c.o.d -o lib/common/libcommon.a.p/lscpu.c.o -c ../git/lib/common/lscpu.c | ||
9 | | In function 'lscpu_info_get', | ||
10 | | inlined from 'lscpu_info' at ../git/lib/common/lscpu.c:210:2: | ||
11 | | ../git/lib/common/lscpu.c:167:9: error: 'fclose' called on pointer returned from a mismatched allocation function [-Werror=mismatched-dealloc] | ||
12 | | 167 | fclose(f); | ||
13 | | | ^~~~~~~~~ | ||
14 | | ../git/lib/common/lscpu.c: In function 'lscpu_info': | ||
15 | | ../git/lib/common/lscpu.c:146:22: note: returned from 'popen' | ||
16 | | 146 | FILE *f = popen(lscpu_path, "r"); | ||
17 | | | ^~~~~~~~~~~~~~~~~~~~~~ | ||
18 | | In function 'cpu_proc_info', | ||
19 | | inlined from 'lscpu_info' at ../git/lib/common/lscpu.c:211:2: | ||
20 | | ../git/lib/common/lscpu.c:195:9: error: 'fclose' called on pointer returned from a mismatched allocation function [-Werror=mismatched-dealloc] | ||
21 | | 195 | fclose(f); | ||
22 | | | ^~~~~~~~~ | ||
23 | | ../git/lib/common/lscpu.c: In function 'lscpu_info': | ||
24 | | ../git/lib/common/lscpu.c:174:22: note: returned from 'popen' | ||
25 | | 174 | FILE *f = popen(proc_path, "r"); | ||
26 | | | ^~~~~~~~~~~~~~~~~~~~~ | ||
27 | | cc1: all warnings being treated as errors | ||
28 | |||
29 | Signed-off-by: Ting Liu <ting.liu@nxp.com> | ||
30 | --- | ||
31 | app/pktgen.h | 2 +- | ||
32 | lib/common/lscpu.c | 4 ++-- | ||
33 | 2 files changed, 3 insertions(+), 3 deletions(-) | ||
34 | |||
35 | diff --git a/app/pktgen.h b/app/pktgen.h | ||
36 | index 7c61fc8..2f24c65 100644 | ||
37 | --- a/app/pktgen.h | ||
38 | +++ b/app/pktgen.h | ||
39 | @@ -531,7 +531,7 @@ do_command(const char *cmd, int (*display)(char *, int)) { | ||
40 | i = display(line, i); | ||
41 | |||
42 | if (f) | ||
43 | - fclose(f); | ||
44 | + pclose(f); | ||
45 | if (line) | ||
46 | free(line); | ||
47 | |||
48 | diff --git a/lib/common/lscpu.c b/lib/common/lscpu.c | ||
49 | index 8b56ccd..912c601 100644 | ||
50 | --- a/lib/common/lscpu.c | ||
51 | +++ b/lib/common/lscpu.c | ||
52 | @@ -164,7 +164,7 @@ lscpu_info_get(const char *lscpu_path) | ||
53 | } | ||
54 | } | ||
55 | |||
56 | - fclose(f); | ||
57 | + pclose(f); | ||
58 | free(line); | ||
59 | } | ||
60 | |||
61 | @@ -192,7 +192,7 @@ cpu_proc_info(const char *proc_path) | ||
62 | } | ||
63 | } | ||
64 | |||
65 | - fclose(f); | ||
66 | + pclose(f); | ||
67 | free(line); | ||
68 | } | ||
69 | |||
70 | -- | ||
71 | 2.25.1 | ||
72 | |||
diff --git a/recipes-extended/pktgen-dpdk/pktgen-dpdk_19.12.0.bb b/recipes-extended/pktgen-dpdk/pktgen-dpdk_19.12.0.bb deleted file mode 100644 index 6a039129..00000000 --- a/recipes-extended/pktgen-dpdk/pktgen-dpdk_19.12.0.bb +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | DESCRIPTION = "PKTGEN DPDK" | ||
2 | LICENSE = "BSD" | ||
3 | LIC_FILES_CHKSUM = "file://LICENSE;md5=30ac8fa65a07ea7cc1c7ee84e1c80294" | ||
4 | |||
5 | DEPENDS += "libpcap dpdk lua lua-native" | ||
6 | |||
7 | SRC_URI = "git://dpdk.org/git/apps/pktgen-dpdk;protocol=https;nobranch=1 \ | ||
8 | " | ||
9 | SRCREV = "7a61e4dfcdf037c31460b6c9bcb301797813036a" | ||
10 | |||
11 | S = "${WORKDIR}/git" | ||
12 | |||
13 | DPAA_VER ?= "dpaa" | ||
14 | export RTE_TARGET = "arm64-${DPAA_VER}-linuxapp-gcc" | ||
15 | export RTE_SDK = "${RECIPE_SYSROOT}/usr/share/" | ||
16 | |||
17 | EXTRA_OEMAKE += 'CC="${CC}" LD="${LD}" RTE_SDK="${RECIPE_SYSROOT}/usr/share/" RTE_TARGET="arm64-${DPAA_VER}-linuxapp-gcc"' | ||
18 | |||
19 | do_compile() { | ||
20 | oe_runmake | ||
21 | } | ||
22 | |||
23 | do_install() { | ||
24 | install -d ${D}${bindir}/ | ||
25 | cp -f ${S}/app/arm64-dpaa-linuxapp-gcc/pktgen ${D}${bindir}/ | ||
26 | cp -f ${S}/Pktgen.lua ${D}${bindir}/ | ||
27 | } | ||
28 | |||
29 | INSANE_SKIP:${PN} = "ldflags" | ||
30 | INHIBIT_PACKAGE_STRIP = "1" | ||
31 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
32 | PARALLEL_MAKE = "" | ||
33 | COMPATIBLE_MACHINE = "(qoriq-arm64)" | ||
diff --git a/recipes-extended/pktgen-dpdk/pktgen-dpdk_21.05.0.bb b/recipes-extended/pktgen-dpdk/pktgen-dpdk_21.05.0.bb new file mode 100644 index 00000000..f04e1e9f --- /dev/null +++ b/recipes-extended/pktgen-dpdk/pktgen-dpdk_21.05.0.bb | |||
@@ -0,0 +1,37 @@ | |||
1 | DESCRIPTION = "PKTGEN DPDK" | ||
2 | LICENSE = "BSD" | ||
3 | LIC_FILES_CHKSUM = "file://LICENSE;md5=0245ceedaef59ae0129500b0ce1e8a45" | ||
4 | |||
5 | DEPENDS += "libpcap dpdk lua lua-native" | ||
6 | |||
7 | SRC_URI = "git://dpdk.org/git/apps/pktgen-dpdk;protocol=https;nobranch=1 \ | ||
8 | file://fix-gcc11-mismatched-dealloc-error.patch \ | ||
9 | " | ||
10 | SRCREV = "3a09aa916597fb9a97ee8eec50044cbdb9c4abde" | ||
11 | |||
12 | S = "${WORKDIR}/git" | ||
13 | |||
14 | DPAA_VER ?= "dpaa" | ||
15 | export RTE_TARGET = "arm64-${DPAA_VER}-linuxapp-gcc" | ||
16 | export RTE_SDK = "${RECIPE_SYSROOT}/usr/share/dpdk" | ||
17 | |||
18 | inherit meson pkgconfig | ||
19 | |||
20 | MESON_BUILDTYPE = "release" | ||
21 | EXTRA_OEMESON += '-Dc_args="-DRTE_FORCE_INTRINSICS"' | ||
22 | |||
23 | do_configure:prepend() { | ||
24 | sed -i "/^add_project_arguments('-march=native'/s/^/#&/" ${S}/meson.build | ||
25 | } | ||
26 | |||
27 | do_install() { | ||
28 | install -d ${D}${bindir}/ | ||
29 | install -m 0755 app/pktgen ${D}${bindir}/ | ||
30 | install -m 0644 ${S}/Pktgen.lua ${D}${bindir}/ | ||
31 | } | ||
32 | |||
33 | INSANE_SKIP:${PN} = "ldflags" | ||
34 | INHIBIT_PACKAGE_STRIP = "1" | ||
35 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
36 | PARALLEL_MAKE = "" | ||
37 | COMPATIBLE_MACHINE = "(qoriq-arm64)" | ||
diff --git a/recipes-extended/secure-obj/secure-obj.inc b/recipes-extended/secure-obj/secure-obj.inc index 55f20ed5..2d26a7e9 100644 --- a/recipes-extended/secure-obj/secure-obj.inc +++ b/recipes-extended/secure-obj/secure-obj.inc | |||
@@ -10,9 +10,8 @@ inherit python3native | |||
10 | 10 | ||
11 | LDFLAGS += "${TOOLCHAIN_OPTIONS}" | 11 | LDFLAGS += "${TOOLCHAIN_OPTIONS}" |
12 | 12 | ||
13 | SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/secure_obj;nobranch=1 \ | 13 | SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/secure_obj;nobranch=1" |
14 | " | 14 | SRCREV = "5ff1231f74b4b01744be95a3137a14ad0a483e61" |
15 | SRCREV = "71a6eb33b58a8578a60995da3896f8f2d638c916" | ||
16 | 15 | ||
17 | WRAP_TARGET_PREFIX ?= "${TARGET_PREFIX}" | 16 | WRAP_TARGET_PREFIX ?= "${TARGET_PREFIX}" |
18 | export SECURE_STORAGE_PATH = "${S}/secure_storage_ta/ta/" | 17 | export SECURE_STORAGE_PATH = "${S}/secure_storage_ta/ta/" |
diff --git a/recipes-extended/secure-obj/secure-obj_git.bb b/recipes-extended/secure-obj/secure-obj_git.bb index 1fd1fea3..84ecea1e 100644 --- a/recipes-extended/secure-obj/secure-obj_git.bb +++ b/recipes-extended/secure-obj/secure-obj_git.bb | |||
@@ -13,6 +13,7 @@ export CROSS_COMPILE_HOST = "${CROSS_COMPILE}" | |||
13 | export CROSS_COMPILE_TA = "${CROSS_COMPILE}" | 13 | export CROSS_COMPILE_TA = "${CROSS_COMPILE}" |
14 | ARCH:qoriq-arm64 = "aarch64" | 14 | ARCH:qoriq-arm64 = "aarch64" |
15 | ARCH:qoriq-arm = "arm" | 15 | ARCH:qoriq-arm = "arm" |
16 | CFLAGS += "${TOOLCHAIN_OPTIONS}" | ||
16 | 17 | ||
17 | do_compile() { | 18 | do_compile() { |
18 | unset LDFLAGS | 19 | unset LDFLAGS |
diff --git a/recipes-extended/tsntool/tsntool_git.bb b/recipes-extended/tsntool/tsntool_git.bb index f4f10938..f1ddbec8 100644 --- a/recipes-extended/tsntool/tsntool_git.bb +++ b/recipes-extended/tsntool/tsntool_git.bb | |||
@@ -8,7 +8,7 @@ DEPENDS = "cjson libnl readline" | |||
8 | inherit pkgconfig | 8 | inherit pkgconfig |
9 | 9 | ||
10 | SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/tsntool;protocol=https;nobranch=1" | 10 | SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/tsntool;protocol=https;nobranch=1" |
11 | SRCREV = "3111f7f79e7d1b1a5e60f37fe76785559b2d0360" | 11 | SRCREV = "b767c260b851aac94828ed26c6a9a327e4e98334" |
12 | 12 | ||
13 | S = "${WORKDIR}/git" | 13 | S = "${WORKDIR}/git" |
14 | 14 | ||
diff --git a/recipes-kernel/linux/linux-qoriq.inc b/recipes-kernel/linux/linux-qoriq.inc index edac1055..cd474aed 100644 --- a/recipes-kernel/linux/linux-qoriq.inc +++ b/recipes-kernel/linux/linux-qoriq.inc | |||
@@ -25,8 +25,7 @@ SCMVERSION ?= "y" | |||
25 | LOCALVERSION = "" | 25 | LOCALVERSION = "" |
26 | DELTA_KERNEL_DEFCONFIG ?= "" | 26 | DELTA_KERNEL_DEFCONFIG ?= "" |
27 | DELTA_KERNEL_DEFCONFIG:prepend:qoriq-arm64 = "lsdk.config " | 27 | DELTA_KERNEL_DEFCONFIG:prepend:qoriq-arm64 = "lsdk.config " |
28 | DELTA_KERNEL_DEFCONFIG:prepend:fsl-lsch2-32b = "multi_v7_lpae.config multi_v8.config lsdk.config " | 28 | DELTA_KERNEL_DEFCONFIG:prepend:qoriq-arm = "multi_v7_lpae.config lsdk.config " |
29 | DELTA_KERNEL_DEFCONFIG:prepend:ls102xa = "multi_v7_lpae.config lsdk.config " | ||
30 | 29 | ||
31 | do_merge_delta_config[depends] += "virtual/${TARGET_PREFIX}gcc:do_populate_sysroot bison-native:do_populate_sysroot" | 30 | do_merge_delta_config[depends] += "virtual/${TARGET_PREFIX}gcc:do_populate_sysroot bison-native:do_populate_sysroot" |
32 | do_merge_delta_config[dirs] = "${B}" | 31 | do_merge_delta_config[dirs] = "${B}" |
@@ -55,14 +54,5 @@ do_merge_delta_config() { | |||
55 | } | 54 | } |
56 | addtask merge_delta_config before do_kernel_localversion after do_patch | 55 | addtask merge_delta_config before do_kernel_localversion after do_patch |
57 | 56 | ||
58 | # The link of dts folder is needed for 32b compile of aarch64 targets(e.g. ls1043ardb-32b) | ||
59 | do_compile:prepend:fsl-lsch2-32b() { | ||
60 | ln -sfT ${STAGING_KERNEL_DIR}/arch/arm64/boot/dts/freescale ${STAGING_KERNEL_DIR}/arch/arm/boot/dts/freescale | ||
61 | } | ||
62 | |||
63 | do_install:prepend:fsl-lsch2-32b() { | ||
64 | rm -f ${STAGING_KERNEL_DIR}/arch/arm/boot/dts/freescale | ||
65 | } | ||
66 | |||
67 | FILES:${KERNEL_PACKAGE_NAME}-image += "/boot/zImage*" | 57 | FILES:${KERNEL_PACKAGE_NAME}-image += "/boot/zImage*" |
68 | COMPATIBLE_MACHINE = "(qoriq)" | 58 | COMPATIBLE_MACHINE = "(qoriq)" |
diff --git a/recipes-kernel/linux/linux-qoriq_5.10.bb b/recipes-kernel/linux/linux-qoriq_5.10.bb new file mode 100644 index 00000000..b5315c71 --- /dev/null +++ b/recipes-kernel/linux/linux-qoriq_5.10.bb | |||
@@ -0,0 +1,8 @@ | |||
1 | LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" | ||
2 | |||
3 | LINUX_VERSION = "5.10.52" | ||
4 | |||
5 | SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/linux;nobranch=1" | ||
6 | SRCREV = "a11753a89ec610768301d4070e10b8bd60fde8cd" | ||
7 | |||
8 | require recipes-kernel/linux/linux-qoriq.inc | ||
diff --git a/recipes-kernel/linux/linux-qoriq_5.4.bb b/recipes-kernel/linux/linux-qoriq_5.4.bb deleted file mode 100644 index 54fd700c..00000000 --- a/recipes-kernel/linux/linux-qoriq_5.4.bb +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" | ||
2 | |||
3 | LINUX_VERSION = "5.4.47" | ||
4 | |||
5 | SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/linux;nobranch=1 \ | ||
6 | file://0001-Makfefile-linux-5.4-add-warning-cflags-on-LSDK-20.04.patch \ | ||
7 | file://0001-perf-tests-bp_account-Make-global-variable-static.patch \ | ||
8 | file://0001-perf-cs-etm-Move-definition-of-traceid_list-global-v.patch \ | ||
9 | file://0001-perf-bench-Share-some-global-variables-to-fix-build-.patch \ | ||
10 | file://0001-libtraceevent-Fix-build-with-binutils-2.35.patch \ | ||
11 | " | ||
12 | SRCREV = "6bff40d413b394c2d742e7a42089bfc62aef0a9b" | ||
13 | |||
14 | require recipes-kernel/linux/linux-qoriq.inc | ||
diff --git a/recipes-security/optee/optee-client-qoriq_3.13.0.bb b/recipes-security/optee/optee-client-qoriq_3.13.0.bb new file mode 100644 index 00000000..94123e43 --- /dev/null +++ b/recipes-security/optee/optee-client-qoriq_3.13.0.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | require optee-client.nxp.inc | ||
2 | |||
3 | PV:append = "+git${SRCPV}" | ||
4 | |||
5 | COMPATIBLE_MACHINE = "(qoriq-arm64)" | ||
diff --git a/recipes-security/optee/optee-client-qoriq_3.8.0.bb b/recipes-security/optee/optee-client-qoriq_3.8.0.bb deleted file mode 100644 index 0cd9eeab..00000000 --- a/recipes-security/optee/optee-client-qoriq_3.8.0.bb +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | SUMMARY = "OPTEE Client" | ||
2 | HOMEPAGE = "https://github.com/OP-TEE/optee_client" | ||
3 | |||
4 | LICENSE = "BSD" | ||
5 | LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=69663ab153298557a59c67a60a743e5b" | ||
6 | |||
7 | inherit python3native systemd | ||
8 | |||
9 | SRC_URI = "git://github.com/OP-TEE/optee_client;nobranch=1" | ||
10 | SRCREV = "be4fa2e36f717f03ca46e574aa66f697a897d090" | ||
11 | |||
12 | S = "${WORKDIR}/git" | ||
13 | |||
14 | EXTRA_OEMAKE = "ARCH=arm64" | ||
15 | |||
16 | do_install() { | ||
17 | oe_runmake install | ||
18 | |||
19 | install -D -p -m0755 ${S}/out/export/usr/sbin/tee-supplicant ${D}${bindir}/tee-supplicant | ||
20 | install -D -p -m0755 ${S}/out/export/usr/lib/libteec.so.1.0.0 ${D}${libdir}/libteec.so.1.0.0 | ||
21 | ln -sf libteec.so.1.0.0 ${D}${libdir}/libteec.so.1.0 | ||
22 | ln -sf libteec.so.1.0.0 ${D}${libdir}/libteec.so.1 | ||
23 | ln -sf libteec.so.1 ${D}${libdir}/libteec.so | ||
24 | |||
25 | cp -a ${S}/out/export/usr/include ${D}/usr/ | ||
26 | } | ||
27 | |||
28 | COMPATIBLE_MACHINE = "(qoriq-arm64)" | ||
diff --git a/recipes-security/optee/optee-client.nxp.inc b/recipes-security/optee/optee-client.nxp.inc new file mode 100644 index 00000000..de2ba8ae --- /dev/null +++ b/recipes-security/optee/optee-client.nxp.inc | |||
@@ -0,0 +1,53 @@ | |||
1 | # Copyright 2020-2021 NXP | ||
2 | |||
3 | SUMMARY = "OPTEE Client libs" | ||
4 | HOMEPAGE = "http://www.optee.org/" | ||
5 | LICENSE = "BSD" | ||
6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=69663ab153298557a59c67a60a743e5b" | ||
7 | |||
8 | inherit python3native systemd | ||
9 | |||
10 | SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/optee_client.git;nobranch=1" | ||
11 | SRCREV = "7c9c423d00e96bf51debd5fe10fd70dce83be5cc" | ||
12 | |||
13 | FILESEXTRAPATHS:prepend := "${THISDIR}/optee-client:" | ||
14 | SRC_URI += "file://tee-supplicant.service" | ||
15 | |||
16 | S = "${WORKDIR}/git" | ||
17 | B = "${WORKDIR}/build" | ||
18 | |||
19 | OPTEE_ARCH ?= "arm32" | ||
20 | OPTEE_ARCH_armv7a = "arm32" | ||
21 | OPTEE_ARCH:aarch64 = "arm64" | ||
22 | |||
23 | EXTRA_OEMAKE = "ARCH=${OPTEE_ARCH} O=${B}" | ||
24 | |||
25 | do_install () { | ||
26 | oe_runmake -C ${S} install | ||
27 | |||
28 | install -d ${D}${libdir}/ | ||
29 | install -p -m0644 ${B}/export${libdir}/libteec.so.1.0.0 ${D}${libdir}/ | ||
30 | ln -sf libteec.so.1.0.0 ${D}${libdir}/libteec.so.1.0 | ||
31 | ln -sf libteec.so.1.0.0 ${D}${libdir}/libteec.so.1 | ||
32 | ln -sf libteec.so.1 ${D}${libdir}/libteec.so | ||
33 | |||
34 | install -D -p -m0644 ${B}/export/usr/lib/libckteec.so.0.1.0 ${D}${libdir}/libckteec.so.0.1.0 | ||
35 | ln -sf libckteec.so.0.1.0 ${D}${libdir}/libckteec.so.0.1 | ||
36 | ln -sf libckteec.so.0.1.0 ${D}${libdir}/libckteec.so.0 | ||
37 | ln -sf libckteec.so.0.1.0 ${D}${libdir}/libckteec.so | ||
38 | |||
39 | install -D -p -m0755 ${B}/export/usr/sbin/tee-supplicant ${D}${bindir}/tee-supplicant | ||
40 | |||
41 | cp -a ${B}/export/usr/include ${D}${includedir} | ||
42 | |||
43 | install -d ${D}${systemd_system_unitdir}/ | ||
44 | install -m0644 ${WORKDIR}/tee-supplicant.service ${D}${systemd_system_unitdir}/ | ||
45 | sed -i -e s:/etc:${sysconfdir}:g -e s:/usr/bin:${bindir}:g ${D}${systemd_system_unitdir}/tee-supplicant.service | ||
46 | } | ||
47 | |||
48 | SYSTEMD_SERVICE:${PN} = "tee-supplicant.service" | ||
49 | |||
50 | FILES:${PN} += "${libdir}/* ${includedir}/*" | ||
51 | |||
52 | INSANE_SKIP:${PN} = "ldflags dev-elf" | ||
53 | INSANE_SKIP:${PN}-dev = "ldflags dev-elf" | ||
diff --git a/recipes-security/optee/optee-client/tee-supplicant.service b/recipes-security/optee/optee-client/tee-supplicant.service new file mode 100644 index 00000000..0e2b4f6b --- /dev/null +++ b/recipes-security/optee/optee-client/tee-supplicant.service | |||
@@ -0,0 +1,11 @@ | |||
1 | [Unit] | ||
2 | Description=TEE Supplicant | ||
3 | |||
4 | [Service] | ||
5 | User=root | ||
6 | EnvironmentFile=-/etc/default/tee-supplicant | ||
7 | ExecStart=/usr/bin/tee-supplicant $OPTARGS | ||
8 | |||
9 | [Install] | ||
10 | WantedBy=basic.target | ||
11 | |||
diff --git a/recipes-security/optee/optee-os-qoriq/0001-allow-setting-sysroot-for-libgcc-lookup.patch b/recipes-security/optee/optee-os-qoriq/0001-allow-setting-sysroot-for-libgcc-lookup.patch deleted file mode 100644 index 17127d0b..00000000 --- a/recipes-security/optee/optee-os-qoriq/0001-allow-setting-sysroot-for-libgcc-lookup.patch +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | diff --git a/mk/gcc.mk b/mk/gcc.mk | ||
2 | index fc38c4d..77b8d74 100644 | ||
3 | --- a/mk/gcc.mk | ||
4 | +++ b/mk/gcc.mk | ||
5 | @@ -12,7 +12,7 @@ nostdinc$(sm) := -nostdinc -isystem $(shell $(CC$(sm)) \ | ||
6 | -print-file-name=include 2> /dev/null) | ||
7 | |||
8 | # Get location of libgcc from gcc | ||
9 | -libgcc$(sm) := $(shell $(CC$(sm)) $(CFLAGS$(arch-bits-$(sm))) $(comp-cflags$(sm)) \ | ||
10 | +libgcc$(sm) := $(shell $(CC$(sm)) $(LIBGCC_LOCATE_CFLAGS) $(CFLAGS$(arch-bits-$(sm))) $(comp-cflags$(sm)) \ | ||
11 | -print-libgcc-file-name 2> /dev/null) | ||
12 | |||
13 | # Define these to something to discover accidental use | ||
diff --git a/recipes-security/optee/optee-os-qoriq/0001-arm64-Disable-outline-atomics-when-compiling.patch b/recipes-security/optee/optee-os-qoriq/0001-arm64-Disable-outline-atomics-when-compiling.patch deleted file mode 100644 index 086d4333..00000000 --- a/recipes-security/optee/optee-os-qoriq/0001-arm64-Disable-outline-atomics-when-compiling.patch +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | From f94d9558d9eae48e92ce8d651539b6cf69eb4394 Mon Sep 17 00:00:00 2001 | ||
2 | From: Joshua Watt <JPEWhacker@gmail.com> | ||
3 | Date: Mon, 18 May 2020 20:00:00 -0500 | ||
4 | Subject: [PATCH] arm64: Disable outline-atomics when compiling | ||
5 | |||
6 | Disables the automatic detection of LSE (Large System Extension) | ||
7 | instructions when compiling AArch64 code. GCC 10 implements this | ||
8 | detection in libgcc using __getauxval(), which optee doesn't implement. | ||
9 | This requires that the proper -mcpu is passed to GCC so that the code | ||
10 | can be correctly compiled to use either LSE or load-store-exclusive. | ||
11 | |||
12 | Fixes linker errors like the following when compiling with GCC 10: | ||
13 | |||
14 | aarch64-linux-ld.bfd: libgcc.a(lse-init.o): | ||
15 | in function `init_have_lse_atomics': | ||
16 | lse-init.c:44: undefined reference to `__getauxval' | ||
17 | core/arch/arm/kernel/link.mk:38: | ||
18 | recipe for target 'build/core/all_objs.o' failed | ||
19 | |||
20 | Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> | ||
21 | Upstream-Status: Submitted [https://github.com/OP-TEE/optee_os/pull/3874] | ||
22 | --- | ||
23 | core/arch/arm/arm.mk | 2 +- | ||
24 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
25 | |||
26 | diff --git a/core/arch/arm/arm.mk b/core/arch/arm/arm.mk | ||
27 | index a18eda3b..07069c66 100644 | ||
28 | --- a/core/arch/arm/arm.mk | ||
29 | +++ b/core/arch/arm/arm.mk | ||
30 | @@ -115,7 +115,7 @@ arm32-platform-aflags-no-hard-float ?= | ||
31 | |||
32 | arm64-platform-cflags-no-hard-float ?= -mgeneral-regs-only | ||
33 | arm64-platform-cflags-hard-float ?= | ||
34 | -arm64-platform-cflags-generic ?= -mstrict-align | ||
35 | +arm64-platform-cflags-generic ?= -mstrict-align $(call cc-option,-mno-outline-atomics,) | ||
36 | |||
37 | ifeq ($(DEBUG),1) | ||
38 | # For backwards compatibility | ||
39 | -- | ||
40 | 2.17.1 | ||
41 | |||
diff --git a/recipes-security/optee/optee-os-qoriq_3.13.0.bb b/recipes-security/optee/optee-os-qoriq_3.13.0.bb new file mode 100644 index 00000000..3c3652d3 --- /dev/null +++ b/recipes-security/optee/optee-os-qoriq_3.13.0.bb | |||
@@ -0,0 +1,28 @@ | |||
1 | require optee-os.nxp.inc | ||
2 | |||
3 | PV:append = "+git${SRCPV}" | ||
4 | |||
5 | PLATFORM_FLAVOR:ls1088ardb-pb = "ls1088ardb" | ||
6 | PLATFORM_FLAVOR:ls1046afrwy = "ls1046ardb" | ||
7 | PLATFORM_FLAVOR:lx2162aqds = "lx2160aqds" | ||
8 | |||
9 | EXTRA_OEMAKE += " \ | ||
10 | PLATFORM=ls \ | ||
11 | CFG_ARM64_core=y \ | ||
12 | " | ||
13 | |||
14 | do_compile:append:ls1012afrwy() { | ||
15 | mv ${B}/core/tee-raw.bin ${B}/core/tee_512mb.bin | ||
16 | oe_runmake CFG_DRAM0_SIZE=0x40000000 all | ||
17 | } | ||
18 | |||
19 | do_install:append:qoriq() { | ||
20 | install -m 644 ${B}/core/tee-raw.bin ${D}${nonarch_base_libdir}/firmware/tee_${MACHINE}.bin | ||
21 | } | ||
22 | |||
23 | do_install:append:ls1012afrwy() { | ||
24 | install -m 644 ${B}/core/tee_512mb.bin ${D}${nonarch_base_libdir}/firmware/tee_${MACHINE}_512mb.bin | ||
25 | } | ||
26 | |||
27 | INHIBIT_PACKAGE_STRIP = "1" | ||
28 | COMPATIBLE_MACHINE = "(qoriq-arm64)" | ||
diff --git a/recipes-security/optee/optee-os-qoriq_3.8.0.bb b/recipes-security/optee/optee-os-qoriq_3.8.0.bb deleted file mode 100644 index f5d6d620..00000000 --- a/recipes-security/optee/optee-os-qoriq_3.8.0.bb +++ /dev/null | |||
@@ -1,83 +0,0 @@ | |||
1 | SUMMARY = "OP-TEE Trusted OS" | ||
2 | DESCRIPTION = "OPTEE OS" | ||
3 | |||
4 | LICENSE = "BSD" | ||
5 | LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=c1f21c4f72f372ef38a5a4aee55ec173" | ||
6 | |||
7 | PV = "3.8+git${SRCPV}" | ||
8 | |||
9 | DEPENDS += "python3-pyelftools-native python3-pycryptodome-native python3-pycryptodomex-native dtc-native" | ||
10 | |||
11 | inherit deploy python3native | ||
12 | |||
13 | SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/optee_os;nobranch=1 \ | ||
14 | file://0001-allow-setting-sysroot-for-libgcc-lookup.patch \ | ||
15 | file://0001-arm64-Disable-outline-atomics-when-compiling.patch \ | ||
16 | " | ||
17 | SRCREV = "0cb01f7f6aee552ead49990c06f69f73f459cc65" | ||
18 | |||
19 | S = "${WORKDIR}/git" | ||
20 | |||
21 | OPTEEMACHINE ?= "${MACHINE}" | ||
22 | OPTEEMACHINE:ls1088ardb-pb = "ls1088ardb" | ||
23 | OPTEEMACHINE:ls1046afrwy = "ls1046ardb" | ||
24 | OPTEEMACHINE:lx2162aqds = "lx2160aqds" | ||
25 | |||
26 | EXTRA_OEMAKE = "PLATFORM=ls-${OPTEEMACHINE} CFG_ARM64_core=y \ | ||
27 | ARCH=arm \ | ||
28 | CROSS_COMPILE_core=${HOST_PREFIX} \ | ||
29 | CROSS_COMPILE_ta_arm64=${HOST_PREFIX} \ | ||
30 | NOWERROR=1 \ | ||
31 | LDFLAGS= \ | ||
32 | LIBGCC_LOCATE_CFLAGS=--sysroot=${STAGING_DIR_HOST} \ | ||
33 | " | ||
34 | EXTRA_OEMAKE:append:lx2162aqds = " CFG_EMBED_DTB_SOURCE_FILE=fsl-lx2160a-qds.dts CFG_EMBED_DT=y" | ||
35 | |||
36 | OPTEE_ARCH:armv7a = "arm32" | ||
37 | OPTEE_ARCH:aarch64 = "arm64" | ||
38 | |||
39 | do_compile() { | ||
40 | unset LDFLAGS | ||
41 | oe_runmake all CFG_TEE_TA_LOG_LEVEL=0 | ||
42 | ${OBJCOPY} -v -O binary ${B}/out/arm-plat-ls/core/tee.elf ${B}/out/arm-plat-ls/core/tee.bin | ||
43 | |||
44 | if [ ${MACHINE} = ls1012afrwy ]; then | ||
45 | mv ${B}/out/arm-plat-ls/core/tee.bin ${B}/out/arm-plat-ls/core/tee_512mb.bin | ||
46 | oe_runmake CFG_DRAM0_SIZE=0x40000000 all CFG_TEE_TA_LOG_LEVEL=0 | ||
47 | ${OBJCOPY} -v -O binary ${B}/out/arm-plat-ls/core/tee.elf ${B}/out/arm-plat-ls/core/tee.bin | ||
48 | fi | ||
49 | } | ||
50 | |||
51 | do_install() { | ||
52 | #install core on boot directory | ||
53 | install -d ${D}/lib/firmware/ | ||
54 | if [ ${MACHINE} = ls1012afrwy ]; then | ||
55 | install -m 644 ${B}/out/arm-plat-ls/core/tee_512mb.bin ${D}/lib/firmware/tee_${MACHINE}_512mb.bin | ||
56 | fi | ||
57 | install -m 644 ${B}/out/arm-plat-ls/core/tee.bin ${D}/lib/firmware/tee_${MACHINE}.bin | ||
58 | #install TA devkit | ||
59 | install -d ${D}/usr/include/optee/export-user_ta/ | ||
60 | |||
61 | for f in ${B}/out/arm-plat-ls/export-ta_${OPTEE_ARCH}/* ; do | ||
62 | cp -aR $f ${D}/usr/include/optee/export-user_ta/ | ||
63 | done | ||
64 | } | ||
65 | |||
66 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
67 | |||
68 | do_deploy() { | ||
69 | install -d ${DEPLOYDIR}/optee | ||
70 | for f in ${D}/lib/firmware/*; do | ||
71 | cp $f ${DEPLOYDIR}/optee/ | ||
72 | done | ||
73 | } | ||
74 | |||
75 | addtask deploy before do_build after do_install | ||
76 | |||
77 | FILES:${PN} = "/lib/firmware/" | ||
78 | FILES:${PN}-dev = "/usr/include/optee" | ||
79 | |||
80 | INSANE_SKIP:${PN}-dev = "staticdev" | ||
81 | |||
82 | INHIBIT_PACKAGE_STRIP = "1" | ||
83 | COMPATIBLE_MACHINE = "(qoriq-arm64)" | ||
diff --git a/recipes-security/optee/optee-os.nxp.inc b/recipes-security/optee/optee-os.nxp.inc new file mode 100644 index 00000000..f376b3ce --- /dev/null +++ b/recipes-security/optee/optee-os.nxp.inc | |||
@@ -0,0 +1,76 @@ | |||
1 | # Copyright 2020-2021 NXP | ||
2 | |||
3 | SUMMARY = "OPTEE OS" | ||
4 | DESCRIPTION = "OPTEE OS" | ||
5 | HOMEPAGE = "http://www.optee.org/" | ||
6 | LICENSE = "BSD" | ||
7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=c1f21c4f72f372ef38a5a4aee55ec173" | ||
8 | |||
9 | inherit deploy python3native autotools | ||
10 | DEPENDS = "python3-pycryptodome-native python3-pyelftools-native python3-pycryptodomex-native dtc-native" | ||
11 | |||
12 | SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/optee_os.git;nobranch=1" | ||
13 | SRCREV = "735d98806dc26fbeeecad7f5e60ffeab8170c67e" | ||
14 | |||
15 | S = "${WORKDIR}/git" | ||
16 | B = "${WORKDIR}/build.${PLATFORM_FLAVOR}" | ||
17 | |||
18 | PLATFORM_FLAVOR ?= "${MACHINE}" | ||
19 | |||
20 | OPTEE_ARCH ?= "arm64" | ||
21 | OPTEE_ARCH_armv7a = "arm32" | ||
22 | OPTEE_ARCH:aarch64 = "arm64" | ||
23 | |||
24 | OPTEE_CORE_LOG_LEVEL ?= "1" | ||
25 | OPTEE_TA_LOG_LEVEL ?= "0" | ||
26 | |||
27 | # Optee-os can be built for 32 bits and 64 bits at the same time | ||
28 | # as long as the compilers are correctly defined. | ||
29 | # For 64bits, CROSS_COMPILE64 must be set | ||
30 | # When defining CROSS_COMPILE and CROSS_COMPILE64, we assure that | ||
31 | # any 32 or 64 bits builds will pass | ||
32 | EXTRA_OEMAKE = " \ | ||
33 | -C ${S} O=${B} \ | ||
34 | PLATFORM_FLAVOR=${PLATFORM_FLAVOR} \ | ||
35 | CROSS_COMPILE=${HOST_PREFIX} \ | ||
36 | CROSS_COMPILE64=${HOST_PREFIX} \ | ||
37 | CFG_WERROR=y \ | ||
38 | CFG_TEE_CORE_LOG_LEVEL=${OPTEE_CORE_LOG_LEVEL} \ | ||
39 | CFG_TEE_TA_LOG_LEVEL=${OPTEE_TA_LOG_LEVEL} \ | ||
40 | " | ||
41 | |||
42 | do_compile() { | ||
43 | unset LDFLAGS | ||
44 | export CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_HOST}" | ||
45 | oe_runmake all | ||
46 | } | ||
47 | |||
48 | do_install() { | ||
49 | install -d ${D}${nonarch_base_libdir}/firmware/ | ||
50 | install -m 644 ${B}/core/*.bin ${D}${nonarch_base_libdir}/firmware/ | ||
51 | |||
52 | # Install the TA devkit | ||
53 | install -d ${D}${includedir}/optee/export-user_ta/ | ||
54 | |||
55 | for f in ${B}/export-ta_${OPTEE_ARCH}/*; do | ||
56 | cp -aR $f ${D}${includedir}/optee/export-user_ta/ | ||
57 | done | ||
58 | |||
59 | install -d ${D}${nonarch_base_libdir}/optee_armtz | ||
60 | find ${B}/export-ta_${OPTEE_ARCH}/ta -name '*.ta' | while read name; do | ||
61 | install -m 444 $name ${D}${nonarch_base_libdir}/optee_armtz/ | ||
62 | done | ||
63 | } | ||
64 | |||
65 | do_deploy() { | ||
66 | install -d ${DEPLOYDIR}/optee | ||
67 | install -m 644 ${D}${nonarch_base_libdir}/firmware/* ${DEPLOYDIR}/optee/ | ||
68 | } | ||
69 | addtask deploy before do_build after do_install | ||
70 | |||
71 | FILES:${PN} = "${nonarch_base_libdir}/firmware/ ${nonarch_base_libdir}/optee_armtz/" | ||
72 | FILES:${PN}-staticdev = "/usr/include/optee/" | ||
73 | RDEPENDS:${PN}-dev += "${PN}-staticdev" | ||
74 | |||
75 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
76 | |||
diff --git a/recipes-security/optee/optee-test-qoriq_3.13.0.bb b/recipes-security/optee/optee-test-qoriq_3.13.0.bb new file mode 100644 index 00000000..69ef73d3 --- /dev/null +++ b/recipes-security/optee/optee-test-qoriq_3.13.0.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | require optee-test.nxp.inc | ||
2 | |||
3 | PV:append = "+git${SRCPV}" | ||
4 | |||
5 | DEPENDS += "optee-client-qoriq optee-os-qoriq" | ||
6 | |||
7 | TEEC_EXPORT = "${STAGING_DIR_HOST}${prefix}" | ||
8 | |||
9 | EXTRA_OEMAKE += " \ | ||
10 | TEEC_EXPORT=${TEEC_EXPORT} \ | ||
11 | " | ||
12 | |||
13 | COMPATIBLE_MACHINE = "(qoriq-arm64)" | ||
diff --git a/recipes-security/optee/optee-test-qoriq_3.8.0.bb b/recipes-security/optee/optee-test-qoriq_3.8.0.bb deleted file mode 100644 index 52cb1bbf..00000000 --- a/recipes-security/optee/optee-test-qoriq_3.8.0.bb +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | SUMMARY = "OP-TEE sanity testsuite" | ||
2 | HOMEPAGE = "https://github.com/OP-TEE/optee_test" | ||
3 | |||
4 | LICENSE = "BSD & GPLv2" | ||
5 | LIC_FILES_CHKSUM = "file://${S}/LICENSE.md;md5=daa2bcccc666345ab8940aab1315a4fa" | ||
6 | |||
7 | DEPENDS = "optee-client-qoriq optee-os-qoriq python3-pycryptodome-native python3-pycryptodomex-native" | ||
8 | |||
9 | inherit python3native | ||
10 | |||
11 | SRC_URI = "git://github.com/OP-TEE/optee_test;nobranch=1" | ||
12 | SRCREV = "30481e381cb4285706e7516853495a7699c93b2c" | ||
13 | |||
14 | S = "${WORKDIR}/git" | ||
15 | |||
16 | OPTEE_CLIENT_EXPORT = "${STAGING_DIR_HOST}${prefix}" | ||
17 | TEEC_EXPORT = "${STAGING_DIR_HOST}${prefix}" | ||
18 | TA_DEV_KIT_DIR = "${STAGING_INCDIR}/optee/export-user_ta" | ||
19 | |||
20 | EXTRA_OEMAKE = " TA_DEV_KIT_DIR=${TA_DEV_KIT_DIR} \ | ||
21 | OPTEE_CLIENT_EXPORT=${OPTEE_CLIENT_EXPORT} \ | ||
22 | CFG_ARM64=y \ | ||
23 | CROSS_COMPILE_HOST=${TARGET_PREFIX} \ | ||
24 | CROSS_COMPILE_TA=${TARGET_PREFIX} \ | ||
25 | V=1 \ | ||
26 | " | ||
27 | |||
28 | do_compile() { | ||
29 | # Top level makefile doesn't seem to handle parallel make gracefully | ||
30 | oe_runmake xtest | ||
31 | oe_runmake ta | ||
32 | } | ||
33 | |||
34 | do_install () { | ||
35 | install -D -p -m0755 ${S}/out/xtest/xtest ${D}${bindir}/xtest | ||
36 | |||
37 | # install path should match the value set in optee-client/tee-supplicant | ||
38 | # default TEEC_LOAD_PATH is /lib | ||
39 | mkdir -p ${D}/lib/optee_armtz/ | ||
40 | install -D -p -m0444 ${S}/out/ta/*/*.ta ${D}/lib/optee_armtz/ | ||
41 | } | ||
42 | |||
43 | FILES:${PN} += "/lib/optee_armtz/" | ||
44 | |||
45 | # Imports machine specific configs from staging to build | ||
46 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
47 | COMPATIBLE_MACHINE = "(qoriq-arm64)" | ||
diff --git a/recipes-security/optee/optee-test.nxp.inc b/recipes-security/optee/optee-test.nxp.inc new file mode 100644 index 00000000..868776c5 --- /dev/null +++ b/recipes-security/optee/optee-test.nxp.inc | |||
@@ -0,0 +1,61 @@ | |||
1 | # Copyright 2020-2021 NXP | ||
2 | |||
3 | SUMMARY = "OPTEE test" | ||
4 | HOMEPAGE = "http://www.optee.org/" | ||
5 | |||
6 | LICENSE = "BSD & GPLv2" | ||
7 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=daa2bcccc666345ab8940aab1315a4fa" | ||
8 | |||
9 | DEPENDS = "python3-pycryptodome-native python3-pycryptodomex-native openssl" | ||
10 | inherit python3native cmake | ||
11 | |||
12 | SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/optee_test.git;nobranch=1" | ||
13 | SRCREV = "69722dab8c1f2683e30e0ee3b536053367e37aad" | ||
14 | |||
15 | S = "${WORKDIR}/git" | ||
16 | B = "${WORKDIR}/build" | ||
17 | |||
18 | TA_DEV_KIT_DIR ?= "${STAGING_INCDIR}/optee/export-user_ta" | ||
19 | OPTEE_CLIENT_EXPORT ?= "${STAGING_DIR_HOST}${prefix}" | ||
20 | |||
21 | EXTRA_OEMAKE = " \ | ||
22 | TA_DEV_KIT_DIR=${TA_DEV_KIT_DIR} \ | ||
23 | OPTEE_CLIENT_EXPORT=${OPTEE_CLIENT_EXPORT} \ | ||
24 | CROSS_COMPILE_HOST=${HOST_PREFIX} \ | ||
25 | CROSS_COMPILE_TA=${HOST_PREFIX} \ | ||
26 | OPTEE_OPENSSL_EXPORT=${STAGING_INCDIR}/ \ | ||
27 | -C ${S} O=${B} \ | ||
28 | " | ||
29 | |||
30 | EXTRA_OECMAKE = " \ | ||
31 | -DOPTEE_TEST_SDK=${TA_DEV_KIT_DIR} \ | ||
32 | " | ||
33 | |||
34 | do_compile() { | ||
35 | export CXXFLAGS="${CXXFLAGS} --sysroot=${STAGING_DIR_HOST}" | ||
36 | oe_runmake xtest | ||
37 | oe_runmake ta | ||
38 | oe_runmake test_plugin | ||
39 | } | ||
40 | |||
41 | do_install() { | ||
42 | install -d ${D}${bindir}/ | ||
43 | install ${B}/xtest/xtest ${D}${bindir}/ | ||
44 | |||
45 | install -d ${D}${nonarch_base_libdir}/optee_armtz | ||
46 | find ${B}/ta -name '*.ta' | while read name; do | ||
47 | install -m 444 $name ${D}${nonarch_base_libdir}/optee_armtz/ | ||
48 | done | ||
49 | |||
50 | install -d ${D}${libdir}/tee-supplicant/plugins/ | ||
51 | find ${B}/supp_plugin -name '*.plugin' | while read name; do | ||
52 | install -m 755 $name ${D}${libdir}/tee-supplicant/plugins/ | ||
53 | done | ||
54 | } | ||
55 | |||
56 | FILES:${PN} += "${nonarch_base_libdir} ${libdir}/tee-supplicant/plugins/" | ||
57 | |||
58 | DEBUG_OPTIMIZATION:append = " -Wno-error=maybe-uninitialized -Wno-deprecated-declarations" | ||
59 | FULL_OPTIMIZATION:append = " -Wno-error=maybe-uninitialized -Wno-deprecated-declarations" | ||
60 | |||
61 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||