boot/versal-firmware: use microblaze toolchain
PATCH 1/1 boot/versal-firmware: use microblaze toolchain
This patch moves the versal-firmware package from the package directory to the boot directory because it is actually boot firmware.
In addition, this patch uses the microblaze bare-metal toolchain from the patch set below in order to now build the plm and psmfw applications.
Microblaze bare-metal toolchain patch set:
https://patchwork.ozlabs.org/project/buildroot/list/?series=371570
The embeddedsw patches required to build the plm and psmfw applications only work on version xilinx_v2023.1, so older versions are not supported. The patches have already been submitted upstream internally at AMD / Xilinx, so they will no longer be necessary with version xilinx_v2023.2 and onwards.
The versal-firmware package now supports custom versal boards with the use of the BR2_TARGET_VERSAL_FIRMWARE_PDI config. The versal pdi file is generated by Vivado is the only firmware file that contains board specific information. By default, the BR2_TARGET_VERSAL_FIRMWARE_PDI config is used to download the vck190 evaluation board pdi from the Xilinx github, but this same config can now be used to download a custom pdi for a custom versal board.
--- DEVELOPERS | 2 +- boot/Config.in | 1 + boot/versal-firmware/Config.in | 34 ++++ boot/versal-firmware/versal-firmware.hash | 2 + boot/versal-firmware/versal-firmware.mk | 47 ++++++ ...al_plm-add-support-of-parallel-build.patch | 157 ++++++++++++++++++ ..._psmfw-add-support-of-parallel-build.patch | 48 ++++++ configs/versal_vck190_defconfig | 6 +- package/Config.in | 1 - package/versal-firmware/Config.in | 24 --- package/versal-firmware/versal-firmware.mk | 21 --- 11 files changed, 293 insertions(+), 50 deletions(-) create mode 100644 boot/versal-firmware/Config.in create mode 100644 boot/versal-firmware/versal-firmware.hash create mode 100644 boot/versal-firmware/versal-firmware.mk create mode 100644 boot/versal-firmware/xilinx_v2023.1/0001-sw_apps-versal_plm-add-support-of-parallel-build.patch create mode 100644 boot/versal-firmware/xilinx_v2023.1/0002-sw_apps-versal_psmfw-add-support-of-parallel-build.patch delete mode 100644 package/versal-firmware/Config.in delete mode 100644 package/versal-firmware/versal-firmware.mk
DEVELOPERS +1 -1
@@ -2235,13 +2235,13 @@ N: Neal Frager <[email protected]> F: board/versal/ F: board/zynq/ F: board/zynqmp/ +F: boot/versal-firmware/ F: configs/versal_vck190_defconfig F: configs/zynq_zc706_defconfig F: configs/zynqmp_kria_kv260_defconfig F: configs/zynqmp_zcu102_defconfig F: configs/zynqmp_zcu106_defconfig F: package/bootgen/ -F: package/versal-firmware/ N: Nicola Di Lieto <[email protected]> F: package/uacme/
boot/Config.in +1 -0
@@ -23,6 +23,7 @@ source "boot/ti-k3-boot-firmware/Config.in" source "boot/ti-k3-image-gen/Config.in" source "boot/ti-k3-r5-loader/Config.in" source "boot/uboot/Config.in" +source "boot/versal-firmware/Config.in" source "boot/vexpress-firmware/Config.in" endmenu
boot/versal-firmware/Config.in new file +34 -0
@@ -0,0 +1,34 @@ +config BR2_TARGET_VERSAL_FIRMWARE + bool "versal-firmware" + select BR2_PACKAGE_HOST_TOOLCHAIN_BARE_METAL + help + This package builds the boot firmware apps for Xilinx versal + boards, so that they can boot u-boot and Linux. + +if BR2_TARGET_VERSAL_FIRMWARE + +config BR2_TARGET_VERSAL_FIRMWARE_VERSION + string "firmware version" + default "xilinx_v2023.1" + help + Release version of versal firmware. + Only versions xilinx_v2023.1 and newer are supported. + +config BR2_TARGET_VERSAL_FIRMWARE_CUSTOM_CFLAGS + string "custom cflags" + help + Adds additional CFLAGS for building versal firmware. + +config BR2_TARGET_VERSAL_FIRMWARE_PDI + string "pdi file location" + default "https://github.com/Xilinx/soc-prebuilt-firmware/raw/xilinx_v2023.1/vck190-versal/vpl_gen_fixed.pdi" + help + The PDI file defines everything which is board specific for versal. + It gets parsed by the plm.elf during boot. To boot a custom target + based on versal, this should be configured to point to your Vivado + generated PDI file. + + This config should never be undefined, so default configuration is + for the vck190 evaluation board. + +endif # BR2_TARGET_VERSAL_FIRMWARE
boot/versal-firmware/versal-firmware.hash new file +2 -0
@@ -0,0 +1,2 @@ +# locally computed +sha256 9850f893113936b9959cc76cc3e9152e30f815ff1acaa4b45f7a60fe3e1836f0 versal-firmware-xilinx_v2023.1.tar.gz
boot/versal-firmware/versal-firmware.mk new file +47 -0
47 lines not on this page · raw message
boot/versal-firmware/xilinx_v2023.1/0001-sw_apps-versal_plm-add-support-of-parallel-build.patch new file +157 -0
157 lines not on this page · raw message
boot/versal-firmware/xilinx_v2023.1/0002-sw_apps-versal_psmfw-add-support-of-parallel-build.patch new file +48 -0
48 lines not on this page · raw message
configs/versal_vck190_defconfig +3 -3
@@ -32,9 +32,9 @@ BR2_TARGET_UBOOT_NEEDS_OPENSSL=y BR2_TARGET_UBOOT_NEEDS_GNUTLS=y BR2_TARGET_UBOOT_FORMAT_REMAKE_ELF=y BR2_TARGET_UBOOT_FORMAT_DTB=y -BR2_PACKAGE_VERSAL_FIRMWARE=y -BR2_PACKAGE_VERSAL_FIRMWARE_VERSION="xilinx_v2023.1" -BR2_PACKAGE_VERSAL_FIRMWARE_BOARD="vck190" +BR2_TARGET_VERSAL_FIRMWARE=y +BR2_TARGET_VERSAL_FIRMWARE_VERSION="xilinx_v2023.1" +BR2_TARGET_VERSAL_FIRMWARE_PDI="https://github.com/Xilinx/soc-prebuilt-firmware/raw/xilinx_v2023.1/vck190-versal/vpl_gen_fixed.pdi" BR2_PACKAGE_HOST_DOSFSTOOLS=y BR2_PACKAGE_HOST_GENIMAGE=y BR2_PACKAGE_HOST_MTOOLS=y
package/Config.in +0 -1
@@ -448,7 +448,6 @@ menu "Firmware" source "package/sunxi-boards/Config.in" source "package/ts4900-fpga/Config.in" source "package/ux500-firmware/Config.in" - source "package/versal-firmware/Config.in" source "package/wilc-firmware/Config.in" source "package/wilink-bt-firmware/Config.in" source "package/zd1211-firmware/Config.in"
package/versal-firmware/Config.in deleted +0 -24
@@ -1,24 +0,0 @@ -config BR2_PACKAGE_VERSAL_FIRMWARE - bool "versal-firmware" - depends on BR2_aarch64 - help - Pre-built firmware files for Xilinx Versal boards. - - https://github.com/Xilinx/soc-prebuilt-firmware - -if BR2_PACKAGE_VERSAL_FIRMWARE - -config BR2_PACKAGE_VERSAL_FIRMWARE_VERSION - string "firmware version" - default "xilinx_v2023.1" - help - Release version of Versal firmware. - -config BR2_PACKAGE_VERSAL_FIRMWARE_BOARD - string "board name" - default "vck190" - help - Name of Versal target board. - Used for installing the appropriate firmware. - -endif # BR2_PACKAGE_VERSAL_FIRMWARE
package/versal-firmware/versal-firmware.mk deleted +0 -21
@@ -1,21 +0,0 @@ -################################################################################ -# -# versal-firmware -# -################################################################################ - -VERSAL_FIRMWARE_VERSION = $(call qstrip,$(BR2_PACKAGE_VERSAL_FIRMWARE_VERSION)) -VERSAL_FIRMWARE_SITE = $(call github,Xilinx,soc-prebuilt-firmware,$(VERSAL_FIRMWARE_VERSION)) -VERSAL_FIRMWARE_LICENSE = MIT -VERSAL_FIRMWARE_LICENSE_FILES = LICENSE -VERSAL_FIRMWARE_INSTALL_TARGET = NO -VERSAL_FIRMWARE_INSTALL_IMAGES = YES - -define VERSAL_FIRMWARE_INSTALL_IMAGES_CMDS - $(foreach f,plm.elf psmfw.elf vpl_gen_fixed.pdi,\ - $(INSTALL) -D -m 0755 $(@D)/$(BR2_PACKAGE_VERSAL_FIRMWARE_BOARD)-versal/$(f) \ - $(BINARIES_DIR)/$(f) - ) -endef - -$(eval $(generic-package))
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Neal,
Quoted 2 lines · On Thu, 7 Sep 2023 11:56:21 +0100 Neal Frager <[email protected]> wrote:
This patch moves the versal-firmware package from the package directory to the boot directory because it is actually boot firmware.
This should be a separate patch. Not only because it is an indipentent change, but also because the diff is not very useful with the old and new code spread apart as one set of deleted files and a set of new files.
Quoted 5 lines
In addition, this patch uses the microblaze bare-metal toolchain from the patch set below in order to now build the plm and psmfw applications.
Microblaze bare-metal toolchain patch set:
https://patchwork.ozlabs.org/project/buildroot/list/?series=371570
Of course that needs to be applied first. I don't see a problem with this patch being around before that, however it probably won't attract much attention at least until the bare-metal toolchain approach is accepted (not necessarily the actual patches).
Luca
Signature · 7 lines
Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot