mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] tf-a: Support enabling DEBUG via TF_A_EXTRA_ARGS
@ 2022-03-09 10:42 Uwe Kleine-König
  2022-03-09 10:47 ` Ahmad Fatoum
  2022-03-09 11:18 ` [ptxdist] [PATCH v2] " Uwe Kleine-König
  0 siblings, 2 replies; 5+ messages in thread
From: Uwe Kleine-König @ 2022-03-09 10:42 UTC (permalink / raw)
  To: ptxdist; +Cc: Ahmad Fatoum

With DEBUG=1 the resulting images are located in a different folder, so
adapt the install target accordingly. Before this adaption the build
either failed when DEBUG=1 was contained in TF_A_EXTRA_ARGS (because no
images were found in the release folder) or (IMHO worse) ptxdist picked
up the build results of an earlier attempt where DEBUG
wasn't set yet in TF_A_EXTRA_ARGS.

Also remove DEBUG=0 from the hardcoded set of options. This is the
default in the tf-a Makefiles anyhow, and passing both DEBUG=0 and
DEBUG=1 only results in confusion.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 rules/tf-a.make | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/rules/tf-a.make b/rules/tf-a.make
index 25fdb0cd213a..72e1bab69371 100644
--- a/rules/tf-a.make
+++ b/rules/tf-a.make
@@ -45,7 +45,6 @@ TF_A_MAKE_OPT	:= \
 	-C $(TF_A_DIR) \
 	CROSS_COMPILE=$(BOOTLOADER_CROSS_COMPILE) \
 	HOSTCC=$(HOSTCC) \
-	DEBUG=0 \
 	ARCH=$(PTXCONF_TF_A_ARCH_STRING) \
 	ARM_ARCH_MAJOR=$(PTXCONF_TF_A_ARM_ARCH_MAJOR) \
 	BUILD_STRING=$(PTXCONF_TF_A_VERSION) \
@@ -90,7 +89,7 @@ $(STATEDIR)/tf-a.compile:
 # ----------------------------------------------------------------------------
 
 tf-a/inst_plat = $(foreach artifact, \
-	$(wildcard $(TF_A_BUILDDIR)/$(1)/release/$(TF_A_ARTIFACTS)), \
+	$(wildcard $(TF_A_BUILDDIR)/$(1)/$(if $(find DEBUG=1,$(PTXCONF_TF_A_EXTRA_ARGS)),debug,release)/$(TF_A_ARTIFACTS)), \
 	install -v -D -m 644 $(artifact) \
 		$(2)/$(1)-$(notdir $(artifact))$(ptx/nl))
 
-- 
2.34.1


_______________________________________________
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] tf-a: Support enabling DEBUG via TF_A_EXTRA_ARGS
  2022-03-09 10:42 [ptxdist] [PATCH] tf-a: Support enabling DEBUG via TF_A_EXTRA_ARGS Uwe Kleine-König
@ 2022-03-09 10:47 ` Ahmad Fatoum
  2022-03-09 10:56   ` Michael Olbrich
  2022-03-09 11:18 ` [ptxdist] [PATCH v2] " Uwe Kleine-König
  1 sibling, 1 reply; 5+ messages in thread
From: Ahmad Fatoum @ 2022-03-09 10:47 UTC (permalink / raw)
  To: Uwe Kleine-König, ptxdist

On 09.03.22 11:42, Uwe Kleine-König wrote:
> With DEBUG=1 the resulting images are located in a different folder, so
> adapt the install target accordingly. Before this adaption the build
> either failed when DEBUG=1 was contained in TF_A_EXTRA_ARGS (because no
> images were found in the release folder) or (IMHO worse) ptxdist picked
> up the build results of an earlier attempt where DEBUG
> wasn't set yet in TF_A_EXTRA_ARGS.
> 
> Also remove DEBUG=0 from the hardcoded set of options. This is the
> default in the tf-a Makefiles anyhow, and passing both DEBUG=0 and
> DEBUG=1 only results in confusion.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Ahmad Fatoum <a.fatoum@pengutronix.de>

> ---
>  rules/tf-a.make | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/rules/tf-a.make b/rules/tf-a.make
> index 25fdb0cd213a..72e1bab69371 100644
> --- a/rules/tf-a.make
> +++ b/rules/tf-a.make
> @@ -45,7 +45,6 @@ TF_A_MAKE_OPT	:= \
>  	-C $(TF_A_DIR) \
>  	CROSS_COMPILE=$(BOOTLOADER_CROSS_COMPILE) \
>  	HOSTCC=$(HOSTCC) \
> -	DEBUG=0 \
>  	ARCH=$(PTXCONF_TF_A_ARCH_STRING) \
>  	ARM_ARCH_MAJOR=$(PTXCONF_TF_A_ARM_ARCH_MAJOR) \
>  	BUILD_STRING=$(PTXCONF_TF_A_VERSION) \
> @@ -90,7 +89,7 @@ $(STATEDIR)/tf-a.compile:
>  # ----------------------------------------------------------------------------
>  
>  tf-a/inst_plat = $(foreach artifact, \
> -	$(wildcard $(TF_A_BUILDDIR)/$(1)/release/$(TF_A_ARTIFACTS)), \
> +	$(wildcard $(TF_A_BUILDDIR)/$(1)/$(if $(find DEBUG=1,$(PTXCONF_TF_A_EXTRA_ARGS)),debug,release)/$(TF_A_ARTIFACTS)), \

Where is this $(find ...) documented? I know of $(findstring ...)

>  	install -v -D -m 644 $(artifact) \
>  		$(2)/$(1)-$(notdir $(artifact))$(ptx/nl))
>  


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

* Re: [ptxdist] [PATCH] tf-a: Support enabling DEBUG via TF_A_EXTRA_ARGS
  2022-03-09 10:47 ` Ahmad Fatoum
