boot/uboot.mk: new zynqmp pmufw embeddedsw option

The new BR2_TARGET_UBOOT_ZYNQMP_PMUFW_EMBEDDEDSW option will enable u-boot to
use the xilinx-embeddedsw package for building a pmufw.elf that gets included
in the generated boot.bin.

If the BR2_TARGET_UBOOT_ZYNQMP_PMUFW_EMBEDDEDSW option is enabled, then the
BR2_TARGET_UBOOT_ZYNQMP_PMUFW config for downloading a prebuilt pmufw from a
custom location will be ignored.

Signed-off-by: Neal Frager <neal.frager@amd.com>
Tested-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
[Luca: Tested on Kria KV260 starter kit]
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
This commit is contained in:
Neal Frager
2025-01-21 10:22:20 +00:00
committed by Julien Olivain
parent 1cbd222150
commit a5b360e53f
2 changed files with 42 additions and 7 deletions

View File

@@ -572,23 +572,55 @@ config BR2_TARGET_UBOOT_ZYNQMP
if BR2_TARGET_UBOOT_ZYNQMP
config BR2_TARGET_UBOOT_ZYNQMP_PMUFW_PREBUILT
bool "xilinx-prebuilt pmufw.elf"
choice
prompt "PMUFW origin"
default BR2_TARGET_UBOOT_ZYNQMP_PMUFW_CUSTOM
depends on BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG
help
Choose between the following options:
1) Build from source via xilinx-embeddedsw
2) Official prebuilt via xilinx-prebuilt
3) Prebuilt from custom location
U-Boot build process will generate a boot.bin (to be loaded
by the ZynqMP boot ROM) containing both the U-Boot SPL and
the PMU firmware in the Xilinx-specific boot format.
config BR2_TARGET_UBOOT_ZYNQMP_PMUFW_EMBEDDEDSW
bool "Build from source via xilinx-embeddedsw"
depends on BR2_TARGET_XILINX_EMBEDDEDSW_ZYNQMP_PMUFW
help
Use xilinx-embeddedsw boot package for building
zynqmp pmufw.elf from
https://github.com/Xilinx/embeddedsw repo.
comment "To build from source, xilinx-embeddedsw needs to be enabled with zynqmp_pmufw option."
depends on !BR2_TARGET_XILINX_EMBEDDEDSW_ZYNQMP_PMUFW
config BR2_TARGET_UBOOT_ZYNQMP_PMUFW_PREBUILT
bool "Prebuilt via xilinx-prebuilt"
depends on BR2_TARGET_XILINX_PREBUILT_ZYNQMP || BR2_TARGET_XILINX_PREBUILT_KRIA
help
Use xilinx-prebuilt boot package for downloading prebuilt
zynqmp pmufw.elf from
https://github.com/Xilinx/soc-prebuilt-firmware repo.
U-Boot build process will generate a boot.bin (to be loaded by
by the ZynqMP boot ROM) containing both the U-Boot SPL and the
PMU firmware in the Xilinx-specific boot format.
comment "To use official prebuilt, xilinx-prebuilt needs to be enabled with zynqmp or kria option."
depends on !BR2_TARGET_XILINX_PREBUILT_KRIA
depends on !BR2_TARGET_XILINX_PREBUILT_ZYNQMP
config BR2_TARGET_UBOOT_ZYNQMP_PMUFW_CUSTOM
bool "Prebuilt from custom location"
help
Location of a PMU firmware binary defined by:
BR2_TARGET_UBOOT_ZYNQMP_PMUFW
endchoice # PMUFW origin
config BR2_TARGET_UBOOT_ZYNQMP_PMUFW
string "Custom PMU firmware location"
depends on BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG
depends on !BR2_TARGET_UBOOT_ZYNQMP_PMUFW_PREBUILT
depends on BR2_TARGET_UBOOT_ZYNQMP_PMUFW_CUSTOM
help
Location of a PMU firmware binary.

View File

@@ -453,7 +453,10 @@ endef
ifeq ($(BR2_TARGET_UBOOT_ZYNQMP),y)
ifeq ($(BR2_TARGET_UBOOT_ZYNQMP_PMUFW_PREBUILT),y)
ifeq ($(BR2_TARGET_UBOOT_ZYNQMP_PMUFW_EMBEDDEDSW),y)
UBOOT_DEPENDENCIES += xilinx-embeddedsw
UBOOT_ZYNQMP_PMUFW_PATH = $(BINARIES_DIR)/pmufw.elf
else ifeq ($(BR2_TARGET_UBOOT_ZYNQMP_PMUFW_PREBUILT),y)
UBOOT_DEPENDENCIES += xilinx-prebuilt
UBOOT_ZYNQMP_PMUFW_PATH = $(BINARIES_DIR)/pmufw.elf
else