Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] boot/arm-trusted-firmware: make Barebox available as BL33
@ 2023-01-19 18:30 Casey Reeves
  2023-01-19 18:50 ` [Buildroot] [PATCH v2] boot/arm-trusted-firmware: " Casey Reeves
  0 siblings, 1 reply; 5+ messages in thread
From: Casey Reeves @ 2023-01-19 18:30 UTC (permalink / raw)
  To: buildroot; +Cc: Sergey Matyukevich

Since version 2022.04.0, Barebox now support a generic image built for
platforms, to be used as BL33 to generate FIP images. This patch makes
it available as choice of BL33 to be used with ATF and is based on the
similar work put into U-Boot as BL33.

Signed-off-by: Casey Reeves <casey@xogium.me>
---
 boot/arm-trusted-firmware/Config.in           | 21 +++++++++++++++++++
 .../arm-trusted-firmware.mk                   |  6 ++++++
 2 files changed, 27 insertions(+)

diff --git a/boot/arm-trusted-firmware/Config.in b/boot/arm-trusted-firmware/Config.in
index a9b9bbcc5a..0ed0fd48ff 100644
--- a/boot/arm-trusted-firmware/Config.in
+++ b/boot/arm-trusted-firmware/Config.in
@@ -129,6 +129,27 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE
 
 endchoice
 
+config BR2_TARGET_ARM_TRUSTED_FIRMWARE_BAREBOX_AS_BL33
+	bool "Use Barebox as BL33"
+	depends on BR2_TARGET_BAREBOX
+	help
+	  This option allows to embed the Barebox generic BL33 image in
+	  the ARM Trusted Firmware. It ensures that the Barebox package
+	  gets built before ATF, and that the appropriate BL33
+	  variable pointing to the generic bl33 image is passed
+	  when building ATF.
+
+if BR2_TARGET_ARM_TRUSTED_FIRMWARE_BAREBOX_AS_BL33
+
+config BR2_TARGET_ARM_TRUSTED_FIRMWARE_BAREBOX_BL33_IMAGE
+	string "Barebox BL33 image name"
+	default *-generic-bl33.img""
+	help
+	  Name of the Barebox BL33 image to include in ATF, it must
+	  have been installed to BINARIES_DIR by the Barebox package.
+
+endif
+
 config BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33
 	bool "Use U-Boot as BL33"
 	depends on BR2_TARGET_UBOOT
diff --git a/boot/arm-trusted-firmware/arm-trusted-firmware.mk b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
index 1164c81410..648f62ed85 100644
--- a/boot/arm-trusted-firmware/arm-trusted-firmware.mk
+++ b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
@@ -105,6 +105,12 @@ ARM_TRUSTED_FIRMWARE_MAKE_OPTS += AARCH32_SP=optee
 endif
 endif # BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE
 
+ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_BAREBOX_AS_BL33),y)
+ARM_TRUSTED_FIRMWARE_BAREBOX_BIN = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_BAREBOX_BL33_IMAGE))
+ARM_TRUSTED_FIRMWARE_MAKE_OPTS += BL33=$(BINARIES_DIR)/$(ARM_TRUSTED_FIRMWARE_BAREBOX_BIN)
+ARM_TRUSTED_FIRMWARE_DEPENDENCIES += barebox
+endif
+
 ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_EDK2_AS_BL33),y)
 ARM_TRUSTED_FIRMWARE_DEPENDENCIES += edk2
 # Since the flash device name vary between platforms, we use the variable
-- 
2.39.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-02-21 21:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-19 18:30 [Buildroot] [PATCH] boot/arm-trusted-firmware: make Barebox available as BL33 Casey Reeves
2023-01-19 18:50 ` [Buildroot] [PATCH v2] boot/arm-trusted-firmware: " Casey Reeves
2023-02-06 13:36   ` [Buildroot] [External] - " Vincent Fazio
2023-02-21 21:54     ` Thomas Petazzoni via buildroot
2023-02-21 21:48   ` [Buildroot] " Thomas Petazzoni via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox