* [Buildroot] [PATCH v2 1/4] boot/xilinx-embeddedsw: new boot package
@ 2025-01-20 11:34 Neal Frager via buildroot
2025-01-20 11:34 ` [Buildroot] [PATCH v2 2/4] boot/uboot.mk: new zynqmp pmufw embeddedsw option Neal Frager via buildroot
` (4 more replies)
0 siblings, 5 replies; 12+ messages in thread
From: Neal Frager via buildroot @ 2025-01-20 11:34 UTC (permalink / raw)
To: buildroot
Cc: ibai.erkiaga-elorza, luca.ceresoli, brandon.maier, ju.o,
thomas.petazzoni, Neal Frager, romain.naour, michal.simek
This patch adds a new boot package to Buildroot for building boot firmware
applications from the https://github.com/Xilinx/embeddedsw repo.
If a user chooses to build a boot firmware application, it will not be
installed by the xilinx-prebuilt package since it will come from the
xilinx-embeddedsw package. In this way, users can mix and match applications
to be built by the xilinx-embeddedsw package and applications to be copied
from the xilinx-prebuilt package. This is necessary for the versal platform
because the pdi file can only be built by AMD Vivado.
Support for additional applications in the https://github.com/Xilinx/embeddedsw
repo can always be added to this package as needed or requested.
The xilinx-embeddedsw package replaces previous solutions including
zynqmp-firmware, versal-firmware and xilinx-source.
A patch is required for the xilinx-embeddedsw repo because the LICENSE file
has the name license.txt. A patch is thus included to create a symbolic link
from LICENCE to licence.txt, so that the Buildroot hash check will succeed.
This patch is not upstreamable.
boot/xilinx-embeddedsw/0001-LICENSE-create-link-to-license.txt.patch
Upstream: n/a
Signed-off-by: Neal Frager <neal.frager@amd.com>
---
V1->V2:
- fix check-package issues in Config.in files
- add patch for creating a link LICENSE->license.txt
- add hash for LICENSE/license.txt file
- change BR2_TARGET_XILINX_EMBEDDEDSW_USER_CFLAGS to
BR2_TARGET_XILINX_EMBEDDEDSW_ZYNQMP_PMUFW_USER_CFLAGS
since it really only applied to zynqmp_pmufw
---
DEVELOPERS | 1 +
boot/Config.in | 1 +
...1-LICENSE-create-link-to-license.txt.patch | 27 +++++++
boot/xilinx-embeddedsw/Config.in | 67 ++++++++++++++++
boot/xilinx-embeddedsw/xilinx-embeddedsw.hash | 5 ++
boot/xilinx-embeddedsw/xilinx-embeddedsw.mk | 80 +++++++++++++++++++
boot/xilinx-prebuilt/Config.in | 8 ++
boot/xilinx-prebuilt/xilinx-prebuilt.mk | 21 ++++-
8 files changed, 207 insertions(+), 3 deletions(-)
create mode 100644 boot/xilinx-embeddedsw/0001-LICENSE-create-link-to-license.txt.patch
create mode 100644 boot/xilinx-embeddedsw/Config.in
create mode 100644 boot/xilinx-embeddedsw/xilinx-embeddedsw.hash
create mode 100644 boot/xilinx-embeddedsw/xilinx-embeddedsw.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index 2d8ae8289b..36de3ceb72 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2426,6 +2426,7 @@ F: board/versal/
F: board/xilinx/
F: board/zynq/
F: board/zynqmp/
+F: boot/xilinx-embeddedsw/
F: boot/xilinx-prebuilt/
F: configs/versal_vck190_defconfig
F: configs/versal_vek280_defconfig
diff --git a/boot/Config.in b/boot/Config.in
index 5c8d0e7ee5..f167346cdf 100644
--- a/boot/Config.in
+++ b/boot/Config.in
@@ -19,6 +19,7 @@ source "boot/ti-k3-boot-firmware/Config.in"
source "boot/ti-k3-r5-loader/Config.in"
source "boot/uboot/Config.in"
source "boot/vexpress-firmware/Config.in"
+source "boot/xilinx-embeddedsw/Config.in"
source "boot/xilinx-prebuilt/Config.in"
endmenu
diff --git a/boot/xilinx-embeddedsw/0001-LICENSE-create-link-to-license.txt.patch b/boot/xilinx-embeddedsw/0001-LICENSE-create-link-to-license.txt.patch
new file mode 100644
index 0000000000..cc880bf2bf
--- /dev/null
+++ b/boot/xilinx-embeddedsw/0001-LICENSE-create-link-to-license.txt.patch
@@ -0,0 +1,27 @@
+From: Neal Frager <neal.frager@amd.com>
+Date: Mon, 20 Jan 2025 09:05:13 +0000
+Subject: [PATCH] LICENSE: create link to license.txt
+
+This patch creates a soft link of LICENSE -> license.txt,
+so that the following Buildroot command will succeed:
+
+ make xilinx-embeddedsw-legal-info
+
+Upstream: n/a
+Signed-off-by: Neal Frager <neal.frager@amd.com>
+---
+ LICENSE | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 120000 LICENSE
+
+diff --git a/LICENSE b/LICENSE
+new file mode 120000
+index 0000000000..cd301a44ab
+--- /dev/null
++++ b/LICENSE
+@@ -0,0 +1 @@
++license.txt
+\ No newline at end of file
+--
+2.25.1
+
diff --git a/boot/xilinx-embeddedsw/Config.in b/boot/xilinx-embeddedsw/Config.in
new file mode 100644
index 0000000000..e68e6077df
--- /dev/null
+++ b/boot/xilinx-embeddedsw/Config.in
@@ -0,0 +1,67 @@
+config BR2_TARGET_XILINX_EMBEDDEDSW
+ bool "xilinx-embeddedsw"
+ depends on BR2_aarch64
+ depends on BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH = "microblazeel-xilinx-elf"
+ help
+ Build boot firmware applications from source for Xilinx
+ boards. Users can mix and match applications to be built
+ by xilinx-embeddedsw and applications to be copied by
+ xilinx-prebuilt. If a xilinx-embeddedsw application is
+ selected, it will be built and installed from the Xilinx
+ embeddedsw repo, and it will not be copied from the
+ xilinx-prebuilt repo.
+
+ Applications can be found on the Xilinx embeddedsw repo:
+ https://github.com/Xilinx/embeddedsw/tree/master/lib/sw_apps
+
+comment "xilinx-embeddedsw needs a bare metal toolchain for tuple microblazeel-xilinx-elf"
+ depends on BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH != "microblazeel-xilinx-elf"
+
+if BR2_TARGET_XILINX_EMBEDDEDSW
+
+config BR2_TARGET_XILINX_EMBEDDEDSW_VERSION
+ string "xilinx-embeddedsw version"
+ default "xilinx_v2024.2"
+ help
+ Release version of Xilinx/embeddedsw.
+ Must be xilinx_v2023.1 or newer.
+
+config BR2_TARGET_XILINX_EMBEDDEDSW_VERSAL_PLM
+ bool "versal plm"
+ help
+ Build versal plm application from Xilinx/embeddedsw repo.
+ If selected, the xilinx-prebuilt package will not install
+ the plm.elf since it will come from the xilinx-embeddedsw
+ package.
+
+ https://github.com/Xilinx/embeddedsw/tree/master/lib/sw_apps/versal_plm
+
+config BR2_TARGET_XILINX_EMBEDDEDSW_VERSAL_PSMFW
+ bool "versal psmfw"
+ help
+ Build versal psmfw application from Xilinx/embeddedsw repo.
+ If selected, the xilinx-prebuilt package will not install
+ the psmfw.elf since it will come from the xilinx-embeddedsw
+ package.
+
+ https://github.com/Xilinx/embeddedsw/tree/master/lib/sw_apps/versal_psmfw
+
+config BR2_TARGET_XILINX_EMBEDDEDSW_ZYNQMP_PMUFW
+ bool "zynqmp pmufw"
+ help
+ Build zynqmp pmufw application from Xilinx/embeddedsw repo.
+ If selected, the xilinx-prebuilt package will not install
+ the pmufw.elf since it will come from the xilinx-embeddedsw
+ package.
+
+ https://github.com/Xilinx/embeddedsw/tree/master/lib/sw_apps/zynqmp_pmufw
+
+config BR2_TARGET_XILINX_EMBEDDEDSW_ZYNQMP_PMUFW_USER_CFLAGS
+ string "xilinx-embeddedsw optional zynqmp_pmufw user cflags"
+ help
+ Add optional cflags when building xilinx zynqmp_pmufw.
+
+ Example cflag options can be found here:
+ https://github.com/Xilinx/embeddedsw/blob/master/lib/sw_apps/zynqmp_pmufw/src/xpfw_config.h
+
+endif # BR2_TARGET_XILINX_EMBEDDEDSW
diff --git a/boot/xilinx-embeddedsw/xilinx-embeddedsw.hash b/boot/xilinx-embeddedsw/xilinx-embeddedsw.hash
new file mode 100644
index 0000000000..ba0214f6c2
--- /dev/null
+++ b/boot/xilinx-embeddedsw/xilinx-embeddedsw.hash
@@ -0,0 +1,5 @@
+# Locally calculated
+sha256 550ba0b206848adb0085bc1ca5a6b6731681335c92912afb4a6a8dbb4c489a0c xilinx-embeddedsw-xilinx_v2024.2.tar.gz
+
+# Locally calculated
+sha256 12bf8dad928a59644758825758b0c9d42d54478f5b04c8beb714d6f792450849 LICENSE
diff --git a/boot/xilinx-embeddedsw/xilinx-embeddedsw.mk b/boot/xilinx-embeddedsw/xilinx-embeddedsw.mk
new file mode 100644
index 0000000000..9a89f27d10
--- /dev/null
+++ b/boot/xilinx-embeddedsw/xilinx-embeddedsw.mk
@@ -0,0 +1,80 @@
+################################################################################
+#
+# xilinx-embeddedsw
+#
+################################################################################
+
+XILINX_EMBEDDEDSW_VERSION = $(call qstrip,$(BR2_TARGET_XILINX_EMBEDDEDSW_VERSION))
+XILINX_EMBEDDEDSW_SITE = $(call github,Xilinx,embeddedsw,$(XILINX_EMBEDDEDSW_VERSION))
+XILINX_EMBEDDEDSW_LICENSE = MIT
+XILINX_EMBEDDEDSW_LICENSE_FILES = LICENSE
+XILINX_EMBEDDEDSW_INSTALL_TARGET = NO
+XILINX_EMBEDDEDSW_INSTALL_IMAGES = YES
+XILINX_EMBEDDEDSW_DEPENDENCIES = toolchain-bare-metal-buildroot
+
+# ZYNQMP_PMUFW application allows users to add cflags
+XILINX_EMBEDDEDSW_ZYNQMP_PMUFW_USER_CFLAGS = \
+ $(call qstrip,$(BR2_TARGET_XILINX_EMBEDDEDSW_ZYNQMP_PMUFW_USER_CFLAGS))
+XILINX_EMBEDDEDSW_ZYNQMP_PMUFW_CFLAGS = \
+ "-Os -flto -ffat-lto-objects $(XILINX_EMBEDDEDSW_ZYNQMP_PMUFW_USER_CFLAGS)"
+
+XILINX_EMBEDDEDSW_CFLAGS = "-Os -flto -ffat-lto-objects"
+
+ifeq ($(BR2_TARGET_XILINX_EMBEDDEDSW_VERSAL_PLM),y)
+define XILINX_EMBEDDEDSW_BUILD_VERSAL_PLM
+ $(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=$(XILINX_EMBEDDEDSW_CFLAGS)
+endef
+
+define XILINX_EMBEDDEDSW_INSTALL_VERSAL_PLM
+ $(INSTALL) -D -m 0755 $(@D)/lib/sw_apps/versal_plm/src/versal/plm.elf \
+ $(BINARIES_DIR)/plm.elf
+endef
+endif # BR2_TARGET_XILINX_EMBEDDEDSW_VERSAL_PLM
+
+ifeq ($(BR2_TARGET_XILINX_EMBEDDEDSW_VERSAL_PSMFW),y)
+define XILINX_EMBEDDEDSW_BUILD_VERSAL_PSMFW
+ $(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=$(XILINX_EMBEDDEDSW_CFLAGS)
+endef
+
+define XILINX_EMBEDDEDSW_INSTALL_VERSAL_PSMFW
+ $(INSTALL) -D -m 0755 $(@D)/lib/sw_apps/versal_psmfw/src/versal/psmfw.elf \
+ $(BINARIES_DIR)/psmfw.elf
+endef
+endif # BR2_TARGET_XILINX_EMBEDDEDSW_VERSAL_PSMFW
+
+ifeq ($(BR2_TARGET_XILINX_EMBEDDEDSW_ZYNQMP_PMUFW),y)
+define XILINX_EMBEDDEDSW_BUILD_ZYNQMP_PMUFW
+ $(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=$(XILINX_EMBEDDEDSW_ZYNQMP_PMUFW_CFLAGS)
+endef
+
+define XILINX_EMBEDDEDSW_INSTALL_ZYNQMP_PMUFW
+ $(INSTALL) -D -m 0755 $(@D)/lib/sw_apps/zynqmp_pmufw/src/executable.elf \
+ $(BINARIES_DIR)/pmufw.elf
+endef
+endif # BR2_TARGET_XILINX_EMBEDDEDSW_ZYNQMP_PMUFW
+
+define XILINX_EMBEDDEDSW_BUILD_CMDS
+ $(XILINX_EMBEDDEDSW_BUILD_VERSAL_PLM)
+ $(XILINX_EMBEDDEDSW_BUILD_VERSAL_PSMFW)
+ $(XILINX_EMBEDDEDSW_BUILD_ZYNQMP_PMUFW)
+endef
+
+define XILINX_EMBEDDEDSW_INSTALL_IMAGES_CMDS
+ $(XILINX_EMBEDDEDSW_INSTALL_VERSAL_PLM)
+ $(XILINX_EMBEDDEDSW_INSTALL_VERSAL_PSMFW)
+ $(XILINX_EMBEDDEDSW_INSTALL_ZYNQMP_PMUFW)
+endef
+
+$(eval $(generic-package))
diff --git a/boot/xilinx-prebuilt/Config.in b/boot/xilinx-prebuilt/Config.in
index 94ef3dd111..793baa116f 100644
--- a/boot/xilinx-prebuilt/Config.in
+++ b/boot/xilinx-prebuilt/Config.in
@@ -4,6 +4,14 @@ config BR2_TARGET_XILINX_PREBUILT
help
Pre-built firmware files for Xilinx boards.
+ The pre-built firmware applications will only be installed
+ if they are not being built by the xilinx-embeddedsw
+ package.
+
+ Users can mix and match applications to build with
+ xilinx-embeddedsw and applications to simply install with
+ xilinx-prebuilt.
+
https://github.com/Xilinx/soc-prebuilt-firmware
if BR2_TARGET_XILINX_PREBUILT
diff --git a/boot/xilinx-prebuilt/xilinx-prebuilt.mk b/boot/xilinx-prebuilt/xilinx-prebuilt.mk
index 9f36ee7285..d0817d3cc7 100644
--- a/boot/xilinx-prebuilt/xilinx-prebuilt.mk
+++ b/boot/xilinx-prebuilt/xilinx-prebuilt.mk
@@ -46,23 +46,38 @@ XILINX_PREBUILT_PSMFW = $(XILINX_PREBUILT_BOARD_DIR)/psmfw.elf
XILINX_PREBUILT_PDI = $(XILINX_PREBUILT_BOARD_DIR)/*.pdi
endif # BR2_TARGET_XILINX_PREBUILT_VERSAL_XSA
-define XILINX_PREBUILT_INSTALL
+ifneq ($(BR2_TARGET_XILINX_EMBEDDEDSW_VERSAL_PLM),y)
+define XILINX_PREBUILT_INSTALL_VERSAL_PLM
$(INSTALL) -D -m 0755 $(XILINX_PREBUILT_PLM) \
$(BINARIES_DIR)/plm.elf
+endef
+endif # !BR2_TARGET_XILINX_EMBEDDEDSW_VERSAL_PLM
+
+ifneq ($(BR2_TARGET_XILINX_EMBEDDEDSW_VERSAL_PSMFW),y)
+define XILINX_PREBUILT_INSTALL_VERSAL_PSMFW
$(INSTALL) -D -m 0755 $(XILINX_PREBUILT_PSMFW) \
$(BINARIES_DIR)/psmfw.elf
+endef
+endif # !BR2_TARGET_XILINX_EMBEDDEDSW_VERSAL_PSMFW
+
+define XILINX_PREBUILT_INSTALL_VERSAL_PDI
$(INSTALL) -D -m 0755 $(XILINX_PREBUILT_PDI) \
$(BINARIES_DIR)/vpl_gen_fixed.pdi
endef
else # BR2_TARGET_XILINX_PREBUILT_VERSAL
-define XILINX_PREBUILT_INSTALL
+ifneq ($(BR2_TARGET_XILINX_EMBEDDEDSW_ZYNQMP_PMUFW),y)
+define XILINX_PREBUILT_INSTALL_ZYNQMP_PMUFW
$(INSTALL) -D -m 0755 $(XILINX_PREBUILT_BOARD_DIR)/pmufw.elf \
$(BINARIES_DIR)/pmufw.elf
endef
+endif # !BR2_TARGET_XILINX_EMBEDDEDSW_ZYNQMP_PMUFW
endif # BR2_TARGET_XILINX_PREBUILT_VERSAL
define XILINX_PREBUILT_INSTALL_IMAGES_CMDS
- $(XILINX_PREBUILT_INSTALL)
+ $(XILINX_PREBUILT_INSTALL_VERSAL_PLM)
+ $(XILINX_PREBUILT_INSTALL_VERSAL_PSMFW)
+ $(XILINX_PREBUILT_INSTALL_VERSAL_PDI)
+ $(XILINX_PREBUILT_INSTALL_ZYNQMP_PMUFW)
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] 12+ messages in thread* [Buildroot] [PATCH v2 2/4] boot/uboot.mk: new zynqmp pmufw embeddedsw option
2025-01-20 11:34 [Buildroot] [PATCH v2 1/4] boot/xilinx-embeddedsw: new boot package Neal Frager via buildroot
@ 2025-01-20 11:34 ` Neal Frager via buildroot
2025-01-20 17:33 ` Luca Ceresoli via buildroot
2025-01-20 11:34 ` [Buildroot] [PATCH v2 3/4] configs/zynqmp_*: migrate to xilinx-embeddedsw Neal Frager via buildroot
` (3 subsequent siblings)
4 siblings, 1 reply; 12+ messages in thread
From: Neal Frager via buildroot @ 2025-01-20 11:34 UTC (permalink / raw)
To: buildroot
Cc: ibai.erkiaga-elorza, luca.ceresoli, brandon.maier, ju.o,
thomas.petazzoni, Neal Frager, romain.naour, michal.simek
The new BR2_TARGET_UBOOT_ZYNQMP_PMUFW_EMBEDDEDSW option will enable u-boot to
use the xilinx-embeddedsw package for building a pmufw.elf that gets included
in the generated boot.bin.
If the BR2_TARGET_UBOOT_ZYNQMP_PMUFW_EMBEDDEDSW option is enabled, then the
BR2_TARGET_UBOOT_ZYNQMP_PMUFW config for downloading a prebuilt pmufw from a
custom location will be ignored.
Signed-off-by: Neal Frager <neal.frager@amd.com>
---
V1->V2:
- edited Config.in help text to fit within 70 characters
---
boot/uboot/Config.in | 27 +++++++++++++++++++++++++++
boot/uboot/uboot.mk | 5 ++++-
2 files changed, 31 insertions(+), 1 deletion(-)
diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
index b6ac2f9380..430191d213 100644
--- a/boot/uboot/Config.in
+++ b/boot/uboot/Config.in
@@ -572,6 +572,27 @@ config BR2_TARGET_UBOOT_ZYNQMP
if BR2_TARGET_UBOOT_ZYNQMP
+choice
+ prompt "xilinx-prebuilt pmufw.elf or build pmufw.elf from source"
+ default BR2_TARGET_UBOOT_ZYNQMP_PMUFW_EMBEDDEDSW
+ help
+ Choose between installing the pmufw.elf from
+ xilinx-prebuilt or building the pmufw.elf from
+ xilinx-embeddedsw.
+
+config BR2_TARGET_UBOOT_ZYNQMP_PMUFW_EMBEDDEDSW
+ bool "xilinx-embeddedsw build pmufw.elf from source"
+ depends on BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG
+ depends on BR2_TARGET_XILINX_EMBEDDEDSW_ZYNQMP_PMUFW
+ help
+ Use xilinx-embeddedsw boot package for building
+ zynqmp pmufw.elf from
+ https://github.com/Xilinx/embeddedsw repo.
+
+ U-Boot build process will generate a boot.bin (to be loaded
+ by the ZynqMP boot ROM) containing both the U-Boot SPL and
+ the PMU firmware in the Xilinx-specific boot format.
+
config BR2_TARGET_UBOOT_ZYNQMP_PMUFW_PREBUILT
bool "xilinx-prebuilt pmufw.elf"
depends on BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG
@@ -585,9 +606,15 @@ config BR2_TARGET_UBOOT_ZYNQMP_PMUFW_PREBUILT
by the ZynqMP boot ROM) containing both the U-Boot SPL and the
PMU firmware in the Xilinx-specific boot format.
+endchoice
+
+comment "If xilinx-embeddedsw or xilinx-prebuilt is selected for pmufw.elf, custom PMU firmware location will be ignored."
+ depends on BR2_TARGET_UBOOT_ZYNQMP_PMUFW_EMBEDDEDSW || BR2_TARGET_UBOOT_ZYNQMP_PMUFW_PREBUILT
+
config BR2_TARGET_UBOOT_ZYNQMP_PMUFW
string "Custom PMU firmware location"
depends on BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG
+ depends on !BR2_TARGET_UBOOT_ZYNQMP_PMUFW_EMBEDDEDSW
depends on !BR2_TARGET_UBOOT_ZYNQMP_PMUFW_PREBUILT
help
Location of a PMU firmware binary.
diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index b3094029e7..cb745413e4 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -453,7 +453,10 @@ endef
ifeq ($(BR2_TARGET_UBOOT_ZYNQMP),y)
-ifeq ($(BR2_TARGET_UBOOT_ZYNQMP_PMUFW_PREBUILT),y)
+ifeq ($(BR2_TARGET_UBOOT_ZYNQMP_PMUFW_EMBEDDEDSW),y)
+UBOOT_DEPENDENCIES += xilinx-embeddedsw
+UBOOT_ZYNQMP_PMUFW_PATH = $(BINARIES_DIR)/pmufw.elf
+else ifeq ($(BR2_TARGET_UBOOT_ZYNQMP_PMUFW_PREBUILT),y)
UBOOT_DEPENDENCIES += xilinx-prebuilt
UBOOT_ZYNQMP_PMUFW_PATH = $(BINARIES_DIR)/pmufw.elf
else
--
2.25.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [Buildroot] [PATCH v2 2/4] boot/uboot.mk: new zynqmp pmufw embeddedsw option
2025-01-20 11:34 ` [Buildroot] [PATCH v2 2/4] boot/uboot.mk: new zynqmp pmufw embeddedsw option Neal Frager via buildroot
@ 2025-01-20 17:33 ` Luca Ceresoli via buildroot
2025-01-21 8:40 ` Frager, Neal via buildroot
0 siblings, 1 reply; 12+ messages in thread
From: Luca Ceresoli via buildroot @ 2025-01-20 17:33 UTC (permalink / raw)
To: Neal Frager
Cc: ibai.erkiaga-elorza, brandon.maier, ju.o, thomas.petazzoni,
buildroot, romain.naour, michal.simek
On Mon, 20 Jan 2025 11:34:03 +0000
Neal Frager <neal.frager@amd.com> wrote:
> The new BR2_TARGET_UBOOT_ZYNQMP_PMUFW_EMBEDDEDSW option will enable u-boot to
> use the xilinx-embeddedsw package for building a pmufw.elf that gets included
> in the generated boot.bin.
>
> If the BR2_TARGET_UBOOT_ZYNQMP_PMUFW_EMBEDDEDSW option is enabled, then the
> BR2_TARGET_UBOOT_ZYNQMP_PMUFW config for downloading a prebuilt pmufw from a
> custom location will be ignored.
>
> Signed-off-by: Neal Frager <neal.frager@amd.com>
> ---
> V1->V2:
> - edited Config.in help text to fit within 70 characters
> ---
> boot/uboot/Config.in | 27 +++++++++++++++++++++++++++
> boot/uboot/uboot.mk | 5 ++++-
> 2 files changed, 31 insertions(+), 1 deletion(-)
>
> diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
> index b6ac2f9380..430191d213 100644
> --- a/boot/uboot/Config.in
> +++ b/boot/uboot/Config.in
> @@ -572,6 +572,27 @@ config BR2_TARGET_UBOOT_ZYNQMP
>
> if BR2_TARGET_UBOOT_ZYNQMP
>
> +choice
> + prompt "xilinx-prebuilt pmufw.elf or build pmufw.elf from source"
Not a very clear string IMO, it should not list the options in the
choice title. I'd rather change it to "PMUFW origin".
> + default BR2_TARGET_UBOOT_ZYNQMP_PMUFW_EMBEDDEDSW
> + help
> + Choose between installing the pmufw.elf from
> + xilinx-prebuilt or building the pmufw.elf from
> + xilinx-embeddedsw.
> +
> +config BR2_TARGET_UBOOT_ZYNQMP_PMUFW_EMBEDDEDSW
> + bool "xilinx-embeddedsw build pmufw.elf from source"
And I'd change this to "Build from source via xilinx-embeddedsw"
> + depends on BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG
> + depends on BR2_TARGET_XILINX_EMBEDDEDSW_ZYNQMP_PMUFW
Not sure what is best here:
a) if xilinx-embeddedsw is enabled, show the option in the choice menu
b) if the choice is selected in the menu, enable xilinx-embeddedsw
a) is what you implemented, b) is what I had in mind before reading
this patch and it would look more intuitive for users I think. The same
applies for the xilinx-prebuilt option.
Opinions from Buildroot maintainers would be welcome here.
> + help
> + Use xilinx-embeddedsw boot package for building
> + zynqmp pmufw.elf from
> + https://github.com/Xilinx/embeddedsw repo.
> +
> + U-Boot build process will generate a boot.bin (to be loaded
> + by the ZynqMP boot ROM) containing both the U-Boot SPL and
> + the PMU firmware in the Xilinx-specific boot format.
> +
> config BR2_TARGET_UBOOT_ZYNQMP_PMUFW_PREBUILT
> bool "xilinx-prebuilt pmufw.elf"
And this to "Prebuilt via xilinx-prebuilt"
> depends on BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG
> @@ -585,9 +606,15 @@ config BR2_TARGET_UBOOT_ZYNQMP_PMUFW_PREBUILT
> by the ZynqMP boot ROM) containing both the U-Boot SPL and the
> PMU firmware in the Xilinx-specific boot format.
>
> +endchoice
> +
> +comment "If xilinx-embeddedsw or xilinx-prebuilt is selected for pmufw.elf, custom PMU firmware location will be ignored."
> + depends on BR2_TARGET_UBOOT_ZYNQMP_PMUFW_EMBEDDEDSW || BR2_TARGET_UBOOT_ZYNQMP_PMUFW_PREBUILT
This is not needed. If any of those two is selected,
BR2_TARGET_UBOOT_ZYNQMP_PMUFW will not be visible. The commit message
needs to be updated accordingly. See below however.
> config BR2_TARGET_UBOOT_ZYNQMP_PMUFW
> string "Custom PMU firmware location"
> depends on BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG
> + depends on !BR2_TARGET_UBOOT_ZYNQMP_PMUFW_EMBEDDEDSW
> depends on !BR2_TARGET_UBOOT_ZYNQMP_PMUFW_PREBUILT
I think BR2_TARGET_UBOOT_ZYNQMP_PMUFW should become a third option in
the choice you are adding above. In other words we should ask users
"How do you want to get the pmufw? Build from source, download from
xilinx-prebuilt or pre-built at a custom location you provide?".
Luca
--
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] 12+ messages in thread
* Re: [Buildroot] [PATCH v2 2/4] boot/uboot.mk: new zynqmp pmufw embeddedsw option
2025-01-20 17:33 ` Luca Ceresoli via buildroot
@ 2025-01-21 8:40 ` Frager, Neal via buildroot
2025-01-21 14:42 ` Luca Ceresoli via buildroot
0 siblings, 1 reply; 12+ messages in thread
From: Frager, Neal via buildroot @ 2025-01-21 8:40 UTC (permalink / raw)
To: Luca Ceresoli
Cc: Erkiaga Elorza, Ibai, brandon.maier@collins.com, ju.o@free.fr,
thomas.petazzoni@bootlin.com, buildroot@buildroot.org,
romain.naour@smile.fr, Simek, Michal
Hello Luca,
> The new BR2_TARGET_UBOOT_ZYNQMP_PMUFW_EMBEDDEDSW option will enable u-boot to
> use the xilinx-embeddedsw package for building a pmufw.elf that gets included
> in the generated boot.bin.
>
> If the BR2_TARGET_UBOOT_ZYNQMP_PMUFW_EMBEDDEDSW option is enabled, then the
> BR2_TARGET_UBOOT_ZYNQMP_PMUFW config for downloading a prebuilt pmufw from a
> custom location will be ignored.
>
> Signed-off-by: Neal Frager <neal.frager@amd.com>
> ---
> V1->V2:
> - edited Config.in help text to fit within 70 characters
> ---
> boot/uboot/Config.in | 27 +++++++++++++++++++++++++++
> boot/uboot/uboot.mk | 5 ++++-
> 2 files changed, 31 insertions(+), 1 deletion(-)
>
> diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
> index b6ac2f9380..430191d213 100644
> --- a/boot/uboot/Config.in
> +++ b/boot/uboot/Config.in
> @@ -572,6 +572,27 @@ config BR2_TARGET_UBOOT_ZYNQMP
>
> if BR2_TARGET_UBOOT_ZYNQMP
>
> +choice
> + prompt "xilinx-prebuilt pmufw.elf or build pmufw.elf from source"
> Not a very clear string IMO, it should not list the options in the
> choice title. I'd rather change it to "PMUFW origin".
Agreed, thanks!
> + default BR2_TARGET_UBOOT_ZYNQMP_PMUFW_EMBEDDEDSW
> + help
> + Choose between installing the pmufw.elf from
> + xilinx-prebuilt or building the pmufw.elf from
> + xilinx-embeddedsw.
> +
> +config BR2_TARGET_UBOOT_ZYNQMP_PMUFW_EMBEDDEDSW
> + bool "xilinx-embeddedsw build pmufw.elf from source"
> And I'd change this to "Build from source via xilinx-embeddedsw"
Ok, works for me.
> + depends on BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG
> + depends on BR2_TARGET_XILINX_EMBEDDEDSW_ZYNQMP_PMUFW
> Not sure what is best here:
> a) if xilinx-embeddedsw is enabled, show the option in the choice menu
> b) if the choice is selected in the menu, enable xilinx-embeddedsw
> a) is what you implemented, b) is what I had in mind before reading
> this patch and it would look more intuitive for users I think. The same
> applies for the xilinx-prebuilt option.
> Opinions from Buildroot maintainers would be welcome here.
I thought about this as well. Unfortunately, option b is more complicated
than just enabling xilinx-embeddedsw or xilinx-prebuilt. Not only do the
zynqmp options in either package also need to be enabled, but in the case
of xilinx-embeddedsw, the toolchain-bare-metal-buildroot also needs to be
enabled along with configuring the tupple to microblaze.
Since I do not think enabling all these options in other packages
automatically from the uboot config is very clean, I think it is best we
stay with option a.
To go along with option a, I like your idea of making the choice three
options as you speak of later on in this email. For options not enabled,
I would like to add a comment in the choice menu informing the user of
what they need to enable to make the option available. I think this is
a better solution.
And since the custom pmufw location option is the only one not dependent
on another Buildroot package, I would recommend having it being the
default choice, since it will always be available.
> + help
> + Use xilinx-embeddedsw boot package for building
> + zynqmp pmufw.elf from
> + https://github.com/Xilinx/embeddedsw repo.
> +
> + U-Boot build process will generate a boot.bin (to be loaded
> + by the ZynqMP boot ROM) containing both the U-Boot SPL and
> + the PMU firmware in the Xilinx-specific boot format.
> +
> config BR2_TARGET_UBOOT_ZYNQMP_PMUFW_PREBUILT
> bool "xilinx-prebuilt pmufw.elf"
> And this to "Prebuilt via xilinx-prebuilt"
Ok, sounds good to me.
> depends on BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG
> @@ -585,9 +606,15 @@ config BR2_TARGET_UBOOT_ZYNQMP_PMUFW_PREBUILT
> by the ZynqMP boot ROM) containing both the U-Boot SPL and the
> PMU firmware in the Xilinx-specific boot format.
>
> +endchoice
> +
> +comment "If xilinx-embeddedsw or xilinx-prebuilt is selected for pmufw.elf, custom PMU firmware location will be ignored."
> + depends on BR2_TARGET_UBOOT_ZYNQMP_PMUFW_EMBEDDEDSW || BR2_TARGET_UBOOT_ZYNQMP_PMUFW_PREBUILT
> This is not needed. If any of those two is selected,
> BR2_TARGET_UBOOT_ZYNQMP_PMUFW will not be visible. The commit message
> needs to be updated accordingly. See below however.
Agreed. Making this a three way choice is the best option.
> config BR2_TARGET_UBOOT_ZYNQMP_PMUFW
> string "Custom PMU firmware location"
> depends on BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG
> + depends on !BR2_TARGET_UBOOT_ZYNQMP_PMUFW_EMBEDDEDSW
> depends on !BR2_TARGET_UBOOT_ZYNQMP_PMUFW_PREBUILT
> I think BR2_TARGET_UBOOT_ZYNQMP_PMUFW should become a third option in
> the choice you are adding above. In other words we should ask users
> "How do you want to get the pmufw? Build from source, download from
> xilinx-prebuilt or pre-built at a custom location you provide?".
I agree with the three option choice idea. I had not thought of it earlier
because choice options need to be boolean as far as I am aware.
To make this possible, I am thinking of adding the third choice as:
BR2_TARGET_UBOOT_ZYNQMP_PMUFW_CUSTOM
bool "Prebuilt from custom location"
And then the BR2_TARGET_UBOOT_ZYNQMP_PMUFW would stay the same as before
with just having a dependency on BR2_TARGET_UBOOT_ZYNQMP_PMUFW_CUSTOM.
What do you think?
Best regards,
Neal Frager
AMD
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [Buildroot] [PATCH v2 2/4] boot/uboot.mk: new zynqmp pmufw embeddedsw option
2025-01-21 8:40 ` Frager, Neal via buildroot
@ 2025-01-21 14:42 ` Luca Ceresoli via buildroot
0 siblings, 0 replies; 12+ messages in thread
From: Luca Ceresoli via buildroot @ 2025-01-21 14:42 UTC (permalink / raw)
To: Frager, Neal
Cc: Erkiaga Elorza, Ibai, brandon.maier@collins.com, ju.o@free.fr,
thomas.petazzoni@bootlin.com, buildroot@buildroot.org,
romain.naour@smile.fr, Simek, Michal
Hi Neal,
On Tue, 21 Jan 2025 08:40:33 +0000
"Frager, Neal" <neal.frager@amd.com> wrote:
> Hello Luca,
>
> > The new BR2_TARGET_UBOOT_ZYNQMP_PMUFW_EMBEDDEDSW option will enable u-boot to
> > use the xilinx-embeddedsw package for building a pmufw.elf that gets included
> > in the generated boot.bin.
> >
> > If the BR2_TARGET_UBOOT_ZYNQMP_PMUFW_EMBEDDEDSW option is enabled, then the
> > BR2_TARGET_UBOOT_ZYNQMP_PMUFW config for downloading a prebuilt pmufw from a
> > custom location will be ignored.
> >
> > Signed-off-by: Neal Frager <neal.frager@amd.com>
> > ---
> > V1->V2:
> > - edited Config.in help text to fit within 70 characters
> > ---
> > boot/uboot/Config.in | 27 +++++++++++++++++++++++++++
> > boot/uboot/uboot.mk | 5 ++++-
> > 2 files changed, 31 insertions(+), 1 deletion(-)
> >
> > diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
> > index b6ac2f9380..430191d213 100644
> > --- a/boot/uboot/Config.in
> > +++ b/boot/uboot/Config.in
> > @@ -572,6 +572,27 @@ config BR2_TARGET_UBOOT_ZYNQMP
> >
> > if BR2_TARGET_UBOOT_ZYNQMP
> >
> > +choice
> > + prompt "xilinx-prebuilt pmufw.elf or build pmufw.elf from source"
>
> > Not a very clear string IMO, it should not list the options in the
> > choice title. I'd rather change it to "PMUFW origin".
>
> Agreed, thanks!
>
> > + default BR2_TARGET_UBOOT_ZYNQMP_PMUFW_EMBEDDEDSW
> > + help
> > + Choose between installing the pmufw.elf from
> > + xilinx-prebuilt or building the pmufw.elf from
> > + xilinx-embeddedsw.
> > +
> > +config BR2_TARGET_UBOOT_ZYNQMP_PMUFW_EMBEDDEDSW
> > + bool "xilinx-embeddedsw build pmufw.elf from source"
>
> > And I'd change this to "Build from source via xilinx-embeddedsw"
>
> Ok, works for me.
>
> > + depends on BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG
> > + depends on BR2_TARGET_XILINX_EMBEDDEDSW_ZYNQMP_PMUFW
>
> > Not sure what is best here:
>
> > a) if xilinx-embeddedsw is enabled, show the option in the choice menu
> > b) if the choice is selected in the menu, enable xilinx-embeddedsw
>
> > a) is what you implemented, b) is what I had in mind before reading
> > this patch and it would look more intuitive for users I think. The same
> > applies for the xilinx-prebuilt option.
>
> > Opinions from Buildroot maintainers would be welcome here.
>
> I thought about this as well. Unfortunately, option b is more complicated
> than just enabling xilinx-embeddedsw or xilinx-prebuilt. Not only do the
> zynqmp options in either package also need to be enabled, but in the case
> of xilinx-embeddedsw, the toolchain-bare-metal-buildroot also needs to be
> enabled along with configuring the tupple to microblaze.
That's true.
> Since I do not think enabling all these options in other packages
> automatically from the uboot config is very clean, I think it is best we
> stay with option a.
>
> To go along with option a, I like your idea of making the choice three
> options as you speak of later on in this email. For options not enabled,
> I would like to add a comment in the choice menu informing the user of
> what they need to enable to make the option available. I think this is
> a better solution.
Adding the comments looks like a good idea, e.g. "Building the PMUFW
from source needs xilinx-embeddedsw"
> And since the custom pmufw location option is the only one not dependent
> on another Buildroot package, I would recommend having it being the
> default choice, since it will always be available.
>
> > + help
> > + Use xilinx-embeddedsw boot package for building
> > + zynqmp pmufw.elf from
> > + https://github.com/Xilinx/embeddedsw repo.
> > +
> > + U-Boot build process will generate a boot.bin (to be loaded
> > + by the ZynqMP boot ROM) containing both the U-Boot SPL and
> > + the PMU firmware in the Xilinx-specific boot format.
> > +
> > config BR2_TARGET_UBOOT_ZYNQMP_PMUFW_PREBUILT
> > bool "xilinx-prebuilt pmufw.elf"
>
> > And this to "Prebuilt via xilinx-prebuilt"
>
> Ok, sounds good to me.
>
> > depends on BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG
> > @@ -585,9 +606,15 @@ config BR2_TARGET_UBOOT_ZYNQMP_PMUFW_PREBUILT
> > by the ZynqMP boot ROM) containing both the U-Boot SPL and the
> > PMU firmware in the Xilinx-specific boot format.
> >
> > +endchoice
> > +
> > +comment "If xilinx-embeddedsw or xilinx-prebuilt is selected for pmufw.elf, custom PMU firmware location will be ignored."
> > + depends on BR2_TARGET_UBOOT_ZYNQMP_PMUFW_EMBEDDEDSW || BR2_TARGET_UBOOT_ZYNQMP_PMUFW_PREBUILT
>
> > This is not needed. If any of those two is selected,
> > BR2_TARGET_UBOOT_ZYNQMP_PMUFW will not be visible. The commit message
> > needs to be updated accordingly. See below however.
>
> Agreed. Making this a three way choice is the best option.
>
> > config BR2_TARGET_UBOOT_ZYNQMP_PMUFW
> > string "Custom PMU firmware location"
> > depends on BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG
> > + depends on !BR2_TARGET_UBOOT_ZYNQMP_PMUFW_EMBEDDEDSW
> > depends on !BR2_TARGET_UBOOT_ZYNQMP_PMUFW_PREBUILT
>
> > I think BR2_TARGET_UBOOT_ZYNQMP_PMUFW should become a third option in
> > the choice you are adding above. In other words we should ask users
> > "How do you want to get the pmufw? Build from source, download from
> > xilinx-prebuilt or pre-built at a custom location you provide?".
>
> I agree with the three option choice idea. I had not thought of it earlier
> because choice options need to be boolean as far as I am aware.
>
> To make this possible, I am thinking of adding the third choice as:
> BR2_TARGET_UBOOT_ZYNQMP_PMUFW_CUSTOM
> bool "Prebuilt from custom location"
>
> And then the BR2_TARGET_UBOOT_ZYNQMP_PMUFW would stay the same as before
> with just having a dependency on BR2_TARGET_UBOOT_ZYNQMP_PMUFW_CUSTOM.
>
> What do you think?
I think it is fine.
Luca
--
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] 12+ messages in thread
* [Buildroot] [PATCH v2 3/4] configs/zynqmp_*: migrate to xilinx-embeddedsw
2025-01-20 11:34 [Buildroot] [PATCH v2 1/4] boot/xilinx-embeddedsw: new boot package Neal Frager via buildroot
2025-01-20 11:34 ` [Buildroot] [PATCH v2 2/4] boot/uboot.mk: new zynqmp pmufw embeddedsw option Neal Frager via buildroot
@ 2025-01-20 11:34 ` Neal Frager via buildroot
2025-01-20 11:34 ` [Buildroot] [PATCH v2 4/4] configs/versal_*: " Neal Frager via buildroot
` (2 subsequent siblings)
4 siblings, 0 replies; 12+ messages in thread
From: Neal Frager via buildroot @ 2025-01-20 11:34 UTC (permalink / raw)
To: buildroot
Cc: ibai.erkiaga-elorza, luca.ceresoli, brandon.maier, ju.o,
thomas.petazzoni, Neal Frager, romain.naour, michal.simek
Migrate zynqmp defconfigs to xilinx-embeddedsw package for building
zynqmp pmufw.
Signed-off-by: Neal Frager <neal.frager@amd.com>
---
V1->V2:
- use new BR2_TARGET_XILINX_EMBEDDEDSW_ZYNQMP_PMUFW_USER_CFLAGS
config for zynqmp_kria defconfigs
---
configs/zynqmp_kria_kd240_defconfig | 9 +++++----
configs/zynqmp_kria_kr260_defconfig | 8 +++++---
configs/zynqmp_kria_kv260_defconfig | 9 +++++----
configs/zynqmp_zcu102_defconfig | 7 ++++---
configs/zynqmp_zcu104_defconfig | 8 ++++----
configs/zynqmp_zcu106_defconfig | 8 ++++----
6 files changed, 27 insertions(+), 22 deletions(-)
diff --git a/configs/zynqmp_kria_kd240_defconfig b/configs/zynqmp_kria_kd240_defconfig
index 38a5aa378a..645b3b23b0 100644
--- a/configs/zynqmp_kria_kd240_defconfig
+++ b/configs/zynqmp_kria_kd240_defconfig
@@ -1,5 +1,7 @@
BR2_aarch64=y
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y
+BR2_TOOLCHAIN_BARE_METAL_BUILDROOT=y
+BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH="microblazeel-xilinx-elf"
BR2_GLOBAL_PATCH_DIR="board/zynqmp/kria/patches board/xilinx/patches"
BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
BR2_ROOTFS_POST_BUILD_SCRIPT="board/zynqmp/post-build.sh board/zynqmp/kria/kd240/kd240.sh"
@@ -35,12 +37,11 @@ BR2_TARGET_UBOOT_FORMAT_ITB=y
BR2_TARGET_UBOOT_SPL=y
BR2_TARGET_UBOOT_SPL_NAME="spl/boot.bin"
BR2_TARGET_UBOOT_ZYNQMP=y
-BR2_TARGET_UBOOT_ZYNQMP_PMUFW_PREBUILT=y
BR2_TARGET_UBOOT_ZYNQMP_PM_CFG="board/zynqmp/kria/kd240/pm_cfg_obj.c"
BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="DEVICE_TREE=zynqmp-smk-k24-revA"
-BR2_TARGET_XILINX_PREBUILT=y
-BR2_TARGET_XILINX_PREBUILT_KRIA=y
-BR2_TARGET_XILINX_PREBUILT_BOARD="kd240"
+BR2_TARGET_XILINX_EMBEDDEDSW=y
+BR2_TARGET_XILINX_EMBEDDEDSW_ZYNQMP_PMUFW=y
+BR2_TARGET_XILINX_EMBEDDEDSW_ZYNQMP_PMUFW_USER_CFLAGS="-DK24_SOM"
BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_MTOOLS=y
diff --git a/configs/zynqmp_kria_kr260_defconfig b/configs/zynqmp_kria_kr260_defconfig
index a5d308a4d5..36da3a146a 100644
--- a/configs/zynqmp_kria_kr260_defconfig
+++ b/configs/zynqmp_kria_kr260_defconfig
@@ -1,5 +1,7 @@
BR2_aarch64=y
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y
+BR2_TOOLCHAIN_BARE_METAL_BUILDROOT=y
+BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH="microblazeel-xilinx-elf"
BR2_GLOBAL_PATCH_DIR="board/zynqmp/kria/patches board/xilinx/patches"
BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
BR2_ROOTFS_POST_BUILD_SCRIPT="board/zynqmp/post-build.sh board/zynqmp/kria/kr260/kr260.sh"
@@ -35,11 +37,11 @@ BR2_TARGET_UBOOT_FORMAT_ITB=y
BR2_TARGET_UBOOT_SPL=y
BR2_TARGET_UBOOT_SPL_NAME="spl/boot.bin"
BR2_TARGET_UBOOT_ZYNQMP=y
-BR2_TARGET_UBOOT_ZYNQMP_PMUFW_PREBUILT=y
BR2_TARGET_UBOOT_ZYNQMP_PM_CFG="board/zynqmp/kria/kr260/pm_cfg_obj.c"
BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="DEVICE_TREE=zynqmp-smk-k26-revA"
-BR2_TARGET_XILINX_PREBUILT=y
-BR2_TARGET_XILINX_PREBUILT_KRIA=y
+BR2_TARGET_XILINX_EMBEDDEDSW=y
+BR2_TARGET_XILINX_EMBEDDEDSW_ZYNQMP_PMUFW=y
+BR2_TARGET_XILINX_EMBEDDEDSW_ZYNQMP_PMUFW_USER_CFLAGS="-DK26_SOM"
BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_MTOOLS=y
diff --git a/configs/zynqmp_kria_kv260_defconfig b/configs/zynqmp_kria_kv260_defconfig
index 711f43c3a6..81875760d6 100644
--- a/configs/zynqmp_kria_kv260_defconfig
+++ b/configs/zynqmp_kria_kv260_defconfig
@@ -1,5 +1,7 @@
BR2_aarch64=y
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y
+BR2_TOOLCHAIN_BARE_METAL_BUILDROOT=y
+BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH="microblazeel-xilinx-elf"
BR2_GLOBAL_PATCH_DIR="board/zynqmp/kria/patches board/xilinx/patches"
BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
BR2_ROOTFS_POST_BUILD_SCRIPT="board/zynqmp/post-build.sh board/zynqmp/kria/kv260/kv260.sh"
@@ -35,12 +37,11 @@ BR2_TARGET_UBOOT_FORMAT_ITB=y
BR2_TARGET_UBOOT_SPL=y
BR2_TARGET_UBOOT_SPL_NAME="spl/boot.bin"
BR2_TARGET_UBOOT_ZYNQMP=y
-BR2_TARGET_UBOOT_ZYNQMP_PMUFW_PREBUILT=y
BR2_TARGET_UBOOT_ZYNQMP_PM_CFG="board/zynqmp/kria/kv260/pm_cfg_obj.c"
BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="DEVICE_TREE=zynqmp-smk-k26-revA"
-BR2_TARGET_XILINX_PREBUILT=y
-BR2_TARGET_XILINX_PREBUILT_KRIA=y
-BR2_TARGET_XILINX_PREBUILT_BOARD="kv260"
+BR2_TARGET_XILINX_EMBEDDEDSW=y
+BR2_TARGET_XILINX_EMBEDDEDSW_ZYNQMP_PMUFW=y
+BR2_TARGET_XILINX_EMBEDDEDSW_ZYNQMP_PMUFW_USER_CFLAGS="-DK26_SOM"
BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_MTOOLS=y
diff --git a/configs/zynqmp_zcu102_defconfig b/configs/zynqmp_zcu102_defconfig
index 849f5bd811..3b1809fd6e 100644
--- a/configs/zynqmp_zcu102_defconfig
+++ b/configs/zynqmp_zcu102_defconfig
@@ -1,5 +1,7 @@
BR2_aarch64=y
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y
+BR2_TOOLCHAIN_BARE_METAL_BUILDROOT=y
+BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH="microblazeel-xilinx-elf"
BR2_GLOBAL_PATCH_DIR="board/xilinx/patches"
BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
BR2_ROOTFS_POST_BUILD_SCRIPT="board/zynqmp/post-build.sh"
@@ -34,11 +36,10 @@ BR2_TARGET_UBOOT_FORMAT_ITB=y
BR2_TARGET_UBOOT_SPL=y
BR2_TARGET_UBOOT_SPL_NAME="spl/boot.bin"
BR2_TARGET_UBOOT_ZYNQMP=y
-BR2_TARGET_UBOOT_ZYNQMP_PMUFW_PREBUILT=y
BR2_TARGET_UBOOT_ZYNQMP_PM_CFG="board/zynqmp/zcu102/pm_cfg_obj.c"
BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="DEVICE_TREE=zynqmp-zcu102-rev1.0"
-BR2_TARGET_XILINX_PREBUILT=y
-BR2_TARGET_XILINX_PREBUILT_VERSION="xilinx_v2024.2"
+BR2_TARGET_XILINX_EMBEDDEDSW=y
+BR2_TARGET_XILINX_EMBEDDEDSW_ZYNQMP_PMUFW=y
BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_MTOOLS=y
diff --git a/configs/zynqmp_zcu104_defconfig b/configs/zynqmp_zcu104_defconfig
index c52bac1462..3022f4c1bb 100644
--- a/configs/zynqmp_zcu104_defconfig
+++ b/configs/zynqmp_zcu104_defconfig
@@ -1,5 +1,7 @@
BR2_aarch64=y
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y
+BR2_TOOLCHAIN_BARE_METAL_BUILDROOT=y
+BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH="microblazeel-xilinx-elf"
BR2_GLOBAL_PATCH_DIR="board/xilinx/patches"
BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
BR2_ROOTFS_POST_BUILD_SCRIPT="board/zynqmp/post-build.sh"
@@ -34,12 +36,10 @@ BR2_TARGET_UBOOT_FORMAT_ITB=y
BR2_TARGET_UBOOT_SPL=y
BR2_TARGET_UBOOT_SPL_NAME="spl/boot.bin"
BR2_TARGET_UBOOT_ZYNQMP=y
-BR2_TARGET_UBOOT_ZYNQMP_PMUFW_PREBUILT=y
BR2_TARGET_UBOOT_ZYNQMP_PM_CFG="board/zynqmp/zcu104/pm_cfg_obj.c"
BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="DEVICE_TREE=zynqmp-zcu104-revC"
-BR2_TARGET_XILINX_PREBUILT=y
-BR2_TARGET_XILINX_PREBUILT_VERSION="xilinx_v2024.2"
-BR2_TARGET_XILINX_PREBUILT_BOARD="zcu104"
+BR2_TARGET_XILINX_EMBEDDEDSW=y
+BR2_TARGET_XILINX_EMBEDDEDSW_ZYNQMP_PMUFW=y
BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_MTOOLS=y
diff --git a/configs/zynqmp_zcu106_defconfig b/configs/zynqmp_zcu106_defconfig
index 2f3edf7972..38dc8c392a 100644
--- a/configs/zynqmp_zcu106_defconfig
+++ b/configs/zynqmp_zcu106_defconfig
@@ -1,5 +1,7 @@
BR2_aarch64=y
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y
+BR2_TOOLCHAIN_BARE_METAL_BUILDROOT=y
+BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH="microblazeel-xilinx-elf"
BR2_GLOBAL_PATCH_DIR="board/xilinx/patches"
BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
BR2_ROOTFS_POST_BUILD_SCRIPT="board/zynqmp/post-build.sh"
@@ -34,12 +36,10 @@ BR2_TARGET_UBOOT_FORMAT_ITB=y
BR2_TARGET_UBOOT_SPL=y
BR2_TARGET_UBOOT_SPL_NAME="spl/boot.bin"
BR2_TARGET_UBOOT_ZYNQMP=y
-BR2_TARGET_UBOOT_ZYNQMP_PMUFW_PREBUILT=y
BR2_TARGET_UBOOT_ZYNQMP_PM_CFG="board/zynqmp/zcu106/pm_cfg_obj.c"
BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="DEVICE_TREE=zynqmp-zcu106-rev1.0"
-BR2_TARGET_XILINX_PREBUILT=y
-BR2_TARGET_XILINX_PREBUILT_VERSION="xilinx_v2024.2"
-BR2_TARGET_XILINX_PREBUILT_BOARD="zcu106"
+BR2_TARGET_XILINX_EMBEDDEDSW=y
+BR2_TARGET_XILINX_EMBEDDEDSW_ZYNQMP_PMUFW=y
BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_MTOOLS=y
--
2.25.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 12+ messages in thread* [Buildroot] [PATCH v2 4/4] configs/versal_*: migrate to xilinx-embeddedsw
2025-01-20 11:34 [Buildroot] [PATCH v2 1/4] boot/xilinx-embeddedsw: new boot package Neal Frager via buildroot
2025-01-20 11:34 ` [Buildroot] [PATCH v2 2/4] boot/uboot.mk: new zynqmp pmufw embeddedsw option Neal Frager via buildroot
2025-01-20 11:34 ` [Buildroot] [PATCH v2 3/4] configs/zynqmp_*: migrate to xilinx-embeddedsw Neal Frager via buildroot
@ 2025-01-20 11:34 ` Neal Frager via buildroot
2025-01-20 17:33 ` [Buildroot] [PATCH v2 1/4] boot/xilinx-embeddedsw: new boot package Luca Ceresoli
2025-01-23 16:47 ` Arnout Vandecappelle via buildroot
4 siblings, 0 replies; 12+ messages in thread
From: Neal Frager via buildroot @ 2025-01-20 11:34 UTC (permalink / raw)
To: buildroot
Cc: ibai.erkiaga-elorza, luca.ceresoli, brandon.maier, ju.o,
thomas.petazzoni, Neal Frager, romain.naour, michal.simek
Migrate versal defconfigs to xilinx-embeddedsw package for building
versal plm and versal psmfw applications.
Signed-off-by: Neal Frager <neal.frager@amd.com>
---
V1->V2:
- no changes
---
configs/versal_vck190_defconfig | 5 +++++
configs/versal_vek280_defconfig | 5 +++++
configs/versal_vpk180_defconfig | 5 +++++
3 files changed, 15 insertions(+)
diff --git a/configs/versal_vck190_defconfig b/configs/versal_vck190_defconfig
index c046d53010..100fa1fa35 100644
--- a/configs/versal_vck190_defconfig
+++ b/configs/versal_vck190_defconfig
@@ -1,6 +1,8 @@
BR2_aarch64=y
BR2_cortex_a72=y
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y
+BR2_TOOLCHAIN_BARE_METAL_BUILDROOT=y
+BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH="microblazeel-xilinx-elf"
BR2_GLOBAL_PATCH_DIR="board/xilinx/patches"
BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
BR2_ROOTFS_POST_BUILD_SCRIPT="board/versal/post-build.sh"
@@ -34,6 +36,9 @@ BR2_TARGET_UBOOT_NEEDS_ATF_BL31_ELF=y
BR2_TARGET_UBOOT_FORMAT_DTB=y
BR2_TARGET_UBOOT_FORMAT_REMAKE_ELF=y
BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="DEVICE_TREE=versal-vck190-rev1.1"
+BR2_TARGET_XILINX_EMBEDDEDSW=y
+BR2_TARGET_XILINX_EMBEDDEDSW_VERSAL_PLM=y
+BR2_TARGET_XILINX_EMBEDDEDSW_VERSAL_PSMFW=y
BR2_TARGET_XILINX_PREBUILT=y
BR2_TARGET_XILINX_PREBUILT_VERSION="xilinx_v2024.2"
BR2_TARGET_XILINX_PREBUILT_VERSAL=y
diff --git a/configs/versal_vek280_defconfig b/configs/versal_vek280_defconfig
index 0ca9d30b2d..38bb7c0e75 100644
--- a/configs/versal_vek280_defconfig
+++ b/configs/versal_vek280_defconfig
@@ -1,6 +1,8 @@
BR2_aarch64=y
BR2_cortex_a72=y
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y
+BR2_TOOLCHAIN_BARE_METAL_BUILDROOT=y
+BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH="microblazeel-xilinx-elf"
BR2_GLOBAL_PATCH_DIR="board/versal/vek280/patches board/xilinx/patches"
BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
BR2_ROOTFS_POST_BUILD_SCRIPT="board/versal/post-build.sh"
@@ -34,6 +36,9 @@ BR2_TARGET_UBOOT_NEEDS_ATF_BL31_ELF=y
BR2_TARGET_UBOOT_FORMAT_DTB=y
BR2_TARGET_UBOOT_FORMAT_REMAKE_ELF=y
BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="DEVICE_TREE=versal-vek280-revB"
+BR2_TARGET_XILINX_EMBEDDEDSW=y
+BR2_TARGET_XILINX_EMBEDDEDSW_VERSAL_PLM=y
+BR2_TARGET_XILINX_EMBEDDEDSW_VERSAL_PSMFW=y
BR2_TARGET_XILINX_PREBUILT=y
BR2_TARGET_XILINX_PREBUILT_VERSION="xilinx_v2024.2"
BR2_TARGET_XILINX_PREBUILT_VERSAL=y
diff --git a/configs/versal_vpk180_defconfig b/configs/versal_vpk180_defconfig
index 1367760325..e70b3aa0f8 100644
--- a/configs/versal_vpk180_defconfig
+++ b/configs/versal_vpk180_defconfig
@@ -1,6 +1,8 @@
BR2_aarch64=y
BR2_cortex_a72=y
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y
+BR2_TOOLCHAIN_BARE_METAL_BUILDROOT=y
+BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH="microblazeel-xilinx-elf"
BR2_GLOBAL_PATCH_DIR="board/xilinx/patches"
BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
BR2_ROOTFS_POST_BUILD_SCRIPT="board/versal/post-build.sh"
@@ -34,6 +36,9 @@ BR2_TARGET_UBOOT_NEEDS_ATF_BL31_ELF=y
BR2_TARGET_UBOOT_FORMAT_DTB=y
BR2_TARGET_UBOOT_FORMAT_REMAKE_ELF=y
BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="DEVICE_TREE=versal-vpk180-revA"
+BR2_TARGET_XILINX_EMBEDDEDSW=y
+BR2_TARGET_XILINX_EMBEDDEDSW_VERSAL_PLM=y
+BR2_TARGET_XILINX_EMBEDDEDSW_VERSAL_PSMFW=y
BR2_TARGET_XILINX_PREBUILT=y
BR2_TARGET_XILINX_PREBUILT_VERSION="xilinx_v2024.2"
BR2_TARGET_XILINX_PREBUILT_VERSAL=y
--
2.25.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [Buildroot] [PATCH v2 1/4] boot/xilinx-embeddedsw: new boot package
2025-01-20 11:34 [Buildroot] [PATCH v2 1/4] boot/xilinx-embeddedsw: new boot package Neal Frager via buildroot
` (2 preceding siblings ...)
2025-01-20 11:34 ` [Buildroot] [PATCH v2 4/4] configs/versal_*: " Neal Frager via buildroot
@ 2025-01-20 17:33 ` Luca Ceresoli
2025-01-21 8:28 ` Frager, Neal via buildroot
2025-01-23 16:47 ` Arnout Vandecappelle via buildroot
4 siblings, 1 reply; 12+ messages in thread
From: Luca Ceresoli @ 2025-01-20 17:33 UTC (permalink / raw)
To: Neal Frager
Cc: ibai.erkiaga-elorza, brandon.maier, ju.o, thomas.petazzoni,
buildroot, romain.naour, michal.simek
Hello Neal,
thanks for pushing this forward.
On Mon, 20 Jan 2025 11:34:02 +0000
Neal Frager <neal.frager@amd.com> wrote:
> This patch adds a new boot package to Buildroot for building boot firmware
> applications from the https://github.com/Xilinx/embeddedsw repo.
>
> If a user chooses to build a boot firmware application, it will not be
> installed by the xilinx-prebuilt package since it will come from the
> xilinx-embeddedsw package. In this way, users can mix and match applications
> to be built by the xilinx-embeddedsw package and applications to be copied
> from the xilinx-prebuilt package. This is necessary for the versal platform
> because the pdi file can only be built by AMD Vivado.
>
> Support for additional applications in the https://github.com/Xilinx/embeddedsw
> repo can always be added to this package as needed or requested.
>
> The xilinx-embeddedsw package replaces previous solutions including
> zynqmp-firmware, versal-firmware and xilinx-source.
>
> A patch is required for the xilinx-embeddedsw repo because the LICENSE file
> has the name license.txt. A patch is thus included to create a symbolic link
> from LICENCE to licence.txt, so that the Buildroot hash check will succeed.
> This patch is not upstreamable.
Isn't changing the _LICENSE value the correct fix?
-XILINX_EMBEDDEDSW_LICENSE_FILES = LICENSE
+XILINX_EMBEDDEDSW_LICENSE_FILES = license.txt
...
> +if BR2_TARGET_XILINX_EMBEDDEDSW
> +
> +config BR2_TARGET_XILINX_EMBEDDEDSW_VERSION
> + string "xilinx-embeddedsw version"
> + default "xilinx_v2024.2"
> + help
> + Release version of Xilinx/embeddedsw.
> + Must be xilinx_v2023.1 or newer.
> +
> +config BR2_TARGET_XILINX_EMBEDDEDSW_VERSAL_PLM
> + bool "versal plm"
> + help
> + Build versal plm application from Xilinx/embeddedsw repo.
> + If selected, the xilinx-prebuilt package will not install
> + the plm.elf since it will come from the xilinx-embeddedsw
> + package.
> +
> + https://github.com/Xilinx/embeddedsw/tree/master/lib/sw_apps/versal_plm
> +
> +config BR2_TARGET_XILINX_EMBEDDEDSW_VERSAL_PSMFW
> + bool "versal psmfw"
> + help
> + Build versal psmfw application from Xilinx/embeddedsw repo.
> + If selected, the xilinx-prebuilt package will not install
> + the psmfw.elf since it will come from the xilinx-embeddedsw
> + package.
> +
> + https://github.com/Xilinx/embeddedsw/tree/master/lib/sw_apps/versal_psmfw
> +
> +config BR2_TARGET_XILINX_EMBEDDEDSW_ZYNQMP_PMUFW
> + bool "zynqmp pmufw"
> + help
> + Build zynqmp pmufw application from Xilinx/embeddedsw repo.
> + If selected, the xilinx-prebuilt package will not install
> + the pmufw.elf since it will come from the xilinx-embeddedsw
> + package.
> +
> + https://github.com/Xilinx/embeddedsw/tree/master/lib/sw_apps/zynqmp_pmufw
> +
> +config BR2_TARGET_XILINX_EMBEDDEDSW_ZYNQMP_PMUFW_USER_CFLAGS
> + string "xilinx-embeddedsw optional zynqmp_pmufw user cflags"
+ depends on BR2_TARGET_XILINX_EMBEDDEDSW_ZYNQMP_PMUFW
> + help
> + Add optional cflags when building xilinx zynqmp_pmufw.
> +
> + Example cflag options can be found here:
> + https://github.com/Xilinx/embeddedsw/blob/master/lib/sw_apps/zynqmp_pmufw/src/xpfw_config.h
> +
> +endif # BR2_TARGET_XILINX_EMBEDDEDSW
...
> diff --git a/boot/xilinx-embeddedsw/xilinx-embeddedsw.mk b/boot/xilinx-embeddedsw/xilinx-embeddedsw.mk
> new file mode 100644
> index 0000000000..9a89f27d10
> --- /dev/null
> +++ b/boot/xilinx-embeddedsw/xilinx-embeddedsw.mk
> @@ -0,0 +1,80 @@
> +################################################################################
> +#
> +# xilinx-embeddedsw
> +#
> +################################################################################
> +
> +XILINX_EMBEDDEDSW_VERSION = $(call qstrip,$(BR2_TARGET_XILINX_EMBEDDEDSW_VERSION))
> +XILINX_EMBEDDEDSW_SITE = $(call github,Xilinx,embeddedsw,$(XILINX_EMBEDDEDSW_VERSION))
> +XILINX_EMBEDDEDSW_LICENSE = MIT
> +XILINX_EMBEDDEDSW_LICENSE_FILES = LICENSE
> +XILINX_EMBEDDEDSW_INSTALL_TARGET = NO
> +XILINX_EMBEDDEDSW_INSTALL_IMAGES = YES
> +XILINX_EMBEDDEDSW_DEPENDENCIES = toolchain-bare-metal-buildroot
> +
> +# ZYNQMP_PMUFW application allows users to add cflags
> +XILINX_EMBEDDEDSW_ZYNQMP_PMUFW_USER_CFLAGS = \
> + $(call qstrip,$(BR2_TARGET_XILINX_EMBEDDEDSW_ZYNQMP_PMUFW_USER_CFLAGS))
> +XILINX_EMBEDDEDSW_ZYNQMP_PMUFW_CFLAGS = \
> + "-Os -flto -ffat-lto-objects $(XILINX_EMBEDDEDSW_ZYNQMP_PMUFW_USER_CFLAGS)"
> +
> +XILINX_EMBEDDEDSW_CFLAGS = "-Os -flto -ffat-lto-objects"
> +
> +ifeq ($(BR2_TARGET_XILINX_EMBEDDEDSW_VERSAL_PLM),y)
I still think this looks like a good approach from a user point of
view. However I cannot say whether the implementation, based on a
package looking into the config knobs of another package, is clean or
not. I'll leave this to more experienced Buildroot reviewers to judge.
Same for the following options.
Other than that it looks overall good.
I've also successfully tested on KV260.
Luca
--
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] 12+ messages in thread* Re: [Buildroot] [PATCH v2 1/4] boot/xilinx-embeddedsw: new boot package
2025-01-20 17:33 ` [Buildroot] [PATCH v2 1/4] boot/xilinx-embeddedsw: new boot package Luca Ceresoli
@ 2025-01-21 8:28 ` Frager, Neal via buildroot
0 siblings, 0 replies; 12+ messages in thread
From: Frager, Neal via buildroot @ 2025-01-21 8:28 UTC (permalink / raw)
To: Luca Ceresoli
Cc: Erkiaga Elorza, Ibai, brandon.maier@collins.com, ju.o@free.fr,
thomas.petazzoni@bootlin.com, buildroot@buildroot.org,
romain.naour@smile.fr, Simek, Michal
Hello Luca,
> This patch adds a new boot package to Buildroot for building boot firmware
> applications from the https://github.com/Xilinx/embeddedsw repo.
>
> If a user chooses to build a boot firmware application, it will not be
> installed by the xilinx-prebuilt package since it will come from the
> xilinx-embeddedsw package. In this way, users can mix and match applications
> to be built by the xilinx-embeddedsw package and applications to be copied
> from the xilinx-prebuilt package. This is necessary for the versal platform
> because the pdi file can only be built by AMD Vivado.
>
> Support for additional applications in the https://github.com/Xilinx/embeddedsw
> repo can always be added to this package as needed or requested.
>
> The xilinx-embeddedsw package replaces previous solutions including
> zynqmp-firmware, versal-firmware and xilinx-source.
>
> A patch is required for the xilinx-embeddedsw repo because the LICENSE file
> has the name license.txt. A patch is thus included to create a symbolic link
> from LICENCE to licence.txt, so that the Buildroot hash check will succeed.
> This patch is not upstreamable.
> Isn't changing the _LICENSE value the correct fix?
> -XILINX_EMBEDDEDSW_LICENSE_FILES = LICENSE
> +XILINX_EMBEDDEDSW_LICENSE_FILES = license.txt
Of course! Thank you for this. I knew I had to be missing something obvious!
> ...
> +if BR2_TARGET_XILINX_EMBEDDEDSW
> +
> +config BR2_TARGET_XILINX_EMBEDDEDSW_VERSION
> + string "xilinx-embeddedsw version"
> + default "xilinx_v2024.2"
> + help
> + Release version of Xilinx/embeddedsw.
> + Must be xilinx_v2023.1 or newer.
> +
> +config BR2_TARGET_XILINX_EMBEDDEDSW_VERSAL_PLM
> + bool "versal plm"
> + help
> + Build versal plm application from Xilinx/embeddedsw repo.
> + If selected, the xilinx-prebuilt package will not install
> + the plm.elf since it will come from the xilinx-embeddedsw
> + package.
> +
> + https://github.com/Xilinx/embeddedsw/tree/master/lib/sw_apps/versal_plm
> +
> +config BR2_TARGET_XILINX_EMBEDDEDSW_VERSAL_PSMFW
> + bool "versal psmfw"
> + help
> + Build versal psmfw application from Xilinx/embeddedsw repo.
> + If selected, the xilinx-prebuilt package will not install
> + the psmfw.elf since it will come from the xilinx-embeddedsw
> + package.
> +
> + https://github.com/Xilinx/embeddedsw/tree/master/lib/sw_apps/versal_psmfw
> +
> +config BR2_TARGET_XILINX_EMBEDDEDSW_ZYNQMP_PMUFW
> + bool "zynqmp pmufw"
> + help
> + Build zynqmp pmufw application from Xilinx/embeddedsw repo.
> + If selected, the xilinx-prebuilt package will not install
> + the pmufw.elf since it will come from the xilinx-embeddedsw
> + package.
> +
> + https://github.com/Xilinx/embeddedsw/tree/master/lib/sw_apps/zynqmp_pmufw
> +
> +config BR2_TARGET_XILINX_EMBEDDEDSW_ZYNQMP_PMUFW_USER_CFLAGS
> + string "xilinx-embeddedsw optional zynqmp_pmufw user cflags"
> + depends on BR2_TARGET_XILINX_EMBEDDEDSW_ZYNQMP_PMUFW
Good catch.
> + help
> + Add optional cflags when building xilinx zynqmp_pmufw.
> +
> + Example cflag options can be found here:
> + https://github.com/Xilinx/embeddedsw/blob/master/lib/sw_apps/zynqmp_pmufw/src/xpfw_config.h
> +
> +endif # BR2_TARGET_XILINX_EMBEDDEDSW
...
> diff --git a/boot/xilinx-embeddedsw/xilinx-embeddedsw.mk b/boot/xilinx-embeddedsw/xilinx-embeddedsw.mk
> new file mode 100644
> index 0000000000..9a89f27d10
> --- /dev/null
> +++ b/boot/xilinx-embeddedsw/xilinx-embeddedsw.mk
> @@ -0,0 +1,80 @@
> +################################################################################
> +#
> +# xilinx-embeddedsw
> +#
> +################################################################################
> +
> +XILINX_EMBEDDEDSW_VERSION = $(call qstrip,$(BR2_TARGET_XILINX_EMBEDDEDSW_VERSION))
> +XILINX_EMBEDDEDSW_SITE = $(call github,Xilinx,embeddedsw,$(XILINX_EMBEDDEDSW_VERSION))
> +XILINX_EMBEDDEDSW_LICENSE = MIT
> +XILINX_EMBEDDEDSW_LICENSE_FILES = LICENSE
> +XILINX_EMBEDDEDSW_INSTALL_TARGET = NO
> +XILINX_EMBEDDEDSW_INSTALL_IMAGES = YES
> +XILINX_EMBEDDEDSW_DEPENDENCIES = toolchain-bare-metal-buildroot
> +
> +# ZYNQMP_PMUFW application allows users to add cflags
> +XILINX_EMBEDDEDSW_ZYNQMP_PMUFW_USER_CFLAGS = \
> + $(call qstrip,$(BR2_TARGET_XILINX_EMBEDDEDSW_ZYNQMP_PMUFW_USER_CFLAGS))
> +XILINX_EMBEDDEDSW_ZYNQMP_PMUFW_CFLAGS = \
> + "-Os -flto -ffat-lto-objects $(XILINX_EMBEDDEDSW_ZYNQMP_PMUFW_USER_CFLAGS)"
> +
> +XILINX_EMBEDDEDSW_CFLAGS = "-Os -flto -ffat-lto-objects"
> +
> +ifeq ($(BR2_TARGET_XILINX_EMBEDDEDSW_VERSAL_PLM),y)
> I still think this looks like a good approach from a user point of
> view. However I cannot say whether the implementation, based on a
> package looking into the config knobs of another package, is clean or
> not. I'll leave this to more experienced Buildroot reviewers to judge.
> Same for the following options.
I am curious to what experienced Buildroot users think as well. From my view,
I currently look at the xilinx-embeddedsw and xilinx-prebuilt as being a
combined package that just happpens to work with two different repos.
With the way I currently implemented the solution, the two packages a very
much tied together. In the end, they are only used for AMD-Xilinx boards, so
since they are isolated from the rest of Buildroot, I hope my current solution
of wiring them together is ok.
> Other than that it looks overall good.
> I've also successfully tested on KV260.
Great news!
Best regards,
Neal Frager
AMD
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Buildroot] [PATCH v2 1/4] boot/xilinx-embeddedsw: new boot package
2025-01-20 11:34 [Buildroot] [PATCH v2 1/4] boot/xilinx-embeddedsw: new boot package Neal Frager via buildroot
` (3 preceding siblings ...)
2025-01-20 17:33 ` [Buildroot] [PATCH v2 1/4] boot/xilinx-embeddedsw: new boot package Luca Ceresoli
@ 2025-01-23 16:47 ` Arnout Vandecappelle via buildroot
2025-01-23 16:48 ` Arnout Vandecappelle via buildroot
2025-01-23 16:50 ` Frager, Neal via buildroot
4 siblings, 2 replies; 12+ messages in thread
From: Arnout Vandecappelle via buildroot @ 2025-01-23 16:47 UTC (permalink / raw)
To: Neal Frager, buildroot
Cc: ibai.erkiaga-elorza, luca.ceresoli, brandon.maier, ju.o,
thomas.petazzoni, romain.naour, michal.simek
Hi Neal,
On 20/01/2025 12:34, Neal Frager via buildroot wrote:
> +XILINX_EMBEDDEDSW_LICENSE = MIT
> +XILINX_EMBEDDEDSW_LICENSE_FILES = LICENSE
Instead of adding a patch that adds a symlink for LICENSE, you should simply set
XILINX_EMBEDDEDSW_LICENSE_FILES = license.txt
(and update the hash file accordingly of course).
Regards,
Arnout
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [Buildroot] [PATCH v2 1/4] boot/xilinx-embeddedsw: new boot package
2025-01-23 16:47 ` Arnout Vandecappelle via buildroot
@ 2025-01-23 16:48 ` Arnout Vandecappelle via buildroot
2025-01-23 16:50 ` Frager, Neal via buildroot
1 sibling, 0 replies; 12+ messages in thread
From: Arnout Vandecappelle via buildroot @ 2025-01-23 16:48 UTC (permalink / raw)
To: Neal Frager, buildroot
Cc: ibai.erkiaga-elorza, luca.ceresoli, brandon.maier, ju.o,
thomas.petazzoni, romain.naour, michal.simek
On 23/01/2025 17:47, Arnout Vandecappelle wrote:
> Hi Neal,
>
> On 20/01/2025 12:34, Neal Frager via buildroot wrote:
>> +XILINX_EMBEDDEDSW_LICENSE = MIT
>> +XILINX_EMBEDDEDSW_LICENSE_FILES = LICENSE
>
> Instead of adding a patch that adds a symlink for LICENSE, you should simply set
>
> XILINX_EMBEDDEDSW_LICENSE_FILES = license.txt
>
> (and update the hash file accordingly of course).
Sorry, I hadn't seen your v3 where this is already fixed.
Regards,
Arnout
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Buildroot] [PATCH v2 1/4] boot/xilinx-embeddedsw: new boot package
2025-01-23 16:47 ` Arnout Vandecappelle via buildroot
2025-01-23 16:48 ` Arnout Vandecappelle via buildroot
@ 2025-01-23 16:50 ` Frager, Neal via buildroot
1 sibling, 0 replies; 12+ messages in thread
From: Frager, Neal via buildroot @ 2025-01-23 16:50 UTC (permalink / raw)
To: Arnout Vandecappelle, buildroot@buildroot.org
Cc: Erkiaga Elorza, Ibai, luca.ceresoli@bootlin.com,
brandon.maier@collins.com, ju.o@free.fr,
thomas.petazzoni@bootlin.com, romain.naour@smile.fr,
Simek, Michal
Hi Arnout,
> +XILINX_EMBEDDEDSW_LICENSE = MIT
> +XILINX_EMBEDDEDSW_LICENSE_FILES = LICENSE
> Instead of adding a patch that adds a symlink for LICENSE, you should simply set
> XILINX_EMBEDDEDSW_LICENSE_FILES = license.txt
> (and update the hash file accordingly of course).
Yes, of course. Luca told me too.
Could you review v3 of the patch set?
https://patchwork.ozlabs.org/project/buildroot/list/?series=441189
Best regards,
Neal Frager
AMD
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2025-01-23 16:50 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-20 11:34 [Buildroot] [PATCH v2 1/4] boot/xilinx-embeddedsw: new boot package Neal Frager via buildroot
2025-01-20 11:34 ` [Buildroot] [PATCH v2 2/4] boot/uboot.mk: new zynqmp pmufw embeddedsw option Neal Frager via buildroot
2025-01-20 17:33 ` Luca Ceresoli via buildroot
2025-01-21 8:40 ` Frager, Neal via buildroot
2025-01-21 14:42 ` Luca Ceresoli via buildroot
2025-01-20 11:34 ` [Buildroot] [PATCH v2 3/4] configs/zynqmp_*: migrate to xilinx-embeddedsw Neal Frager via buildroot
2025-01-20 11:34 ` [Buildroot] [PATCH v2 4/4] configs/versal_*: " Neal Frager via buildroot
2025-01-20 17:33 ` [Buildroot] [PATCH v2 1/4] boot/xilinx-embeddedsw: new boot package Luca Ceresoli
2025-01-21 8:28 ` Frager, Neal via buildroot
2025-01-23 16:47 ` Arnout Vandecappelle via buildroot
2025-01-23 16:48 ` Arnout Vandecappelle via buildroot
2025-01-23 16:50 ` Frager, Neal via buildroot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.