summaryrefslogtreecommitdiffstats
path: root/recipes-bsp/imx-atf
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2022-08-30 16:59:13 +0200
committerMax Krummenacher <max.krummenacher@toradex.com>2022-08-30 16:59:13 +0200
commitff4ee796e67ec3f8de3fa2bd591874dd9fe61999 (patch)
tree085871ab77035718d3b9d14c6dedc3e931031c43 /recipes-bsp/imx-atf
parent8421997dbbacc487ddf192af6fac0004ebd4c44d (diff)
downloadmeta-freescale-ff4ee796e67ec3f8de3fa2bd591874dd9fe61999.tar.gz
arm/trusted-firmware-a: work around RWX permission error on segment
Binutils 2.39 now warns when a segment has RXW permissions[1]: aarch64-none-elf-ld.bfd: warning: bl31.elf has a LOAD segment with RWX permissions However, TF-A passes --fatal-warnings to LD, so this is a build failure. There is a ticket filed upstream[2], so until that is resolved we can disable this warning. [1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba951afb99912da01a6e8434126b8fac7aa75107 [2] https://developer.trustedfirmware.org/T996 Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Jon Mason <jon.mason@arm.com> Original commit: https://github.com/jonmason/meta-arm/commit/977c5222d8c2f6f6c7e522e480a6e4cd40ba32d7 Reworked commit for imx-atf. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Diffstat (limited to 'recipes-bsp/imx-atf')
-rw-r--r--recipes-bsp/imx-atf/imx-atf/rwx-segments.patch38
-rw-r--r--recipes-bsp/imx-atf/imx-atf_2.6.bb7
2 files changed, 43 insertions, 2 deletions
diff --git a/recipes-bsp/imx-atf/imx-atf/rwx-segments.patch b/recipes-bsp/imx-atf/imx-atf/rwx-segments.patch
new file mode 100644
index 00000000..a4518ec6
--- /dev/null
+++ b/recipes-bsp/imx-atf/imx-atf/rwx-segments.patch
@@ -0,0 +1,38 @@
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 b0426f0b..3f627150 100644
--- a/recipes-bsp/imx-atf/imx-atf_2.6.bb
+++ b/recipes-bsp/imx-atf/imx-atf_2.6.bb
@@ -7,8 +7,11 @@ 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 = "git://source.codeaurora.org/external/imx/imx-atf.git;protocol=https;branch=${SRCBRANCH} \ 10SRC_URI = " \
11 file://0001-Makefile-Suppress-array-bounds-error.patch" 11 git://source.codeaurora.org/external/imx/imx-atf.git;protocol=https;branch=${SRCBRANCH} \
12 file://0001-Makefile-Suppress-array-bounds-error.patch \
13 file://rwx-segments.patch \
14"
12SRCBRANCH = "lf_v2.6" 15SRCBRANCH = "lf_v2.6"
13SRCREV = "c6a19b1a351308cc73443283f6aa56b2eff791b8" 16SRCREV = "c6a19b1a351308cc73443283f6aa56b2eff791b8"
14 17