From: Brandon Maier via buildroot <buildroot@buildroot.org>
To: "Romain Naour" <romain.naour@smile.fr>, <buildroot@buildroot.org>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>,
Neal Frager <neal.frager@amd.com>
Subject: Re: [Buildroot] [PATCH v3] boot/xilinx-prebuilt: support custom boards using XSA
Date: Sat, 13 Jul 2024 19:56:30 +0000 [thread overview]
Message-ID: <D2OOCH8PNMRR.2A90SMBTA8GG@collins.com> (raw)
In-Reply-To: <29dbb9d5-e35d-4ea5-bfda-cb4edac504d9@smile.fr>
On Sat Jul 13, 2024 at 4:46 PM UTC, Romain Naour via buildroot wrote:
> Hello Brandon,
>
> Le 13/07/2024 à 18:21, Brandon Maier a écrit :
> > On Sat Jul 13, 2024 at 4:08 PM UTC, Romain Naour via buildroot wrote:
> >> Hello Brandon, All,
> >>
> >> Le 01/07/2024 à 18:48, Brandon Maier via buildroot a écrit :
> >>> The xilinx-prebuilt package only supports development boards that Xilinx
> >>> has published firmware for. Custom designs based on the Xilinx platform
> >>> must generate their own firmware using the AMD Vivado Design Suite.
> >>>
> >>> Vivado produces an XSA file, which is a Zip file containing all the
> >>> firmware needed by xilinx-prebuilt. We extend xilinx-prebuilt to
> >>> download custom XSA files and extract their contents.
> >>>
> >>> Reviewed-by: Neal Frager <neal.frager@amd.com>
> >>> Signed-off-by: Brandon Maier <brandon.maier@collins.com>
> >>> ---
> >>> Changes in v3:
> >>> - Rebase on upstream changes to boot/xilinx-prebuilt
> >>> - Link to v2: https://lore.kernel.org/r/20240626-versal-xsa-support-prebuilt-v2-1-724b00c4596d@collins.com
> >>>
> >>> Changes in v2:
> >>> - Fix help text to say XSA is created by Vivado [Neal]
> >>> - Link to v1: https://lore.kernel.org/r/20240625-versal-xsa-support-prebuilt-v1-1-f64a7a396a34@collins.com
> >>> ---
> >>> boot/xilinx-prebuilt/Config.in | 24 ++++++++++++++++++++++++
> >>> boot/xilinx-prebuilt/xilinx-prebuilt.mk | 27 ++++++++++++++++++++++++---
> >>> 2 files changed, 48 insertions(+), 3 deletions(-)
> >>>
> >>> diff --git a/boot/xilinx-prebuilt/Config.in b/boot/xilinx-prebuilt/Config.in
> >>> index d3df1c06e7..94ef3dd111 100644
> >>> --- a/boot/xilinx-prebuilt/Config.in
> >>> +++ b/boot/xilinx-prebuilt/Config.in
> >>> @@ -31,6 +31,30 @@ config BR2_TARGET_XILINX_PREBUILT_VERSAL
> >>>
> >>> endchoice
> >>>
> >>> +config BR2_TARGET_XILINX_PREBUILT_VERSAL_XSA
> >>> + bool "download a prebuilt Versal XSA"
> >>> + depends on BR2_TARGET_XILINX_PREBUILT_VERSAL
> >>> + help
> >>> + The Xilinx Support Archive (XSA) provides custom Xilinx
> >>> + firmware files generated by the AMD Vivado Design Suite.
> >>> +
> >>> + https://docs.amd.com/r/en-US/ug1400-vitis-embedded/Creating-a-Hardware-Design-XSA-File
> >>> +
> >>> +if BR2_TARGET_XILINX_PREBUILT_VERSAL_XSA
> >>> +
> >>> +config BR2_TARGET_XILINX_PREBUILT_VERSAL_XSA_LOCATION
> >>> + string "URL of custom XSA"
> >>> + help
> >>> + This option allows to specify a URL pointing to an XSA source
> >>> + file. This URL can use any protocol recognized by Buildroot,
> >>> + like http://, ftp://, file:// or scp://.
> >>> +
> >>> + When pointing to a local XSA using file://, you may want to
> >>> + use a make variable like $(TOPDIR) to reference the root of
> >>> + the Buildroot tree.
> >>> +
> >>> +endif # BR2_TARGET_XILINX_PREBUILT_VERSAL_XSA
> >>> +
> >>> config BR2_TARGET_XILINX_PREBUILT_FAMILY
> >>> string
> >>> default "zynqmp" if BR2_TARGET_XILINX_PREBUILT_ZYNQMP
> >>> diff --git a/boot/xilinx-prebuilt/xilinx-prebuilt.mk b/boot/xilinx-prebuilt/xilinx-prebuilt.mk
> >>> index d09f4b13e2..c3000b7e45 100644
> >>> --- a/boot/xilinx-prebuilt/xilinx-prebuilt.mk
> >>> +++ b/boot/xilinx-prebuilt/xilinx-prebuilt.mk
> >>> @@ -5,9 +5,20 @@
> >>> ################################################################################
> >>>
> >>> XILINX_PREBUILT_VERSION = $(call qstrip,$(BR2_TARGET_XILINX_PREBUILT_VERSION))
> >>> +
> >>> +ifeq ($(BR2_TARGET_XILINX_PREBUILT_VERSAL_XSA),y)
> >>> +XILINX_PREBUILT_FILE = $(call qstrip,$(BR2_TARGET_XILINX_PREBUILT_VERSAL_XSA_LOCATION))
> >>> +XILINX_PREBUILT_SITE = $(patsubst %/,%,$(dir $(XILINX_PREBUILT_FILE)))
> >>> +XILINX_PREBUILT_SOURCE = $(notdir $(XILINX_PREBUILT_FILE))
> >>> +define XILINX_PREBUILT_EXTRACT_CMDS
> >>> + $(UNZIP) $(XILINX_PREBUILT_DL_DIR)/$(XILINX_PREBUILT_SOURCE) -d $(@D)
> >>> +endef
> >>> +else # BR2_TARGET_XILINX_PREBUILT_VERSAL_XSA
> >>> XILINX_PREBUILT_SITE = $(call github,Xilinx,soc-prebuilt-firmware,$(XILINX_PREBUILT_VERSION))
> >>> XILINX_PREBUILT_LICENSE = MIT
> >>> XILINX_PREBUILT_LICENSE_FILES = LICENSE
> >>> +endif # BR2_TARGET_XILINX_PREBUILT_VERSAL_XSA
> >>> +
> >>> XILINX_PREBUILT_INSTALL_TARGET = NO
> >>> XILINX_PREBUILT_INSTALL_IMAGES = YES
> >>>
> >>> @@ -20,12 +31,22 @@ 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
> >>> +XILINX_PREBUILT_PSMFW = $(@D)/pdi_files/static_files/psm_fw.elf
> >>
> >> is '_' character intended in "psm_fw.elf" file name instead of "psmfw.elf" as
> >> for Xilinx dev boards?
> >
> > I had not noticed that. I double-checked and the file does have '_'
> > inside the XSA, but does not in the Xilinx prebuilt repo. It is strange,
> > but this does work as intended.
>
> Ok, that is strange indeed.
>
> Maybe a comment about that in the .mk would be useful?
No problem, I sent a v4 to reword the comment block above to call out
the psm_fw.elf
Thanks,
Brandon
>
> Best regards,
> Romain
>
> >
> > Thanks for spotting that,
> > Brandon
> >
> >>
> >>> +XILINX_PREBUILT_PDI = $(@D)/*.pdi
> >>> +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
> >> ^^^^^^^^^
> >>
> >> Best regards,
> >> Romain
> >>
> >>
> >>> +XILINX_PREBUILT_PDI = $(XILINX_PREBUILT_BOARD_DIR)/*.pdi
> >>> +endif # BR2_TARGET_XILINX_PREBUILT_VERSAL_XSA
> >>> +
> >>> define XILINX_PREBUILT_INSTALL
> >>> - $(INSTALL) -D -m 0755 $(XILINX_PREBUILT_BOARD_DIR)/plm.elf \
> >>> + $(INSTALL) -D -m 0755 $(XILINX_PREBUILT_PLM) \
> >>> $(BINARIES_DIR)/plm.elf
> >>> - $(INSTALL) -D -m 0755 $(XILINX_PREBUILT_BOARD_DIR)/psmfw.elf \
> >>> + $(INSTALL) -D -m 0755 $(XILINX_PREBUILT_PSMFW) \
> >>> $(BINARIES_DIR)/psmfw.elf
> >>> - $(INSTALL) -D -m 0755 $(XILINX_PREBUILT_BOARD_DIR)/*.pdi \
> >>> + $(INSTALL) -D -m 0755 $(XILINX_PREBUILT_PDI) \
> >>> $(BINARIES_DIR)/vpl_gen_fixed.pdi
> >>> endef
> >>> else # BR2_TARGET_XILINX_PREBUILT_VERSAL
> >>>
> >>> ---
> >>> base-commit: 55c8c2328e73725e9ab41c8dc566b09f49f2aad5
> >>> change-id: 20240621-versal-xsa-support-prebuilt-9c5aed5be687
> >>>
> >>> Best regards,
> >>
> >> _______________________________________________
> >> buildroot mailing list
> >> buildroot@buildroot.org
> >> https://lists.buildroot.org/mailman/listinfo/buildroot
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2024-07-13 19:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-01 16:48 [Buildroot] [PATCH v3] boot/xilinx-prebuilt: support custom boards using XSA Brandon Maier via buildroot
2024-07-13 16:08 ` Romain Naour via buildroot
2024-07-13 16:21 ` Brandon Maier via buildroot
2024-07-13 16:46 ` Romain Naour via buildroot
2024-07-13 19:52 ` Romain Naour via buildroot
2024-07-13 19:56 ` Brandon Maier via buildroot [this message]
2024-07-13 20:09 ` Romain Naour via buildroot
2024-07-13 23:58 ` Frager, Neal via buildroot
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=D2OOCH8PNMRR.2A90SMBTA8GG@collins.com \
--to=buildroot@buildroot.org \
--cc=brandon.maier@collins.com \
--cc=neal.frager@amd.com \
--cc=romain.naour@smile.fr \
--cc=yann.morin.1998@free.fr \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.