All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 4/8] boot/arm-trusted-firmware: add EDK2 as BL33 option
Date: Mon, 20 Jul 2020 22:59:41 +0200	[thread overview]
Message-ID: <20200720225941.796ff11c@windsurf.home> (raw)
In-Reply-To: <20200719180727.28202-5-hi@senzilla.io>

Hello,

+Yann Morin, on variable reference between packages.

On Sun, 19 Jul 2020 18:10:03 +0000
Dick Olsson <hi@senzilla.io> wrote:

> diff --git a/boot/arm-trusted-firmware/Config.in b/boot/arm-trusted-firmware/Config.in
> index 7d0f6aa4e0..f24813f8e6 100644
> --- a/boot/arm-trusted-firmware/Config.in
> +++ b/boot/arm-trusted-firmware/Config.in
> @@ -1,7 +1,7 @@
>  config BR2_TARGET_ARM_TRUSTED_FIRMWARE
>  	bool "ARM Trusted Firmware (ATF)"
>  	depends on (BR2_ARM_CPU_ARMV8A || BR2_ARM_CPU_ARMV7A) && \
> -           BR2_TARGET_UBOOT
> +           (BR2_TARGET_UBOOT || BR2_TARGET_EDK2)

Ah, this is why your previous patch has a spurious change in this file :-)

> +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.

So there are cases where ATF depends on EDK2, and other cases where
EDK2 depends on ATF (BR2_TARGET_EDK2_PLATFORM_QEMU_SBSA situation).
Correct ?

Note: this is OK, we already have this situation between U-Boot and
ATF. On some platforms, ATF embeds U-Boot, on others, U-Boot embeds ATF.

>  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 a3553e36cf..58b48df5d8 100644
> --- a/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> +++ b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> @@ -79,6 +79,13 @@ ARM_TRUSTED_FIRMWARE_MAKE_OPTS += AARCH32_SP=optee
>  endif
>  endif # BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE
>  
> +ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_EDK2_AS_BL33),y)
> +ARM_TRUSTED_FIRMWARE_DEPENDENCIES += edk2
> +# Since the flash device names vary between platforms, we use the variable
> +# provided by the EDK2 package this.
> +ARM_TRUSTED_FIRMWARE_MAKE_OPTS += BL33=$(BINARIES_DIR)/$(EDK2_FD_NAME).fd

So there is this reference to a variable of another package, which I'm
never sure if it works correctly. Yann, what is the rule again ? :-)

For the U-Boot case, we have an explicit
BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE. If we drop the
"platform choice" in EDK2, we would anyway have to specify somewhere a
free form string that contains the final image name.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2020-07-20 20:59 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-19 18:08 [Buildroot] [PATCH 0/8] Introduce EDK2 firmware builds Dick Olsson
2020-07-19 18:08 ` [Buildroot] [PATCH 1/8] package/edk2-platforms: new package Dick Olsson
2020-07-20 20:40   ` Thomas Petazzoni
2020-07-19 18:09 ` [Buildroot] [PATCH 2/8] boot/edk2: " Dick Olsson
2020-07-20 20:56   ` Thomas Petazzoni
2020-07-19 18:09 ` [Buildroot] [PATCH 3/8] boot/arm-trusted-firmware: bump to version 2.2 Dick Olsson
2020-07-20 20:39   ` Thomas Petazzoni
2020-07-19 18:10 ` [Buildroot] [PATCH 4/8] boot/arm-trusted-firmware: add EDK2 as BL33 option Dick Olsson
2020-07-20 20:59   ` Thomas Petazzoni [this message]
2020-07-20 21:21     ` Yann E. MORIN
2020-07-21  7:26       ` Thomas Petazzoni
2020-07-19 18:10 ` [Buildroot] [PATCH 5/8] configs/aarch64_efi_defconfig: build the EDK2 firmware from source Dick Olsson
2020-07-20 21:02   ` Thomas Petazzoni
2020-07-19 18:10 ` [Buildroot] [PATCH 6/8] configs/qemu_aarch64_sbsa_sbbr_defconfig: new config for SBBR on QEMU SBSA Dick Olsson
2020-07-20 21:15   ` Thomas Petazzoni
2020-07-19 18:11 ` [Buildroot] [PATCH 7/8] configs/qemu_aarch64_virt_sbbr_defconfig: new config for SBBR on Virt Dick Olsson
2020-07-19 18:11 ` [Buildroot] [PATCH 8/8] configs/arm_foundationv8_sbbr_defconfig: new config for SBBR on FVP Dick Olsson
2020-07-20 21:10 ` [Buildroot] [PATCH 0/8] Introduce EDK2 firmware builds Thomas Petazzoni
2020-07-22 19:36   ` DO

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200720225941.796ff11c@windsurf.home \
    --to=thomas.petazzoni@bootlin.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.