* [Buildroot] [PATCH] boot/arm-trusted-firmware: introduce a choice to select the BL33 image
@ 2023-02-21 21:49 Thomas Petazzoni via buildroot
2023-02-22 15:32 ` [Buildroot] [External] - " Vincent Fazio
2023-08-12 20:23 ` [Buildroot] " Yann E. MORIN
0 siblings, 2 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-02-21 21:49 UTC (permalink / raw)
To: buildroot; +Cc: Sergey Matyukevich, Vincent Fazio, Thomas Petazzoni
We now have 3 different options to select an image as the BL33 stage
of TF-A: Barebox, U-Boot or EDK2. Technically speaking, they are
mutually exclusive: they all specify a BL33= variable to the TF-A
build, and TF-A can only support a single BL33 stage.
However, as pointed out by Vincent Fazio in [0] there is nothing that
prevents selecting Barebox, U-Boot and EDK2 together, even though it
doesn't make sense.
To address this, this commit introduces a choice...endchoice block,
into which the Barebox, U-Boot and EDK2 options are moved. An
additional "none" option is added, which is the default, and
corresponds to not having any BL33 image.
Since we keep the same name for the options, no legacy handling is
necessary.
[0] https://lore.kernel.org/buildroot/PH1P110MB1603A4AA1638838DA56BAA069FDA9@PH1P110MB1603.NAMP110.PROD.OUTLOOK.COM/
Reported-by: Vincent Fazio <vfazio@xes-inc.com>
Cc: Vincent Fazio <vfazio@xes-inc.com>
Cc: Casey Reeves <casey@xogium.me>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
boot/arm-trusted-firmware/Config.in | 57 +++++++++++++++++------------
1 file changed, 34 insertions(+), 23 deletions(-)
diff --git a/boot/arm-trusted-firmware/Config.in b/boot/arm-trusted-firmware/Config.in
index cb54c6c9d8..a5ac987172 100644
--- a/boot/arm-trusted-firmware/Config.in
+++ b/boot/arm-trusted-firmware/Config.in
@@ -129,8 +129,17 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE
endchoice
+choice
+ prompt "BL33"
+ default BR2_TARGET_ARM_TRUSTED_FIRMWARE_NONE_AS_BL33
+ help
+ Select the image to include as BL33.
+
+config BR2_TARGET_ARM_TRUSTED_FIRMWARE_NONE_AS_BL33
+ bool "None"
+
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_BAREBOX_AS_BL33
- bool "Use Barebox as BL33"
+ bool "Barebox"
depends on BR2_TARGET_BAREBOX
help
This option allows to embed the Barebox generic BL33 image in
@@ -139,6 +148,30 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_BAREBOX_AS_BL33
variable pointing to the generic bl33 image is passed
when building ATF.
+config BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33
+ bool "U-Boot"
+ depends on BR2_TARGET_UBOOT
+ help
+ This option allows to embed u-boot.bin as the BL33 part of
+ the ARM Trusted Firmware. It ensures that the u-boot package
+ gets built before ATF, and that the appropriate BL33
+ variable pointing to u-boot.bin is passed when building ATF.
+
+config BR2_TARGET_ARM_TRUSTED_FIRMWARE_EDK2_AS_BL33
+ bool "EDK2"
+ depends on BR2_TARGET_EDK2
+ help
+ This option allows to embed EDK2 as the BL33 part of
+ the ARM Trusted Firmware. It ensures that the EDK2 package
+ gets built before ATF, and that the appropriate BL33
+ variable pointing to the EDK2 is passed when building ATF.
+
+ Do not choose this option if you intend to build ATF and EDK2
+ for the 'qemu_sbsa' platform. In this case, due to the EDK2
+ build system, the dependency between ATF and EDK is reversed.
+
+endchoice
+
if BR2_TARGET_ARM_TRUSTED_FIRMWARE_BAREBOX_AS_BL33
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_BAREBOX_BL33_IMAGE
@@ -150,15 +183,6 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_BAREBOX_BL33_IMAGE
endif
-config BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33
- bool "Use U-Boot as BL33"
- depends on BR2_TARGET_UBOOT
- help
- This option allows to embed u-boot.bin as the BL33 part of
- the ARM Trusted Firmware. It ensures that the u-boot package
- gets built before ATF, and that the appropriate BL33
- variable pointing to u-boot.bin is passed when building ATF.
-
if BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE
@@ -170,19 +194,6 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE
endif
-config BR2_TARGET_ARM_TRUSTED_FIRMWARE_EDK2_AS_BL33
- bool "Use EDK2 as BL33"
- depends on BR2_TARGET_EDK2
- help
- This option allows to embed EDK2 as the BL33 part of
- the ARM Trusted Firmware. It ensures that the EDK2 package
- gets built before ATF, and that the appropriate BL33
- variable pointing to the EDK2 is passed when building ATF.
-
- Do not choose this option if you intend to build ATF and EDK2
- for the 'qemu_sbsa' platform. In this case, due to the EDK2
- build system, the dependency between ATF and EDK is reversed.
-
config BR2_TARGET_ARM_TRUSTED_FIRMWARE_RCW
bool "Include NXP RCW in BL2"
depends on BR2_PACKAGE_HOST_QORIQ_RCW
--
2.39.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [External] - [PATCH] boot/arm-trusted-firmware: introduce a choice to select the BL33 image
2023-02-21 21:49 [Buildroot] [PATCH] boot/arm-trusted-firmware: introduce a choice to select the BL33 image Thomas Petazzoni via buildroot
@ 2023-02-22 15:32 ` Vincent Fazio
2023-08-12 20:23 ` [Buildroot] " Yann E. MORIN
1 sibling, 0 replies; 3+ messages in thread
From: Vincent Fazio @ 2023-02-22 15:32 UTC (permalink / raw)
To: Thomas Petazzoni, buildroot@buildroot.org; +Cc: Sergey Matyukevich
> -----Original Message-----
> From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Sent: Tuesday, February 21, 2023 3:49 PM
> To: buildroot@buildroot.org
> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>; Vincent Fazio
> <vfazio@xes-inc.com>; Casey Reeves <casey@xogium.me>; Dick Olsson
> <hi@senzilla.io>; Sergey Matyukevich <geomatsi@gmail.com>
> Subject: [External] - [PATCH] boot/arm-trusted-firmware: introduce a choice
> to select the BL33 image
>
> We now have 3 different options to select an image as the BL33 stage of TF-
> A: Barebox, U-Boot or EDK2. Technically speaking, they are mutually
> exclusive: they all specify a BL33= variable to the TF-A build, and TF-A can
> only support a single BL33 stage.
>
> However, as pointed out by Vincent Fazio in [0] there is nothing that
> prevents selecting Barebox, U-Boot and EDK2 together, even though it
> doesn't make sense.
>
> To address this, this commit introduces a choice...endchoice block, into which
> the Barebox, U-Boot and EDK2 options are moved. An additional "none"
> option is added, which is the default, and corresponds to not having any BL33
> image.
>
> Since we keep the same name for the options, no legacy handling is
> necessary.
>
> [0]
> https://lore.kernel.org/buildroot/PH1P110MB1603A4AA1638838DA56BAA06
> 9FDA9@PH1P110MB1603.NAMP110.PROD.OUTLOOK.COM/
>
> Reported-by: Vincent Fazio <vfazio@xes-inc.com>
> Cc: Vincent Fazio <vfazio@xes-inc.com>
> Cc: Casey Reeves <casey@xogium.me>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> ---
> boot/arm-trusted-firmware/Config.in | 57 +++++++++++++++++------------
> 1 file changed, 34 insertions(+), 23 deletions(-)
>
> diff --git a/boot/arm-trusted-firmware/Config.in b/boot/arm-trusted-
> firmware/Config.in
> index cb54c6c9d8..a5ac987172 100644
> --- a/boot/arm-trusted-firmware/Config.in
> +++ b/boot/arm-trusted-firmware/Config.in
> @@ -129,8 +129,17 @@ config
> BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE
>
> endchoice
>
> +choice
> + prompt "BL33"
> + default BR2_TARGET_ARM_TRUSTED_FIRMWARE_NONE_AS_BL33
> + help
> + Select the image to include as BL33.
> +
> +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_NONE_AS_BL33
> + bool "None"
> +
> config BR2_TARGET_ARM_TRUSTED_FIRMWARE_BAREBOX_AS_BL33
> - bool "Use Barebox as BL33"
> + bool "Barebox"
> depends on BR2_TARGET_BAREBOX
> help
> This option allows to embed the Barebox generic BL33 image in @@ -
> 139,6 +148,30 @@ config
> BR2_TARGET_ARM_TRUSTED_FIRMWARE_BAREBOX_AS_BL33
> variable pointing to the generic bl33 image is passed
> when building ATF.
>
> +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33
> + bool "U-Boot"
> + depends on BR2_TARGET_UBOOT
> + help
> + This option allows to embed u-boot.bin as the BL33 part of
> + the ARM Trusted Firmware. It ensures that the u-boot package
> + gets built before ATF, and that the appropriate BL33
> + variable pointing to u-boot.bin is passed when building ATF.
> +
> +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_EDK2_AS_BL33
> + bool "EDK2"
> + depends on BR2_TARGET_EDK2
> + help
> + This option allows to embed EDK2 as the BL33 part of
> + the ARM Trusted Firmware. It ensures that the EDK2 package
> + gets built before ATF, and that the appropriate BL33
> + variable pointing to the EDK2 is passed when building ATF.
> +
> + Do not choose this option if you intend to build ATF and EDK2
> + for the 'qemu_sbsa' platform. In this case, due to the EDK2
> + build system, the dependency between ATF and EDK is reversed.
> +
> +endchoice
> +
> if BR2_TARGET_ARM_TRUSTED_FIRMWARE_BAREBOX_AS_BL33
>
> config BR2_TARGET_ARM_TRUSTED_FIRMWARE_BAREBOX_BL33_IMAGE
> @@ -150,15 +183,6 @@ config
> BR2_TARGET_ARM_TRUSTED_FIRMWARE_BAREBOX_BL33_IMAGE
>
> endif
>
> -config BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33
> - bool "Use U-Boot as BL33"
> - depends on BR2_TARGET_UBOOT
> - help
> - This option allows to embed u-boot.bin as the BL33 part of
> - the ARM Trusted Firmware. It ensures that the u-boot package
> - gets built before ATF, and that the appropriate BL33
> - variable pointing to u-boot.bin is passed when building ATF.
> -
> if BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33
>
> config BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE
> @@ -170,19 +194,6 @@ config
> BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE
>
> endif
>
> -config BR2_TARGET_ARM_TRUSTED_FIRMWARE_EDK2_AS_BL33
> - bool "Use EDK2 as BL33"
> - depends on BR2_TARGET_EDK2
> - help
> - This option allows to embed EDK2 as the BL33 part of
> - the ARM Trusted Firmware. It ensures that the EDK2 package
> - gets built before ATF, and that the appropriate BL33
> - variable pointing to the EDK2 is passed when building ATF.
> -
> - Do not choose this option if you intend to build ATF and EDK2
> - for the 'qemu_sbsa' platform. In this case, due to the EDK2
> - build system, the dependency between ATF and EDK is reversed.
> -
> config BR2_TARGET_ARM_TRUSTED_FIRMWARE_RCW
> bool "Include NXP RCW in BL2"
> depends on BR2_PACKAGE_HOST_QORIQ_RCW
> --
> 2.39.1
>
Tested-by: Vincent Fazio <vfazio@xes-inc.com>
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH] boot/arm-trusted-firmware: introduce a choice to select the BL33 image
2023-02-21 21:49 [Buildroot] [PATCH] boot/arm-trusted-firmware: introduce a choice to select the BL33 image Thomas Petazzoni via buildroot
2023-02-22 15:32 ` [Buildroot] [External] - " Vincent Fazio
@ 2023-08-12 20:23 ` Yann E. MORIN
1 sibling, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2023-08-12 20:23 UTC (permalink / raw)
To: Thomas Petazzoni; +Cc: Vincent Fazio, Sergey Matyukevich, buildroot
Thomas, All,
On 2023-02-21 22:49 +0100, Thomas Petazzoni via buildroot spake thusly:
> We now have 3 different options to select an image as the BL33 stage
> of TF-A: Barebox, U-Boot or EDK2. Technically speaking, they are
> mutually exclusive: they all specify a BL33= variable to the TF-A
> build, and TF-A can only support a single BL33 stage.
>
> However, as pointed out by Vincent Fazio in [0] there is nothing that
> prevents selecting Barebox, U-Boot and EDK2 together, even though it
> doesn't make sense.
>
> To address this, this commit introduces a choice...endchoice block,
> into which the Barebox, U-Boot and EDK2 options are moved. An
> additional "none" option is added, which is the default, and
> corresponds to not having any BL33 image.
>
> Since we keep the same name for the options, no legacy handling is
> necessary.
>
> [0] https://lore.kernel.org/buildroot/PH1P110MB1603A4AA1638838DA56BAA069FDA9@PH1P110MB1603.NAMP110.PROD.OUTLOOK.COM/
>
> Reported-by: Vincent Fazio <vfazio@xes-inc.com>
> Cc: Vincent Fazio <vfazio@xes-inc.com>
> Cc: Casey Reeves <casey@xogium.me>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
As seen on IRC, this is not critical, even if semantically it is a fix.
so: applied to next, thanks.
Regards,
Yann E. MORIN.
> ---
> boot/arm-trusted-firmware/Config.in | 57 +++++++++++++++++------------
> 1 file changed, 34 insertions(+), 23 deletions(-)
>
> diff --git a/boot/arm-trusted-firmware/Config.in b/boot/arm-trusted-firmware/Config.in
> index cb54c6c9d8..a5ac987172 100644
> --- a/boot/arm-trusted-firmware/Config.in
> +++ b/boot/arm-trusted-firmware/Config.in
> @@ -129,8 +129,17 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE
>
> endchoice
>
> +choice
> + prompt "BL33"
> + default BR2_TARGET_ARM_TRUSTED_FIRMWARE_NONE_AS_BL33
> + help
> + Select the image to include as BL33.
> +
> +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_NONE_AS_BL33
> + bool "None"
> +
> config BR2_TARGET_ARM_TRUSTED_FIRMWARE_BAREBOX_AS_BL33
> - bool "Use Barebox as BL33"
> + bool "Barebox"
> depends on BR2_TARGET_BAREBOX
> help
> This option allows to embed the Barebox generic BL33 image in
> @@ -139,6 +148,30 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_BAREBOX_AS_BL33
> variable pointing to the generic bl33 image is passed
> when building ATF.
>
> +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33
> + bool "U-Boot"
> + depends on BR2_TARGET_UBOOT
> + help
> + This option allows to embed u-boot.bin as the BL33 part of
> + the ARM Trusted Firmware. It ensures that the u-boot package
> + gets built before ATF, and that the appropriate BL33
> + variable pointing to u-boot.bin is passed when building ATF.
> +
> +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_EDK2_AS_BL33
> + bool "EDK2"
> + depends on BR2_TARGET_EDK2
> + help
> + This option allows to embed EDK2 as the BL33 part of
> + the ARM Trusted Firmware. It ensures that the EDK2 package
> + gets built before ATF, and that the appropriate BL33
> + variable pointing to the EDK2 is passed when building ATF.
> +
> + Do not choose this option if you intend to build ATF and EDK2
> + for the 'qemu_sbsa' platform. In this case, due to the EDK2
> + build system, the dependency between ATF and EDK is reversed.
> +
> +endchoice
> +
> if BR2_TARGET_ARM_TRUSTED_FIRMWARE_BAREBOX_AS_BL33
>
> config BR2_TARGET_ARM_TRUSTED_FIRMWARE_BAREBOX_BL33_IMAGE
> @@ -150,15 +183,6 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_BAREBOX_BL33_IMAGE
>
> endif
>
> -config BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33
> - bool "Use U-Boot as BL33"
> - depends on BR2_TARGET_UBOOT
> - help
> - This option allows to embed u-boot.bin as the BL33 part of
> - the ARM Trusted Firmware. It ensures that the u-boot package
> - gets built before ATF, and that the appropriate BL33
> - variable pointing to u-boot.bin is passed when building ATF.
> -
> if BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33
>
> config BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE
> @@ -170,19 +194,6 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE
>
> endif
>
> -config BR2_TARGET_ARM_TRUSTED_FIRMWARE_EDK2_AS_BL33
> - bool "Use EDK2 as BL33"
> - depends on BR2_TARGET_EDK2
> - help
> - This option allows to embed EDK2 as the BL33 part of
> - the ARM Trusted Firmware. It ensures that the EDK2 package
> - gets built before ATF, and that the appropriate BL33
> - variable pointing to the EDK2 is passed when building ATF.
> -
> - Do not choose this option if you intend to build ATF and EDK2
> - for the 'qemu_sbsa' platform. In this case, due to the EDK2
> - build system, the dependency between ATF and EDK is reversed.
> -
> config BR2_TARGET_ARM_TRUSTED_FIRMWARE_RCW
> bool "Include NXP RCW in BL2"
> depends on BR2_PACKAGE_HOST_QORIQ_RCW
> --
> 2.39.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] 3+ messages in thread
end of thread, other threads:[~2023-08-12 20:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-21 21:49 [Buildroot] [PATCH] boot/arm-trusted-firmware: introduce a choice to select the BL33 image Thomas Petazzoni via buildroot
2023-02-22 15:32 ` [Buildroot] [External] - " Vincent Fazio
2023-08-12 20:23 ` [Buildroot] " Yann E. MORIN
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox