* [Buildroot] [PATCH v1 1/1] board/versal: fix atf build failure
@ 2023-07-31 6:19 Neal Frager via buildroot
2023-07-31 12:11 ` Luca Ceresoli via buildroot
0 siblings, 1 reply; 2+ messages in thread
From: Neal Frager via buildroot @ 2023-07-31 6:19 UTC (permalink / raw)
To: buildroot; +Cc: michal.simek, luca.ceresoli, thomas.petazzoni, Neal Frager
Binutils 2.39 now warns when a segment has RXW permissions[1]:
aarch64-buildroot-linux-gnu-ld: bl31.elf has a LOAD segment with RWX
permissions.
There is a ticket filed upstream[2], so until that is resolved just
disable the warning.
[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba951afb99912da01a6e8434126b8fac7aa75107
[2] https://developer.trustedfirmware.org/T996
Fixes: https://developer.trustedfirmware.org/T996
Signed-off-by: Neal Frager <neal.frager@amd.com>
---
.../0001-Makefile-no-warn-rwx-segments.patch | 46 +++++++++++++++++++
configs/versal_vck190_defconfig | 1 +
2 files changed, 47 insertions(+)
create mode 100644 board/versal/patches/arm-trusted-firmware/0001-Makefile-no-warn-rwx-segments.patch
diff --git a/board/versal/patches/arm-trusted-firmware/0001-Makefile-no-warn-rwx-segments.patch b/board/versal/patches/arm-trusted-firmware/0001-Makefile-no-warn-rwx-segments.patch
new file mode 100644
index 0000000000..1a3014ca37
--- /dev/null
+++ b/board/versal/patches/arm-trusted-firmware/0001-Makefile-no-warn-rwx-segments.patch
@@ -0,0 +1,46 @@
+From 9e495d1fffd2c7ae18191fe76702eca6a54c0192 Mon Sep 17 00:00:00 2001
+From: Neal Frager <neal.frager@amd.com>
+Date: Mon, 31 Jul 2023 06:39:41 +0100
+Subject: [PATCH v1 1/1] Makefile: no warn rwx segments
+
+Binutils 2.39 now warns when a segment has RXW permissions[1]:
+
+aarch64-buildroot-linux-gnu-ld: bl31.elf has a LOAD segment with RWX
+permissions.
+
+There is a ticket filed upstream[2], so until that is resolved just
+disable the warning.
+
+[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba951afb99912da01a6e8434126b8fac7aa75107
+[2] https://developer.trustedfirmware.org/T996
+
+Upstream-Status: Inappropriate
+
+Signed-off-by: Neal Frager <neal.frager@amd.com>
+---
+ Makefile | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/Makefile b/Makefile
+index 1ddb7b844..77483eec1 100644
+--- a/Makefile
++++ b/Makefile
+@@ -427,6 +427,7 @@ else ifneq ($(findstring gcc,$(notdir $(LD))),)
+ # Pass ld options with Wl or Xlinker switches
+ TF_LDFLAGS += -Wl,--fatal-warnings -O1
+ TF_LDFLAGS += -Wl,--gc-sections
++TF_LDFLAGS += -Wl,--no-warn-rwx-segment
+ ifeq ($(ENABLE_LTO),1)
+ ifeq (${ARCH},aarch64)
+ TF_LDFLAGS += -flto -fuse-linker-plugin
+@@ -444,6 +445,7 @@ TF_LDFLAGS += $(subst --,-Xlinker --,$(TF_LDFLAGS_$(ARCH)))
+ else
+ TF_LDFLAGS += --fatal-warnings -O1
+ TF_LDFLAGS += --gc-sections
++TF_LDFLAGS += --no-warn-rwx-segment
+ # ld.lld doesn't recognize the errata flags,
+ # therefore don't add those in that case
+ ifeq ($(findstring ld.lld,$(notdir $(LD))),)
+--
+2.25.1
+
diff --git a/configs/versal_vck190_defconfig b/configs/versal_vck190_defconfig
index a393b681c8..fab41a2991 100644
--- a/configs/versal_vck190_defconfig
+++ b/configs/versal_vck190_defconfig
@@ -39,3 +39,4 @@ BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_MTOOLS=y
BR2_PACKAGE_HOST_BOOTGEN=y
+BR2_GLOBAL_PATCH_DIR="board/versal/patches"
--
2.25.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH v1 1/1] board/versal: fix atf build failure
2023-07-31 6:19 [Buildroot] [PATCH v1 1/1] board/versal: fix atf build failure Neal Frager via buildroot
@ 2023-07-31 12:11 ` Luca Ceresoli via buildroot
0 siblings, 0 replies; 2+ messages in thread
From: Luca Ceresoli via buildroot @ 2023-07-31 12:11 UTC (permalink / raw)
To: Neal Frager; +Cc: michal.simek, thomas.petazzoni, buildroot
On Mon, 31 Jul 2023 07:19:37 +0100
Neal Frager <neal.frager@amd.com> wrote:
> Binutils 2.39 now warns when a segment has RXW permissions[1]:
>
> aarch64-buildroot-linux-gnu-ld: bl31.elf has a LOAD segment with RWX
> permissions.
>
> There is a ticket filed upstream[2], so until that is resolved just
> disable the warning.
>
> [1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba951afb99912da01a6e8434126b8fac7aa75107
> [2] https://developer.trustedfirmware.org/T996
>
> Fixes: https://developer.trustedfirmware.org/T996
> Signed-off-by: Neal Frager <neal.frager@amd.com>
[Build-tested on zynqmp_kria_kv260_defconfig]
Tested-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-31 12:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-31 6:19 [Buildroot] [PATCH v1 1/1] board/versal: fix atf build failure Neal Frager via buildroot
2023-07-31 12:11 ` Luca Ceresoli via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox