Skip to contentSkip to conversation

boot/uboot/uboot.mk: add pmufw.elf support

PATCH In review Neal Frager via buildroot 2 participants 5 messages Oct 13, 2022 – Nov 2, 2022

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 boot/uboot/uboot.mk: add pmufw.elf support

This patch adds support for zynqmp pmufw.elf files. It will allow buildroot to use pmufw.elf binaries directly from the Xilinx git repository built by petalinux in addition to still supporting pmufw.bin binaries built by the zynqmp-pmufw-builder.

https://github.com/Xilinx/ubuntu-firmware/tree/v2022.1_22.04_1/xlnx-firmware

---
V1->V2:
- corrected objcopy instruction for converting elf to bin
V2->V3:
- removed unnecessary spaces
- simplified if statement to check for a pmufw.elf file
V3->V4:
- added spaces around = sign of UBOOT_ZYNQMP_PMUFW_BASENAME definition

---
 boot/uboot/uboot.mk | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
boot/uboot/uboot.mk +4 -1
index a9f9b1bf16..0439ec5e4b 100644
@@ -391,9 +391,12 @@ UBOOT_ZYNQMP_PMUFW_PATH = $(UBOOT_DL_DIR)/$(notdir $(UBOOT_ZYNQMP_PMUFW))
 else ifneq ($(UBOOT_ZYNQMP_PMUFW),)
 UBOOT_ZYNQMP_PMUFW_PATH = $(shell readlink -f $(UBOOT_ZYNQMP_PMUFW))
 endif
+UBOOT_ZYNQMP_PMUFW_BASENAME = $(basename $(UBOOT_ZYNQMP_PMUFW_PATH))
 
 define UBOOT_ZYNQMP_KCONFIG_PMUFW
-	$(call KCONFIG_SET_OPT,CONFIG_PMUFW_INIT_FILE,"$(UBOOT_ZYNQMP_PMUFW_PATH)")
+	$(if $(filter %.elf,$(UBOOT_ZYNQMP_PMUFW_PATH)),
+		objcopy -O binary -I elf32-little $(UBOOT_ZYNQMP_PMUFW_BASENAME).elf $(UBOOT_ZYNQMP_PMUFW_BASENAME).bin)
+	$(call KCONFIG_SET_OPT,CONFIG_PMUFW_INIT_FILE,"$(UBOOT_ZYNQMP_PMUFW_BASENAME).bin")
 endef
 
 UBOOT_ZYNQMP_PM_CFG = $(call qstrip,$(BR2_TARGET_UBOOT_ZYNQMP_PM_CFG))
Signature · 6 lines
2.17.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
author Reviewed-by Luca Ceresoli on v4 1/1
#1 lore raw

Hello Neal,

Quoted 9 lines · On Thu, 13 Oct 2022 00:49:31 -0600 Neal Frager <[email protected]> wrote:

This patch adds support for zynqmp pmufw.elf files. It will allow buildroot to use pmufw.elf binaries directly from the Xilinx git repository built by petalinux in addition to still supporting pmufw.bin binaries built by the zynqmp-pmufw-builder.

https://github.com/Xilinx/ubuntu-firmware/tree/v2022.1_22.04_1/xlnx-firmware

Thank you very much for working on a solution to this unpleasant situation. I still would like to address it, but spare time is not easily available... however I'm always happy to received patches for zynqmp-pmufw-builder! ;-)

Signature · 7 lines
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Hello Luca,

Quoted 5 lines

This patch adds support for zynqmp pmufw.elf files.
It will allow buildroot to use pmufw.elf binaries directly from the Xilinx git repository built by petalinux in addition to still supporting pmufw.bin binaries built by the zynqmp-pmufw-builder.

Quoted 8 lines

https://github.com/Xilinx/ubuntu-firmware/tree/v2022.1_22.04_1/xlnx-fi
rmware

Thank you very much for working on a solution to this unpleasant situation. I still would like to address it, but spare time is not easily available... however I'm always happy to received patches for zynqmp-pmufw-builder! ;-)

Thank you for your understanding. As you can see with this patch, pmufw.bin files are still accepted. The moment zynqmp-pmufw-builder is fixed, developers can use it with buildroot again.

I understand the lack of spare time. If I ever get some, I will take a closer look at how to patch the zynqmp-pmufw-builder microblaze compiler.

Best regards,
Neal Frager
AMD
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#3 lore raw
In reply to Neal Frager via buildroot
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Neal" == Neal Frager <[email protected]> writes:

This patch adds support for zynqmp pmufw.elf files. It will allow buildroot to use pmufw.elf binaries directly from the Xilinx git repository built by petalinux in addition to still supporting pmufw.bin binaries built by the zynqmp-pmufw-builder.

Quoted 4 lines

https://github.com/Xilinx/ubuntu-firmware/tree/v2022.1_22.04_1/xlnx-firmware

---

V1-> V2:

Quoted 1 line

- corrected objcopy instruction for converting elf to bin

V2-> V3:

Quoted 2 lines

- removed unnecessary spaces
- simplified if statement to check for a pmufw.elf file

V3-> V4:

Quoted 1 line

- added spaces around = sign of UBOOT_ZYNQMP_PMUFW_BASENAME definition

Committed, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#4 lore raw
In reply to Neal Frager via buildroot
Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Neal" == Neal Frager <[email protected]> writes:

This patch adds support for zynqmp pmufw.elf files. It will allow buildroot to use pmufw.elf binaries directly from the Xilinx git repository built by petalinux in addition to still supporting pmufw.bin binaries built by the zynqmp-pmufw-builder.

https://github.com/Xilinx/ubuntu-firmware/tree/v2022.1_22.04_1/xlnx-firmware

Quoted 8 lines

---
V1-> V2:
- corrected objcopy instruction for converting elf to bin
V2-> V3:
- removed unnecessary spaces
- simplified if statement to check for a pmufw.elf file
V3-> V4:
- added spaces around = sign of UBOOT_ZYNQMP_PMUFW_BASENAME definition

Committed to 2022.08.x and 2022.02.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot