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 <brandon.maier@collins.com>
Reviewed-by: Neal Frager <neal.frager@amd.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Brandon Maier
2024-08-19 19:39:29 +00:00
committed by Thomas Petazzoni
parent 3ba9ac6205
commit db32d83e42

View File

@@ -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