@ 2022-03-09 10:56   ` Michael Olbrich
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Olbrich @ 2022-03-09 10:56 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: ptxdist, Uwe Kleine-König

On Wed, Mar 09, 2022 at 11:47:23AM +0100, Ahmad Fatoum wrote:
> On 09.03.22 11:42, Uwe Kleine-König wrote:
> > With DEBUG=1 the resulting images are located in a different folder, so
> > adapt the install target accordingly. Before this adaption the build
> > either failed when DEBUG=1 was contained in TF_A_EXTRA_ARGS (because no
> > images were found in the release folder) or (IMHO worse) ptxdist picked
> > up the build results of an earlier attempt where DEBUG
> > wasn't set yet in TF_A_EXTRA_ARGS.
> > 
> > Also remove DEBUG=0 from the hardcoded set of options. This is the
> > default in the tf-a Makefiles anyhow, and passing both DEBUG=0 and
> > DEBUG=1 only results in confusion.
> > 
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> 
> Acked-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> 
> > ---
> >  rules/tf-a.make | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> > 
> > diff --git a/rules/tf-a.make b/rules/tf-a.make
> > index 25fdb0cd213a..72e1bab69371 100644
> > --- a/rules/tf-a.make
> > +++ b/rules/tf-a.make
> > @@ -45,7 +45,6 @@ TF_A_MAKE_OPT	:= \
> >  	-C $(TF_A_DIR) \
> >  	CROSS_COMPILE=$(BOOTLOADER_CROSS_COMPILE) \
> >  	HOSTCC=$(HOSTCC) \
> > -	DEBUG=0 \
> >  	ARCH=$(PTXCONF_TF_A_ARCH_STRING) \
> >  	ARM_ARCH_MAJOR=$(PTXCONF_TF_A_ARM_ARCH_MAJOR) \
> >  	BUILD_STRING=$(PTXCONF_TF_A_VERSION) \
> > @@ -90,7 +89,7 @@ $(STATEDIR)/tf-a.compile:
> >  # ----------------------------------------------------------------------------
> >  
> >  tf-a/inst_plat = $(foreach artifact, \
> > -	$(wildcard $(TF_A_BUILDDIR)/$(1)/release/$(TF_A_ARTIFACTS)), \
> > +	$(wildcard $(TF_A_BUILDDIR)/$(1)/$(if $(find DEBUG=1,$(PTXCONF_TF_A_EXTRA_ARGS)),debug,release)/$(TF_A_ARTIFACTS)), \
> 
> Where is this $(find ...) documented? I know of $(findstring ...)

It does not exists so the resulting string is always empty...

Michael

 
> >  	install -v -D -m 644 $(artifact) \
> >  		$(2)/$(1)-$(notdir $(artifact))$(ptx/nl))
> >  
> 
> 
> -- 
> 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

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

* [ptxdist] [PATCH v2] tf-a: Support enabling DEBUG via TF_A_EXTRA_ARGS
  2022-03-09 10:42 [ptxdist] [PATCH] tf-a: Support enabling DEBUG via TF_A_EXTRA_ARGS Uwe Kleine-König
  2022-03-09 10:47 ` Ahmad Fatoum
@ 2022-03-09 11:18 ` Uwe Kleine-König
  2022-03-14 10:14   ` [ptxdist] [APPLIED] " Michael Olbrich
  1 sibling, 1 reply; 5+ messages in thread
From: Uwe Kleine-König @ 2022-03-09 11:18 UTC (permalink / raw)
  To: ptxdist; +Cc: Ahmad Fatoum

With DEBUG=1 the resulting images are located in a different folder, so
adapt the install target accordingly. Before this adaption the build
either failed when DEBUG=1 was contained in TF_A_EXTRA_ARGS (because no
images were found in the release folder) or (IMHO worse) ptxdist picked
up the build results of an earlier attempt where DEBUG
wasn't set yet in TF_A_EXTRA_ARGS.

Also remove DEBUG=0 from the hardcoded set of options. This is the
default in the tf-a Makefiles anyhow, and passing both DEBUG=0 and
DEBUG=1 only results in confusion.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
Hello,

compared to (implicit) v1 this patch also works with DEBUG=1 in
TF_A_EXTRA_ARGS. *sigh*

