* [Buildroot] [PATCH v1 1/1] board/zynqmp: fix atf build failure
@ 2023-07-31 6:11 Neal Frager via buildroot
2023-07-31 12:11 ` Luca Ceresoli via buildroot
2023-07-31 12:21 ` Thomas Petazzoni via buildroot
0 siblings, 2 replies; 6+ messages in thread
From: Neal Frager via buildroot @ 2023-07-31 6:11 UTC (permalink / raw)
To: buildroot
Cc: ibai.erkiaga-elorza, luca.ceresoli, thomas.petazzoni, Neal Frager,
michal.simek
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/zynqmp_kria_kv260_defconfig | 2 +-
configs/zynqmp_zcu102_defconfig | 1 +
configs/zynqmp_zcu106_defconfig | 1 +
4 files changed, 49 insertions(+), 1 deletion(-)
create mode 100644 board/zynqmp/patches/arm-trusted-firmware/0001-Makefile-no-warn-rwx-segments.patch
diff --git a/board/zynqmp/patches/arm-trusted-firmware/0001-Makefile-no-warn-rwx-segments.patch b/board/zynqmp/patches/arm-trusted-firmware/0001-Makefile-no-warn-rwx-segments.patch
new file mode 100644
index 0000000000..1a3014ca37
--- /dev/null
+++ b/board/zynqmp/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/zynqmp_kria_kv260_defconfig b/configs/zynqmp_kria_kv260_defconfig
index e180d5e7e7..8ceaa6983d 100644
--- a/configs/zynqmp_kria_kv260_defconfig
+++ b/configs/zynqmp_kria_kv260_defconfig
@@ -38,4 +38,4 @@ BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_MTOOLS=y
-BR2_GLOBAL_PATCH_DIR="board/zynqmp/kria/patches"
+BR2_GLOBAL_PATCH_DIR="board/zynqmp/kria/patches board/zynqmp/patches"
diff --git a/configs/zynqmp_zcu102_defconfig b/configs/zynqmp_zcu102_defconfig
index 00b33261b6..f4789b9d88 100644
--- a/configs/zynqmp_zcu102_defconfig
+++ b/configs/zynqmp_zcu102_defconfig
@@ -36,3 +36,4 @@ BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_MTOOLS=y
+BR2_GLOBAL_PATCH_DIR="board/zynqmp/patches"
diff --git a/configs/zynqmp_zcu106_defconfig b/configs/zynqmp_zcu106_defconfig
index 88295571af..516f1143ce 100644
--- a/configs/zynqmp_zcu106_defconfig
+++ b/configs/zynqmp_zcu106_defconfig
@@ -36,3 +36,4 @@ BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_MTOOLS=y
+BR2_GLOBAL_PATCH_DIR="board/zynqmp/patches"
--
2.25.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [Buildroot] [PATCH v1 1/1] board/zynqmp: fix atf build failure
2023-07-31 6:11 [Buildroot] [PATCH v1 1/1] board/zynqmp: fix atf build failure Neal Frager via buildroot
@ 2023-07-31 12:11 ` Luca Ceresoli via buildroot
2023-07-31 12:21 ` Thomas Petazzoni via buildroot
1 sibling, 0 replies; 6+ messages in thread
From: Luca Ceresoli via buildroot @ 2023-07-31 12:11 UTC (permalink / raw)
To: Neal Frager
Cc: ibai.erkiaga-elorza, michal.simek, thomas.petazzoni, buildroot
Hi Neal,
On Mon, 31 Jul 2023 07:11:13 +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>
Despite being a warning, it does actually break the build.
[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] 6+ messages in thread
* Re: [Buildroot] [PATCH v1 1/1] board/zynqmp: fix atf build failure
2023-07-31 6:11 [Buildroot] [PATCH v1 1/1] board/zynqmp: fix atf build failure Neal Frager via buildroot
2023-07-31 12:11 ` Luca Ceresoli via buildroot
@ 2023-07-31 12:21 ` Thomas Petazzoni via buildroot
2023-07-31 16:01 ` Frager, Neal via buildroot
1 sibling, 1 reply; 6+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-07-31 12:21 UTC (permalink / raw)
To: Neal Frager via buildroot
Cc: michal.simek, ibai.erkiaga-elorza, luca.ceresoli, Neal Frager
Hello Neal,
On Mon, 31 Jul 2023 07:11:13 +0100
Neal Frager via buildroot <buildroot@buildroot.org> 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>
Thanks for this patch. However, could you use upstream's fix instead,
which is
https://github.com/ARM-software/arm-trusted-firmware/commit/1f49db5f25cdd4e43825c9bcc0575070b80f628c.
We have already integrated it in Buildroot for upstream TF-A versions
2.2 to 2.8 in commit
https://gitlab.com/buildroot.org/buildroot/-/commit/7b774048be6292bb61f90759ad3b7b58a33a1650,
but your defconfigs are using custom versions of TF-A, so our patch is
not applied.
Of course, same suggestion for "[PATCH v1 1/1] board/versal: fix atf
build failure".
Thanks!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH v1 1/1] board/zynqmp: fix atf build failure
2023-07-31 12:21 ` Thomas Petazzoni via buildroot
@ 2023-07-31 16:01 ` Frager, Neal via buildroot
2023-07-31 16:07 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 6+ messages in thread
From: Frager, Neal via buildroot @ 2023-07-31 16:01 UTC (permalink / raw)
To: Thomas Petazzoni, Neal Frager via buildroot
Cc: Simek, Michal, luca.ceresoli@bootlin.com, Erkiaga Elorza, Ibai
Hello Thomas,
> 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=ba951afb9991
> 2da01a6e8434126b8fac7aa75107 [2]
> https://developer.trustedfirmware.org/T996
>
> Fixes: https://developer.trustedfirmware.org/T996
> Signed-off-by: Neal Frager <neal.frager@amd.com>
> Thanks for this patch. However, could you use upstream's fix instead, which is https://github.com/ARM-software/arm-trusted-firmware/commit/1f49db5f25cdd4e43825c9bcc0575070b80f628c.
> We have already integrated it in Buildroot for upstream TF-A versions
> 2.2 to 2.8 in commit
> https://gitlab.com/buildroot.org/buildroot/-/commit/7b774048be6292bb61f90759ad3b7b58a33a1650,
> but your defconfigs are using custom versions of TF-A, so our patch is not applied.
Thank you for pointing this out. Are you ok with my just creating a link to the arm-trusted-firmware patch for v2.6 already included in buildroot?
> Of course, same suggestion for "[PATCH v1 1/1] board/versal: fix atf build failure".
Understood.
> Thanks!
> Thomas
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com
Best regards,
Neal Frager
AMD
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH v1 1/1] board/zynqmp: fix atf build failure
2023-07-31 16:01 ` Frager, Neal via buildroot
@ 2023-07-31 16:07 ` Thomas Petazzoni via buildroot
2023-07-31 16:17 ` Frager, Neal via buildroot
0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-07-31 16:07 UTC (permalink / raw)
To: Frager, Neal
Cc: Simek, Michal, Erkiaga Elorza, Ibai, luca.ceresoli@bootlin.com,
Neal Frager via buildroot
On Mon, 31 Jul 2023 16:01:45 +0000
"Frager, Neal" <neal.frager@amd.com> wrote:
> Thank you for pointing this out. Are you ok with my just creating a
> link to the arm-trusted-firmware patch for v2.6 already included in
> buildroot?
I saw your patch that use a symbolic link. I don't have a strong
opinion here. On one side, using a symbolic link obviously avoids
duplicating the patch. However, I'm wondering if we will remember to
adjust the symlink in board/zynqmp and board/versal when we
change/remove the patches in boot/arm-trusted/firmware/. Or maybe
AMD/Xilinx will update to a newer TF-A soon, which will no longer
require the bug fix?
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH v1 1/1] board/zynqmp: fix atf build failure
2023-07-31 16:07 ` Thomas Petazzoni via buildroot
@ 2023-07-31 16:17 ` Frager, Neal via buildroot
0 siblings, 0 replies; 6+ messages in thread
From: Frager, Neal via buildroot @ 2023-07-31 16:17 UTC (permalink / raw)
To: Thomas Petazzoni
Cc: Simek, Michal, Erkiaga Elorza, Ibai, luca.ceresoli@bootlin.com,
Neal Frager via buildroot
Hi Thomas,
> Thank you for pointing this out. Are you ok with my just creating a
> link to the arm-trusted-firmware patch for v2.6 already included in
> buildroot?
> I saw your patch that use a symbolic link. I don't have a strong opinion here. On one side, using a symbolic link obviously avoids duplicating the patch. However, I'm wondering if we will remember to adjust the symlink in board/zynqmp and board/versal when we change/remove the patches in boot/arm-trusted/firmware/. Or maybe AMD/Xilinx will update to a newer TF-A soon, which will no longer require the bug fix?
I already have a patch set ready to bump the zynqmp and versal boards to our 2023.1 release which bumps to TF-A v2.8.
I will make sure to update the symbolic links when I submit these patches.
Our 2024.1 release will be based on TF-A v2.10 (or whatever it gets called). As far as I understand, the patch will no longer be needed when we bump to this version.
At the moment, I am committed to maintaining the zynq, zynqmp and versal defconfigs to follow the AMD/Xilinx release schedule, so I will make sure to handle this.
> Thomas
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com
Best regards,
Neal Frager
AMD
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-07-31 16:17 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-31 6:11 [Buildroot] [PATCH v1 1/1] board/zynqmp: fix atf build failure Neal Frager via buildroot
2023-07-31 12:11 ` Luca Ceresoli via buildroot
2023-07-31 12:21 ` Thomas Petazzoni via buildroot
2023-07-31 16:01 ` Frager, Neal via buildroot
2023-07-31 16:07 ` Thomas Petazzoni via buildroot
2023-07-31 16:17 ` Frager, Neal via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox