mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] U-Boot: Add TF-A dependency option.
@ 2021-11-29 14:27 Christian Melki
  2021-11-29 15:31 ` Alexander Dahl
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Melki @ 2021-11-29 14:27 UTC (permalink / raw)
  To: ptxdist

Let U-Boot depend on TF-A firmwares for inclusion.
TF-A firmwares are a common thing on various machines.
Also add an option to let U-Boot build without the
"Out Of Tree" option. This option sometimes breaks
builds with various external dependencies.

Signed-off-by: Christian Melki <christian.melki@t2data.com>
---
 platforms/u-boot.in | 20 +++++++++++++++++++-
 rules/u-boot.make   |  4 +++-
 2 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/platforms/u-boot.in b/platforms/u-boot.in
index 4ddf3b3fb..0d8213f45 100644
--- a/platforms/u-boot.in
+++ b/platforms/u-boot.in
@@ -2,6 +2,7 @@
 
 menuconfig U_BOOT
 	select BOOTLOADER
+	select TF_A		if U_BOOT_USE_TF_A
 	prompt "U-Boot                        "
 	bool
 
@@ -19,6 +20,16 @@ config U_BOOT_MD5
 	string
 	prompt "U-Boot source md5"
 
+config U_BOOT_BUILD_OOT
+	prompt "Out of tree build"
+	default y
+	bool
+	help
+	  U-Boot is usually built out of tree.
+	  But for some builds, f.ex. with firmware blobs, out of tree builds
+	  can break because of vendors using source paths to files.
+	  This is mostly a workaround for those type of builds.
+
 choice
 	prompt "config system"
 	default U_BOOT_CONFIGSYSTEM_LEGACY
@@ -71,12 +82,19 @@ config U_BOOT_CONFIG
 
 endif
 
+config U_BOOT_USE_TF_A
+	prompt "Include TF-A firmwares in U-Boot."
+	bool
+	help
+	  Generate TF-A (ARM Trusted Firmwares type A) to include in u-boot.
+
 config U_BOOT_CUSTOM_MAKE_OPTS
 	prompt "Custom make options"
 	string
 	help
 	  List of custom make options passed at build time. Can be
-	  used for example to pass a DEVICE_TREE= value.
+	  used for example to pass a DEVICE_TREE= value or passing
+	  TF-A firmware, BL31=${PTXDIST_PLATFORMDIR}/path-to/bl31.bin
 
 choice
 	prompt "Generate environment image"
diff --git a/rules/u-boot.make b/rules/u-boot.make
index 38c32bf27..b2e4e1311 100644
--- a/rules/u-boot.make
+++ b/rules/u-boot.make
@@ -23,9 +23,11 @@ U_BOOT_SUFFIX		:= tar.bz2
 U_BOOT_URL		:= https://ftp.denx.de/pub/u-boot/$(U_BOOT).$(U_BOOT_SUFFIX)
 U_BOOT_SOURCE		:= $(SRCDIR)/$(U_BOOT).$(U_BOOT_SUFFIX)
 U_BOOT_DIR		:= $(BUILDDIR)/$(U_BOOT)
+ifeq ($(PTXCONF_U_BOOT_BUILD_OOT),y)
 U_BOOT_BUILD_DIR	:= $(U_BOOT_DIR)-build
+endif
 U_BOOT_DEVPKG		:= NO
-U_BOOT_BUILD_OOT	:= KEEP
+U_BOOT_BUILD_OOT	:= $(call ptx/ifdef, PTXCONF_U_BOOT_BUILD_OOT, YES, NO)
 
 ifdef PTXCONF_U_BOOT_CONFIGSYSTEM_KCONFIG
 U_BOOT_CONFIG	:= $(call ptx/in-platformconfigdir, \
-- 
2.30.2


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


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

* Re: [ptxdist] [PATCH] U-Boot: Add TF-A dependency option.
  2021-11-29 14:27 [ptxdist] [PATCH] U-Boot: Add TF-A dependency option Christian Melki
@ 2021-11-29 15:31 ` Alexander Dahl
  0 siblings, 0 replies; 2+ messages in thread
From: Alexander Dahl @ 2021-11-29 15:31 UTC (permalink / raw)
  To: ptxdist; +Cc: Christian Melki


