From: Luca Ceresoli via buildroot <buildroot@buildroot.org>
To: Neal Frager <neal.frager@amd.com>
Cc: ibai.erkiaga-elorza@amd.com, arnout@mind.be,
brandon.maier@collins.com, ju.o@free.fr,
thomas.petazzoni@bootlin.com, buildroot@buildroot.org,
fabio.caccamo@amd.com, romain.naour@smile.fr,
michal.simek@amd.com
Subject: Re: [Buildroot] [PATCH v3 1/3] boot/xilinx-prebuilt: add segmented config support
Date: Fri, 16 May 2025 10:13:25 +0200 [thread overview]
Message-ID: <20250516101325.587ab846@booty> (raw)
In-Reply-To: <20250409110455.3850790-1-neal.frager@amd.com>
Hello Neal,
On Wed, 9 Apr 2025 12:04:53 +0100
Neal Frager <neal.frager@amd.com> wrote:
> 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>
> ---
> V1->V2:
> - $(@D) is not available in time for wildcard evaluation outside of shell
> script, so moved the wildcard functions into the install scripts
> V2->V3:
> - Moved if statement inside of $(INSTALL) commands to make the code easier
> to read.
> - Changed wildcards to more specific name "*_boot.pdi".
> - Changed pdi file permissions to 0644.
> ---
> boot/xilinx-prebuilt/xilinx-prebuilt.mk | 36 ++++++++++++++++++-------
> 1 file changed, 26 insertions(+), 10 deletions(-)
>
> diff --git a/boot/xilinx-prebuilt/xilinx-prebuilt.mk b/boot/xilinx-prebuilt/xilinx-prebuilt.mk
> index d0817d3cc7..4d1dfc5ca0 100644
> --- a/boot/xilinx-prebuilt/xilinx-prebuilt.mk
> +++ b/boot/xilinx-prebuilt/xilinx-prebuilt.mk
> @@ -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 \
I still think fixing the permissions from 755 to 644 should have been a
separate, initial patch, because it is a fix. This would allow for
example to cherry-pick the fix on a stable branch, without adding the
new feature.
If maintainers are OK with this patch as is, I'm OK to apply it because
the "bug" probably does not create practical issues. But if you send a
v4 please split it.
Otherwise looks good:
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
prev parent reply other threads:[~2025-05-16 8:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-09 11:04 [Buildroot] [PATCH v3 1/3] boot/xilinx-prebuilt: add segmented config support Neal Frager via buildroot
2025-04-09 11:04 ` [Buildroot] [PATCH v3 2/3] board/versal: change pdi filename to boot.pdi Neal Frager via buildroot
2025-05-16 8:13 ` Luca Ceresoli via buildroot
2025-04-09 11:04 ` [Buildroot] [PATCH v3 3/3] boot/xilinx-prebuilt: install pld.pdi to target Neal Frager via buildroot
2025-05-16 8:13 ` Luca Ceresoli via buildroot
2025-05-17 9:56 ` Frager, Neal via buildroot
2025-05-13 10:32 ` [Buildroot] [PATCH v3 1/3] boot/xilinx-prebuilt: add segmented config support Frager, Neal via buildroot
2025-05-16 8:13 ` Luca Ceresoli via buildroot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250516101325.587ab846@booty \
--to=buildroot@buildroot.org \
--cc=arnout@mind.be \
--cc=brandon.maier@collins.com \
--cc=fabio.caccamo@amd.com \
--cc=ibai.erkiaga-elorza@amd.com \
--cc=ju.o@free.fr \
--cc=luca.ceresoli@bootlin.com \
--cc=michal.simek@amd.com \
--cc=neal.frager@amd.com \
--cc=romain.naour@smile.fr \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox