* [ptxdist] [PATCH] tf-a: Allow to build for multiple platforms
@ 2020-09-24 9:31 Sascha Hauer
2020-09-24 13:55 ` Michael Olbrich
2020-09-24 14:44 ` Guillermo Rodriguez Garcia
0 siblings, 2 replies; 6+ messages in thread
From: Sascha Hauer @ 2020-09-24 9:31 UTC (permalink / raw)
To: ptxdist
A single ptxdist build can be for multiple platforms, so allow to
compile the ARM trusted firmware for multiple platforms as well.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
platforms/tf-a.in | 6 +++---
rules/tf-a.make | 28 ++++++++++++++++++----------
2 files changed, 21 insertions(+), 13 deletions(-)
diff --git a/platforms/tf-a.in b/platforms/tf-a.in
index ba04f44be..0936319f1 100644
--- a/platforms/tf-a.in
+++ b/platforms/tf-a.in
@@ -58,11 +58,11 @@ config TF_A_ARM_ARCH_MAJOR
default 8 if TF_A_ARM_ARCH_MAJOR_8
-config TF_A_PLATFORM
+config TF_A_PLATFORMS
string
- prompt "TF-A target platform"
+ prompt "TF-A target platforms"
help
- The TF-A target platform.
+ A space separated list of TF-A target platforms.
config TF_A_ARM_ARCH_MINOR
depends on TF_A_ARM_ARCH_MAJOR_8 || TF_A_ARM_ARCH_MAJOR_8_32_BIT
diff --git a/rules/tf-a.make b/rules/tf-a.make
index 91b2eca9f..843a46776 100644
--- a/rules/tf-a.make
+++ b/rules/tf-a.make
@@ -34,7 +34,7 @@ TF_A_LICENSE := BSD-3-Clause AND BSD-2-Clause \
# Prepare
# ----------------------------------------------------------------------------
-TF_A_PLATFORM := $(call remove_quotes, $(PTXCONF_TF_A_PLATFORM))
+TF_A_PLATFORMS := $(call remove_quotes, $(PTXCONF_TF_A_PLATFORMS))
TF_A_ARTIFACTS := $(call remove_quotes, $(PTXCONF_TF_A_ARTIFACTS))
TF_A_WRAPPER_BLACKLIST := \
@@ -45,7 +45,6 @@ TF_A_MAKE_OPT := \
-C $(TF_A_DIR) \
CROSS_COMPILE=$(BOOTLOADER_CROSS_COMPILE) \
HOSTCC=$(HOSTCC) \
- PLAT=$(TF_A_PLATFORM) \
DEBUG=0 \
ARCH=$(PTXCONF_TF_A_ARCH_STRING) \
ARM_ARCH_MAJOR=$(PTXCONF_TF_A_ARM_ARCH_MAJOR) \
@@ -77,18 +76,29 @@ TF_A_CONF_TOOL := NO
TF_A_MAKE_ENV := $(CROSS_ENV)
+$(STATEDIR)/tf-a.compile:
+ @$(call targetinfo)
+
+ @$(foreach plat, $(TF_A_PLATFORMS), \
+ $(call compile, TF_A, \
+ $(TF_A_MAKE_OPT) PLAT=$(plat))$(ptx/nl))
+
+ @$(call touch)
+
# ----------------------------------------------------------------------------
# Install
# ----------------------------------------------------------------------------
-TF_A_BUILD_OUTPUT_DIR := $(TF_A_BUILDDIR)/$(TF_A_PLATFORM)/release
-TF_A_ARTIFACTS_SRC = $(wildcard $(addprefix $(TF_A_BUILD_OUTPUT_DIR)/,$(TF_A_ARTIFACTS)))
+inst_plat = $(foreach artifact, \
+ $(wildcard $(TF_A_BUILDDIR)/$(1)/release/$(TF_A_ARTIFACTS)), \
+ install -v -D -m 644 $(artifact) \
+ $(2)/$(1)-$(notdir $(artifact))$(ptx/nl))
+
+inst_bins = $(foreach plat, $(TF_A_PLATFORMS), $(call inst_plat,$(plat),$(1)))
$(STATEDIR)/tf-a.install:
@$(call targetinfo)
- @$(foreach artifact, $(TF_A_ARTIFACTS_SRC), \
- install -v -D -m 644 $(artifact) \
- $(TF_A_PKGDIR)/usr/lib/firmware/$(notdir $(artifact))$(ptx/nl))
+ @$(call inst_bins,$(TF_A_PKGDIR)/usr/lib/firmware)
@$(call touch)
# ----------------------------------------------------------------------------
@@ -97,9 +107,7 @@ $(STATEDIR)/tf-a.install:
$(STATEDIR)/tf-a.targetinstall:
@$(call targetinfo)
- @$(foreach artifact, $(TF_A_ARTIFACTS_SRC), \
- install -v -D -m 644 $(artifact) \
- $(IMAGEDIR)/$(notdir $(artifact))$(ptx/nl))
+ @$(call inst_bins,$(IMAGEDIR))
@$(call touch)
# ----------------------------------------------------------------------------
--
2.28.0
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ptxdist] [PATCH] tf-a: Allow to build for multiple platforms
2020-09-24 9:31 [ptxdist] [PATCH] tf-a: Allow to build for multiple platforms Sascha Hauer
@ 2020-09-24 13:55 ` Michael Olbrich
2020-09-25 6:11 ` Sascha Hauer
2020-09-24 14:44 ` Guillermo Rodriguez Garcia
1 sibling, 1 reply; 6+ messages in thread
From: Michael Olbrich @ 2020-09-24 13:55 UTC (permalink / raw)
To: ptxdist
On Thu, Sep 24, 2020 at 11:31:24AM +0200, Sascha Hauer wrote:
> A single ptxdist build can be for multiple platforms, so allow to
> compile the ARM trusted firmware for multiple platforms as well.
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
> platforms/tf-a.in | 6 +++---
> rules/tf-a.make | 28 ++++++++++++++++++----------
> 2 files changed, 21 insertions(+), 13 deletions(-)
>
> diff --git a/platforms/tf-a.in b/platforms/tf-a.in
> index ba04f44be..0936319f1 100644
> --- a/platforms/tf-a.in
> +++ b/platforms/tf-a.in
> @@ -58,11 +58,11 @@ config TF_A_ARM_ARCH_MAJOR
> default 8 if TF_A_ARM_ARCH_MAJOR_8
>
>
> -config TF_A_PLATFORM
> +config TF_A_PLATFORMS
Please add a migration helper for this in scripts/migrate/migrate_platform.
> string
> - prompt "TF-A target platform"
> + prompt "TF-A target platforms"
> help
> - The TF-A target platform.
> + A space separated list of TF-A target platforms.
>
> config TF_A_ARM_ARCH_MINOR
> depends on TF_A_ARM_ARCH_MAJOR_8 || TF_A_ARM_ARCH_MAJOR_8_32_BIT
> diff --git a/rules/tf-a.make b/rules/tf-a.make
> index 91b2eca9f..843a46776 100644
> --- a/rules/tf-a.make
> +++ b/rules/tf-a.make
> @@ -34,7 +34,7 @@ TF_A_LICENSE := BSD-3-Clause AND BSD-2-Clause \
> # Prepare
> # ----------------------------------------------------------------------------
>
> -TF_A_PLATFORM := $(call remove_quotes, $(PTXCONF_TF_A_PLATFORM))
> +TF_A_PLATFORMS := $(call remove_quotes, $(PTXCONF_TF_A_PLATFORMS))
> TF_A_ARTIFACTS := $(call remove_quotes, $(PTXCONF_TF_A_ARTIFACTS))
>
> TF_A_WRAPPER_BLACKLIST := \
> @@ -45,7 +45,6 @@ TF_A_MAKE_OPT := \
> -C $(TF_A_DIR) \
> CROSS_COMPILE=$(BOOTLOADER_CROSS_COMPILE) \
> HOSTCC=$(HOSTCC) \
> - PLAT=$(TF_A_PLATFORM) \
> DEBUG=0 \
> ARCH=$(PTXCONF_TF_A_ARCH_STRING) \
> ARM_ARCH_MAJOR=$(PTXCONF_TF_A_ARM_ARCH_MAJOR) \
> @@ -77,18 +76,29 @@ TF_A_CONF_TOOL := NO
>
> TF_A_MAKE_ENV := $(CROSS_ENV)
>
> +$(STATEDIR)/tf-a.compile:
> + @$(call targetinfo)
> +
> + @$(foreach plat, $(TF_A_PLATFORMS), \
> + $(call compile, TF_A, \
> + $(TF_A_MAKE_OPT) PLAT=$(plat))$(ptx/nl))
> +
> + @$(call touch)
> +
> # ----------------------------------------------------------------------------
> # Install
> # ----------------------------------------------------------------------------
>
> -TF_A_BUILD_OUTPUT_DIR := $(TF_A_BUILDDIR)/$(TF_A_PLATFORM)/release
> -TF_A_ARTIFACTS_SRC = $(wildcard $(addprefix $(TF_A_BUILD_OUTPUT_DIR)/,$(TF_A_ARTIFACTS)))
> +inst_plat = $(foreach artifact, \
> + $(wildcard $(TF_A_BUILDDIR)/$(1)/release/$(TF_A_ARTIFACTS)), \
> + install -v -D -m 644 $(artifact) \
> + $(2)/$(1)-$(notdir $(artifact))$(ptx/nl))
> +
> +inst_bins = $(foreach plat, $(TF_A_PLATFORMS), $(call inst_plat,$(plat),$(1)))
These should be namespaced to avoid name clashes. Maybe
tf-a/inst_plat = ...
tf-a/inst_bins = ...
Michael
>
> $(STATEDIR)/tf-a.install:
> @$(call targetinfo)
> - @$(foreach artifact, $(TF_A_ARTIFACTS_SRC), \
> - install -v -D -m 644 $(artifact) \
> - $(TF_A_PKGDIR)/usr/lib/firmware/$(notdir $(artifact))$(ptx/nl))
> + @$(call inst_bins,$(TF_A_PKGDIR)/usr/lib/firmware)
> @$(call touch)
>
> # ----------------------------------------------------------------------------
> @@ -97,9 +107,7 @@ $(STATEDIR)/tf-a.install:
>
> $(STATEDIR)/tf-a.targetinstall:
> @$(call targetinfo)
> - @$(foreach artifact, $(TF_A_ARTIFACTS_SRC), \
> - install -v -D -m 644 $(artifact) \
> - $(IMAGEDIR)/$(notdir $(artifact))$(ptx/nl))
> + @$(call inst_bins,$(IMAGEDIR))
> @$(call touch)
>
> # ----------------------------------------------------------------------------
> --
> 2.28.0
>
>
> _______________________________________________
> 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] 6+ messages in thread
* Re: [ptxdist] [PATCH] tf-a: Allow to build for multiple platforms
2020-09-24 9:31 [ptxdist] [PATCH] tf-a: Allow to build for multiple platforms Sascha Hauer
2020-09-24 13:55 ` Michael Olbrich
@ 2020-09-24 14:44 ` Guillermo Rodriguez Garcia
2020-09-25 6:17 ` Sascha Hauer
1 sibling, 1 reply; 6+ messages in thread
From: Guillermo Rodriguez Garcia @ 2020-09-24 14:44 UTC (permalink / raw)
To: ptxdist
El jue., 24 sept. 2020 a las 11:31, Sascha Hauer
(<s.hauer@pengutronix.de>) escribió:
>
> A single ptxdist build can be for multiple platforms, so allow to
> compile the ARM trusted firmware for multiple platforms as well.
Sorry if this is slightly off-topic but is this possible for u-boot as well?
Specifically it would be good to be able to build several boardconfigs
for the same board (e.g. a debug config and a production config). Do
you know if this is currently possible?
Thanks,
Guillermo Rodriguez Garcia
guille.rodriguez@gmail.com
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ptxdist] [PATCH] tf-a: Allow to build for multiple platforms
2020-09-24 13:55 ` Michael Olbrich
@ 2020-09-25 6:11 ` Sascha Hauer
2020-09-25 7:18 ` Michael Olbrich
0 siblings, 1 reply; 6+ messages in thread
From: Sascha Hauer @ 2020-09-25 6:11 UTC (permalink / raw)
To: Michael Olbrich; +Cc: ptxdist
On Thu, Sep 24, 2020 at 03:55:33PM +0200, Michael Olbrich wrote:
> On Thu, Sep 24, 2020 at 11:31:24AM +0200, Sascha Hauer wrote:
> > A single ptxdist build can be for multiple platforms, so allow to
> > compile the ARM trusted firmware for multiple platforms as well.
> >
> > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > ---
> > platforms/tf-a.in | 6 +++---
> > rules/tf-a.make | 28 ++++++++++++++++++----------
> > 2 files changed, 21 insertions(+), 13 deletions(-)
> >
> > diff --git a/platforms/tf-a.in b/platforms/tf-a.in
> > index ba04f44be..0936319f1 100644
> > --- a/platforms/tf-a.in
> > +++ b/platforms/tf-a.in
> > @@ -58,11 +58,11 @@ config TF_A_ARM_ARCH_MAJOR
> > default 8 if TF_A_ARM_ARCH_MAJOR_8
> >
> >
> > -config TF_A_PLATFORM
> > +config TF_A_PLATFORMS
>
> Please add a migration helper for this in scripts/migrate/migrate_platform.
Is this worth the hassle? I could also keep the old name instead.
> > -TF_A_BUILD_OUTPUT_DIR := $(TF_A_BUILDDIR)/$(TF_A_PLATFORM)/release
> > -TF_A_ARTIFACTS_SRC = $(wildcard $(addprefix $(TF_A_BUILD_OUTPUT_DIR)/,$(TF_A_ARTIFACTS)))
> > +inst_plat = $(foreach artifact, \
> > + $(wildcard $(TF_A_BUILDDIR)/$(1)/release/$(TF_A_ARTIFACTS)), \
> > + install -v -D -m 644 $(artifact) \
> > + $(2)/$(1)-$(notdir $(artifact))$(ptx/nl))
> > +
> > +inst_bins = $(foreach plat, $(TF_A_PLATFORMS), $(call inst_plat,$(plat),$(1)))
>
> These should be namespaced to avoid name clashes. Maybe
>
> tf-a/inst_plat = ...
> tf-a/inst_bins = ...
OK
Sascha
--
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] 6+ messages in thread
* Re: [ptxdist] [PATCH] tf-a: Allow to build for multiple platforms
2020-09-24 14:44 ` Guillermo Rodriguez Garcia
@ 2020-09-25 6:17 ` Sascha Hauer
0 siblings, 0 replies; 6+ messages in thread
From: Sascha Hauer @ 2020-09-25 6:17 UTC (permalink / raw)
To: Guillermo Rodriguez Garcia; +Cc: ptxdist
On Thu, Sep 24, 2020 at 04:44:56PM +0200, Guillermo Rodriguez Garcia wrote:
> El jue., 24 sept. 2020 a las 11:31, Sascha Hauer
> (<s.hauer@pengutronix.de>) escribió:
> >
> > A single ptxdist build can be for multiple platforms, so allow to
> > compile the ARM trusted firmware for multiple platforms as well.
>
> Sorry if this is slightly off-topic but is this possible for u-boot as well?
This doesn't seem to be easily possible with the current U-Boot build script in
ptxdist.
>
> Specifically it would be good to be able to build several boardconfigs
> for the same board (e.g. a debug config and a production config). Do
> you know if this is currently possible?
If you want that you can create a template for U-Boot similar to
rules/templates/template-barebox-*
Sascha
--
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] 6+ messages in thread
* Re: [ptxdist] [PATCH] tf-a: Allow to build for multiple platforms
2020-09-25 6:11 ` Sascha Hauer
@ 2020-09-25 7:18 ` Michael Olbrich
0 siblings, 0 replies; 6+ messages in thread
From: Michael Olbrich @ 2020-09-25 7:18 UTC (permalink / raw)
To: ptxdist
On Fri, Sep 25, 2020 at 08:11:02AM +0200, Sascha Hauer wrote:
> On Thu, Sep 24, 2020 at 03:55:33PM +0200, Michael Olbrich wrote:
> > On Thu, Sep 24, 2020 at 11:31:24AM +0200, Sascha Hauer wrote:
> > > A single ptxdist build can be for multiple platforms, so allow to
> > > compile the ARM trusted firmware for multiple platforms as well.
> > >
> > > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > > ---
> > > platforms/tf-a.in | 6 +++---
> > > rules/tf-a.make | 28 ++++++++++++++++++----------
> > > 2 files changed, 21 insertions(+), 13 deletions(-)
> > >
> > > diff --git a/platforms/tf-a.in b/platforms/tf-a.in
> > > index ba04f44be..0936319f1 100644
> > > --- a/platforms/tf-a.in
> > > +++ b/platforms/tf-a.in
> > > @@ -58,11 +58,11 @@ config TF_A_ARM_ARCH_MAJOR
> > > default 8 if TF_A_ARM_ARCH_MAJOR_8
> > >
> > >
> > > -config TF_A_PLATFORM
> > > +config TF_A_PLATFORMS
> >
> > Please add a migration helper for this in scripts/migrate/migrate_platform.
>
> Is this worth the hassle? I could also keep the old name instead.
I prefer the new name. It's less confusing in the long run.
Michael
> > > -TF_A_BUILD_OUTPUT_DIR := $(TF_A_BUILDDIR)/$(TF_A_PLATFORM)/release
> > > -TF_A_ARTIFACTS_SRC = $(wildcard $(addprefix $(TF_A_BUILD_OUTPUT_DIR)/,$(TF_A_ARTIFACTS)))
> > > +inst_plat = $(foreach artifact, \
> > > + $(wildcard $(TF_A_BUILDDIR)/$(1)/release/$(TF_A_ARTIFACTS)), \
> > > + install -v -D -m 644 $(artifact) \
> > > + $(2)/$(1)-$(notdir $(artifact))$(ptx/nl))
> > > +
> > > +inst_bins = $(foreach plat, $(TF_A_PLATFORMS), $(call inst_plat,$(plat),$(1)))
> >
> > These should be namespaced to avoid name clashes. Maybe
> >
> > tf-a/inst_plat = ...
> > tf-a/inst_bins = ...
>
> OK
>
> Sascha
>
> --
> 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 |
>
--
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] 6+ messages in thread
end of thread, other threads:[~2020-09-25 7:18 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-24 9:31 [ptxdist] [PATCH] tf-a: Allow to build for multiple platforms Sascha Hauer
2020-09-24 13:55 ` Michael Olbrich
2020-09-25 6:11 ` Sascha Hauer
2020-09-25 7:18 ` Michael Olbrich
2020-09-24 14:44 ` Guillermo Rodriguez Garcia
2020-09-25 6:17 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox