All of 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

* [Buildroot] [PATCH v2] boot/arm-trusted-firmware: Barebox available as BL33
  2023-01-19 18:30 [Buildroot] [PATCH] boot/arm-trusted-firmware: make Barebox available as BL33 Casey Reeves
@ 2023-01-19 18:50 ` Casey Reeves
  2023-02-06 13:36   ` [Buildroot] [External] - " Vincent Fazio
  2023-02-21 21:48   ` [Buildroot] " Thomas Petazzoni via buildroot
  0 siblings, 2 replies; 5+ messages in thread
From: Casey Reeves @ 2023-01-19 18:50 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>

---
Changes v1 -> v2:
- fixed quoting issue in the default image name
---
 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..cb54c6c9d8 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

* Re: [Buildroot] [External] - [PATCH v2] boot/arm-trusted-firmware: Barebox available as BL33
  2023-01-19 18:50 ` [Buildroot] [PATCH v2] boot/arm-trusted-firmware: " Casey Reeves
@ 2023-02-06 13:36   ` Vincent Fazio
  2023-02-21 21:54     ` Thomas Petazzoni via buildroot
  2023-02-21 21:48   ` [Buildroot] " Thomas Petazzoni via buildroot
  1 sibling, 1 reply; 5+ messages in thread
From: Vincent Fazio @ 2023-02-06 13:36 UTC (permalink / raw)
  To: Casey Reeves, buildroot; +Cc: Sergey Matyukevich

Casey,

> -----Original Message-----
> From: buildroot <buildroot-bounces@buildroot.org> On Behalf Of Casey
> Reeves
> Sent: Thursday, January 19, 2023 12:51 PM
> To: buildroot@buildroot.org
> Cc: Sergey Matyukevich <geomatsi@gmail.com>
> Subject: [External] - [Buildroot] [PATCH v2] boot/arm-trusted-firmware:
> Barebox available as BL33
> 
> 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>
> 
> ---
> Changes v1 -> v2:
> - fixed quoting issue in the default image name
> ---
>  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..cb54c6c9d8 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

Does TFA allow multiple BL33 images to be defined? I don't see a guard if some other package such as U-Boot or EDK2 has been enabled as well. 
If only one image is supported but multiple images are supplied via BL33 on the make command line, is it last declared wins?

> +       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
> CAUTION: This email originated from outside of the organization. Do not click
> links or open attachments unless you recognize the sender and know the
> content is safe.

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

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

* Re: [Buildroot] [PATCH v2] boot/arm-trusted-firmware: Barebox available as BL33
  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:48   ` Thomas Petazzoni via buildroot
  1 sibling, 0 replies; 5+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-02-21 21:48 UTC (permalink / raw)
  To: Casey Reeves; +Cc: Sergey Matyukevich, buildroot

On Thu, 19 Jan 2023 19:50:40 +0100
Casey Reeves <casey@xogium.me> wrote:

> 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>
> 
> ---
> Changes v1 -> v2:
> - fixed quoting issue in the default image name
> ---
>  boot/arm-trusted-firmware/Config.in           | 21 +++++++++++++++++++
>  .../arm-trusted-firmware.mk                   |  6 ++++++
>  2 files changed, 27 insertions(+)

Applied to next, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, 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] 5+ messages in thread

* Re: [Buildroot] [External] - [PATCH v2] boot/arm-trusted-firmware: Barebox available as BL33
  2023-02-06 13:36   ` [Buildroot] [External] - " Vincent Fazio
@ 2023-02-21 21:54     ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-02-21 21:54 UTC (permalink / raw)
  To: Vincent Fazio; +Cc: Sergey Matyukevich, buildroot

Hello Vincent,

On Mon, 6 Feb 2023 13:36:09 +0000
Vincent Fazio <vfazio@xes-inc.com> wrote:

> Does TFA allow multiple BL33 images to be defined? I don't see a guard if some other package such as U-Boot or EDK2 has been enabled as well. 
> If only one image is supported but multiple images are supplied via BL33 on the make command line, is it last declared wins?

This is absolutely true, so I have submitted
https://patchwork.ozlabs.org/project/buildroot/patch/20230221214904.454053-1-thomas.petazzoni@bootlin.com/
to move to a choice..endchoice in Config.in to select the BL33. Thanks
for reporting this!

Best regards,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[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 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.