diff mbox series

[v5,5/9] boot/arm-trusted-firmware: allow additional make dependencies

Message ID 20200207083857.28058-5-jerry.huang@nxp.com
State Changes Requested
Headers show
Series [v5,1/9] package/nxp: new package directory | expand

Commit Message

Changming Huang Feb. 7, 2020, 8:38 a.m. UTC
Allow specifying additional build dependencies for ATF.

This might be more useful when using a custom git repository.

For example, when using with the ATF repository from NXP QorIQ,
the qoriq-rcw is used to build the pbl binary image.

Signed-off-by: Changming Huang <jerry.huang@nxp.com>
---
changes since v4:
1. remove the option BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_TARGETS.
2. modify the description.

changes since v3:
no changes.

changes since v2:
1. introduce option BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_TARGETS.
2. introduce option BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_DEPENDENCIES.
3. rewrite the makefile with these two options

changes since v1:
1. Use option BR2_PACKAGE_HOST_RCW_ATF as the condition for RCW used by ATF.
---
 boot/arm-trusted-firmware/Config.in               | 5 +++++
 boot/arm-trusted-firmware/arm-trusted-firmware.mk | 3 +++
 2 files changed, 8 insertions(+)

Comments

Arnout Vandecappelle Jan. 6, 2022, 3:05 p.m. UTC | #1
On 07/02/2020 09:38, Changming Huang wrote:
> Allow specifying additional build dependencies for ATF.
> 
> This might be more useful when using a custom git repository.
> 
> For example, when using with the ATF repository from NXP QorIQ,
> the qoriq-rcw is used to build the pbl binary image.

  This is not a very user-friendly way to do it. Since RCW support is something 
that is in upstream ATF, I think it makes a whole lot more sense to make it an 
explicit option. Something like:

config BR2_TARGET_ARM_TRUSTED_FIRMWARE_RCW
	bool "Include RCW"
	depends on BR2_HOST_QORIQ_RCW
	help
	  Include the RCW in BL2.

  That way you can also add the RCW=$(BINARIES_DIR)/PBL.bin automatically to the 
variables (and this is an advantage of always calling it PBL.bin :-)

  I've marked this patch as Changes Requested.

  Regards,
  Arnout

> 
> Signed-off-by: Changming Huang <jerry.huang@nxp.com>
> ---
> changes since v4:
> 1. remove the option BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_TARGETS.
> 2. modify the description.
> 
> changes since v3:
> no changes.
> 
> changes since v2:
> 1. introduce option BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_TARGETS.
> 2. introduce option BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_DEPENDENCIES.
> 3. rewrite the makefile with these two options
> 
> changes since v1:
> 1. Use option BR2_PACKAGE_HOST_RCW_ATF as the condition for RCW used by ATF.
> ---
>   boot/arm-trusted-firmware/Config.in               | 5 +++++
>   boot/arm-trusted-firmware/arm-trusted-firmware.mk | 3 +++
>   2 files changed, 8 insertions(+)
> 
> diff --git a/boot/arm-trusted-firmware/Config.in b/boot/arm-trusted-firmware/Config.in
> index 373591d497..c9b74064d7 100644
> --- a/boot/arm-trusted-firmware/Config.in
> +++ b/boot/arm-trusted-firmware/Config.in
> @@ -142,6 +142,11 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_TARGETS
>   	  E.G. When using the QorIQ custom ATF repository from NXP,
>   	  the target 'pbl' can be used to build the pbl binary.
>   
> +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_DEPENDENCIES
> +	string "Additional AFT dependencies"
> +	help
> +	  Additional dependencies for ATF build, E.G. "host-qoriq-rcw"
> +
>   config BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES
>   	string "Additional ATF build variables"
>   	help
> diff --git a/boot/arm-trusted-firmware/arm-trusted-firmware.mk b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> index bf1ac46cf6..43be2fef99 100644
> --- a/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> +++ b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
> @@ -92,6 +92,9 @@ endif
>   
>   ARM_TRUSTED_FIRMWARE_MAKE_TARGETS = all
>   
> +ARM_TRUSTED_FIRMWARE_DEPENDENCIES += \
> +	$(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_DEPENDENCIES))
> +
>   ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP),y)
>   ARM_TRUSTED_FIRMWARE_MAKE_TARGETS += fip
>   ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-openssl
>
diff mbox series

Patch

diff --git a/boot/arm-trusted-firmware/Config.in b/boot/arm-trusted-firmware/Config.in
index 373591d497..c9b74064d7 100644
--- a/boot/arm-trusted-firmware/Config.in
+++ b/boot/arm-trusted-firmware/Config.in
@@ -142,6 +142,11 @@  config BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_TARGETS
 	  E.G. When using the QorIQ custom ATF repository from NXP,
 	  the target 'pbl' can be used to build the pbl binary.
 
+config BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_DEPENDENCIES
+	string "Additional AFT dependencies"
+	help
+	  Additional dependencies for ATF build, E.G. "host-qoriq-rcw"
+
 config BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES
 	string "Additional ATF build variables"
 	help
diff --git a/boot/arm-trusted-firmware/arm-trusted-firmware.mk b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
index bf1ac46cf6..43be2fef99 100644
--- a/boot/arm-trusted-firmware/arm-trusted-firmware.mk
+++ b/boot/arm-trusted-firmware/arm-trusted-firmware.mk
@@ -92,6 +92,9 @@  endif
 
 ARM_TRUSTED_FIRMWARE_MAKE_TARGETS = all
 
+ARM_TRUSTED_FIRMWARE_DEPENDENCIES += \
+	$(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_DEPENDENCIES))
+
 ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP),y)
 ARM_TRUSTED_FIRMWARE_MAKE_TARGETS += fip
 ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-openssl