config BR2_TARGET_XILINX_PREBUILT
	bool "xilinx-prebuilt"
	depends on BR2_aarch64
	help
	  Pre-built firmware files for Xilinx boards.

	  https://github.com/Xilinx/soc-prebuilt-firmware

if BR2_TARGET_XILINX_PREBUILT

config BR2_TARGET_XILINX_PREBUILT_VERSION
	string "prebuilt version"
	default "xilinx_v2024.1"
	help
	  Release version of Xilinx firmware.
	  Must be xilinx_v2023.1 or newer.

choice
	bool "family variant"
	default BR2_TARGET_XILINX_PREBUILT_VERSAL if BR2_PACKAGE_VERSAL_FIRMWARE  # legacy
	default BR2_TARGET_XILINX_PREBUILT_ZYNQMP

config BR2_TARGET_XILINX_PREBUILT_ZYNQMP
	bool "zynqmp"

config BR2_TARGET_XILINX_PREBUILT_KRIA
	bool "kria"

config BR2_TARGET_XILINX_PREBUILT_VERSAL
	bool "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
	default "kria" if BR2_TARGET_XILINX_PREBUILT_KRIA
	default "versal" if BR2_TARGET_XILINX_PREBUILT_VERSAL

config BR2_TARGET_XILINX_PREBUILT_BOARD
	string "board name"
	default "zcu102" if BR2_TARGET_XILINX_PREBUILT_ZYNQMP
	default "kr260" if BR2_TARGET_XILINX_PREBUILT_KRIA
	default "vck190" if BR2_TARGET_XILINX_PREBUILT_VERSAL
	help
	  Name of Xilinx target board.
	  Used for installing the appropriate firmware.

endif # BR2_TARGET_XILINX_PREBUILT
