boot/zynqmp-firmware: new boot firmware
PATCH v11 1/6 boot/zynqmp-firmware: new boot firmware
This patch adds a new boot firmware to buildroot for building the zynqmp pmufw. It requires the toolchain-bare-metal package that includes a bare-metal binutils, gcc and newlib which can be built for the microblaze architecture.
---V1->V2:
- builds a bare-metal gcc toolchain instead of requiring an external microblaze toolchainV2->V3:
- corrected custom cflags option
- added support for xilinx_v2022.2 version
- added zynqmp-firmware.hashV3->V4:
- no changesV4->V5:
- reduced all lines to <80 charsV5->V6:
- migrated to toolchain-bare-metal-buildrootV6->V7:
- removed patch numbers
- changed dependency to toolchain-bare-metal-buildroot
- removed hash since version is configurableV7->V9:
- no changesV9->V10:
- removed patches for supporting versions older than xilinx_v2023.2
V10-V11:
- set default BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH to "microblazeel-xilinx-elf" to avoid stand-alone build failure
--- DEVELOPERS | 1 + boot/Config.in | 1 + boot/zynqmp-firmware/Config.in | 22 +++++++++++++ boot/zynqmp-firmware/zynqmp-firmware.mk | 33 +++++++++++++++++++ .../toolchain-bare-metal-buildroot/Config.in | 1 + 5 files changed, 58 insertions(+) create mode 100644 boot/zynqmp-firmware/Config.in create mode 100644 boot/zynqmp-firmware/zynqmp-firmware.mk
DEVELOPERS +1 -0
@@ -2283,6 +2283,7 @@ N: Neal Frager <[email protected]> F: board/versal/ F: board/zynq/ F: board/zynqmp/ +F: boot/zynqmp-firmware/ F: configs/versal_vck190_defconfig F: configs/zynq_zc702_defconfig F: configs/zynq_zc706_defconfig
boot/Config.in +1 -0
@@ -24,5 +24,6 @@ source "boot/ti-k3-image-gen/Config.in" source "boot/ti-k3-r5-loader/Config.in" source "boot/uboot/Config.in" source "boot/vexpress-firmware/Config.in" +source "boot/zynqmp-firmware/Config.in" endmenu
boot/zynqmp-firmware/Config.in new file +22 -0
@@ -0,0 +1,22 @@ +config BR2_TARGET_ZYNQMP_FIRMWARE + bool "zynqmp-firmware" + select BR2_TOOLCHAIN_BARE_METAL_BUILDROOT + help + This package builds the PMU Firmware application required + to run U-Boot and Linux in the Zynq MPSoC devices. + +if BR2_TARGET_ZYNQMP_FIRMWARE + +config BR2_TARGET_ZYNQMP_FIRMWARE_VERSION + string "firmware version" + default "xilinx_v2023.2" + help + Release version of zynqmp firmware. + Only versions xilinx_v2023.2 and newer are supported. + +config BR2_TARGET_ZYNQMP_FIRMWARE_CUSTOM_CFLAGS + string "custom cflags" + help + Adds additional CFLAGS for building zynqmp firmware. + +endif # BR2_TARGET_ZYNQMP_FIRMWARE
boot/zynqmp-firmware/zynqmp-firmware.mk new file +33 -0
@@ -0,0 +1,33 @@ +################################################################################ +# +# zynqmp-firmware +# +################################################################################ + +ZYNQMP_FIRMWARE_VERSION = $(call qstrip,$(BR2_TARGET_ZYNQMP_FIRMWARE_VERSION)) +ZYNQMP_FIRMWARE_SITE = \ + $(call github,Xilinx,embeddedsw,$(ZYNQMP_FIRMWARE_VERSION)) +ZYNQMP_FIRMWARE_LICENSE = MIT +ZYNQMP_FIRMWARE_LICENSE_FILES = license.txt +ZYNQMP_FIRMWARE_INSTALL_IMAGES = YES +ZYNQMP_FIRMWARE_INSTALL_TARGET = NO +ZYNQMP_FIRMWARE_DEPENDENCIES = toolchain-bare-metal-buildroot + +CUSTOM_CFLAGS = $(call qstrip,$(BR2_TARGET_ZYNQMP_FIRMWARE_CUSTOM_CFLAGS)) +ZYNQMP_FIRMWARE_CFLAGS = "-Os -flto -ffat-lto-objects $(CUSTOM_CFLAGS)" + +define ZYNQMP_FIRMWARE_BUILD_CMDS + $(MAKE) -C $(@D)/lib/sw_apps/zynqmp_pmufw/src \ + COMPILER=$(HOST_DIR)/bin/microblazeel-xilinx-elf-gcc \ + ARCHIVER=$(HOST_DIR)/bin/microblazeel-xilinx-elf-gcc-ar \ + CC=$(HOST_DIR)/bin/microblazeel-xilinx-elf-gcc \ + CFLAGS=$(ZYNQMP_FIRMWARE_CFLAGS) +endef + +ZYNQMP_PMUFW = $(@D)/lib/sw_apps/zynqmp_pmufw/src/executable.elf + +define ZYNQMP_FIRMWARE_INSTALL_IMAGES_CMDS + $(INSTALL) -D -m 0755 $(ZYNQMP_PMUFW) $(BINARIES_DIR)/pmufw.elf +endef + +$(eval $(generic-package))
toolchain/toolchain-bare-metal-buildroot/Config.in +1 -0
@@ -2,6 +2,7 @@ if BR2_TOOLCHAIN_BARE_METAL_BUILDROOT config BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH string "architecture tuple" + default "microblazeel-xilinx-elf" if BR2_TARGET_ZYNQMP_FIRMWARE help This option allows to define the architecture tuple for the bare-metal toolchain.
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v11 2/6 boot/uboot.mk: new zynqmp pmufw build option
The new BR2_TARGET_UBOOT_ZYNQMP_PMUFW_SOURCE option will enable u-boot to use the zynqmp-firmware package for building a pmufw.elf that gets included in the generated boot.bin.
If the BR2_TARGET_UBOOT_ZYNQMP_PMUFW_SOURCE option is enabled, then the BR2_TARGET_UBOOT_ZYNQMP_PMUFW config for downloading a prebuilt pmufw will be ignored.
---V1->V2:
- patch is now backwards compatible for users already using the BR2_TARGET_UBOOT_ZYNQMP_PMUFW config for downloading a prebuilt pmufwV2->V3:
- no changesV3->V4:
- BR2_TARGET_UBOOT_ZYNQMP_PMUFW removed when BR2_TARGET_UBOOT_ZYNQMP_PMUFW_SOURCE selectedV4->V11:
- no changes
--- boot/uboot/Config.in | 19 +++++++++++++++++-- boot/uboot/uboot.mk | 5 +++++ 2 files changed, 22 insertions(+), 2 deletions(-)
boot/uboot/Config.in +17 -2
@@ -514,11 +514,26 @@ config BR2_TARGET_UBOOT_ZYNQMP if BR2_TARGET_UBOOT_ZYNQMP +config BR2_TARGET_UBOOT_ZYNQMP_PMUFW_SOURCE + bool "Build zynqmp PMU firmware from source" + select BR2_TARGET_ZYNQMP_FIRMWARE + depends on BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG + help + This option instructs u-boot to build the zynqmp pmufw using + the zynqmp-firmware package. u-boot will then include this + pmufw.elf in the generated boot.bin. + + If this option is selected, the BR2_TARGET_UBOOT_ZYNQMP_PMUFW + prebuilt option will be ignored. + + This feature requires U-Boot >= 2018.07. + config BR2_TARGET_UBOOT_ZYNQMP_PMUFW - string "PMU firmware location" + string "Pre-built zynqmp PMU firmware location" depends on BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG + depends on !BR2_TARGET_UBOOT_ZYNQMP_PMUFW_SOURCE help - Location of a PMU firmware binary. + Location of a pre-built PMU firmware binary. If not empty, instructs the U-Boot build process to generate a boot.bin (to be loaded by the ZynqMP boot ROM) containing
boot/uboot/uboot.mk +5 -0
@@ -416,7 +416,12 @@ endef ifeq ($(BR2_TARGET_UBOOT_ZYNQMP),y) +ifeq ($(BR2_TARGET_UBOOT_ZYNQMP_PMUFW_SOURCE),y) +UBOOT_DEPENDENCIES += zynqmp-firmware +UBOOT_ZYNQMP_PMUFW = $(BINARIES_DIR)/pmufw.elf +else UBOOT_ZYNQMP_PMUFW = $(call qstrip,$(BR2_TARGET_UBOOT_ZYNQMP_PMUFW)) +endif #BR2_TARGET_UBOOT_ZYNQMP_PMUFW_SOURCE ifneq ($(findstring ://,$(UBOOT_ZYNQMP_PMUFW)),) UBOOT_EXTRA_DOWNLOADS += $(UBOOT_ZYNQMP_PMUFW)
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v11 2/6] boot/uboot.mk: new zynqmp pmufw build option
Quoted 9 lines · On Mon, 4 Mar 2024 07:41:36 +0000 Neal Frager <[email protected]> wrote:
The new
BR2_TARGET_UBOOT_ZYNQMP_PMUFW_SOURCEoption will enable u-boot to use the zynqmp-firmware package for building a pmufw.elf that gets included in the generated boot.bin.If the
BR2_TARGET_UBOOT_ZYNQMP_PMUFW_SOURCEoption is enabled, then theBR2_TARGET_UBOOT_ZYNQMP_PMUFWconfig for downloading a prebuilt pmufw will be ignored.Signed-off-by Neal Frager <[email protected]>
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
PATCH v11 3/6 configs/zynqmp*: build pmufw source
In reply to Neal Frager via buildrootThis patch migrates the zynqmp config files to use the new zynqmp-firmware package for building the zynqmp pmufw from source.
---V4->V7:
- no changesV7->V8:
- bump to xilinx_v2023.2V8->V9:
- add the new zynqmp defconfigs
- add BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH definitionV9->V10:
- no changesV10->V11:
- BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH is set by zynqmp-firmware
--- configs/zynqmp_kria_kd240_defconfig | 4 +++- configs/zynqmp_kria_kr260_defconfig | 4 +++- configs/zynqmp_kria_kv260_defconfig | 4 +++- configs/zynqmp_zcu102_defconfig | 3 ++- configs/zynqmp_zcu104_defconfig | 3 ++- configs/zynqmp_zcu106_defconfig | 3 ++- 6 files changed, 15 insertions(+), 6 deletions(-)
configs/zynqmp_kria_kd240_defconfig +3 -1
@@ -32,7 +32,9 @@ BR2_TARGET_UBOOT_NEEDS_GNUTLS=y BR2_TARGET_UBOOT_SPL=y BR2_TARGET_UBOOT_SPL_NAME="spl/boot.bin" BR2_TARGET_UBOOT_ZYNQMP=y -BR2_TARGET_UBOOT_ZYNQMP_PMUFW="https://github.com/Xilinx/soc-prebuilt-firmware/raw/xilinx_v2023.2/kd240-kria/pmufw.elf" +BR2_TARGET_UBOOT_ZYNQMP_PMUFW_SOURCE=y +BR2_TARGET_ZYNQMP_FIRMWARE_VERSION="xilinx_v2023.2" +BR2_TARGET_ZYNQMP_FIRMWARE_CUSTOM_CFLAGS="-DBOARD_SHUTDOWN_PIN=2 -DBOARD_SHUTDOWN_PIN_STATE=0 -DENABLE_EM -DENABLE_MOD_OVERTEMP -DENABLE_DYNAMIC_MIO_CONFIG -DENABLE_IOCTL -DCONNECT_PMU_GPO_2_VAL=0" BR2_TARGET_UBOOT_ZYNQMP_PM_CFG="board/zynqmp/kria/kd240/pm_cfg_obj.c" BR2_TARGET_UBOOT_FORMAT_ITB=y BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
configs/zynqmp_kria_kr260_defconfig +3 -1
@@ -32,7 +32,9 @@ BR2_TARGET_UBOOT_NEEDS_GNUTLS=y BR2_TARGET_UBOOT_SPL=y BR2_TARGET_UBOOT_SPL_NAME="spl/boot.bin" BR2_TARGET_UBOOT_ZYNQMP=y -BR2_TARGET_UBOOT_ZYNQMP_PMUFW="https://github.com/Xilinx/soc-prebuilt-firmware/raw/xilinx_v2023.2/kr260-kria/pmufw.elf" +BR2_TARGET_UBOOT_ZYNQMP_PMUFW_SOURCE=y +BR2_TARGET_ZYNQMP_FIRMWARE_VERSION="xilinx_v2023.2" +BR2_TARGET_ZYNQMP_FIRMWARE_CUSTOM_CFLAGS="-DBOARD_SHUTDOWN_PIN=2 -DBOARD_SHUTDOWN_PIN_STATE=0 -DENABLE_EM -DENABLE_MOD_OVERTEMP -DENABLE_DYNAMIC_MIO_CONFIG -DENABLE_IOCTL -DCONNECT_PMU_GPO_2_VAL=0" BR2_TARGET_UBOOT_ZYNQMP_PM_CFG="board/zynqmp/kria/kr260/pm_cfg_obj.c" BR2_TARGET_UBOOT_FORMAT_ITB=y BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
configs/zynqmp_kria_kv260_defconfig +3 -1
@@ -32,7 +32,9 @@ BR2_TARGET_UBOOT_NEEDS_GNUTLS=y BR2_TARGET_UBOOT_SPL=y BR2_TARGET_UBOOT_SPL_NAME="spl/boot.bin" BR2_TARGET_UBOOT_ZYNQMP=y -BR2_TARGET_UBOOT_ZYNQMP_PMUFW="https://github.com/Xilinx/soc-prebuilt-firmware/raw/xilinx_v2023.2/kv260-kria/pmufw.elf" +BR2_TARGET_UBOOT_ZYNQMP_PMUFW_SOURCE=y +BR2_TARGET_ZYNQMP_FIRMWARE_VERSION="xilinx_v2023.2" +BR2_TARGET_ZYNQMP_FIRMWARE_CUSTOM_CFLAGS="-DBOARD_SHUTDOWN_PIN=2 -DBOARD_SHUTDOWN_PIN_STATE=0 -DENABLE_EM -DENABLE_MOD_OVERTEMP -DENABLE_DYNAMIC_MIO_CONFIG -DENABLE_IOCTL -DCONNECT_PMU_GPO_2_VAL=0" BR2_TARGET_UBOOT_ZYNQMP_PM_CFG="board/zynqmp/kria/kv260/pm_cfg_obj.c" BR2_TARGET_UBOOT_FORMAT_ITB=y BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
configs/zynqmp_zcu102_defconfig +2 -1
@@ -30,7 +30,8 @@ BR2_TARGET_UBOOT_NEEDS_GNUTLS=y BR2_TARGET_UBOOT_SPL=y BR2_TARGET_UBOOT_SPL_NAME="spl/boot.bin" BR2_TARGET_UBOOT_ZYNQMP=y -BR2_TARGET_UBOOT_ZYNQMP_PMUFW="https://github.com/Xilinx/soc-prebuilt-firmware/raw/xilinx_v2023.2/zcu102-zynqmp/pmufw.elf" +BR2_TARGET_UBOOT_ZYNQMP_PMUFW_SOURCE=y +BR2_TARGET_ZYNQMP_FIRMWARE_VERSION="xilinx_v2023.2" BR2_TARGET_UBOOT_ZYNQMP_PM_CFG="board/zynqmp/zcu102/pm_cfg_obj.c" BR2_TARGET_UBOOT_FORMAT_ITB=y BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
configs/zynqmp_zcu104_defconfig +2 -1
@@ -30,7 +30,8 @@ BR2_TARGET_UBOOT_NEEDS_GNUTLS=y BR2_TARGET_UBOOT_SPL=y BR2_TARGET_UBOOT_SPL_NAME="spl/boot.bin" BR2_TARGET_UBOOT_ZYNQMP=y -BR2_TARGET_UBOOT_ZYNQMP_PMUFW="https://github.com/Xilinx/soc-prebuilt-firmware/raw/xilinx_v2023.2/zcu104-zynqmp/pmufw.elf" +BR2_TARGET_UBOOT_ZYNQMP_PMUFW_SOURCE=y +BR2_TARGET_ZYNQMP_FIRMWARE_VERSION="xilinx_v2023.2" BR2_TARGET_UBOOT_ZYNQMP_PM_CFG="board/zynqmp/zcu104/pm_cfg_obj.c" BR2_TARGET_UBOOT_FORMAT_ITB=y BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
configs/zynqmp_zcu106_defconfig +2 -1
@@ -30,7 +30,8 @@ BR2_TARGET_UBOOT_NEEDS_GNUTLS=y BR2_TARGET_UBOOT_SPL=y BR2_TARGET_UBOOT_SPL_NAME="spl/boot.bin" BR2_TARGET_UBOOT_ZYNQMP=y -BR2_TARGET_UBOOT_ZYNQMP_PMUFW="https://github.com/Xilinx/soc-prebuilt-firmware/raw/xilinx_v2023.2/zcu106-zynqmp/pmufw.elf" +BR2_TARGET_UBOOT_ZYNQMP_PMUFW_SOURCE=y +BR2_TARGET_ZYNQMP_FIRMWARE_VERSION="xilinx_v2023.2" BR2_TARGET_UBOOT_ZYNQMP_PM_CFG="board/zynqmp/zcu106/pm_cfg_obj.c" BR2_TARGET_UBOOT_FORMAT_ITB=y BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v11 3/6] configs/zynqmp*: build pmufw source
Quoted 11 lines · On Mon, 4 Mar 2024 07:41:37 +0000 Neal Frager <[email protected]> wrote:
From: Neal Frager <[email protected]>
To: <[email protected]>
CC: <[email protected]>, <[email protected]>, <[email protected]>, <[email protected]>, <[email protected]>, Neal Frager <[email protected]>
Subject: [PATCH v11 3/6] configs/zynqmp*: build pmufw source
Date: Mon, 4 Mar 2024 07:41:37 +0000
X-Mailer: git-send-email 2.25.1This patch migrates the zynqmp config files to use the new zynqmp-firmware package for building the zynqmp pmufw from source.
Signed-off-by Neal Frager <[email protected]>
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
PATCH v11 4/6 boot/versal-firmware: new boot firmware
In reply to Neal Frager via buildrootThis patch adds a new boot firmware to buildroot for building the versal plm and psmfw. It requires the toolchain-bare-metal package that includes a bare-metal binutils, gcc and newlib which can be built for the microblaze architecture.
---V4->V5:
- automatically select bootgen as a needed tool
- reduce all lines to <80 chars
- add help for PDI file location which could be URL or localV5->V6:
- migrated to toolchain-bare-metal-buildrootV6->V7:
- removed patch numbers
- changed dependency to toolchain-bare-metal-buildroot
- removed hash since version is configurableV7->V9:
- no changesV9->V10:
- removed patches for supporting versions older than xilinx_v2023.2
V10-V11:
- set default BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH to "microblazeel-xilinx-elf" to avoid stand-alone build failure
--- DEVELOPERS | 1 + boot/Config.in | 1 + boot/versal-firmware/Config.in | 38 ++++++++++++++ boot/versal-firmware/versal-firmware.mk | 52 +++++++++++++++++++ .../toolchain-bare-metal-buildroot/Config.in | 1 + 5 files changed, 93 insertions(+) create mode 100644 boot/versal-firmware/Config.in create mode 100644 boot/versal-firmware/versal-firmware.mk
DEVELOPERS +1 -0
@@ -2283,6 +2283,7 @@ N: Neal Frager <[email protected]> F: board/versal/ F: board/zynq/ F: board/zynqmp/ +F: boot/versal-firmware/ F: boot/zynqmp-firmware/ F: configs/versal_vck190_defconfig F: configs/zynq_zc702_defconfig
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" source "boot/zynqmp-firmware/Config.in"
boot/versal-firmware/Config.in new file +38 -0
@@ -0,0 +1,38 @@ +config BR2_TARGET_VERSAL_FIRMWARE + bool "versal-firmware" + select BR2_PACKAGE_HOST_BOOTGEN + select BR2_TOOLCHAIN_BARE_METAL_BUILDROOT + 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.2" + help + Release version of versal firmware. + Only versions xilinx_v2023.2 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.2/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. + + The location of the PDI can be either a URL for download or a file + in the local repository. + + 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.mk new file +52 -0
52 lines not on this page · raw message
toolchain/toolchain-bare-metal-buildroot/Config.in +1 -0
@@ -2,6 +2,7 @@ if BR2_TOOLCHAIN_BARE_METAL_BUILDROOT config BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH string "architecture tuple" + default "microblazeel-xilinx-elf" if BR2_TARGET_VERSAL_FIRMWARE default "microblazeel-xilinx-elf" if BR2_TARGET_ZYNQMP_FIRMWARE help This option allows to define the architecture tuple for the
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v11 4/6] boot/versal-firmware: new boot firmware
Quoted 6 lines · On Mon, 4 Mar 2024 07:41:38 +0000 Neal Frager <[email protected]> wrote:
This patch adds a new boot firmware to buildroot for building the versal plm and psmfw. It requires the toolchain-bare-metal package that includes a bare-metal binutils, gcc and newlib which can be built for the microblaze architecture.
Signed-off-by Neal Frager <[email protected]>
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
PATCH v11 5/6 configs/versal_vck190_defconfig: build plm and psmfw source
In reply to Neal Frager via buildrootThis patch migrates the versal_vck190_defconfig to use the new versal-firmware package for building the versal plm and psmfw from source.
---V4->V5:
- bootgen is selected automatically nowV5->V7:
- no changesV7->V8:
- bump to xilinx_v2023.2V8->V9:
- add BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH definitionV9->V10:
- no changesV10->V11:
- BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH is set by versal-firmware
--- configs/versal_vck190_defconfig | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
configs/versal_vck190_defconfig +3 -4
@@ -32,11 +32,10 @@ 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.2" -BR2_PACKAGE_VERSAL_FIRMWARE_BOARD="vck190" +BR2_TARGET_VERSAL_FIRMWARE=y +BR2_TARGET_VERSAL_FIRMWARE_VERSION="xilinx_v2023.2" +BR2_TARGET_VERSAL_FIRMWARE_PDI="https://github.com/Xilinx/soc-prebuilt-firmware/raw/xilinx_v2023.2/vck190-versal/vpl_gen_fixed.pdi" BR2_PACKAGE_HOST_DOSFSTOOLS=y BR2_PACKAGE_HOST_GENIMAGE=y BR2_PACKAGE_HOST_MTOOLS=y -BR2_PACKAGE_HOST_BOOTGEN=y BR2_GLOBAL_PATCH_DIR="board/versal/patches"
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v11 5/6] configs/versal_vck190_defconfig: build plm and psmfw source
Quoted 11 lines · On Mon, 4 Mar 2024 07:41:39 +0000 Neal Frager <[email protected]> wrote:
From: Neal Frager <[email protected]>
To: <[email protected]>
CC: <[email protected]>, <[email protected]>, <[email protected]>, <[email protected]>, <[email protected]>, Neal Frager <[email protected]>
Subject: [PATCH v11 5/6] configs/versal_vck190_defconfig: build plm and psmfw source
Date: Mon, 4 Mar 2024 07:41:39 +0000
X-Mailer: git-send-email 2.25.1This patch migrates the
versal_vck190_defconfigto use the new versal-firmware package for building the versal plm and psmfw from source.Signed-off-by Neal Frager <[email protected]>
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
PATCH v11 6/6 package/versal-firmware: remove package
In reply to Neal Frager via buildrootThis patch removes the package/versal-firmware as this package is replaced by the boot/versal-firmware target boot firmware package for versal.
---V4->V11:
- no changes
--- DEVELOPERS | 1 - package/Config.in | 1 - package/versal-firmware/Config.in | 24 ---------------------- package/versal-firmware/versal-firmware.mk | 21 ------------------- 4 files changed, 47 deletions(-) delete mode 100644 package/versal-firmware/Config.in delete mode 100644 package/versal-firmware/versal-firmware.mk
DEVELOPERS +0 -1
@@ -2298,7 +2298,6 @@ F: package/binutils-bare-metal/ F: package/bootgen/ F: package/gcc-bare-metal/ F: package/newlib-bare-metal/ -F: package/versal-firmware/ F: toolchain/toolchain-bare-metal-buildroot/ N: Nicola Di Lieto <[email protected]>
package/Config.in +0 -1
@@ -457,7 +457,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
Re: [Buildroot] [PATCH v11 6/6] package/versal-firmware: remove package
Quoted 4 lines · On Mon, 4 Mar 2024 07:41:40 +0000 Neal Frager <[email protected]> wrote:
This patch removes the package/versal-firmware as this package is replaced by the boot/versal-firmware target boot firmware package for versal.
Signed-off-by Neal Frager <[email protected]>
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
Quoted 5 lines · On Mon, 4 Mar 2024 07:41:35 +0000 Neal Frager <[email protected]> wrote:
This patch adds a new boot firmware to buildroot for building the zynqmp pmufw. It requires the toolchain-bare-metal package that includes a bare-metal binutils, gcc and newlib which can be built for the microblaze architecture.
Signed-off-by Neal Frager <[email protected]>
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
Hello everyone,
Quoted 9 lines
This patch adds a new boot firmware to buildroot for building the zynqmp pmufw. It requires the toolchain-bare-metal package that includes a bare-metal binutils, gcc and newlib which can be built for the microblaze architecture.
Signed-off-by Neal Frager <[email protected]>[Tested on Kria KV260 starter kit]Tested-by Luca Ceresoli <[email protected]>Reviewed-by Luca Ceresoli <[email protected]>
Any other feedback regarding this patch set?
Best regards,
Neal Frager
AMD
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Peter,
Quoted 9 lines
This patch adds a new boot firmware to buildroot for building the zynqmp pmufw. It requires the toolchain-bare-metal package that includes a bare-metal binutils, gcc and newlib which can be built for the microblaze architecture.
Signed-off-by Neal Frager <[email protected]>[Tested on Kria KV260 starter kit]Tested-by Luca Ceresoli <[email protected]>Reviewed-by Luca Ceresoli <[email protected]>
Do you have any thoughts on this patch set?
Best regards,
Neal Frager
AMD
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Neal, All,
I had a quick look, and there is something I don;t really like...
On 2024-03-04 07:41 +0000, Neal Frager via buildroot spake thusly:
Quoted 3 lines
This patch adds a new boot firmware to buildroot for building the zynqmp pmufw. It requires the toolchain-bare-metal package that includes a bare-metal binutils, gcc and newlib which can be built for the microblaze architecture.
[--SNIP--]
boot/zynqmp-firmware/Config.in line 3
Quoted 9 lines
boot/zynqmp-firmware/Config.in new file +3
-0@@ -0,0 +1,22 @@ +config BR2_TARGET_ZYNQMP_FIRMWARE + bool "zynqmp-firmware" + select BR2_TOOLCHAIN_BARE_METAL_BUILDROOT
This and [0]...
[--SNIP--]
boot/zynqmp-firmware/zynqmp-firmware.mk
Quoted 6 lines
boot/zynqmp-firmware/zynqmp-firmware.mk new file +0
-0@@ -0,0 +1,33 @@
[--SNIP--]
boot/zynqmp-firmware/zynqmp-firmware.mk line 27
Quoted 1 line
boot/zynqmp-firmware/zynqmp-firmware.mk new file +1
-0+ZYNQMP_PMUFW = $(@D)/lib/sw_apps/zynqmp_pmufw/src/executable.elf
$ ./utils/docker-run make check-package
boot/zynqmp-firmware/zynqmp-firmware.mk:27: possible typo: ZYNQMP_PMUFW -> *ZYNQMP_FIRMWARE*[--SNIP--]
toolchain/toolchain-bare-metal-buildroot/Config.in if BR2_TOOLCHAIN_BARE_METAL_BUILDROOT · line 5
Quoted 9 lines
toolchain/toolchain-bare-metal-buildroot/Config.in +1
-0@@ -2,6 +2,7 @@ if BR2_TOOLCHAIN_BARE_METAL_BUILDROOT config BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH string "architecture tuple" + default "microblazeel-xilinx-elf" if BR2_TARGET_ZYNQMP_FIRMWARE
...[0] this are smelly to me.
It wokrs in your specific case, because all you do is target a microblazeel-xilinx-elf and zynqmp-firmware is the first package that depends on a bare-metal toolchain to be built [2]
But nothign prevents other situations:
- user manually changes BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH to another tuple, e.g. arm-gnu
- another package does sopmething similar with another tuple, like
riscv64-elf
The bare-metal toolchain can currently be built only for one and only one tuple, so this can't work nicely.
Instead, I think we should go another rooute:
config BR2_TARGET_ZYNQMP_FIRMWARE
bool "zynqmp-firmware"
depends on BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_TUPLE = "microblazeel-xilinx-elf"
comment "zynqmp-firmware needs a bare metal toolchain for tuple microblazeel-xilinx-elf"
depends on BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_TUPLE != "microblazeel-xilinx-elf"
[2] Note that we already have a few pre-built bare-metal toolchains:
- package/arm-gnu-toolchain/ package/riscv64-elf-toolchain/
So it is not unconceivalbe that at some point we will want to be able to actually build suhc toolchains...
Regards,
Yann E. MORIN.
Quoted 10 lines
toolchain/toolchain-bare-metal-buildroot/Config.in +0
-0help This option allows to define the architecture tuple for the bare-metal toolchain.Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Yann,
Quoted 1 line
I had a quick look, and there is something I don;t really like...
Thank you for your review.
Quoted 3 lines
This patch adds a new boot firmware to buildroot for building the zynqmp pmufw. It requires the toolchain-bare-metal package that includes a bare-metal binutils, gcc and newlib which can be built for the microblaze architecture.
[--SNIP--]
Quoted 11 lines
boot/zynqmp-firmware/Config.in new file +3
-0@@ -0,0 +1,22 @@ +config BR2_TARGET_ZYNQMP_FIRMWARE + bool "zynqmp-firmware" + select BR2_TOOLCHAIN_BARE_METAL_BUILDROOTThis and [0]...
Ok. Feedback at the end.
[--SNIP--]
Quoted 11 lines
boot/zynqmp-firmware/zynqmp-firmware.mk new file +0
-0@@ -0,0 +1,33 @@[--SNIP--]
+ZYNQMP_PMUFW = $(@D)/lib/sw_apps/zynqmp_pmufw/src/executable.elf$ ./utils/docker-run make check-package boot/zynqmp-firmware/zynqmp-firmware.mk:27: possible typo: ZYNQMP_PMUFW -> *ZYNQMP_FIRMWARE*
No problem on this. I will change the variable name to ZYNQMP_FIRMWARE.
Quoted 34 lines
[--SNIP--]
toolchain/toolchain-bare-metal-buildroot/Config.in +1
-0@@ -2,6 +2,7 @@ if BR2_TOOLCHAIN_BARE_METAL_BUILDROOT config BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH string "architecture tuple" + default "microblazeel-xilinx-elf" if BR2_TARGET_ZYNQMP_FIRMWARE...[0] this are smelly to me.
It wokrs in your specific case, because all you do is target a microblazeel-xilinx-elf and zynqmp-firmware is the first package that depends on a bare-metal toolchain to be built [2]
But nothign prevents other situations:
- user manually changes
BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCHto another tuple, e.g. arm-gnu- another package does sopmething similar with another tuple, like riscv64-elf
The bare-metal toolchain can currently be built only for one and only one tuple, so this can't work nicely.
Instead, I think we should go another rooute:
config
BR2_TARGET_ZYNQMP_FIRMWARE
bool "zynqmp-firmware"
depends onBR2_TOOLCHAIN_BARE_METAL_BUILDROOT_TUPLE= "microblazeel-xilinx-elf"
Quoted 8 lines
comment "zynqmp-firmware needs a bare metal toolchain for tuple microblazeel-xilinx-elf"
depends on BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_TUPLE != "microblazeel-xilinx-elf"[2] Note that we already have a few pre-built bare-metal toolchains:
- package/arm-gnu-toolchain/ package/riscv64-elf-toolchain/
So it is not unconceivalbe that at some point we will want to be able to actually build suhc toolchains...
You raise a good point about a user building the bare-metal toolchain for a different target. I did not think about this, as I was focused on the Xilinx use case of needing a microblaze bare-metal toolchain only.
I will incorporate your change in the next version.
However, I do want to add a note. Xilinx has just released a new microblaze-v processor core. It is like a microblaze in that it has all the same memory and peripheral connections, but uses a risc-v instruction set.
https://www.xilinx.com/products/design-tools/microblaze-v.html
With this release, I can imagine use cases where users will have a risc-v soft core in the zynqmp and versal products, so they very well may want to have two bare-metal toolchains. One for the hardened microblaze cores for boot firmware and another for risc-v application software.
Perhaps we should start thinking of a solution for users who may want multiple bare-metal toolchains?
Best regards,
Neal Frager
AMD
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot