mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH v2] U-Boot: Add TF-A dependency option.
@ 2021-11-29 19:49 Christian Melki
  2021-11-29 19:49 ` [ptxdist] [PATCH v2] U-Boot: Add option to disable OOT builds Christian Melki
  2022-02-04  8:20 ` [ptxdist] [PATCH v2] U-Boot: Add TF-A dependency option Michael Olbrich
  0 siblings, 2 replies; 5+ messages in thread
From: Christian Melki @ 2021-11-29 19:49 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.

Signed-off-by: Christian Melki <christian.melki@t2data.com>
---
 platforms/u-boot.in | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/platforms/u-boot.in b/platforms/u-boot.in
index 4ddf3b3fb..410391fe8 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
 
@@ -71,12 +72,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"
-- 
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] 5+ messages in thread

* [ptxdist] [PATCH v2] U-Boot: Add option to disable OOT builds.
  2021-11-29 19:49 [ptxdist] [PATCH v2] U-Boot: Add TF-A dependency option Christian Melki
@ 2021-11-29 19:49 ` Christian Melki
  2021-11-30  5:43   ` Alexander Dahl
  2021-11-30  8:04   ` Alexander Dahl
  2022-02-04  8:20 ` [ptxdist] [PATCH v2] U-Boot: Add TF-A dependency option Michael Olbrich
  1 sibling, 2 replies; 5+ messages in thread
From: Christian Melki @ 2021-11-29 19:49 UTC (permalink / raw)
  To: ptxdist

This option sometimes breaks builds with various external dependencies.
Especially vendor trees that have sourcedir path references.

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

diff --git a/platforms/u-boot.in b/platforms/u-boot.in
index 410391fe8..0d8213f45 100644
--- a/platforms/u-boot.in
+++ b/platforms/u-boot.in
@@ -20,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
diff --git a/rules/u-boot.make b/rules/u-boot.make
index 38c32bf27..cb1454a89 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, KEEP, 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] 5+ messages in thread

* Re: [ptxdist] [PATCH v2] U-Boot: Add option to disable OOT builds.
  2021-11-29 19:49 ` [ptxdist] [PATCH v2] U-Boot: Add option to disable OOT builds Christian Melki
@ 2021-11-30  5:43   ` Alexander Dahl
  2021-11-30  8:04   ` Alexander Dahl
  1 sibling, 0 replies; 5+ messages in thread
From: Alexander Dahl @ 2021-11-30  5:43 UTC (permalink / raw)
  To: Christian Melki; +Cc: ptxdist

Hello Christian,

Am Mon, Nov 29, 2021 at 08:49:03PM +0100 schrieb Christian Melki:
> This option sometimes breaks builds with various external dependencies.
> Especially vendor trees that have sourcedir path references.
> 
> Signed-off-by: Christian Melki <christian.melki@t2data.com>
> ---
>  platforms/u-boot.in | 10 ++++++++++
>  rules/u-boot.make   |  4 +++-
>  2 files changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/platforms/u-boot.in b/platforms/u-boot.in
> index 410391fe8..0d8213f45 100644
> --- a/platforms/u-boot.in
> +++ b/platforms/u-boot.in
> @@ -20,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.

Fine.

> +
>  choice
>  	prompt "config system"
>  	default U_BOOT_CONFIGSYSTEM_LEGACY
> diff --git a/rules/u-boot.make b/rules/u-boot.make
> index 38c32bf27..cb1454a89 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

Why not simply use 'ifdef PTXCONF_U_BOOT_BUILD_OOT' like for usual
boolean options, too?

>  U_BOOT_DEVPKG		:= NO
> -U_BOOT_BUILD_OOT	:= KEEP
> +U_BOOT_BUILD_OOT	:= $(call ptx/ifdef, PTXCONF_U_BOOT_BUILD_OOT, KEEP, NO)

Looks correct.

Greets
Alex

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

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


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

* Re: [ptxdist] [PATCH v2] U-Boot: Add option to disable OOT builds.
  2021-11-29 19:49 ` [ptxdist] [PATCH v2] U-Boot: Add option to disable OOT builds Christian Melki
  2021-11-30  5:43   ` Alexander Dahl
@ 2021-11-30  8:04   ` Alexander Dahl
  1 sibling, 0 replies; 5+ messages in thread
From: Alexander Dahl @ 2021-11-30  8:04 UTC (permalink / raw)
  To: Christian Melki; +Cc: ptxdist

Hello Christian,

for the record, we just discussed this on IRC …

Am Mon, Nov 29, 2021 at 08:49:03PM +0100 schrieb Christian Melki:
> This option sometimes breaks builds with various external dependencies.
> Especially vendor trees that have sourcedir path references.
> 
> Signed-off-by: Christian Melki <christian.melki@t2data.com>
> ---
>  platforms/u-boot.in | 10 ++++++++++
>  rules/u-boot.make   |  4 +++-
>  2 files changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/platforms/u-boot.in b/platforms/u-boot.in
> index 410391fe8..0d8213f45 100644
> --- a/platforms/u-boot.in
> +++ b/platforms/u-boot.in
> @@ -20,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
> diff --git a/rules/u-boot.make b/rules/u-boot.make
> index 38c32bf27..cb1454a89 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, KEEP, NO)
>  
>  ifdef PTXCONF_U_BOOT_CONFIGSYSTEM_KCONFIG
>  U_BOOT_CONFIG	:= $(call ptx/in-platformconfigdir, \

This is not enough. Please have a look at changeset 3dd50debec02
("u-boot: Build out-of-tree") when OOT build for U-Boot was
introduced. 

U_BOOT_CONF_OPT got the O=path option, which should be
omitted for in tree builds.

targetinstall uses U_BOOT_BUILD_DIR … I'm not sure this is set
correctly with your changes. Please test.

Greets
Alex


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

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

* Re: [ptxdist] [PATCH v2] U-Boot: Add TF-A dependency option.
  2021-11-29 19:49 [ptxdist] [PATCH v2] U-Boot: Add TF-A dependency option Christian Melki
  2021-11-29 19:49 ` [ptxdist] [PATCH v2] U-Boot: Add option to disable OOT builds Christian Melki
@ 2022-02-04  8:20 ` Michael Olbrich
  1 sibling, 0 replies; 5+ messages in thread
From: Michael Olbrich @ 2022-02-04  8:20 UTC (permalink / raw)
  To: Christian Melki; +Cc: ptxdist

On Mon, Nov 29, 2021 at 08:49:02PM +0100, Christian Melki wrote:
> Let U-Boot depend on TF-A firmwares for inclusion.
> TF-A firmwares are a common thing on various machines.

I think, this should be handled like we do in barebox. Take a look at the
firmware file handling that hit ptxdist master recently.

Michael

> Signed-off-by: Christian Melki <christian.melki@t2data.com>
> ---
>  platforms/u-boot.in | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/platforms/u-boot.in b/platforms/u-boot.in
> index 4ddf3b3fb..410391fe8 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
>  
> @@ -71,12 +72,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"
> -- 
> 2.30.2
> 
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
> To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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


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

end of thread, other threads:[~2022-02-04  8:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-29 19:49 [ptxdist] [PATCH v2] U-Boot: Add TF-A dependency option Christian Melki
2021-11-29 19:49 ` [ptxdist] [PATCH v2] U-Boot: Add option to disable OOT builds Christian Melki
2021-11-30  5:43   ` Alexander Dahl
2021-11-30  8:04   ` Alexander Dahl
2022-02-04  8:20 ` [ptxdist] [PATCH v2] U-Boot: Add TF-A dependency option Michael Olbrich

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