mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-01 21:23:51 -09:00
boot/xilinx-prebuilt: add segmented config support
AMD has created a new segmented configuration for Versal products. It splits the Vivado hardware design into two PDI files, one containing the minimal required configuration for the DDR and booting the processors, and a second PDI file which contains the rest of the FPGA design and can be loaded at run-time via U-boot or Linux. The file names generated when using the Vivado Segmented Configuration are as follows: <design>_boot.pdi - Minimal DDR and PS config for booting <design>_pld.pdi - Remainder of FPGA design to be loaded at run-time Since two PDI files will be included in the XSA file when using Segmented Configuration, the xilinx-prebuilt package needs to be updated to support this feature. For Buildroot purposes, the <design>_boot.pdi is the file that needs to be included in the boot.bin for booting the processors, so this patch checks for a file named *boot*.pdi which will indicate that Segmented Configuration is being used and will make sure to use the <design>_boot.pdi file and not the <design>_pld.pdi file when generating the boot.bin image. If no pdi files contain the word "boot" in the filename, it can be assumed that Segmented Configuration is not being used, so the single file *.pdi method is the appropriate one for this case, and this patch is thus backwards compatible with prior designs not using Segmented Configuration. Also, Segmented Configuration is going to become the default mode for Versal products, so the xilinx-prebuilt github location will also soon have two PDI files for each board. For this reason, this patch is also handling Segmented Configuration for files downloaded from the xilinx-prebuilt repo. For further information about the AMD Segmented Configuration, please see the github tutorial below. https://github.com/Xilinx/Vivado-Design-Tutorials/tree/2024.2/Versal/Boot_and_Config/Segmented_Configuration Signed-off-by: Neal Frager <neal.frager@amd.com> Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Julien Olivain <ju.o@free.fr>
This commit is contained in:
committed by
Julien Olivain
parent
6646d0b90f
commit
a0a92928db
@@ -28,9 +28,6 @@ XILINX_PREBUILT_BOARD = $(call qstrip,$(BR2_TARGET_XILINX_PREBUILT_BOARD))
|
||||
XILINX_PREBUILT_BOARD_DIR = $(@D)/$(XILINX_PREBUILT_BOARD)-$(XILINX_PREBUILT_FAMILY)
|
||||
|
||||
ifeq ($(BR2_TARGET_XILINX_PREBUILT_VERSAL),y)
|
||||
# We need the *.pdi glob, because the file has different names for the
|
||||
# different boards, but there is only one, and it has to be named
|
||||
# vpl_gen_fixed.pdi when installed.
|
||||
ifeq ($(BR2_TARGET_XILINX_PREBUILT_VERSAL_XSA),y)
|
||||
XILINX_PREBUILT_PLM = $(@D)/pdi_files/gen_files/plm.elf
|
||||
# Unlike the psmfw.elf file for Xilinx development boards,
|
||||
@@ -39,11 +36,33 @@ XILINX_PREBUILT_PLM = $(@D)/pdi_files/gen_files/plm.elf
|
||||
# so to support current and future AMD Vivado versions, the filename
|
||||
# psm*fw.elf is used.
|
||||
XILINX_PREBUILT_PSMFW = $(@D)/pdi_files/static_files/psm*fw.elf
|
||||
XILINX_PREBUILT_PDI = $(@D)/*.pdi
|
||||
# We need the *.pdi glob, because the file has different names for the
|
||||
# different boards, and it has to be named vpl_gen_fixed.pdi when installed.
|
||||
# If Segmented Configuration is used, there will be two pdi files and we need
|
||||
# the file that has "_boot.pdi" in the filename.
|
||||
define XILINX_PREBUILT_INSTALL_VERSAL_XSA_BOOT_PDI
|
||||
$(INSTALL) -D -m 0644 \
|
||||
$(if $(wildcard $(@D)/*_boot.pdi), \
|
||||
$(@D)/*_boot.pdi, \
|
||||
$(@D)/*.pdi \
|
||||
) \
|
||||
$(BINARIES_DIR)/vpl_gen_fixed.pdi
|
||||
endef
|
||||
else # BR2_TARGET_XILINX_PREBUILT_VERSAL_XSA
|
||||
XILINX_PREBUILT_PLM = $(XILINX_PREBUILT_BOARD_DIR)/plm.elf
|
||||
XILINX_PREBUILT_PSMFW = $(XILINX_PREBUILT_BOARD_DIR)/psmfw.elf
|
||||
XILINX_PREBUILT_PDI = $(XILINX_PREBUILT_BOARD_DIR)/*.pdi
|
||||
# We need the *.pdi glob, because the file has different names for the
|
||||
# different boards, and it has to be named vpl_gen_fixed.pdi when installed.
|
||||
# If Segmented Configuration is used, there will be two pdi files and we need
|
||||
# the file that has "_boot.pdi" in the filename.
|
||||
define XILINX_PREBUILT_INSTALL_VERSAL_BOOT_PDI
|
||||
$(INSTALL) -D -m 0644 \
|
||||
$(if $(wildcard $(XILINX_PREBUILT_BOARD_DIR)/*_boot.pdi), \
|
||||
$(XILINX_PREBUILT_BOARD_DIR)/*_boot.pdi, \
|
||||
$(XILINX_PREBUILT_BOARD_DIR)/*.pdi \
|
||||
) \
|
||||
$(BINARIES_DIR)/vpl_gen_fixed.pdi
|
||||
endef
|
||||
endif # BR2_TARGET_XILINX_PREBUILT_VERSAL_XSA
|
||||
|
||||
ifneq ($(BR2_TARGET_XILINX_EMBEDDEDSW_VERSAL_PLM),y)
|
||||
@@ -60,10 +79,6 @@ define XILINX_PREBUILT_INSTALL_VERSAL_PSMFW
|
||||
endef
|
||||
endif # !BR2_TARGET_XILINX_EMBEDDEDSW_VERSAL_PSMFW
|
||||
|
||||
define XILINX_PREBUILT_INSTALL_VERSAL_PDI
|
||||
$(INSTALL) -D -m 0644 $(XILINX_PREBUILT_PDI) \
|
||||
$(BINARIES_DIR)/vpl_gen_fixed.pdi
|
||||
endef
|
||||
else # BR2_TARGET_XILINX_PREBUILT_VERSAL
|
||||
ifneq ($(BR2_TARGET_XILINX_EMBEDDEDSW_ZYNQMP_PMUFW),y)
|
||||
define XILINX_PREBUILT_INSTALL_ZYNQMP_PMUFW
|
||||
@@ -76,7 +91,8 @@ endif # BR2_TARGET_XILINX_PREBUILT_VERSAL
|
||||
define XILINX_PREBUILT_INSTALL_IMAGES_CMDS
|
||||
$(XILINX_PREBUILT_INSTALL_VERSAL_PLM)
|
||||
$(XILINX_PREBUILT_INSTALL_VERSAL_PSMFW)
|
||||
$(XILINX_PREBUILT_INSTALL_VERSAL_PDI)
|
||||
$(XILINX_PREBUILT_INSTALL_VERSAL_BOOT_PDI)
|
||||
$(XILINX_PREBUILT_INSTALL_VERSAL_XSA_BOOT_PDI)
|
||||
$(XILINX_PREBUILT_INSTALL_ZYNQMP_PMUFW)
|
||||
endef
|
||||
|
||||
|
||||
Reference in New Issue
Block a user