[Buildroot] [git commit] boot/xilinx-prebuilt: simplify family logic

Julien Olivain ju.o at free.fr
Tue Sep 30 19:20:55 UTC 2025


commit: https://git.buildroot.net/buildroot/commit/?id=97ecafec8989c99f83a35d4b5bd0fadb91a6a394
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Currently, the xilinx-prebuilt package uses an if-then-else statement for
deciding which files need to be installed from the xilinx-prebuilt repo. This
works fine for now because there are really only two options, either versal or
zynqmp/kria.

Starting with the xilinx_v2025.2 release, the versal2 family along with the
vek385 board will be added to Buildroot and thus the xilinx-prebuilt package
as well. In the future, additional families will also probably be added to
this package.

To avoid creating a long if-then-else-then-else statement which will only grow
in complexity over time, simplify the logic of the xilinx-prebuilt package by
giving each xilinx family its own if statement. In the long term, this will
make the xilinx-prebuilt package easier to understand and maintain.

For this reason, this patch moves the zynqmp/kria families from the "else"
statement to having an if statement separate from the versal family.

Signed-off-by: Neal Frager <neal.frager at amd.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli at bootlin.com>
Signed-off-by: Julien Olivain <ju.o at free.fr>
---
 boot/xilinx-prebuilt/xilinx-prebuilt.mk | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/boot/xilinx-prebuilt/xilinx-prebuilt.mk b/boot/xilinx-prebuilt/xilinx-prebuilt.mk
index 5d984c4f82..95b656cdde 100644
--- a/boot/xilinx-prebuilt/xilinx-prebuilt.mk
+++ b/boot/xilinx-prebuilt/xilinx-prebuilt.mk
@@ -103,15 +103,16 @@ define XILINX_PREBUILT_INSTALL_VERSAL_PSMFW
 		$(BINARIES_DIR)/psmfw.elf
 endef
 endif # !BR2_TARGET_XILINX_EMBEDDEDSW_VERSAL_PSMFW
+endif # BR2_TARGET_XILINX_PREBUILT_VERSAL
 
-else # BR2_TARGET_XILINX_PREBUILT_VERSAL
+ifeq ($(BR2_TARGET_XILINX_PREBUILT_KRIA)$(BR2_TARGET_XILINX_PREBUILT_ZYNQMP),y)
 ifneq ($(BR2_TARGET_XILINX_EMBEDDEDSW_ZYNQMP_PMUFW),y)
 define XILINX_PREBUILT_INSTALL_ZYNQMP_PMUFW
 	$(INSTALL) -D -m 0755 $(XILINX_PREBUILT_BOARD_DIR)/pmufw.elf \
 		$(BINARIES_DIR)/pmufw.elf
 endef
 endif # !BR2_TARGET_XILINX_EMBEDDEDSW_ZYNQMP_PMUFW
-endif # BR2_TARGET_XILINX_PREBUILT_VERSAL
+endif # BR2_TARGET_XILINX_PREBUILT_KRIA | BR2_TARGET_XILINX_PREBUILT_ZYNQMP
 
 define XILINX_PREBUILT_INSTALL_IMAGES_CMDS
 	$(XILINX_PREBUILT_INSTALL_VERSAL_PLM)


More information about the buildroot mailing list