From db32d83e42d88b4a443789dd488fba69d0d271f4 Mon Sep 17 00:00:00 2001 From: Brandon Maier Date: Mon, 19 Aug 2024 19:39:29 +0000 Subject: [PATCH] boot/uboot: use $(TARGET_OBJCOPY) for ZynqMP pmufw.elf 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 Reviewed-by: Neal Frager Reviewed-by: Luca Ceresoli Signed-off-by: Thomas Petazzoni --- boot/uboot/uboot.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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