* [Buildroot] [PATCH v11 2/6] boot/uboot.mk: new zynqmp pmufw build option
2024-03-04 7:41 [Buildroot] [PATCH v11 1/6] boot/zynqmp-firmware: new boot firmware Neal Frager via buildroot
@ 2024-03-04 7:41 ` Neal Frager via buildroot
2024-03-08 21:45 ` Luca Ceresoli via buildroot
2024-03-04 7:41 ` [Buildroot] [PATCH v11 3/6] configs/zynqmp*: build pmufw source Neal Frager via buildroot
` (5 subsequent siblings)
6 siblings, 1 reply; 16+ messages in thread
From: Neal Frager via buildroot @ 2024-03-04 7:41 UTC (permalink / raw)
To: buildroot
Cc: ibai.erkiaga-elorza, luca.ceresoli, thomas.petazzoni, Neal Frager,
michal.simek
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.
Signed-off-by: Neal Frager <neal.frager@amd.com>
---
V1->V2:
- patch is now backwards compatible for users already using the
BR2_TARGET_UBOOT_ZYNQMP_PMUFW config for downloading a prebuilt pmufw
V2->V3:
- no changes
V3->V4:
- BR2_TARGET_UBOOT_ZYNQMP_PMUFW removed when
BR2_TARGET_UBOOT_ZYNQMP_PMUFW_SOURCE selected
V4->V11:
- no changes
---
boot/uboot/Config.in | 19 +++++++++++++++++--
boot/uboot/uboot.mk | 5 +++++
2 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
index beafb38930..c5e33944d5 100644
--- a/boot/uboot/Config.in
+++ b/boot/uboot/Config.in
@@ -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
diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index dda606a880..c11e3d89f7 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -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)
--
2.25.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [Buildroot] [PATCH v11 2/6] boot/uboot.mk: new zynqmp pmufw build option
2024-03-04 7:41 ` [Buildroot] [PATCH v11 2/6] boot/uboot.mk: new zynqmp pmufw build option Neal Frager via buildroot
@ 2024-03-08 21:45 ` Luca Ceresoli via buildroot
0 siblings, 0 replies; 16+ messages in thread
From: Luca Ceresoli via buildroot @ 2024-03-08 21:45 UTC (permalink / raw)
To: Neal Frager
Cc: ibai.erkiaga-elorza, michal.simek, thomas.petazzoni, buildroot
On Mon, 4 Mar 2024 07:41:36 +0000
Neal Frager <neal.frager@amd.com> wrote:
> 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.
>
> Signed-off-by: Neal Frager <neal.frager@amd.com>
[Tested on Kria KV260 starter kit]
Tested-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH v11 3/6] configs/zynqmp*: build pmufw source
2024-03-04 7:41 [Buildroot] [PATCH v11 1/6] boot/zynqmp-firmware: new boot firmware Neal Frager via buildroot
2024-03-04 7:41 ` [Buildroot] [PATCH v11 2/6] boot/uboot.mk: new zynqmp pmufw build option Neal Frager via buildroot
@ 2024-03-04 7:41 ` Neal Frager via buildroot
2024-03-08 21:45 ` Luca Ceresoli via buildroot
2024-03-04 7:41 ` [Buildroot] [PATCH v11 4/6] boot/versal-firmware: new boot firmware Neal Frager via buildroot
` (4 subsequent siblings)
6 siblings, 1 reply; 16+ messages in thread
From: Neal Frager via buildroot @ 2024-03-04 7:41 UTC (permalink / raw)
To: buildroot
Cc: ibai.erkiaga-elorza, luca.ceresoli, thomas.petazzoni, Neal Frager,
michal.simek
This 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 <neal.frager@amd.com>
---
V4->V7:
- no changes
V7->V8:
- bump to xilinx_v2023.2
V8->V9:
- add the new zynqmp defconfigs
- add BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH definition
V9->V10:
- no changes
V10->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(-)
diff --git a/configs/zynqmp_kria_kd240_defconfig b/configs/zynqmp_kria_kd240_defconfig
index 78302a48c0..908ded1d97 100644
--- a/configs/zynqmp_kria_kd240_defconfig
+++ b/configs/zynqmp_kria_kd240_defconfig
@@ -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
diff --git a/configs/zynqmp_kria_kr260_defconfig b/configs/zynqmp_kria_kr260_defconfig
index 2089c3f355..73b0a641e0 100644
--- a/configs/zynqmp_kria_kr260_defconfig
+++ b/configs/zynqmp_kria_kr260_defconfig
@@ -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
diff --git a/configs/zynqmp_kria_kv260_defconfig b/configs/zynqmp_kria_kv260_defconfig
index a3a157267c..0151b364d6 100644
--- a/configs/zynqmp_kria_kv260_defconfig
+++ b/configs/zynqmp_kria_kv260_defconfig
@@ -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
diff --git a/configs/zynqmp_zcu102_defconfig b/configs/zynqmp_zcu102_defconfig
index c920093d8d..bdd85ab7d3 100644
--- a/configs/zynqmp_zcu102_defconfig
+++ b/configs/zynqmp_zcu102_defconfig
@@ -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
diff --git a/configs/zynqmp_zcu104_defconfig b/configs/zynqmp_zcu104_defconfig
index 452f2343c8..7e341c571b 100644
--- a/configs/zynqmp_zcu104_defconfig
+++ b/configs/zynqmp_zcu104_defconfig
@@ -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
diff --git a/configs/zynqmp_zcu106_defconfig b/configs/zynqmp_zcu106_defconfig
index 011c7f0fae..554e62fb05 100644
--- a/configs/zynqmp_zcu106_defconfig
+++ b/configs/zynqmp_zcu106_defconfig
@@ -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
--
2.25.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [Buildroot] [PATCH v11 3/6] configs/zynqmp*: build pmufw source
2024-03-04 7:41 ` [Buildroot] [PATCH v11 3/6] configs/zynqmp*: build pmufw source Neal Frager via buildroot
@ 2024-03-08 21:45 ` Luca Ceresoli via buildroot
0 siblings, 0 replies; 16+ messages in thread
From: Luca Ceresoli via buildroot @ 2024-03-08 21:45 UTC (permalink / raw)
To: Neal Frager
Cc: ibai.erkiaga-elorza, michal.simek, thomas.petazzoni, buildroot
On Mon, 4 Mar 2024 07:41:37 +0000
Neal Frager <neal.frager@amd.com> wrote:
> From: Neal Frager <neal.frager@amd.com>
> To: <buildroot@buildroot.org>
> CC: <luca.ceresoli@bootlin.com>, <thomas.petazzoni@bootlin.com>, <peter@korsgaard.com>, <michal.simek@amd.com>, <ibai.erkiaga-elorza@amd.com>, Neal Frager <neal.frager@amd.com>
> 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.1
>
> This 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 <neal.frager@amd.com>
[Tested on Kria KV260 starter kit]
Tested-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH v11 4/6] boot/versal-firmware: new boot firmware
2024-03-04 7:41 [Buildroot] [PATCH v11 1/6] boot/zynqmp-firmware: new boot firmware Neal Frager via buildroot
2024-03-04 7:41 ` [Buildroot] [PATCH v11 2/6] boot/uboot.mk: new zynqmp pmufw build option Neal Frager via buildroot
2024-03-04 7:41 ` [Buildroot] [PATCH v11 3/6] configs/zynqmp*: build pmufw source Neal Frager via buildroot
@ 2024-03-04 7:41 ` Neal Frager via buildroot
2024-03-08 21:45 ` Luca Ceresoli via buildroot
2024-03-04 7:41 ` [Buildroot] [PATCH v11 5/6] configs/versal_vck190_defconfig: build plm and psmfw source Neal Frager via buildroot
` (3 subsequent siblings)
6 siblings, 1 reply; 16+ messages in thread
From: Neal Frager via buildroot @ 2024-03-04 7:41 UTC (permalink / raw)
To: buildroot
Cc: ibai.erkiaga-elorza, luca.ceresoli, thomas.petazzoni, Neal Frager,
michal.simek
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 <neal.frager@amd.com>
---
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 local
V5->V6:
- migrated to toolchain-bare-metal-buildroot
V6->V7:
- removed patch numbers
- changed dependency to toolchain-bare-metal-buildroot
- removed hash since version is configurable
V7->V9:
- no changes
V9->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
diff --git a/DEVELOPERS b/DEVELOPERS
index b677d9cd5b..fa3424074e 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2283,6 +2283,7 @@ N: Neal Frager <neal.frager@amd.com>
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
diff --git a/boot/Config.in b/boot/Config.in
index c7478fef2e..da5ccb6b9c 100644
--- a/boot/Config.in
+++ b/boot/Config.in
@@ -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"
diff --git a/boot/versal-firmware/Config.in b/boot/versal-firmware/Config.in
new file mode 100644
index 0000000000..cda72c7704
--- /dev/null
+++ b/boot/versal-firmware/Config.in
@@ -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
diff --git a/boot/versal-firmware/versal-firmware.mk b/boot/versal-firmware/versal-firmware.mk
new file mode 100644
index 0000000000..fa932510a1
--- /dev/null
+++ b/boot/versal-firmware/versal-firmware.mk
@@ -0,0 +1,52 @@
+################################################################################
+#
+# versal-firmware
+#
+################################################################################
+
+VERSAL_FIRMWARE_VERSION = $(call qstrip,$(BR2_TARGET_VERSAL_FIRMWARE_VERSION))
+VERSAL_FIRMWARE_SITE = \
+ $(call github,Xilinx,embeddedsw,$(VERSAL_FIRMWARE_VERSION))
+VERSAL_FIRMWARE_LICENSE = MIT
+VERSAL_FIRMWARE_LICENSE_FILES = license.txt
+VERSAL_FIRMWARE_INSTALL_IMAGES = YES
+VERSAL_FIRMWARE_INSTALL_TARGET = NO
+VERSAL_FIRMWARE_DEPENDENCIES = toolchain-bare-metal-buildroot
+
+CUSTOM_CFLAGS = $(call qstrip,$(BR2_TARGET_VERSAL_FIRMWARE_CUSTOM_CFLAGS))
+VERSAL_FIRMWARE_CFLAGS = "-Os -flto -ffat-lto-objects $(CUSTOM_CFLAGS)"
+
+VERSAL_FIRMWARE_PDI = $(call qstrip,$(BR2_TARGET_VERSAL_FIRMWARE_PDI))
+
+ifneq ($(findstring ://,$(VERSAL_FIRMWARE_PDI)),)
+VERSAL_FIRMWARE_EXTRA_DOWNLOADS = $(VERSAL_FIRMWARE_PDI)
+BR_NO_CHECK_HASH_FOR += $(notdir $(VERSAL_FIRMWARE_PDI))
+VERSAL_PDI = $(VERSAL_FIRMWARE_DL_DIR)/$(notdir $(VERSAL_FIRMWARE_PDI))
+else ifneq ($(VERSAL_FIRMWARE_PDI),)
+VERSAL_PDI = $(shell readlink -f $(VERSAL_FIRMWARE_PDI))
+endif #VERSAL_FIRMWARE_PDI
+
+define VERSAL_FIRMWARE_BUILD_CMDS
+ $(MAKE) -C $(@D)/lib/sw_apps/versal_plm/src/versal \
+ 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=$(VERSAL_FIRMWARE_CFLAGS)
+
+ $(MAKE) -C $(@D)/lib/sw_apps/versal_psmfw/src/versal \
+ 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=$(VERSAL_FIRMWARE_CFLAGS)
+endef
+
+VERSAL_PLM = $(@D)/lib/sw_apps/versal_plm/src/versal/plm.elf
+VERSAL_PSMFW = $(@D)/lib/sw_apps/versal_psmfw/src/versal/psmfw.elf
+
+define VERSAL_FIRMWARE_INSTALL_IMAGES_CMDS
+ $(INSTALL) -D -m 0755 $(VERSAL_PLM) $(BINARIES_DIR)/plm.elf
+ $(INSTALL) -D -m 0755 $(VERSAL_PSMFW) $(BINARIES_DIR)/psmfw.elf
+ $(INSTALL) -D -m 0755 $(VERSAL_PDI) $(BINARIES_DIR)/vpl_gen_fixed.pdi
+endef
+
+$(eval $(generic-package))
diff --git a/toolchain/toolchain-bare-metal-buildroot/Config.in b/toolchain/toolchain-bare-metal-buildroot/Config.in
index 7d33a68c5c..1a15558371 100644
--- a/toolchain/toolchain-bare-metal-buildroot/Config.in
+++ b/toolchain/toolchain-bare-metal-buildroot/Config.in
@@ -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
--
2.25.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 16+ messages in thread* [Buildroot] [PATCH v11 5/6] configs/versal_vck190_defconfig: build plm and psmfw source
2024-03-04 7:41 [Buildroot] [PATCH v11 1/6] boot/zynqmp-firmware: new boot firmware Neal Frager via buildroot
` (2 preceding siblings ...)
2024-03-04 7:41 ` [Buildroot] [PATCH v11 4/6] boot/versal-firmware: new boot firmware Neal Frager via buildroot
@ 2024-03-04 7:41 ` Neal Frager via buildroot
2024-03-08 21:46 ` Luca Ceresoli via buildroot
2024-03-04 7:41 ` [Buildroot] [PATCH v11 6/6] package/versal-firmware: remove package Neal Frager via buildroot
` (2 subsequent siblings)
6 siblings, 1 reply; 16+ messages in thread
From: Neal Frager via buildroot @ 2024-03-04 7:41 UTC (permalink / raw)
To: buildroot
Cc: ibai.erkiaga-elorza, luca.ceresoli, thomas.petazzoni, Neal Frager,
michal.simek
This patch migrates the versal_vck190_defconfig to use the new
versal-firmware package for building the versal plm and psmfw from source.
Signed-off-by: Neal Frager <neal.frager@amd.com>
---
V4->V5:
- bootgen is selected automatically now
V5->V7:
- no changes
V7->V8:
- bump to xilinx_v2023.2
V8->V9:
- add BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH definition
V9->V10:
- no changes
V10->V11:
- BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH is set by versal-firmware
---
configs/versal_vck190_defconfig | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/configs/versal_vck190_defconfig b/configs/versal_vck190_defconfig
index 8561b6641a..d59e23792c 100644
--- a/configs/versal_vck190_defconfig
+++ b/configs/versal_vck190_defconfig
@@ -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"
--
2.25.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [Buildroot] [PATCH v11 5/6] configs/versal_vck190_defconfig: build plm and psmfw source
2024-03-04 7:41 ` [Buildroot] [PATCH v11 5/6] configs/versal_vck190_defconfig: build plm and psmfw source Neal Frager via buildroot
@ 2024-03-08 21:46 ` Luca Ceresoli via buildroot
0 siblings, 0 replies; 16+ messages in thread
From: Luca Ceresoli via buildroot @ 2024-03-08 21:46 UTC (permalink / raw)
To: Neal Frager
Cc: ibai.erkiaga-elorza, michal.simek, thomas.petazzoni, buildroot
On Mon, 4 Mar 2024 07:41:39 +0000
Neal Frager <neal.frager@amd.com> wrote:
> From: Neal Frager <neal.frager@amd.com>
> To: <buildroot@buildroot.org>
> CC: <luca.ceresoli@bootlin.com>, <thomas.petazzoni@bootlin.com>, <peter@korsgaard.com>, <michal.simek@amd.com>, <ibai.erkiaga-elorza@amd.com>, Neal Frager <neal.frager@amd.com>
> 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.1
>
> This patch migrates the versal_vck190_defconfig to use the new
> versal-firmware package for building the versal plm and psmfw from source.
>
> Signed-off-by: Neal Frager <neal.frager@amd.com>
[Tested on Kria KV260 starter kit]
Tested-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH v11 6/6] package/versal-firmware: remove package
2024-03-04 7:41 [Buildroot] [PATCH v11 1/6] boot/zynqmp-firmware: new boot firmware Neal Frager via buildroot
` (3 preceding siblings ...)
2024-03-04 7:41 ` [Buildroot] [PATCH v11 5/6] configs/versal_vck190_defconfig: build plm and psmfw source Neal Frager via buildroot
@ 2024-03-04 7:41 ` Neal Frager via buildroot
2024-03-08 21:46 ` Luca Ceresoli via buildroot
2024-03-08 21:45 ` [Buildroot] [PATCH v11 1/6] boot/zynqmp-firmware: new boot firmware Luca Ceresoli via buildroot
2024-06-06 17:12 ` Yann E. MORIN
6 siblings, 1 reply; 16+ messages in thread
From: Neal Frager via buildroot @ 2024-03-04 7:41 UTC (permalink / raw)
To: buildroot
Cc: ibai.erkiaga-elorza, luca.ceresoli, thomas.petazzoni, Neal Frager,
michal.simek
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 <neal.frager@amd.com>
---
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
diff --git a/DEVELOPERS b/DEVELOPERS
index fa3424074e..5fb3b1f5ef 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -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 <nicola.dilieto@gmail.com>
diff --git a/package/Config.in b/package/Config.in
index bf0fe078b9..f3bcf13bb9 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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"
diff --git a/package/versal-firmware/Config.in b/package/versal-firmware/Config.in
deleted file mode 100644
index 01daefd204..0000000000
--- a/package/versal-firmware/Config.in
+++ /dev/null
@@ -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
diff --git a/package/versal-firmware/versal-firmware.mk b/package/versal-firmware/versal-firmware.mk
deleted file mode 100644
index 1ced259be1..0000000000
--- a/package/versal-firmware/versal-firmware.mk
+++ /dev/null
@@ -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))
--
2.25.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [Buildroot] [PATCH v11 1/6] boot/zynqmp-firmware: new boot firmware
2024-03-04 7:41 [Buildroot] [PATCH v11 1/6] boot/zynqmp-firmware: new boot firmware Neal Frager via buildroot
` (4 preceding siblings ...)
2024-03-04 7:41 ` [Buildroot] [PATCH v11 6/6] package/versal-firmware: remove package Neal Frager via buildroot
@ 2024-03-08 21:45 ` Luca Ceresoli via buildroot
2024-03-21 9:03 ` Frager, Neal via buildroot
2024-04-03 7:21 ` Frager, Neal via buildroot
2024-06-06 17:12 ` Yann E. MORIN
6 siblings, 2 replies; 16+ messages in thread
From: Luca Ceresoli via buildroot @ 2024-03-08 21:45 UTC (permalink / raw)
To: Neal Frager
Cc: ibai.erkiaga-elorza, michal.simek, thomas.petazzoni, buildroot
On Mon, 4 Mar 2024 07:41:35 +0000
Neal Frager <neal.frager@amd.com> 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 <neal.frager@amd.com>
[Tested on Kria KV260 starter kit]
Tested-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [Buildroot] [PATCH v11 1/6] boot/zynqmp-firmware: new boot firmware
2024-03-08 21:45 ` [Buildroot] [PATCH v11 1/6] boot/zynqmp-firmware: new boot firmware Luca Ceresoli via buildroot
@ 2024-03-21 9:03 ` Frager, Neal via buildroot
2024-04-03 7:21 ` Frager, Neal via buildroot
1 sibling, 0 replies; 16+ messages in thread
From: Frager, Neal via buildroot @ 2024-03-21 9:03 UTC (permalink / raw)
To: Luca Ceresoli, peter@korsgaard.com, buildroot@buildroot.org
Cc: Simek, Michal, thomas.petazzoni@bootlin.com, Erkiaga Elorza, Ibai
Hello everyone,
> 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 <neal.frager@amd.com>
> [Tested on Kria KV260 starter kit]
> Tested-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
> Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Any other feedback regarding this patch set?
Best regards,
Neal Frager
AMD
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Buildroot] [PATCH v11 1/6] boot/zynqmp-firmware: new boot firmware
2024-03-08 21:45 ` [Buildroot] [PATCH v11 1/6] boot/zynqmp-firmware: new boot firmware Luca Ceresoli via buildroot
2024-03-21 9:03 ` Frager, Neal via buildroot
@ 2024-04-03 7:21 ` Frager, Neal via buildroot
1 sibling, 0 replies; 16+ messages in thread
From: Frager, Neal via buildroot @ 2024-04-03 7:21 UTC (permalink / raw)
To: peter@korsgaard.com
Cc: Luca Ceresoli, Erkiaga Elorza, Ibai, Simek, Michal,
thomas.petazzoni@bootlin.com, buildroot@buildroot.org
Hi Peter,
> 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 <neal.frager@amd.com>
> [Tested on Kria KV260 starter kit]
> Tested-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
> Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Do you have any thoughts on this patch set?
Best regards,
Neal Frager
AMD
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Buildroot] [PATCH v11 1/6] boot/zynqmp-firmware: new boot firmware
2024-03-04 7:41 [Buildroot] [PATCH v11 1/6] boot/zynqmp-firmware: new boot firmware Neal Frager via buildroot
` (5 preceding siblings ...)
2024-03-08 21:45 ` [Buildroot] [PATCH v11 1/6] boot/zynqmp-firmware: new boot firmware Luca Ceresoli via buildroot
@ 2024-06-06 17:12 ` Yann E. MORIN
2024-06-07 6:29 ` Frager, Neal via buildroot
6 siblings, 1 reply; 16+ messages in thread
From: Yann E. MORIN @ 2024-06-06 17:12 UTC (permalink / raw)
To: Neal Frager
Cc: michal.simek, ibai.erkiaga-elorza, luca.ceresoli,
thomas.petazzoni, 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:
> 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--]
> diff --git a/boot/zynqmp-firmware/Config.in b/boot/zynqmp-firmware/Config.in
> new file mode 100644
> index 0000000000..d68ec2cf6a
> --- /dev/null
> +++ b/boot/zynqmp-firmware/Config.in
> @@ -0,0 +1,22 @@
> +config BR2_TARGET_ZYNQMP_FIRMWARE
> + bool "zynqmp-firmware"
> + select BR2_TOOLCHAIN_BARE_METAL_BUILDROOT
This and [0]...
[--SNIP--]
> diff --git a/boot/zynqmp-firmware/zynqmp-firmware.mk b/boot/zynqmp-firmware/zynqmp-firmware.mk
> new file mode 100644
> index 0000000000..383d888fba
> --- /dev/null
> +++ b/boot/zynqmp-firmware/zynqmp-firmware.mk
> @@ -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*
[--SNIP--]
> diff --git a/toolchain/toolchain-bare-metal-buildroot/Config.in b/toolchain/toolchain-bare-metal-buildroot/Config.in
> index 6fe969357f..7d33a68c5c 100644
> --- a/toolchain/toolchain-bare-metal-buildroot/Config.in
> +++ b/toolchain/toolchain-bare-metal-buildroot/Config.in
> @@ -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.
> help
> This option allows to define the architecture tuple for the
> bare-metal toolchain.
> --
> 2.25.1
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| 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
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [Buildroot] [PATCH v11 1/6] boot/zynqmp-firmware: new boot firmware
2024-06-06 17:12 ` Yann E. MORIN
@ 2024-06-07 6:29 ` Frager, Neal via buildroot
0 siblings, 0 replies; 16+ messages in thread
From: Frager, Neal via buildroot @ 2024-06-07 6:29 UTC (permalink / raw)
To: Yann E. MORIN
Cc: Simek, Michal, Erkiaga Elorza, Ibai, luca.ceresoli@bootlin.com,
thomas.petazzoni@bootlin.com, buildroot@buildroot.org
Hi Yann,
> I had a quick look, and there is something I don;t really like...
Thank you for your review.
> 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--]
> diff --git a/boot/zynqmp-firmware/Config.in b/boot/zynqmp-firmware/Config.in
> new file mode 100644
> index 0000000000..d68ec2cf6a
> --- /dev/null
> +++ b/boot/zynqmp-firmware/Config.in
> @@ -0,0 +1,22 @@
> +config BR2_TARGET_ZYNQMP_FIRMWARE
> + bool "zynqmp-firmware"
> + select BR2_TOOLCHAIN_BARE_METAL_BUILDROOT
> This and [0]...
Ok. Feedback at the end.
[--SNIP--]
> diff --git a/boot/zynqmp-firmware/zynqmp-firmware.mk b/boot/zynqmp-firmware/zynqmp-firmware.mk
> new file mode 100644
> index 0000000000..383d888fba
> --- /dev/null
> +++ b/boot/zynqmp-firmware/zynqmp-firmware.mk
> @@ -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.
> [--SNIP--]
> diff --git a/toolchain/toolchain-bare-metal-buildroot/Config.in b/toolchain/toolchain-bare-metal-buildroot/Config.in
> index 6fe969357f..7d33a68c5c 100644
> --- a/toolchain/toolchain-bare-metal-buildroot/Config.in
> +++ b/toolchain/toolchain-bare-metal-buildroot/Config.in
> @@ -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...
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
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 16+ messages in thread