summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2020-09-25 13:32:46 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2020-10-14 12:30:02 +0200
commitc9d48debf405ed49deffebef892990376052df09 (patch)
tree673b577a0a02a4c34d5561139a5437ed6c6cb23e
parente3caf369a9a0fc95300122534478fe2e58f4a4fc (diff)
downloadptxdist-c9d48debf405ed49deffebef892990376052df09.tar.gz
ptxdist-c9d48debf405ed49deffebef892990376052df09.tar.xz
tf-a: Allow to build for multiple platforms
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> Message-Id: <20200925113246.13226-1-s.hauer@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--platforms/tf-a.in6
-rw-r--r--rules/tf-a.make28
-rwxr-xr-xscripts/migrate/migrate_platform8
3 files changed, 29 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..a84c56792 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)))
+tf-a/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))
+
+tf-a/inst_bins = $(foreach plat, $(TF_A_PLATFORMS), $(call tf-a/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 tf-a/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 tf-a/inst_bins,$(IMAGEDIR))
@$(call touch)
# ----------------------------------------------------------------------------
diff --git a/scripts/migrate/migrate_platform b/scripts/migrate/migrate_platform
index 56c21c698..b31592b88 100755
--- a/scripts/migrate/migrate_platform
+++ b/scripts/migrate/migrate_platform
@@ -33,3 +33,11 @@ s/^\(\(# \)\?PTXCONF\)_IMAGE_IPKG_EXTRA_ARGS\(.*$\)/\1_IMAGE_XPKG_EXTRA_ARGS\3/
# reason : PTXCONF_KERNEL_ARCH_STRING was removed
#
/^PTXCONF_DTC_OFTREE_DTS/s/PTXCONF_KERNEL_ARCH_STRING/GENERIC_KERNEL_ARCH/g
+
+#
+# from : ptxdist-2020.09.0
+# to : ptxdist-2020.10.0
+# symbol : PTXCONF_TF_A_PLATFORM -> PTXCONF_TF_A_PLATFORMS
+# reason : tf-a can be built for multiple platforms now
+#
+s/^\(\(# \)\?PTXCONF_TF_A_PLATFORM\)\(.*$\)/\1S\3/