summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2021-10-15 12:02:01 -0300
committerGitHub <noreply@github.com>2021-10-15 12:02:01 -0300
commit9d05232d9a12a52d17039003f8d4b23ac001d378 (patch)
tree9eea3870c4a5af37b4b7613517008d050bda0738
parent2cdfab64a588c7570fe87c0fc3d05f061f2b692c (diff)
parent93d26c3d784f38b5629f31eb08ae7169c44ccb31 (diff)
downloadmeta-freescale-9d05232d9a12a52d17039003f8d4b23ac001d378.tar.gz
Merge pull request #888 from ting-liu/master
updates for Layerscape machines
-rw-r--r--conf/machine/lx2160ardb.conf6
-rw-r--r--recipes-bsp/atf/files/0001-Clean-usage-of-void-pointers-to-access-symbols.patch709
-rw-r--r--recipes-bsp/atf/qoriq-atf-2.3.inc13
-rw-r--r--recipes-bsp/atf/qoriq-atf-2.4.inc10
-rw-r--r--recipes-bsp/atf/qoriq-atf-tools_2.4.bb (renamed from recipes-bsp/atf/qoriq-atf-tools_2.3.bb)5
-rw-r--r--recipes-bsp/atf/qoriq-atf_1.5.bb248
-rw-r--r--recipes-bsp/atf/qoriq-atf_2.3.bb175
-rw-r--r--recipes-bsp/atf/qoriq-atf_2.4.bb186
-rw-r--r--recipes-bsp/mc-utils/mc-utils_git.bb26
-rw-r--r--recipes-bsp/rcw/rcw_git.bb2
-rw-r--r--recipes-bsp/u-boot/u-boot-qoriq_2021.04.bb (renamed from recipes-bsp/u-boot/u-boot-qoriq_2020.04.bb)2
-rw-r--r--recipes-bsp/uefi/uefi_git.bb2
-rw-r--r--recipes-devtools/cst/cst_git.bb1
-rw-r--r--recipes-devtools/qemu/qemu-qoriq/0001-linux-user-remove-host-stime-syscall.patch67
-rw-r--r--recipes-devtools/qemu/qemu-qoriq_4.2.bb (renamed from recipes-devtools/qemu/qemu-qoriq_4.1.0.bb)5
-rw-r--r--recipes-dpaa2/management-complex/management-complex_10.29.0.bb41
-rw-r--r--recipes-dpaa2/restool/files/disable-manpage-generation.patch25
-rw-r--r--recipes-dpaa2/restool/restool_git.bb15
-rw-r--r--recipes-dpaa2/spc/spc_git.bb2
-rw-r--r--recipes-extended/dpdk/dpdk-20.11.inc15
-rw-r--r--recipes-extended/dpdk/dpdk-20.11/0001-Makefile-add-makefile.patch74
-rw-r--r--recipes-extended/dpdk/dpdk-20.11/0001-drivers-net-enetfec-enet_uio.c-fix-multiple-definiti.patch30
-rw-r--r--recipes-extended/dpdk/dpdk-20.11/0001-ifpga-meson-Fix-finding-librt-using-find_library.patch35
-rw-r--r--recipes-extended/dpdk/dpdk-20.11/0001-meson.build-march-and-mcpu-already-passed-by-Yocto.patch38
-rw-r--r--recipes-extended/dpdk/dpdk-module_20.11.bb41
-rw-r--r--recipes-extended/dpdk/dpdk_20.11.bb93
-rw-r--r--recipes-extended/libpkcs11/libpkcs11_git.bb3
-rw-r--r--recipes-extended/ovs-dpdk/ovs-dpdk_2.13.0.bb48
-rw-r--r--recipes-extended/ovs-dpdk/ovs-dpdk_2.15.bb36
-rw-r--r--recipes-extended/pktgen-dpdk/files/fix-gcc11-mismatched-dealloc-error.patch72
-rw-r--r--recipes-extended/pktgen-dpdk/pktgen-dpdk_19.12.0.bb33
-rw-r--r--recipes-extended/pktgen-dpdk/pktgen-dpdk_21.05.0.bb37
-rw-r--r--recipes-extended/secure-obj/secure-obj.inc5
-rw-r--r--recipes-extended/secure-obj/secure-obj_git.bb1
-rw-r--r--recipes-extended/tsntool/tsntool_git.bb2
-rw-r--r--recipes-kernel/linux/linux-qoriq.inc12
-rw-r--r--recipes-kernel/linux/linux-qoriq_5.10.bb8
-rw-r--r--recipes-kernel/linux/linux-qoriq_5.4.bb14
-rw-r--r--recipes-security/optee/optee-client-qoriq_3.13.0.bb5
-rw-r--r--recipes-security/optee/optee-client-qoriq_3.8.0.bb28
-rw-r--r--recipes-security/optee/optee-client.nxp.inc53
-rw-r--r--recipes-security/optee/optee-client/tee-supplicant.service11
-rw-r--r--recipes-security/optee/optee-os-qoriq/0001-allow-setting-sysroot-for-libgcc-lookup.patch13
-rw-r--r--recipes-security/optee/optee-os-qoriq/0001-arm64-Disable-outline-atomics-when-compiling.patch41
-rw-r--r--recipes-security/optee/optee-os-qoriq_3.13.0.bb28
-rw-r--r--recipes-security/optee/optee-os-qoriq_3.8.0.bb83
-rw-r--r--recipes-security/optee/optee-os.nxp.inc76
-rw-r--r--recipes-security/optee/optee-test-qoriq_3.13.0.bb13
-rw-r--r--recipes-security/optee/optee-test-qoriq_3.8.0.bb47
-rw-r--r--recipes-security/optee/optee-test.nxp.inc61
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"
28SERIAL_CONSOLES_CHECK ?= "${SERIAL_CONSOLES}" 28SERIAL_CONSOLES_CHECK ?= "${SERIAL_CONSOLES}"
29 29
30UEFI_XSPIBOOT ?= "LX2160ARDB_EFI_NORBOOT.fd" 30UEFI_XSPIBOOT ?= "LX2160ARDB_EFI_NORBOOT.fd"
31RCWXSPI ?= "XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2900_19_5_2" 31RCWXSPI ?= "XGGFF_PP_HHHH_RR_19_5_2/rcw_2200_750_3200_19_5_2"
32RCWSD ?= "XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2900_19_5_2" 32RCWSD ?= "XGGFF_PP_HHHH_RR_19_5_2/rcw_2200_750_3200_19_5_2"
33RCWEMMC ?= "XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2900_19_5_2" 33RCWEMMC ?= "XGGFF_PP_HHHH_RR_19_5_2/rcw_2200_750_3200_19_5_2"
34 34
35EXTRA_IMAGEDEPENDS += "management-complex mc-utils rcw ls2-phy ddr-phy uefi qoriq-atf inphi" 35EXTRA_IMAGEDEPENDS += "management-complex mc-utils rcw ls2-phy ddr-phy uefi qoriq-atf inphi"
36USE_VT = "0" 36USE_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 @@
1From 9f85f9e3796f1c351bbc4c8436dc66d83c140b71 Mon Sep 17 00:00:00 2001
2From: Joel Hutton <Joel.Hutton@Arm.com>
3Date: Wed, 21 Mar 2018 11:40:57 +0000
4Subject: [PATCH] Clean usage of void pointers to access symbols
5
6Void pointers have been used to access linker symbols, by declaring an
7extern pointer, then taking the address of it. This limits symbols
8values to aligned pointer values. To remove this restriction an
9IMPORT_SYM macro has been introduced, which declares it as a char
10pointer and casts it to the required type.
11
12Upstream-Status: Backport
13
14Change-Id: I89877fc3b13ed311817bb8ba79d4872b89bfd3b0
15Signed-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
37diff --git a/bl1/bl1_private.h b/bl1/bl1_private.h
38index 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
71diff --git a/common/runtime_svc.c b/common/runtime_svc.c
72index 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
91diff --git a/drivers/auth/img_parser_mod.c b/drivers/auth/img_parser_mod.c
92index 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
117diff --git a/include/common/bl_common.h b/include/common/bl_common.h
118index 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 /*******************************************************************************
175diff --git a/include/common/runtime_svc.h b/include/common/runtime_svc.h
176index 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];
190diff --git a/include/lib/utils_def.h b/include/lib/utils_def.h
191index 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__ */
223diff --git a/include/plat/common/common_def.h b/include/plat/common/common_def.h
224index 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__ */
269diff --git a/include/services/secure_partition.h b/include/services/secure_partition.h
270index 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
299diff --git a/lib/locks/bakery/bakery_lock_normal.c b/lib/locks/bakery/bakery_lock_normal.c
300index 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) \
328diff --git a/lib/pmf/pmf_main.c b/lib/pmf/pmf_main.c
329index 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
370diff --git a/plat/hisilicon/hikey/hikey_bl1_setup.c b/plat/hisilicon/hikey/hikey_bl1_setup.c
371index 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 /*
409diff --git a/plat/hisilicon/hikey960/hikey960_bl1_setup.c b/plat/hisilicon/hikey960/hikey960_bl1_setup.c
410index 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)
443diff --git a/plat/hisilicon/poplar/bl1_plat_setup.c b/plat/hisilicon/poplar/bl1_plat_setup.c
444index 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)
479diff --git a/plat/mediatek/mt6795/bl31_plat_setup.c b/plat/mediatek/mt6795/bl31_plat_setup.c
480index 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
517diff --git a/plat/mediatek/mt8173/bl31_plat_setup.c b/plat/mediatek/mt8173/bl31_plat_setup.c
518index 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 }
568diff --git a/plat/nvidia/tegra/common/tegra_bl31_setup.c b/plat/nvidia/tegra/common/tegra_bl31_setup.c
569index 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;
635diff --git a/plat/rockchip/common/bl31_plat_setup.c b/plat/rockchip/common/bl31_plat_setup.c
636index 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;
670diff --git a/services/std_svc/spm/spm_shim_private.h b/services/std_svc/spm/spm_shim_private.h
671index 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--
7082.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 @@
1LICENSE = "BSD"
2LIC_FILES_CHKSUM = "file://license.rst;md5=1dd070c98a281d18d9eefd938729b031"
3
4PV = "2.3+git${SRCPV}"
5
6SRC_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"
9SRCREV = "4e40e24590ab908773ef842cd0e17faf233767d4"
10SRCREV_mbedtls = "85da85555e5b086b0250780693c3ee584f63e79f"
11SRCREV_FORMAT = "atf"
12
13S = "${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 @@
1DESCRIPTION = "ARM Trusted Firmware"
2
3LICENSE = "BSD"
4LIC_FILES_CHKSUM = "file://license.rst;md5=1dd070c98a281d18d9eefd938729b031"
5
6SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/atf.git;nobranch=1"
7SRCREV = "bb4957067d4b96a6ee197a333425948e409e990d"
8
9S = "${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 @@
1require qoriq-atf-${PV}.inc 1require recipes-bsp/atf/qoriq-atf-2.4.inc
2
3SUMMARY = "Tools for ARM Trusted Firmware, e.g. FIP image creation tool"
4 2
5DEPENDS += "openssl" 3DEPENDS += "openssl"
6 4
@@ -12,3 +10,4 @@ do_install () {
12} 10}
13 11
14BBCLASSEXTEND = "native" 12BBCLASSEXTEND = "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 @@
1DESCRIPTION = "ARM Trusted Firmware"
2
3LICENSE = "BSD"
4LIC_FILES_CHKSUM = "file://license.rst;md5=e927e02bca647e14efd87e9e914b2443"
5
6PV = "1.5+git${SRCPV}"
7
8inherit deploy
9
10DEPENDS += "u-boot-mkimage-native u-boot openssl openssl-native mbedtls rcw cst-native"
11DEPENDS:append:lx2160a = " ddr-phy"
12do_compile[depends] += "u-boot:do_deploy rcw:do_deploy uefi:do_deploy"
13
14S = "${WORKDIR}/git"
15
16SRC_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"
19SRCREV = "5ae5233c064e94a8bd1b4a1652a03b87b0be63f6"
20
21COMPATIBLE_MACHINE = "(qoriq)"
22
23PACKAGE_ARCH = "${MACHINE_ARCH}"
24
25PLATFORM = "${MACHINE}"
26PLATFORM:ls1088ardb-pb = "ls1088ardb"
27PLATFORM_ADDITIONAL_TARGET ??= ""
28PLATFORM_ADDITIONAL_TARGET:ls1012afrwy = "ls1012afrwy_512mb"
29
30RCW_FOLDER ?= "${MACHINE}"
31RCW_FOLDER:ls1088ardb-pb = "ls1088ardb"
32
33# requires CROSS_COMPILE set by hand as there is no configure script
34export CROSS_COMPILE="${TARGET_PREFIX}"
35export ARCH="arm64"
36
37# Let the Makefile handle setting up the CFLAGS and LDFLAGS as it is
38# a standalone application
39CFLAGS[unexport] = "1"
40LDFLAGS[unexport] = "1"
41AS[unexport] = "1"
42LD[unexport] = "1"
43
44EXTRA_OEMAKE += "HOSTCC='${BUILD_CC} ${BUILD_CPPFLAGS} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}'"
45
46BOOTTYPE ?= "nor nand qspi flexspi_nor sd emmc"
47OTABOOTTYPE ?= "nor qspi flexspi_nor"
48BUILD_SECURE = "${@bb.utils.contains('DISTRO_FEATURES', 'secure', 'true', 'false', d)}"
49BUILD_OPTEE = "${@bb.utils.contains('COMBINED_FEATURES', 'optee', 'true', 'false', d)}"
50BUILD_FUSE = "${@bb.utils.contains('DISTRO_FEATURES', 'fuse', 'true', 'false', d)}"
51BUILD_OTA = "${@bb.utils.contains('DISTRO_FEATURES', 'ota', 'true', 'false', d)}"
52
53PACKAGECONFIG ??= " \
54 ${@bb.utils.filter('COMBINED_FEATURES', 'optee', d)} \
55"
56PACKAGECONFIG[optee] = ",,optee-os-qoriq"
57
58uboot_boot_sec ?= "${DEPLOY_DIR_IMAGE}/u-boot.bin-tfa-secure-boot"
59uboot_boot ?= "${DEPLOY_DIR_IMAGE}/u-boot.bin-tfa"
60rcw ?= ""
61rcw:ls1012a = "_default"
62rcwsec ?= "_sben"
63
64chassistype ?= "ls2088_1088"
65chassistype:ls1012a = "ls104x_1012"
66chassistype:ls1043a = "ls104x_1012"
67chassistype:ls1046a = "ls104x_1012"
68
69ddrphyopt ?= ""
70ddrphyopt:lx2160a = "fip_ddr_sec"
71
72do_configure[noexec] = "1"
73
74do_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
180do_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
214do_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}
246addtask deploy after do_install
247FILES:${PN} += "/boot"
248BBCLASSEXTEND = "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 @@
1require qoriq-atf-${PV}.inc
2
3DESCRIPTION = "ARM Trusted Firmware"
4
5inherit deploy
6
7DEPENDS += "cst-native"
8do_compile[depends] += "u-boot:do_deploy rcw:do_deploy ddr-phy:do_deploy"
9
10PACKAGE_ARCH = "${MACHINE_ARCH}"
11
12PLATFORM = "${MACHINE}"
13MBEDTLS_FOLDER ?= "${S}/mbedtls"
14RCW_FOLDER ?= "${MACHINE}"
15
16# requires CROSS_COMPILE set by hand as there is no configure script
17export CROSS_COMPILE="${TARGET_PREFIX}"
18export ARCH="arm64"
19
20# Let the Makefile handle setting up the CFLAGS and LDFLAGS as it is
21# a standalone application
22CFLAGS[unexport] = "1"
23LDFLAGS[unexport] = "1"
24AS[unexport] = "1"
25LD[unexport] = "1"
26
27EXTRA_OEMAKE += "HOSTCC='${BUILD_CC} ${BUILD_CPPFLAGS} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}'"
28
29BOOTTYPE ?= "flexspi_nor sd emmc"
30ARM_COT = "${@bb.utils.contains('DISTRO_FEATURES', 'arm-cot', 'true', 'false', d)}"
31NXP_COT = "${@bb.utils.contains('DISTRO_FEATURES', 'secure', 'true', 'false', d)}"
32BUILD_OPTEE = "${@bb.utils.contains('COMBINED_FEATURES', 'optee', 'true', 'false', d)}"
33
34PACKAGECONFIG ??= " \
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"
39PACKAGECONFIG[optee] = ",,optee-os-qoriq"
40
41uboot_sec ?= "${DEPLOY_DIR_IMAGE}/u-boot.bin-tfa-secure-boot"
42uboot ?= "${DEPLOY_DIR_IMAGE}/u-boot.bin-tfa"
43
44do_configure[noexec] = "1"
45
46do_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
136do_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
161do_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}
173addtask deploy after do_install
174FILES:${PN} += "/boot"
175COMPATIBLE_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 @@
1require recipes-bsp/atf/qoriq-atf-2.4.inc
2
3inherit deploy
4
5DEPENDS += "u-boot-mkimage-native u-boot openssl openssl-native mbedtls rcw cst-native bc-native"
6DEPENDS:append:lx2160a += "ddr-phy"
7DEPENDS:append:lx2162a += "ddr-phy"
8do_compile[depends] += "u-boot:do_deploy rcw:do_deploy uefi:do_deploy"
9
10SRC_URI += "git://github.com/ARMmbed/mbedtls;nobranch=1;destsuffix=git/mbedtls;name=mbedtls"
11SRCREV_mbedtls = "0795874acdf887290b2571b193cafd3c4041a708"
12SRCREV_FORMAT = "atf"
13
14COMPATIBLE_MACHINE = "(qoriq)"
15
16PACKAGE_ARCH = "${MACHINE_ARCH}"
17
18PLATFORM = "${MACHINE}"
19PLATFORM:ls1088ardb-pb = "ls1088ardb"
20PLATFORM_ADDITIONAL_TARGET ??= ""
21PLATFORM_ADDITIONAL_TARGET:ls1012afrwy = "ls1012afrwy_512mb"
22
23RCW_FOLDER ?= "${MACHINE}"
24RCW_FOLDER:ls1088ardb-pb = "ls1088ardb"
25RCW_FOLDER:lx2160ardb = "lx2160ardb_rev2"
26
27RCW_SUFFIX ?= ".bin"
28RCW_SUFFIX:ls1012a = "${@bb.utils.contains('DISTRO_FEATURES', 'secure', '_sben.bin', '_default.bin', d)}"
29RCW_SUFFIX:ls1043a = "${@bb.utils.contains('DISTRO_FEATURES', 'secure', '_sben.bin', '.bin', d)}"
30RCW_SUFFIX:ls1046a = "${@bb.utils.contains('DISTRO_FEATURES', 'secure', '_sben.bin', '.bin', d)}"
31
32UBOOT_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
34SECURE_EXTENTION ?= "${@bb.utils.contains('DISTRO_FEATURES', 'secure', '_sec', '', d)}"
35
36BOOTTYPE ?= "nor nand qspi flexspi_nor sd emmc"
37
38chassistype ?= "ls2088_1088"
39chassistype:ls1012a = "ls104x_1012"
40chassistype:ls1043a = "ls104x_1012"
41chassistype:ls1046a = "ls104x_1012"
42
43DDR_PHY_BIN_PATH ?= ""
44DDR_PHY_BIN_PATH:lx2160a = "${DEPLOY_DIR_IMAGE}/ddr-phy"
45DDR_PHY_BIN_PATH:lx2162a = "${DEPLOY_DIR_IMAGE}/ddr-phy"
46
47# requires CROSS_COMPILE set by hand as there is no configure script
48export CROSS_COMPILE="${TARGET_PREFIX}"
49export ARCH="arm64"
50
51# Let the Makefile handle setting up the CFLAGS and LDFLAGS as it is
52# a standalone application
53CFLAGS[unexport] = "1"
54LDFLAGS[unexport] = "1"
55AS[unexport] = "1"
56LD[unexport] = "1"
57
58EXTRA_OEMAKE += "HOSTCC='${BUILD_CC} ${BUILD_CPPFLAGS} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}'"
59EXTRA_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
66PACKAGECONFIG ??= " \
67 ${@bb.utils.filter('COMBINED_FEATURES', 'optee', d)} \
68"
69PACKAGECONFIG[optee] = ",,optee-os-qoriq"
70
71python() {
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
77do_configure[noexec] = "1"
78
79do_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
167do_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
179do_deploy() {
180 install -d ${DEPLOYDIR}/atf/
181 cp ${D}/boot/atf/* ${DEPLOYDIR}/atf/
182}
183addtask deploy after do_install
184
185FILES:${PN} += "/boot"
186BBCLASSEXTEND = "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 @@
1DESCRIPTION = "The Management Complex (MC) is a key component of DPAA" 1DESCRIPTION = "The Management Complex (MC) is a key component of DPAA"
2SECTION = "mc-utils" 2SECTION = "mc-utils"
3LICENSE = "BSD" 3LICENSE = "BSD"
4 4LIC_FILES_CHKSUM = "file://LICENSE;md5=386a6287daa6504b7e7e5014ddfb3987"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=386a6287daa6504b7e7e5014ddfb3987 \
6"
7 5
8DEPENDS += "dtc-native" 6DEPENDS += "dtc-native"
9 7
10inherit deploy 8inherit deploy
11 9
12SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/mc-utils;nobranch=1" 10SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/mc-utils;nobranch=1"
13SRCREV = "8e0b863693fc2ccbc62a62c79b4e3db6da88c16e" 11SRCREV = "12ffee82d210cb6b5c8fa30fbc6f5d29e4be2e6f"
14 12
15S = "${WORKDIR}/git" 13S = "${WORKDIR}/git"
16 14
@@ -18,10 +16,10 @@ MC_CFG ?= ""
18MC_CFG:ls1088a = "ls1088a" 16MC_CFG:ls1088a = "ls1088a"
19MC_CFG:ls2088a = "ls2088a" 17MC_CFG:ls2088a = "ls2088a"
20MC_CFG:lx2160a = "lx2160a" 18MC_CFG:lx2160a = "lx2160a"
21MC_CFG:lx2162aqds = "lx2162aqds" 19MC_CFG:lx2162a = "lx2162a"
22 20
23MC_FLAVOUR ?= "RDB" 21MC_FLAVOUR ?= "${@oe.utils.ifelse(d.getVar('MACHINE').endswith('qds'), 'QDS', 'RDB')}"
24MC_FLAVOUR:lx2162a = "" 22MC_FOLDER ?= "${@d.getVar('MC_CFG').upper() + '-' + d.getVar('MC_FLAVOUR')}"
25 23
26do_compile () { 24do_compile () {
27 oe_runmake -C config 25 oe_runmake -C config
@@ -29,23 +27,19 @@ do_compile () {
29 27
30do_install () { 28do_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
39do_deploy () { 36do_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}
47addtask deploy after do_install 40addtask deploy after do_install
48 41
49PACKAGES += "${PN}-image" 42PACKAGES += "${PN}-image"
50FILES:${PN}-image += "/boot" 43FILES:${PN}-image += "/boot"
44PACKAGE_ARCH = "${MACHINE_ARCH}"
51COMPATIBLE_MACHINE = "(qoriq-arm64)" 45COMPATIBLE_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"
8inherit deploy siteinfo 8inherit deploy siteinfo
9 9
10SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/rcw;nobranch=1" 10SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/rcw;nobranch=1"
11SRCREV = "1caebba96b6fd8eac9ef4246c181f2b47c448c4f" 11SRCREV = "1f431891c7f0e7d4f52327f1fe19504a284491c4"
12 12
13S = "${WORKDIR}/git" 13S = "${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
17SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/u-boot;nobranch=1" 17SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/u-boot;nobranch=1"
18SRCREV= "f46a944f715f284aff1d42c009680ffe0be4058f" 18SRCREV= "1c0116f3da250c5a52858c53efb8b38c0963f477"
19 19
20S = "${WORKDIR}/git" 20S = "${WORKDIR}/git"
21B = "${WORKDIR}/build" 21B = "${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"
6inherit deploy 6inherit deploy
7 7
8SRC_URI = "git://github.com/NXP/qoriq-uefi-binary.git;nobranch=1" 8SRC_URI = "git://github.com/NXP/qoriq-uefi-binary.git;nobranch=1"
9SRCREV= "06e960829ba204f35979440364b9ac7e51ed996b" 9SRCREV= "1b28cad962a3f7b61baae2229cb3b84926941cfa"
10 10
11S = "${WORKDIR}/git" 11S = "${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"
24S = "${WORKDIR}/git" 24S = "${WORKDIR}/git"
25 25
26EXTRA_OEMAKE = 'CC="${CC}" LD="${CC}"' 26EXTRA_OEMAKE = 'CC="${CC}" LD="${CC}"'
27CFLAGS:append = ' -Wno-deprecated-declarations'
27 28
28PARALLEL_MAKE = "" 29PARALLEL_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 @@
1From 0f1f2d4596aee037d3ccbcf10592466daa54107f Mon Sep 17 00:00:00 2001
2From: Laurent Vivier <laurent@vivier.eu>
3Date: Tue, 12 Nov 2019 15:25:56 +0100
4Subject: [PATCH] linux-user: remove host stime() syscall
5
6stime() has been withdrawn from glibc
7(12cbde1dae6f "Use clock_settime to implement stime; withdraw stime.")
8
9Implement the target stime() syscall using host
10clock_settime(CLOCK_REALTIME, ...) as it is done internally in glibc.
11
12Tested 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
34Upstream-Status: Backport
35
36Buglink: https://bugs.launchpad.net/qemu/+bug/1852115
37Reported-by: Cole Robinson <crobinso@redhat.com>
38Signed-off-by: Laurent Vivier <laurent@vivier.eu>
39Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
40Message-Id: <20191112142556.6335-1-laurent@vivier.eu>
41---
42 linux-user/syscall.c | 8 +++++---
43 1 file changed, 5 insertions(+), 3 deletions(-)
44
45diff --git a/linux-user/syscall.c b/linux-user/syscall.c
46index 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--
662.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
19SRCREV = "0b88a503e43ca629d6e8165638ac6b312e5c66bd" 18SRCREV = "14fda5a42df6c72e890d6a97ff88c5852172604b"
20 19
21S = "${WORKDIR}/git" 20S = "${WORKDIR}/git"
22 21
@@ -53,7 +52,7 @@ do_install_ptest() {
53} 52}
54 53
55PACKAGECONFIG ??= " \ 54PACKAGECONFIG ??= " \
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"
59PACKAGECONFIG:class-nativesdk ??= "fdt sdl kvm" 58PACKAGECONFIG: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 @@
1SUMMARY = "DPAA2 Management Complex Firmware"
2LICENSE = "NXP-Binary-EULA"
3LIC_FILES_CHKSUM = "file://NXP-Binary-EULA.txt;md5=2cb2fee5d3558ee2a81331ed121647ad"
4
5inherit deploy
6
7INHIBIT_DEFAULT_DEPS = "1"
8
9SRC_URI = "git://github.com/nxp/qoriq-mc-binary;nobranch=1"
10SRCREV = "d21bc22000a14b0b6eeafc017fb93bc70499f74a"
11
12S = "${WORKDIR}/git"
13
14REGLEX:ls2088a = "ls2088a"
15REGLEX:ls2080a = "ls2080a"
16REGLEX:ls1088a = "ls1088a"
17REGLEX:lx2160a = "lx216xa"
18REGLEX:lx2162a = "lx216xa"
19
20do_install () {
21 install -d ${D}/boot
22 install -m 755 ${S}/${REGLEX}/*.itb ${D}/boot
23}
24
25do_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}
33addtask deploy before do_build after do_install
34
35PACKAGES += "${PN}-image"
36FILES:${PN}-image += "/boot"
37
38INHIBIT_PACKAGE_STRIP = "1"
39
40COMPATIBLE_MACHINE = "(qoriq-arm64)"
41PACKAGE_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 @@
1From 5392152e704ff001c41de03445d668227237a87e Mon Sep 17 00:00:00 2001
2From: Ting Liu <ting.liu@nxp.com>
3Date: Fri, 15 Oct 2021 09:36:04 +0530
4Subject: [PATCH] disable manpage generation
5
6Signed-off-by: Ting Liu <ting.liu@nxp.com>
7---
8 Makefile | 1 -
9 1 file changed, 1 deletion(-)
10
11diff --git a/Makefile b/Makefile
12index 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--
242.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"
2LICENSE = "BSD" 2LICENSE = "BSD"
3LIC_FILES_CHKSUM = "file://COPYING;md5=ec8d84e9cd4de287e290275d09db27f0" 3LIC_FILES_CHKSUM = "file://COPYING;md5=ec8d84e9cd4de287e290275d09db27f0"
4 4
5RDEPENDS:${PN} += "bash dtc" 5SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/restool;nobranch=1 \
6 6 file://disable-manpage-generation.patch \
7SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/restool;nobranch=1" 7"
8SRCREV = "8ddbe4c9559ffad5d7e5dd3cd5f00ceeff7f05d4" 8SRCREV = "d29522aef9f92ff2557978d5d3979b771a9576fe"
9 9
10S = "${WORKDIR}/git" 10S = "${WORKDIR}/git"
11 11
12EXTRA_OEMAKE = 'CC="${CC}" EXTRA_CFLAGS="-O2 -Wno-missing-field-initializers -Wno-missing-braces"' 12inherit bash-completion
13
14EXTRA_OEMAKE = 'CC="${CC}" MANPAGE= EXTRA_CFLAGS="-O2 -Wno-missing-field-initializers -Wno-missing-braces -Wno-maybe-uninitialized -Wno-date-time"'
13 15
14do_install () { 16do_install () {
15 oe_runmake install DESTDIR=${D} 17 oe_runmake install DESTDIR=${D}
@@ -18,3 +20,6 @@ do_install () {
18COMPATIBLE_MACHINE = "(qoriq-arm64)" 20COMPATIBLE_MACHINE = "(qoriq-arm64)"
19PACKAGE_ARCH = "${MACHINE_ARCH}" 21PACKAGE_ARCH = "${MACHINE_ARCH}"
20 22
23RDEPENDS:${PN} += "bash dtc"
24RDEPENDS:${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"
5DEPENDS = "libxml2 fmlib tclap" 5DEPENDS = "libxml2 fmlib tclap"
6 6
7SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/spc;nobranch=1" 7SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/spc;nobranch=1"
8SRCREV = "be7dd8e346a934aae1e4bdd6b579f2aa4bb5cd86" 8SRCREV = "398138687a3d3d6ef174501221711de74ff7bc40"
9 9
10S = "${WORKDIR}/git" 10S = "${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 @@
1DESCRIPTION = "Data Plane Development Kit"
2HOMEPAGE = "http://dpdk.org"
3LICENSE = "BSD-3-Clause & LGPLv2.1 & GPLv2"
4LIC_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
8SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/dpdk;nobranch=1"
9SRCREV = "f74b8bd5ab1c6ff76e956fc202a56aea2d200270"
10
11S = "${WORKDIR}/git"
12
13COMPATIBLE_MACHINE = "(qoriq-arm64)"
14
15CVE_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 @@
1From 768cef60957d5e840071d1d6514d4add3f3c2904 Mon Sep 17 00:00:00 2001
2From: Naveen Saini <naveen.kumar.saini@intel.com>
3Date: Wed, 14 Apr 2021 17:25:53 +0800
4Subject: [PATCH] Makefile: add makefile
5
6Current meson build for kernel module build does not fit in Yocto.
7So added Makefile to build rte_kni.ko
8
9Upstream-Status: Inappropriate
10
11Signed-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
19diff --git a/kernel/linux/kni/Kbuild b/kernel/linux/kni/Kbuild
20deleted file mode 100644
21index 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))
31diff --git a/kernel/linux/kni/Makefile b/kernel/linux/kni/Makefile
32new file mode 100644
33index 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--
732.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 @@
1From 6fe85f3a12d15e25345ef0547035a929351a179c Mon Sep 17 00:00:00 2001
2From: Ting Liu <ting.liu@nxp.com>
3Date: Fri, 17 Sep 2021 12:53:53 +0530
4Subject: [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
8collect2: error: ld returned 1 exit status
9
10Signed-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
15diff --git a/drivers/net/enetfec/enet_uio.c b/drivers/net/enetfec/enet_uio.c
16index 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--
292.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 @@
1From 308409d72671b7978b20d40748ad985a235b6c86 Mon Sep 17 00:00:00 2001
2From: Mohamad Noor Alim Hussin <mohamad.noor.alim.hussin@intel.com>
3Date: Thu, 24 Jun 2021 11:30:09 +0800
4Subject: [PATCH] ifpga/meson: Fix finding librt using find_library()
5
6Finding with "librt" keyword would give the output
7with full path of librt such as /usr/lib/librt.so
8instead of -lrt.
9
10Assume find_library() will prepend "lib", thus remove
11"lib" from "librt" keyword. The output will shows as
12-lrt.
13
14Upstream-Status: Submitted [https://mails.dpdk.org/archives/stable/2021-June/031840.html]
15
16Signed-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
21diff --git a/drivers/raw/ifpga/base/meson.build b/drivers/raw/ifpga/base/meson.build
22index 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--
352.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 @@
1From cf8f15824dc2dd306d9c7e111641bef045d623c2 Mon Sep 17 00:00:00 2001
2From: Naveen Saini <naveen.kumar.saini@intel.com>
3Date: Wed, 14 Apr 2021 16:03:10 +0800
4Subject: [PATCH] meson.build:-march and -mcpu already passed by Yocto
5
6Upstream-Status: Inappropriate
7
8Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
9---
10 config/meson.build | 12 ++++++------
11 1 file changed, 6 insertions(+), 6 deletions(-)
12
13diff --git a/config/meson.build b/config/meson.build
14index 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--
372.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 @@
1include dpdk-20.11.inc
2
3FILESEXTRAPATHS:prepend := "${THISDIR}/dpdk-${PV}:"
4
5SRC_URI += " \
6 file://0001-Makefile-add-makefile.patch \
7"
8
9inherit module
10
11#kernel module needs 'rte_build_config.h', which is generated at buid time
12DEPENDS += "dpdk"
13
14export S
15export STAGING_KERNEL_DIR
16export STAGING_INCDIR
17export INSTALL_MOD_DIR="dpdk"
18
19do_configure[noexec] = "1"
20
21do_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
33do_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 @@
1include dpdk-20.11.inc
2
3SRC_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
9MESON_BUILDTYPE = "release"
10
11# kernel module is provide by dpdk-module recipe, so disable here
12EXTRA_OEMESON = " -Denable_kmods=false \
13 -Dexamples=all \
14 -Doptimization=3 \
15"
16
17PACKAGECONFIG ??= "openssl"
18PACKAGECONFIG[afxdp] = ",,libbpf"
19PACKAGECONFIG[libvirt] = ",,libvirt"
20PACKAGECONFIG[openssl] = ",,openssl"
21
22RDEPENDS:${PN} += "bash pciutils python3-core"
23RDEPENDS:${PN}-examples += "bash"
24DEPENDS = "numactl"
25
26inherit meson
27
28INSTALL_PATH = "${prefix}/share/dpdk"
29
30do_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
37do_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
52PACKAGES =+ "${PN}-tools ${PN}-examples ${PN}-misc"
53
54FILES:${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
62FILES:${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
86FILES:${PN}-misc = " \
87 ${bindir}/dpdk-pdump \
88 ${bindir}/dpdk-test-* \
89 ${bindir}/dpdk-*.py \
90 ${INSTALL_PATH}/examples/* \
91"
92
93INSANE_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"
5SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/libpkcs11;nobranch=1 \ 5SRC_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"
8SRCREV = "a243fb21772f1bd434d8bc1ac45feb36571afadb" 8SRCREV = "8d85182b7a7cd393ab6dd72930f8d1b69468f741"
9 9
10DEPENDS = "openssl secure-obj" 10DEPENDS = "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 @@
1DESCRIPTION = "OVS DPDK"
2LICENSE = "BSD"
3LIC_FILES_CHKSUM = "file://LICENSE;md5=1ce5d23a6429dff345518758f13aaeab"
4
5DEPENDS = "dpdk python3-six-native coreutils-native"
6RDEPENDS:${PN} = "bash libcrypto libssl python3"
7
8inherit python3native
9
10SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/ovs-dpdk;nobranch=1"
11SRCREV = "072130412196029bcc284e353023d81019a8daa7"
12
13S = "${WORKDIR}/git"
14
15DPAA_VER ?= "dpaa"
16export RTE_TARGET = "${ARCH}-${DPAA_VER}-linuxapp-gcc"
17
18EXTRA_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
24do_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
30do_compile() {
31 oe_runmake O="${RTE_TARGET}" T="${RTE_TARGET}"
32}
33
34do_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
45ALLOW_EMPTY:${PN} = "1"
46INHIBIT_PACKAGE_STRIP = "1"
47PACKAGE_ARCH = "${MACHINE_ARCH}"
48COMPATIBLE_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 @@
1DESCRIPTION = "OVS DPDK"
2LICENSE = "BSD"
3LIC_FILES_CHKSUM = "file://LICENSE;md5=1ce5d23a6429dff345518758f13aaeab"
4
5DEPENDS = "dpdk python3-six-native coreutils-native autoconf-native automake-native"
6RDEPENDS:${PN} = "bash libcrypto libssl python3"
7
8inherit python3native pkgconfig
9
10SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/ovs-dpdk;nobranch=1"
11SRCREV = "f2c0744d2f68c4cd2840d6e409d7b0520e4caf99"
12
13S = "${WORKDIR}/git"
14
15do_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
21do_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
33ALLOW_EMPTY:${PN} = "1"
34INHIBIT_PACKAGE_STRIP = "1"
35PACKAGE_ARCH = "${MACHINE_ARCH}"
36COMPATIBLE_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 @@
1From 530fbb2e2deb6b9214466933df221910c2c50b7c Mon Sep 17 00:00:00 2001
2From: Ting Liu <ting.liu@nxp.com>
3Date: Fri, 15 Oct 2021 08:01:15 +0530
4Subject: [PATCH] fix gcc11 mismatched-dealloc error
5
6Fix 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
29Signed-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
35diff --git a/app/pktgen.h b/app/pktgen.h
36index 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
48diff --git a/lib/common/lscpu.c b/lib/common/lscpu.c
49index 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--
712.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 @@
1DESCRIPTION = "PKTGEN DPDK"
2LICENSE = "BSD"
3LIC_FILES_CHKSUM = "file://LICENSE;md5=30ac8fa65a07ea7cc1c7ee84e1c80294"
4
5DEPENDS += "libpcap dpdk lua lua-native"
6
7SRC_URI = "git://dpdk.org/git/apps/pktgen-dpdk;protocol=https;nobranch=1 \
8"
9SRCREV = "7a61e4dfcdf037c31460b6c9bcb301797813036a"
10
11S = "${WORKDIR}/git"
12
13DPAA_VER ?= "dpaa"
14export RTE_TARGET = "arm64-${DPAA_VER}-linuxapp-gcc"
15export RTE_SDK = "${RECIPE_SYSROOT}/usr/share/"
16
17EXTRA_OEMAKE += 'CC="${CC}" LD="${LD}" RTE_SDK="${RECIPE_SYSROOT}/usr/share/" RTE_TARGET="arm64-${DPAA_VER}-linuxapp-gcc"'
18
19do_compile() {
20 oe_runmake
21}
22
23do_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
29INSANE_SKIP:${PN} = "ldflags"
30INHIBIT_PACKAGE_STRIP = "1"
31PACKAGE_ARCH = "${MACHINE_ARCH}"
32PARALLEL_MAKE = ""
33COMPATIBLE_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 @@
1DESCRIPTION = "PKTGEN DPDK"
2LICENSE = "BSD"
3LIC_FILES_CHKSUM = "file://LICENSE;md5=0245ceedaef59ae0129500b0ce1e8a45"
4
5DEPENDS += "libpcap dpdk lua lua-native"
6
7SRC_URI = "git://dpdk.org/git/apps/pktgen-dpdk;protocol=https;nobranch=1 \
8 file://fix-gcc11-mismatched-dealloc-error.patch \
9"
10SRCREV = "3a09aa916597fb9a97ee8eec50044cbdb9c4abde"
11
12S = "${WORKDIR}/git"
13
14DPAA_VER ?= "dpaa"
15export RTE_TARGET = "arm64-${DPAA_VER}-linuxapp-gcc"
16export RTE_SDK = "${RECIPE_SYSROOT}/usr/share/dpdk"
17
18inherit meson pkgconfig
19
20MESON_BUILDTYPE = "release"
21EXTRA_OEMESON += '-Dc_args="-DRTE_FORCE_INTRINSICS"'
22
23do_configure:prepend() {
24 sed -i "/^add_project_arguments('-march=native'/s/^/#&/" ${S}/meson.build
25}
26
27do_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
33INSANE_SKIP:${PN} = "ldflags"
34INHIBIT_PACKAGE_STRIP = "1"
35PACKAGE_ARCH = "${MACHINE_ARCH}"
36PARALLEL_MAKE = ""
37COMPATIBLE_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
11LDFLAGS += "${TOOLCHAIN_OPTIONS}" 11LDFLAGS += "${TOOLCHAIN_OPTIONS}"
12 12
13SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/secure_obj;nobranch=1 \ 13SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/secure_obj;nobranch=1"
14" 14SRCREV = "5ff1231f74b4b01744be95a3137a14ad0a483e61"
15SRCREV = "71a6eb33b58a8578a60995da3896f8f2d638c916"
16 15
17WRAP_TARGET_PREFIX ?= "${TARGET_PREFIX}" 16WRAP_TARGET_PREFIX ?= "${TARGET_PREFIX}"
18export SECURE_STORAGE_PATH = "${S}/secure_storage_ta/ta/" 17export 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}"
13export CROSS_COMPILE_TA = "${CROSS_COMPILE}" 13export CROSS_COMPILE_TA = "${CROSS_COMPILE}"
14ARCH:qoriq-arm64 = "aarch64" 14ARCH:qoriq-arm64 = "aarch64"
15ARCH:qoriq-arm = "arm" 15ARCH:qoriq-arm = "arm"
16CFLAGS += "${TOOLCHAIN_OPTIONS}"
16 17
17do_compile() { 18do_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"
8inherit pkgconfig 8inherit pkgconfig
9 9
10SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/tsntool;protocol=https;nobranch=1" 10SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/tsntool;protocol=https;nobranch=1"
11SRCREV = "3111f7f79e7d1b1a5e60f37fe76785559b2d0360" 11SRCREV = "b767c260b851aac94828ed26c6a9a327e4e98334"
12 12
13S = "${WORKDIR}/git" 13S = "${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"
25LOCALVERSION = "" 25LOCALVERSION = ""
26DELTA_KERNEL_DEFCONFIG ?= "" 26DELTA_KERNEL_DEFCONFIG ?= ""
27DELTA_KERNEL_DEFCONFIG:prepend:qoriq-arm64 = "lsdk.config " 27DELTA_KERNEL_DEFCONFIG:prepend:qoriq-arm64 = "lsdk.config "
28DELTA_KERNEL_DEFCONFIG:prepend:fsl-lsch2-32b = "multi_v7_lpae.config multi_v8.config lsdk.config " 28DELTA_KERNEL_DEFCONFIG:prepend:qoriq-arm = "multi_v7_lpae.config lsdk.config "
29DELTA_KERNEL_DEFCONFIG:prepend:ls102xa = "multi_v7_lpae.config lsdk.config "
30 29
31do_merge_delta_config[depends] += "virtual/${TARGET_PREFIX}gcc:do_populate_sysroot bison-native:do_populate_sysroot" 30do_merge_delta_config[depends] += "virtual/${TARGET_PREFIX}gcc:do_populate_sysroot bison-native:do_populate_sysroot"
32do_merge_delta_config[dirs] = "${B}" 31do_merge_delta_config[dirs] = "${B}"
@@ -55,14 +54,5 @@ do_merge_delta_config() {
55} 54}
56addtask merge_delta_config before do_kernel_localversion after do_patch 55addtask 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)
59do_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
63do_install:prepend:fsl-lsch2-32b() {
64 rm -f ${STAGING_KERNEL_DIR}/arch/arm/boot/dts/freescale
65}
66
67FILES:${KERNEL_PACKAGE_NAME}-image += "/boot/zImage*" 57FILES:${KERNEL_PACKAGE_NAME}-image += "/boot/zImage*"
68COMPATIBLE_MACHINE = "(qoriq)" 58COMPATIBLE_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 @@
1LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
2
3LINUX_VERSION = "5.10.52"
4
5SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/linux;nobranch=1"
6SRCREV = "a11753a89ec610768301d4070e10b8bd60fde8cd"
7
8require 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 @@
1LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
2
3LINUX_VERSION = "5.4.47"
4
5SRC_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"
12SRCREV = "6bff40d413b394c2d742e7a42089bfc62aef0a9b"
13
14require 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 @@
1require optee-client.nxp.inc
2
3PV:append = "+git${SRCPV}"
4
5COMPATIBLE_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 @@
1SUMMARY = "OPTEE Client"
2HOMEPAGE = "https://github.com/OP-TEE/optee_client"
3
4LICENSE = "BSD"
5LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=69663ab153298557a59c67a60a743e5b"
6
7inherit python3native systemd
8
9SRC_URI = "git://github.com/OP-TEE/optee_client;nobranch=1"
10SRCREV = "be4fa2e36f717f03ca46e574aa66f697a897d090"
11
12S = "${WORKDIR}/git"
13
14EXTRA_OEMAKE = "ARCH=arm64"
15
16do_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
28COMPATIBLE_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
3SUMMARY = "OPTEE Client libs"
4HOMEPAGE = "http://www.optee.org/"
5LICENSE = "BSD"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=69663ab153298557a59c67a60a743e5b"
7
8inherit python3native systemd
9
10SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/optee_client.git;nobranch=1"
11SRCREV = "7c9c423d00e96bf51debd5fe10fd70dce83be5cc"
12
13FILESEXTRAPATHS:prepend := "${THISDIR}/optee-client:"
14SRC_URI += "file://tee-supplicant.service"
15
16S = "${WORKDIR}/git"
17B = "${WORKDIR}/build"
18
19OPTEE_ARCH ?= "arm32"
20OPTEE_ARCH_armv7a = "arm32"
21OPTEE_ARCH:aarch64 = "arm64"
22
23EXTRA_OEMAKE = "ARCH=${OPTEE_ARCH} O=${B}"
24
25do_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
48SYSTEMD_SERVICE:${PN} = "tee-supplicant.service"
49
50FILES:${PN} += "${libdir}/* ${includedir}/*"
51
52INSANE_SKIP:${PN} = "ldflags dev-elf"
53INSANE_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]
2Description=TEE Supplicant
3
4[Service]
5User=root
6EnvironmentFile=-/etc/default/tee-supplicant
7ExecStart=/usr/bin/tee-supplicant $OPTARGS
8
9[Install]
10WantedBy=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 @@
1diff --git a/mk/gcc.mk b/mk/gcc.mk
2index 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 @@
1From f94d9558d9eae48e92ce8d651539b6cf69eb4394 Mon Sep 17 00:00:00 2001
2From: Joshua Watt <JPEWhacker@gmail.com>
3Date: Mon, 18 May 2020 20:00:00 -0500
4Subject: [PATCH] arm64: Disable outline-atomics when compiling
5
6Disables the automatic detection of LSE (Large System Extension)
7instructions when compiling AArch64 code. GCC 10 implements this
8detection in libgcc using __getauxval(), which optee doesn't implement.
9This requires that the proper -mcpu is passed to GCC so that the code
10can be correctly compiled to use either LSE or load-store-exclusive.
11
12Fixes 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
20Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
21Upstream-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
26diff --git a/core/arch/arm/arm.mk b/core/arch/arm/arm.mk
27index 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--
402.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 @@
1require optee-os.nxp.inc
2
3PV:append = "+git${SRCPV}"
4
5PLATFORM_FLAVOR:ls1088ardb-pb = "ls1088ardb"
6PLATFORM_FLAVOR:ls1046afrwy = "ls1046ardb"
7PLATFORM_FLAVOR:lx2162aqds = "lx2160aqds"
8
9EXTRA_OEMAKE += " \
10 PLATFORM=ls \
11 CFG_ARM64_core=y \
12"
13
14do_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
19do_install:append:qoriq() {
20 install -m 644 ${B}/core/tee-raw.bin ${D}${nonarch_base_libdir}/firmware/tee_${MACHINE}.bin
21}
22
23do_install:append:ls1012afrwy() {
24 install -m 644 ${B}/core/tee_512mb.bin ${D}${nonarch_base_libdir}/firmware/tee_${MACHINE}_512mb.bin
25}
26
27INHIBIT_PACKAGE_STRIP = "1"
28COMPATIBLE_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 @@
1SUMMARY = "OP-TEE Trusted OS"
2DESCRIPTION = "OPTEE OS"
3
4LICENSE = "BSD"
5LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=c1f21c4f72f372ef38a5a4aee55ec173"
6
7PV = "3.8+git${SRCPV}"
8
9DEPENDS += "python3-pyelftools-native python3-pycryptodome-native python3-pycryptodomex-native dtc-native"
10
11inherit deploy python3native
12
13SRC_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 "
17SRCREV = "0cb01f7f6aee552ead49990c06f69f73f459cc65"
18
19S = "${WORKDIR}/git"
20
21OPTEEMACHINE ?= "${MACHINE}"
22OPTEEMACHINE:ls1088ardb-pb = "ls1088ardb"
23OPTEEMACHINE:ls1046afrwy = "ls1046ardb"
24OPTEEMACHINE:lx2162aqds = "lx2160aqds"
25
26EXTRA_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 "
34EXTRA_OEMAKE:append:lx2162aqds = " CFG_EMBED_DTB_SOURCE_FILE=fsl-lx2160a-qds.dts CFG_EMBED_DT=y"
35
36OPTEE_ARCH:armv7a = "arm32"
37OPTEE_ARCH:aarch64 = "arm64"
38
39do_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
51do_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
66PACKAGE_ARCH = "${MACHINE_ARCH}"
67
68do_deploy() {
69 install -d ${DEPLOYDIR}/optee
70 for f in ${D}/lib/firmware/*; do
71 cp $f ${DEPLOYDIR}/optee/
72 done
73}
74
75addtask deploy before do_build after do_install
76
77FILES:${PN} = "/lib/firmware/"
78FILES:${PN}-dev = "/usr/include/optee"
79
80INSANE_SKIP:${PN}-dev = "staticdev"
81
82INHIBIT_PACKAGE_STRIP = "1"
83COMPATIBLE_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
3SUMMARY = "OPTEE OS"
4DESCRIPTION = "OPTEE OS"
5HOMEPAGE = "http://www.optee.org/"
6LICENSE = "BSD"
7LIC_FILES_CHKSUM = "file://LICENSE;md5=c1f21c4f72f372ef38a5a4aee55ec173"
8
9inherit deploy python3native autotools
10DEPENDS = "python3-pycryptodome-native python3-pyelftools-native python3-pycryptodomex-native dtc-native"
11
12SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/optee_os.git;nobranch=1"
13SRCREV = "735d98806dc26fbeeecad7f5e60ffeab8170c67e"
14
15S = "${WORKDIR}/git"
16B = "${WORKDIR}/build.${PLATFORM_FLAVOR}"
17
18PLATFORM_FLAVOR ?= "${MACHINE}"
19
20OPTEE_ARCH ?= "arm64"
21OPTEE_ARCH_armv7a = "arm32"
22OPTEE_ARCH:aarch64 = "arm64"
23
24OPTEE_CORE_LOG_LEVEL ?= "1"
25OPTEE_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
32EXTRA_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
42do_compile() {
43 unset LDFLAGS
44 export CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_HOST}"
45 oe_runmake all
46}
47
48do_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
65do_deploy() {
66 install -d ${DEPLOYDIR}/optee
67 install -m 644 ${D}${nonarch_base_libdir}/firmware/* ${DEPLOYDIR}/optee/
68}
69addtask deploy before do_build after do_install
70
71FILES:${PN} = "${nonarch_base_libdir}/firmware/ ${nonarch_base_libdir}/optee_armtz/"
72FILES:${PN}-staticdev = "/usr/include/optee/"
73RDEPENDS:${PN}-dev += "${PN}-staticdev"
74
75PACKAGE_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 @@
1require optee-test.nxp.inc
2
3PV:append = "+git${SRCPV}"
4
5DEPENDS += "optee-client-qoriq optee-os-qoriq"
6
7TEEC_EXPORT = "${STAGING_DIR_HOST}${prefix}"
8
9EXTRA_OEMAKE += " \
10 TEEC_EXPORT=${TEEC_EXPORT} \
11"
12
13COMPATIBLE_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 @@
1SUMMARY = "OP-TEE sanity testsuite"
2HOMEPAGE = "https://github.com/OP-TEE/optee_test"
3
4LICENSE = "BSD & GPLv2"
5LIC_FILES_CHKSUM = "file://${S}/LICENSE.md;md5=daa2bcccc666345ab8940aab1315a4fa"
6
7DEPENDS = "optee-client-qoriq optee-os-qoriq python3-pycryptodome-native python3-pycryptodomex-native"
8
9inherit python3native
10
11SRC_URI = "git://github.com/OP-TEE/optee_test;nobranch=1"
12SRCREV = "30481e381cb4285706e7516853495a7699c93b2c"
13
14S = "${WORKDIR}/git"
15
16OPTEE_CLIENT_EXPORT = "${STAGING_DIR_HOST}${prefix}"
17TEEC_EXPORT = "${STAGING_DIR_HOST}${prefix}"
18TA_DEV_KIT_DIR = "${STAGING_INCDIR}/optee/export-user_ta"
19
20EXTRA_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
28do_compile() {
29 # Top level makefile doesn't seem to handle parallel make gracefully
30 oe_runmake xtest
31 oe_runmake ta
32}
33
34do_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
43FILES:${PN} += "/lib/optee_armtz/"
44
45# Imports machine specific configs from staging to build
46PACKAGE_ARCH = "${MACHINE_ARCH}"
47COMPATIBLE_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
3SUMMARY = "OPTEE test"
4HOMEPAGE = "http://www.optee.org/"
5
6LICENSE = "BSD & GPLv2"
7LIC_FILES_CHKSUM = "file://LICENSE.md;md5=daa2bcccc666345ab8940aab1315a4fa"
8
9DEPENDS = "python3-pycryptodome-native python3-pycryptodomex-native openssl"
10inherit python3native cmake
11
12SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/optee_test.git;nobranch=1"
13SRCREV = "69722dab8c1f2683e30e0ee3b536053367e37aad"
14
15S = "${WORKDIR}/git"
16B = "${WORKDIR}/build"
17
18TA_DEV_KIT_DIR ?= "${STAGING_INCDIR}/optee/export-user_ta"
19OPTEE_CLIENT_EXPORT ?= "${STAGING_DIR_HOST}${prefix}"
20
21EXTRA_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
30EXTRA_OECMAKE = " \
31 -DOPTEE_TEST_SDK=${TA_DEV_KIT_DIR} \
32"
33
34do_compile() {
35 export CXXFLAGS="${CXXFLAGS} --sysroot=${STAGING_DIR_HOST}"
36 oe_runmake xtest
37 oe_runmake ta
38 oe_runmake test_plugin
39}
40
41do_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
56FILES:${PN} += "${nonarch_base_libdir} ${libdir}/tee-supplicant/plugins/"
57
58DEBUG_OPTIMIZATION:append = " -Wno-error=maybe-uninitialized -Wno-deprecated-declarations"
59FULL_OPTIMIZATION:append = " -Wno-error=maybe-uninitialized -Wno-deprecated-declarations"
60
61PACKAGE_ARCH = "${MACHINE_ARCH}"