[-- Attachment #1.1: Type: text/plain, Size: 3371 bytes --]

Hello Christian,

On Mon, Nov 29, 2021 at 03:27:20PM +0100, Christian Melki wrote:
> Let U-Boot depend on TF-A firmwares for inclusion.
> TF-A firmwares are a common thing on various machines.
> Also add an option to let U-Boot build without the
> "Out Of Tree" option. This option sometimes breaks
> builds with various external dependencies.

I would split the TF-A stuff from the oot build and make two
changesets. Those two are conceptually independent.

Greets
Alex

> Signed-off-by: Christian Melki <christian.melki@t2data.com>
> ---
>  platforms/u-boot.in | 20 +++++++++++++++++++-
>  rules/u-boot.make   |  4 +++-
>  2 files changed, 22 insertions(+), 2 deletions(-)
> 
> diff --git a/platforms/u-boot.in b/platforms/u-boot.in
> index 4ddf3b3fb..0d8213f45 100644
> --- a/platforms/u-boot.in
> +++ b/platforms/u-boot.in
> @@ -2,6 +2,7 @@
>  
>  menuconfig U_BOOT
>  	select BOOTLOADER
> +	select TF_A		if U_BOOT_USE_TF_A
>  	prompt "U-Boot                        "
>  	bool
>  
> @@ -19,6 +20,16 @@ config U_BOOT_MD5
>  	string
>  	prompt "U-Boot source md5"
>  
> +config U_BOOT_BUILD_OOT
> +	prompt "Out of tree build"
> +	default y
> +	bool
> +	help
> +	  U-Boot is usually built out of tree.
> +	  But for some builds, f.ex. with firmware blobs, out of tree builds
> +	  can break because of vendors using source paths to files.
> +	  This is mostly a workaround for those type of builds.
> +
>  choice
>  	prompt "config system"
>  	default U_BOOT_CONFIGSYSTEM_LEGACY
> @@ -71,12 +82,19 @@ config U_BOOT_CONFIG
>  
>  endif
>  
> +config U_BOOT_USE_TF_A
> +	prompt "Include TF-A firmwares in U-Boot."
> +	bool
> +	help
> +	  Generate TF-A (ARM Trusted Firmwares type A) to include in u-boot.
> +
>  config U_BOOT_CUSTOM_MAKE_OPTS
>  	prompt "Custom make options"
>  	string
>  	help
>  	  List of custom make options passed at build time. Can be
> -	  used for example to pass a DEVICE_TREE= value.
> +	  used for example to pass a DEVICE_TREE= value or passing
> +	  TF-A firmware, BL31=${PTXDIST_PLATFORMDIR}/path-to/bl31.bin
>  
>  choice
>  	prompt "Generate environment image"
> diff --git a/rules/u-boot.make b/rules/u-boot.make
> index 38c32bf27..b2e4e1311 100644
> --- a/rules/u-boot.make
> +++ b/rules/u-boot.make
> @@ -23,9 +23,11 @@ U_BOOT_SUFFIX		:= tar.bz2
>  U_BOOT_URL		:= https://ftp.denx.de/pub/u-boot/$(U_BOOT).$(U_BOOT_SUFFIX)
>  U_BOOT_SOURCE		:= $(SRCDIR)/$(U_BOOT).$(U_BOOT_SUFFIX)
>  U_BOOT_DIR		:= $(BUILDDIR)/$(U_BOOT)
> +ifeq ($(PTXCONF_U_BOOT_BUILD_OOT),y)
>  U_BOOT_BUILD_DIR	:= $(U_BOOT_DIR)-build
> +endif
>  U_BOOT_DEVPKG		:= NO
> -U_BOOT_BUILD_OOT	:= KEEP
> +U_BOOT_BUILD_OOT	:= $(call ptx/ifdef, PTXCONF_U_BOOT_BUILD_OOT, YES, NO)
>  
>  ifdef PTXCONF_U_BOOT_CONFIGSYSTEM_KCONFIG
>  U_BOOT_CONFIG	:= $(call ptx/in-platformconfigdir, \
> -- 
> 2.30.2
> 
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
> To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

-- 
/"\ ASCII RIBBON | »With the first link, the chain is forged. The first
\ / CAMPAIGN     | speech censured, the first thought forbidden, the
 X  AGAINST      | first freedom denied, chains us all irrevocably.«
/ \ HTML MAIL    | (Jean-Luc Picard, quoting Judge Aaron Satie)

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 181 bytes --]

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

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

end of thread, other threads:[~2021-11-29 15:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-29 14:27 [ptxdist] [PATCH] U-Boot: Add TF-A dependency option Christian Melki
2021-11-29 15:31 ` Alexander Dahl

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