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