Best regards
Uwe

 rules/tf-a.make | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/rules/tf-a.make b/rules/tf-a.make
index 25fdb0cd213a..2caa68d97054 100644
--- a/rules/tf-a.make
+++ b/rules/tf-a.make
@@ -45,7 +45,6 @@ TF_A_MAKE_OPT	:= \
 	-C $(TF_A_DIR) \
 	CROSS_COMPILE=$(BOOTLOADER_CROSS_COMPILE) \
 	HOSTCC=$(HOSTCC) \
-	DEBUG=0 \
 	ARCH=$(PTXCONF_TF_A_ARCH_STRING) \
 	ARM_ARCH_MAJOR=$(PTXCONF_TF_A_ARM_ARCH_MAJOR) \
 	BUILD_STRING=$(PTXCONF_TF_A_VERSION) \
@@ -90,7 +89,7 @@ $(STATEDIR)/tf-a.compile:
 # ----------------------------------------------------------------------------
 
 tf-a/inst_plat = $(foreach artifact, \
-	$(wildcard $(TF_A_BUILDDIR)/$(1)/release/$(TF_A_ARTIFACTS)), \
+	$(wildcard $(TF_A_BUILDDIR)/$(1)/$(if $(filter DEBUG=1,$(call remove_quotes,$(PTXCONF_TF_A_EXTRA_ARGS))),debug,release)/$(TF_A_ARTIFACTS)), \
 	install -v -D -m 644 $(artifact) \
 		$(2)/$(1)-$(notdir $(artifact))$(ptx/nl))
 
-- 
2.34.1


_______________________________________________
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] [APPLIED] tf-a: Support enabling DEBUG via TF_A_EXTRA_ARGS
  2022-03-09 11:18 ` [ptxdist] [PATCH v2] " Uwe Kleine-König
@ 2022-03-14 10:14   ` Michael Olbrich
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Olbrich @ 2022-03-14 10:14 UTC (permalink / raw)
  To: ptxdist; +Cc: Uwe Kleine-König

Thanks, applied as 5608cc10e703b1d25acdfd2dd5de4338a3cbfa4e.

Michael

[sent from post-receive hook]

On Mon, 14 Mar 2022 11:14:33 +0100, Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> With DEBUG=1 the resulting images are located in a different folder, so
> adapt the install target accordingly. Before this adaption the build
> either failed when DEBUG=1 was contained in TF_A_EXTRA_ARGS (because no
> images were found in the release folder) or (IMHO worse) ptxdist picked
> up the build results of an earlier attempt where DEBUG
> wasn't set yet in TF_A_EXTRA_ARGS.
> 
> Also remove DEBUG=0 from the hardcoded set of options. This is the
> default in the tf-a Makefiles anyhow, and passing both DEBUG=0 and
> DEBUG=1 only results in confusion.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Message-Id: <20220309111852.537125-1-u.kleine-koenig@pengutronix.de>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> diff --git a/rules/tf-a.make b/rules/tf-a.make
> index 25fdb0cd213a..2caa68d97054 100644
> --- a/rules/tf-a.make
> +++ b/rules/tf-a.make
> @@ -45,7 +45,6 @@ TF_A_MAKE_OPT	:= \
>  	-C $(TF_A_DIR) \
>  	CROSS_COMPILE=$(BOOTLOADER_CROSS_COMPILE) \
>  	HOSTCC=$(HOSTCC) \
> -	DEBUG=0 \
>  	ARCH=$(PTXCONF_TF_A_ARCH_STRING) \
>  	ARM_ARCH_MAJOR=$(PTXCONF_TF_A_ARM_ARCH_MAJOR) \
>  	BUILD_STRING=$(PTXCONF_TF_A_VERSION) \
> @@ -90,7 +89,7 @@ $(STATEDIR)/tf-a.compile:
>  # ----------------------------------------------------------------------------
>  
>  tf-a/inst_plat = $(foreach artifact, \
> -	$(wildcard $(TF_A_BUILDDIR)/$(1)/release/$(TF_A_ARTIFACTS)), \
> +	$(wildcard $(TF_A_BUILDDIR)/$(1)/$(if $(filter DEBUG=1,$(call remove_quotes,$(PTXCONF_TF_A_EXTRA_ARGS))),debug,release)/$(TF_A_ARTIFACTS)), \
>  	install -v -D -m 644 $(artifact) \
>  		$(2)/$(1)-$(notdir $(artifact))$(ptx/nl))
>  

_______________________________________________
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-03-14 10:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-09 10:42 [ptxdist] [PATCH] tf-a: Support enabling DEBUG via TF_A_EXTRA_ARGS Uwe Kleine-König
2022-03-09 10:47 ` Ahmad Fatoum
2022-03-09 10:56   ` Michael Olbrich
2022-03-09 11:18 ` [ptxdist] [PATCH v2] " Uwe Kleine-König
2022-03-14 10:14   ` [ptxdist] [APPLIED] " Michael Olbrich

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