summaryrefslogtreecommitdiffstats
path: root/meta-ti-bsp
diff options
context:
space:
mode:
authorRyan Eatmon <reatmon@ti.com>2022-10-13 15:57:14 -0500
committerRyan Eatmon <reatmon@ti.com>2022-10-17 13:04:19 -0500
commit928d30486bb960e1a3d904d768e2808e4640fc42 (patch)
treea56d2486e0c4b8bdb9011026bc72ee5c1dd5391d /meta-ti-bsp
parent5eb1a669b82bfa58c5fc85ceadab815c6c4a6e61 (diff)
downloadmeta-ti-928d30486bb960e1a3d904d768e2808e4640fc42.tar.gz
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> Adapted from the above patch[3] in meta-arm, but we cannot use that patch as we are on an older SRCREV and the Makefile has changed. [3] https://git.yoctoproject.org/meta-arm/commit/meta-arm/recipes-bsp?id=977c5222d8c2f6f6c7e522e480a6e4cd40ba32d7 Signed-off-by: Ryan Eatmon <reatmon@ti.com>
Diffstat (limited to 'meta-ti-bsp')
-rw-r--r--meta-ti-bsp/recipes-bsp/trusted-firmware-a/files/rwx-segments-ti.patch45
-rw-r--r--meta-ti-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend3
2 files changed, 48 insertions, 0 deletions
diff --git a/meta-ti-bsp/recipes-bsp/trusted-firmware-a/files/rwx-segments-ti.patch b/meta-ti-bsp/recipes-bsp/trusted-firmware-a/files/rwx-segments-ti.patch
new file mode 100644
index 00000000..826a4b32
--- /dev/null
+++ b/meta-ti-bsp/recipes-bsp/trusted-firmware-a/files/rwx-segments-ti.patch
@@ -0,0 +1,45 @@
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
17
18Adapted from the above patch in meta-arm, but we cannot use that patch as
19we are on an older SRCREV and the Makefile has changed.
20
21Signed-off-by: Ryan Eatmon <reatmon@ti.com>
22
23
24diff --git a/Makefile b/Makefile
25index 3941f8698..13bbac348 100644
26--- a/Makefile
27+++ b/Makefile
28@@ -421,7 +421,7 @@ TF_LDFLAGS += $(TF_LDFLAGS_$(ARCH))
29 # LD = gcc (used when GCC LTO is enabled)
30 else ifneq ($(findstring gcc,$(notdir $(LD))),)
31 # Pass ld options with Wl or Xlinker switches
32-TF_LDFLAGS += -Wl,--fatal-warnings -O1
33+TF_LDFLAGS += -O1
34 TF_LDFLAGS += -Wl,--gc-sections
35 ifeq ($(ENABLE_LTO),1)
36 ifeq (${ARCH},aarch64)
37@@ -439,7 +439,7 @@ TF_LDFLAGS += $(subst --,-Xlinker --,$(TF_LDFLAGS_$(ARCH)))
38
39 # LD = gcc-ld (ld) or llvm-ld (ld.lld) or other
40 else
41-TF_LDFLAGS += --fatal-warnings -O1
42+TF_LDFLAGS += -O1
43 TF_LDFLAGS += --gc-sections
44 # ld.lld doesn't recognize the errata flags,
45 # therefore don't add those in that case
diff --git a/meta-ti-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend b/meta-ti-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend
index 14463846..55fc3e29 100644
--- a/meta-ti-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend
+++ b/meta-ti-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend
@@ -6,6 +6,9 @@ TFA_BUILD_TARGET:k3 = "all"
6TFA_INSTALL_TARGET:k3 = "bl31" 6TFA_INSTALL_TARGET:k3 = "bl31"
7TFA_SPD:k3 = "opteed" 7TFA_SPD:k3 = "opteed"
8 8
9SRC_URI:append:k3 = " file://rwx-segments-ti.patch"
10FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
11
9EXTRA_OEMAKE:append:k3 = "${@ ' K3_USART=' + d.getVar('TFA_K3_USART') if d.getVar('TFA_K3_USART') else ''}" 12EXTRA_OEMAKE:append:k3 = "${@ ' K3_USART=' + d.getVar('TFA_K3_USART') if d.getVar('TFA_K3_USART') else ''}"
10EXTRA_OEMAKE:append:k3 = "${@ ' K3_PM_SYSTEM_SUSPEND=' + d.getVar('TFA_K3_SYSTEM_SUSPEND') if d.getVar('TFA_K3_SYSTEM_SUSPEND') else ''}" 13EXTRA_OEMAKE:append:k3 = "${@ ' K3_PM_SYSTEM_SUSPEND=' + d.getVar('TFA_K3_SYSTEM_SUSPEND') if d.getVar('TFA_K3_SYSTEM_SUSPEND') else ''}"
11 14