[Buildroot] [PATCH v1 1/2] package/fpgautil: new package
Neal Frager
neal.frager at amd.com
Tue Apr 8 11:48:33 UTC 2025
Add a new package to Buildroot called fpgautil which builds the Xilinx
fpgautil script which can be used for loading FPGA bitstreams on zynq, zynqmp
and versal products at run-time. This is a handy application for loading
FPGA bitstreams and their corresponding device tree overlays.
An explanation of how this script can be used for each type of product can be
found on the wiki pages below.
https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841645/Solution+Zynq+PL+Programming+With+FPGA+Manager
https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841847/Solution+ZynqMP+PL+Programming
https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/1188397412/Solution+Versal+PL+Programming
In addition, the source code for fpgautil can be found here:
https://github.com/Xilinx/meta-xilinx/blob/master/meta-xilinx-core/recipes-bsp/fpga-manager-script/files/fpgautil.c
The fpgautil script can be used hand in hand with the Versal Segmented
Configuration with the following example command for programming the pld.pdi
file to the Versal FPGA:
fpgautil -b /lib/firmware/<design-name>_pld.pdi -o /lib/firmware/<dtbo-name>.dtbo
Signed-off-by: Neal Frager <neal.frager at amd.com>
---
DEVELOPERS | 1 +
package/Config.in | 1 +
package/fpgautil/Config.in | 8 ++++++++
package/fpgautil/fpgautil.hash | 3 +++
package/fpgautil/fpgautil.mk | 22 ++++++++++++++++++++++
5 files changed, 35 insertions(+)
create mode 100644 package/fpgautil/Config.in
create mode 100644 package/fpgautil/fpgautil.hash
create mode 100644 package/fpgautil/fpgautil.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index 1c84f95943..fe5cf29ccf 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2484,6 +2484,7 @@ F: configs/zynqmp_zcu104_defconfig
F: configs/zynqmp_zcu106_defconfig
F: package/binutils-bare-metal/
F: package/bootgen/
+F: package/fpgautil/
F: package/gcc-bare-metal/
F: package/newlib-bare-metal/
F: toolchain/toolchain-bare-metal-buildroot/
diff --git a/package/Config.in b/package/Config.in
index 291e784f26..494cae887f 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -443,6 +443,7 @@ menu "Firmware"
source "package/armbian-firmware/Config.in"
source "package/b43-firmware/Config.in"
source "package/brcmfmac_sdio-firmware-rpi/Config.in"
+ source "package/fpgautil/Config.in"
source "package/linux-firmware/Config.in"
source "package/murata-cyw-fw/Config.in"
source "package/nxp-bt-wifi-firmware/Config.in"
diff --git a/package/fpgautil/Config.in b/package/fpgautil/Config.in
new file mode 100644
index 0000000000..8a1f557f7e
--- /dev/null
+++ b/package/fpgautil/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_FPGAUTIL
+ bool "fpgautil script"
+ depends on BR2_arm || BR2_aarch64
+ help
+ Xilinx FPGA Manager Utility for zynq, zynqmp
+ and versal products.
+
+ https://github.com/Xilinx/meta-xilinx/blob/master/meta-xilinx-core/recipes-bsp/fpga-manager-script/files/fpgautil.c
diff --git a/package/fpgautil/fpgautil.hash b/package/fpgautil/fpgautil.hash
new file mode 100644
index 0000000000..2723323a21
--- /dev/null
+++ b/package/fpgautil/fpgautil.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 439a3681d8efa9641ab39c7645836b9ac78b2fdb36242f9bc94c1f3dfb2d9c4e fpgautil-xlnx-rel-v2024.2_update3.tar.gz
+sha256 89807acf2309bd285f033404ee78581602f3cd9b819a16ac2f0e5f60ff4a473e COPYING.MIT
diff --git a/package/fpgautil/fpgautil.mk b/package/fpgautil/fpgautil.mk
new file mode 100644
index 0000000000..3f75412e7e
--- /dev/null
+++ b/package/fpgautil/fpgautil.mk
@@ -0,0 +1,22 @@
+################################################################################
+#
+# fpgautil
+#
+################################################################################
+
+FPGAUTIL_VERSION = xlnx-rel-v2024.2_update3
+FPGAUTIL_SITE = $(call github,Xilinx,meta-xilinx,$(FPGAUTIL_VERSION))
+FPGAUTIL_LICENSE = MIT
+FPGAUTIL_LICENSE_FILES = COPYING.MIT
+
+define FPGAUTIL_BUILD_CMDS
+ $(TARGET_MAKE_ENV) $(TARGET_CC) $(TARGET_LDFLAGS) \
+ $(@D)/meta-xilinx-core/recipes-bsp/fpga-manager-script/files/fpgautil.c \
+ -o $(@D)/fpgautil
+endef
+
+define FPGAUTIL_INSTALL_TARGET_CMDS
+ $(INSTALL) -m 0755 -D $(@D)/fpgautil $(TARGET_DIR)/bin/fpgautil
+endef
+
+$(eval $(generic-package))
--
2.25.1
More information about the buildroot
mailing list