summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2023-05-02 12:57:19 -0300
committerGitHub <noreply@github.com>2023-05-02 12:57:19 -0300
commitc7ac1edd36f26b7380d324c0fa55f373a8f33606 (patch)
tree6f971218a72ca8680867fa5c806f94de13e2bded
parent465598263e416459f36a49c396133e44574c528e (diff)
parent528a49b0437acbcf61028a8c97747ae714ed3b55 (diff)
downloadmeta-freescale-c7ac1edd36f26b7380d324c0fa55f373a8f33606.tar.gz
Merge pull request #1520 from Freescale/backport-1519-to-mickledore
[Backport mickledore] imx-atf: Update lf-5.15.71-2.2.0 to lf-6.1.1-1.0.0
-rw-r--r--recipes-bsp/imx-atf/imx-atf/0001-Makefile-Suppress-array-bounds-error.patch47
-rw-r--r--recipes-bsp/imx-atf/imx-atf/rwx-segments.patch38
-rw-r--r--recipes-bsp/imx-atf/imx-atf_2.6.bb10
3 files changed, 3 insertions, 92 deletions
diff --git a/recipes-bsp/imx-atf/imx-atf/0001-Makefile-Suppress-array-bounds-error.patch b/recipes-bsp/imx-atf/imx-atf/0001-Makefile-Suppress-array-bounds-error.patch
deleted file mode 100644
index c7ace225..00000000
--- a/recipes-bsp/imx-atf/imx-atf/0001-Makefile-Suppress-array-bounds-error.patch
+++ /dev/null
@@ -1,47 +0,0 @@
1From 85f576054a4d5496706bbd37a520942f51cb74b9 Mon Sep 17 00:00:00 2001
2From: Tom Hochstein <tom.hochstein@nxp.com>
3Date: Mon, 16 May 2022 13:45:16 -0500
4Subject: [PATCH] Makefile: Suppress array-bounds error
5
6The array-bounds error is triggered now in cases where it was silent
7before, causing errors like:
8
9```
10plat/imx/imx8m/hab.c: In function 'imx_hab_handler':
11plat/imx/imx8m/hab.c:64:57: error: array subscript 0 is outside array bounds of 'uint32_t[0]' {aka 'unsigned int[]'} [-Werror=array-bounds]
12 64 | #define HAB_RVT_CHECK_TARGET_ARM64 ((unsigned long)*(uint32_t *)(HAB_RVT_BASE + 0x18))
13 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14```
15
16The error is a false-positive and is entered as a bug [1]. The problem
17is fixed partially in GCC 12 and fully in GCC 13 [2].
18
19The partial fix does not work here because the constant addresses used
20are less than the 4kB boundary chosen for the partial fix, so suppress
21the error until GCC is upgraded to 13.
22
23[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578
24[2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578#c39
25
26Upstream-Status: Inappropriate [other]
27Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
28---
29 Makefile | 2 +-
30 1 file changed, 1 insertion(+), 1 deletion(-)
31
32diff --git a/Makefile b/Makefile
33index c87c3ae08..2d6b90f47 100644
34--- a/Makefile
35+++ b/Makefile
36@@ -346,7 +346,7 @@ WARNINGS += -Wshift-overflow -Wshift-sign-overflow \
37 endif
38
39 ifneq (${E},0)
40-ERRORS := -Werror
41+ERRORS := -Werror -Wno-error=array-bounds
42 endif
43
44 CPPFLAGS = ${DEFINES} ${INCLUDES} ${MBEDTLS_INC} -nostdinc \
45--
462.17.1
47
diff --git a/recipes-bsp/imx-atf/imx-atf/rwx-segments.patch b/recipes-bsp/imx-atf/imx-atf/rwx-segments.patch
deleted file mode 100644
index a4518ec6..00000000
--- a/recipes-bsp/imx-atf/imx-atf/rwx-segments.patch
+++ /dev/null
@@ -1,38 +0,0 @@
1Binutils 2.39 now warns when a segment has RXW permissions[1]:
2
3aarch64-none-elf-ld.bfd: warning: bl31.elf has a LOAD segment with RWX
4permissions
5
6However, TF-A passes --fatal-warnings to LD, so this is a build failure.
7
8There is a ticket filed upstream[2], so until that is resolved just
9remove --fatal-warnings.
10
11[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba951afb99912da01a6e8434126b8fac7aa75107
12[2] https://developer.trustedfirmware.org/T996
13
14Upstream-Status: Inappropriate
15Signed-off-by: Ross Burton <ross.burton@arm.com>
16
17diff --git a/Makefile b/Makefile
18index 3941f8698..13bbac348 100644
19--- a/Makefile
20+++ b/Makefile
21@@ -418,7 +418,7 @@ TF_LDFLAGS += $(TF_LDFLAGS_$(ARCH))
22 # LD = gcc (used when GCC LTO is enabled)
23 else ifneq ($(findstring gcc,$(notdir $(LD))),)
24 # Pass ld options with Wl or Xlinker switches
25-TF_LDFLAGS += -Wl,--fatal-warnings -O1
26+TF_LDFLAGS += -O1
27 TF_LDFLAGS += -Wl,--gc-sections
28 ifeq ($(ENABLE_LTO),1)
29 ifeq (${ARCH},aarch64)
30@@ -435,7 +435,7 @@ TF_LDFLAGS += $(subst --,-Xlinker --,$(TF_LDFLAGS_$(ARCH)))
31
32 # LD = gcc-ld (ld) or llvm-ld (ld.lld) or other
33 else
34-TF_LDFLAGS += --fatal-warnings -O1
35+TF_LDFLAGS += -O1
36 TF_LDFLAGS += --gc-sections
37 # ld.lld doesn't recognize the errata flags,
38 # therefore don't add those in that case
diff --git a/recipes-bsp/imx-atf/imx-atf_2.6.bb b/recipes-bsp/imx-atf/imx-atf_2.6.bb
index 33663a3a..ea83b9e8 100644
--- a/recipes-bsp/imx-atf/imx-atf_2.6.bb
+++ b/recipes-bsp/imx-atf/imx-atf_2.6.bb
@@ -7,13 +7,9 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/BSD-3-Clause;m
7 7
8PV .= "+git${SRCPV}" 8PV .= "+git${SRCPV}"
9 9
10SRC_URI = " \ 10SRC_URI = "git://github.com/nxp-imx/imx-atf.git;protocol=https;branch=${SRCBRANCH}"
11 git://github.com/nxp-imx/imx-atf.git;protocol=https;branch=${SRCBRANCH} \
12 file://0001-Makefile-Suppress-array-bounds-error.patch \
13 file://rwx-segments.patch \
14"
15SRCBRANCH = "lf_v2.6" 11SRCBRANCH = "lf_v2.6"
16SRCREV = "3c1583ba0a5d11e5116332e91065cb3740153a46" 12SRCREV = "616a4588f333522d50a55bedd2b9a90a51474a75"
17 13
18S = "${WORKDIR}/git" 14S = "${WORKDIR}/git"
19 15
@@ -26,7 +22,7 @@ ATF_PLATFORM ??= "INVALID"
26ATF_BOOT_UART_BASE ?= "" 22ATF_BOOT_UART_BASE ?= ""
27 23
28EXTRA_OEMAKE += " \ 24EXTRA_OEMAKE += " \
29 CROSS_COMPILE="${TARGET_PREFIX}" \ 25 CROSS_COMPILE=${TARGET_PREFIX} \
30 PLAT=${ATF_PLATFORM} \ 26 PLAT=${ATF_PLATFORM} \
31" 27"
32 28