From df4a87e6e6b733536df0ae15aaa83ba00e0a364a Mon Sep 17 00:00:00 2001 From: Neal Frager Date: Thu, 4 Dec 2025 11:44:09 +0000 Subject: [PATCH] boot/xilinx-prebuilt: add local versal xsa support Most of the time, users will be running Vivado on their local host machine, and will generate a XSA (Xilinx Shell Archive) locally. Instead of requiring users to create a URL location for their XSA file, this patch improves ease of use by allowing users to work directly with just a path on the local host machine. BR2_TARGET_XILINX_PREBUILT_VERSAL_XSA_LOCATION can thus be defined as either a simple local location or a URL location for the XSA file. In either case, a hash for the XSA file needs to be added to the boot/xilinx-prebuilt/xilinx-prebuilt.hash when using this option. Signed-off-by: Neal Frager Signed-off-by: Julien Olivain --- boot/xilinx-prebuilt/Config.in | 6 +++--- boot/xilinx-prebuilt/xilinx-prebuilt.mk | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/boot/xilinx-prebuilt/Config.in b/boot/xilinx-prebuilt/Config.in index a1e711e6cf..7926b6cb9e 100644 --- a/boot/xilinx-prebuilt/Config.in +++ b/boot/xilinx-prebuilt/Config.in @@ -68,9 +68,9 @@ config BR2_TARGET_XILINX_PREBUILT_VERSAL_XSA_LOCATION 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. + When pointing to a local XSA using file:// or simply the + local path, you may want to use a make variable like + $(TOPDIR) to reference the root of the Buildroot tree. This option applies to either versal or versal2. diff --git a/boot/xilinx-prebuilt/xilinx-prebuilt.mk b/boot/xilinx-prebuilt/xilinx-prebuilt.mk index 6bd16d663a..7433444924 100644 --- a/boot/xilinx-prebuilt/xilinx-prebuilt.mk +++ b/boot/xilinx-prebuilt/xilinx-prebuilt.mk @@ -10,6 +10,9 @@ 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)) +ifeq ($(findstring ://,$(XILINX_PREBUILT_FILE)),) +XILINX_PREBUILT_SITE_METHOD = file +endif define XILINX_PREBUILT_EXTRACT_CMDS $(UNZIP) $(XILINX_PREBUILT_DL_DIR)/$(XILINX_PREBUILT_SOURCE) -d $(@D) endef