diff mbox series

[v2] boot/uboot: use $(TARGET_OBJCOPY) for ZynqMP pmufw.elf

Message ID 20240819-boot-uboot-clean-for-pmufw-v2-1-055f6b9ad56d@collins.com
State Accepted
Headers show
Series [v2] boot/uboot: use $(TARGET_OBJCOPY) for ZynqMP pmufw.elf | expand

Commit Message

Brandon Maier Aug. 19, 2024, 7:39 p.m. UTC
Converting the pmufw.elf to a binary works with any objcopy, regardless
if it's from the host or cross-compiler. Prefer to use the
$(TARGET_OBJCOPY) as it's always available and reproducible.

Signed-off-by: Brandon Maier <brandon.maier@collins.com>
Reviewed-by: Neal Frager <neal.frager@amd.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
---
Changes in v2:
- Drop patch 1 [Luca]
- Add a comment about using `objcopy` [Luca]
- Link to v1: https://lore.kernel.org/r/20240815-boot-uboot-clean-for-pmufw-v1-0-3f0d9909c0b4@collins.com
---
 boot/uboot/uboot.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)


---
base-commit: 48e7affffa06bbe23a1cd190d0a765956cf179b0
change-id: 20240815-boot-uboot-clean-for-pmufw-c0c401a9fec5

Best regards,

Comments

Thomas Petazzoni Aug. 19, 2024, 8:27 p.m. UTC | #1
On Mon, 19 Aug 2024 19:39:29 +0000
Brandon Maier via buildroot <buildroot@buildroot.org> wrote:

> Converting the pmufw.elf to a binary works with any objcopy, regardless
> if it's from the host or cross-compiler. Prefer to use the
> $(TARGET_OBJCOPY) as it's always available and reproducible.
> 
> Signed-off-by: Brandon Maier <brandon.maier@collins.com>
> Reviewed-by: Neal Frager <neal.frager@amd.com>
> Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
> ---
> Changes in v2:
> - Drop patch 1 [Luca]
> - Add a comment about using `objcopy` [Luca]
> - Link to v1: https://lore.kernel.org/r/20240815-boot-uboot-clean-for-pmufw-v1-0-3f0d9909c0b4@collins.com
> ---
>  boot/uboot/uboot.mk | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Applied to master, thanks.

Thomas
diff mbox series

Patch

diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index cdb9f435f7..2c04abc896 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -462,8 +462,10 @@  endif #BR2_TARGET_UBOOT_ZYNQMP_PMUFW_PREBUILT
 
 ifeq ($(suffix $(UBOOT_ZYNQMP_PMUFW_PATH)),.elf)
 UBOOT_ZYNQMP_PMUFW_PATH_FINAL = $(basename $(UBOOT_ZYNQMP_PMUFW_PATH)).bin
+# objcopy is arch-agnostic so we can use $(TARGET_OBJCOPY) in lack of a
+# microblaze objcopy
 define UBOOT_ZYNQMP_PMUFW_CONVERT
-	objcopy -O binary -I elf32-little $(UBOOT_ZYNQMP_PMUFW_PATH) $(UBOOT_ZYNQMP_PMUFW_PATH_FINAL)
+	$(TARGET_OBJCOPY) -O binary -I elf32-little $(UBOOT_ZYNQMP_PMUFW_PATH) $(UBOOT_ZYNQMP_PMUFW_PATH_FINAL)
 endef
 UBOOT_PRE_BUILD_HOOKS += UBOOT_ZYNQMP_PMUFW_CONVERT
 else