* [ptxdist] [PATCH] host-tf-a: fix build with v2.14
@ 2026-03-18 11:14 Roland Hieber
2026-03-23 12:34 ` Roland Hieber
0 siblings, 1 reply; 2+ messages in thread
From: Roland Hieber @ 2026-03-18 11:14 UTC (permalink / raw)
To: ptxdist; +Cc: Roland Hieber
TF-A >= v2.14 now tries to detect an ARM toolchain early in the Makefile
and errors out if it cannot find one before even evaluating the
'fiptool' recipe. Even though we only use the host toolchain to build
fiptool, set the same build environment as for the tf-a recipe to make
it work again. HOST_TF_A is usually only selected by images, not by TF_A
directly, so make sure that we can use TF_A_* variables with an
additional 'select' in the platformconfig menu.
(This problem only happens on build hosts without an aarch64-linux-gnu-*
toolchain installed in /usr/bin/, to which TF-A defaults when no ARCH is
set. However PTXdist includes the selected_toolchain in PATH when
building host-tf-a, so a matching cross toolchain can always be found.)
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
platforms/host-tf-a.in | 1 +
rules/host-tf-a.make | 4 +++-
rules/tf-a.make | 8 +++++---
3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/platforms/host-tf-a.in b/platforms/host-tf-a.in
index f8fd15c48937..9a77c7e8ddc3 100644
--- a/platforms/host-tf-a.in
+++ b/platforms/host-tf-a.in
@@ -4,5 +4,6 @@ config HOST_TF_A
tristate
default y if ALLYES && TF_A
select HOST_OPENSSL
+ select TF_A if BUILDTIME
help
This provides fiptool
diff --git a/rules/host-tf-a.make b/rules/host-tf-a.make
index 38f0006428e1..5b8045feefdf 100644
--- a/rules/host-tf-a.make
+++ b/rules/host-tf-a.make
@@ -10,7 +10,9 @@
#
HOST_PACKAGES-$(PTXCONF_HOST_TF_A) += host-tf-a
-HOST_TF_A_MAKE_OPT = fiptool
+HOST_TF_A_MAKE_OPT = \
+ $(TF_A_SHARED_OPT) \
+ fiptool
$(STATEDIR)/host-tf-a.install:
@$(call targetinfo)
diff --git a/rules/tf-a.make b/rules/tf-a.make
index 6347112fcf1c..89b53d695775 100644
--- a/rules/tf-a.make
+++ b/rules/tf-a.make
@@ -45,13 +45,15 @@ TF_A_WRAPPER_BLACKLIST := \
TF_A_EXTRA_ARGS := $(call remove_quotes,$(PTXCONF_TF_A_EXTRA_ARGS))
TF_A_BINDIR = $(TF_A_BUILD_DIR)/$(1)/$(if $(filter DEBUG=1,$(TF_A_EXTRA_ARGS)),debug,release)
TF_A_BINDIR_BOARD = $(TF_A_BUILD_DIR)/$(1)/*/$(if $(filter DEBUG=1,$(TF_A_EXTRA_ARGS)),debug,release)
-TF_A_MAKE_OPT := \
- -C $(TF_A_DIR) \
+TF_A_SHARED_OPT := \
CROSS_COMPILE=$(BOOTLOADER_CROSS_COMPILE) \
HOSTCC=$(HOSTCC) \
ARCH=$(PTXCONF_TF_A_ARCH_STRING) \
ARM_ARCH_MAJOR=$(PTXCONF_TF_A_ARM_ARCH_MAJOR) \
- BUILD_STRING=$(PTXCONF_TF_A_VERSION) \
+ BUILD_STRING=$(PTXCONF_TF_A_VERSION)
+TF_A_MAKE_OPT := \
+ -C $(TF_A_DIR) \
+ $(TF_A_SHARED_OPT) \
$(TF_A_EXTRA_ARGS) \
all
--
2.47.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [ptxdist] [PATCH] host-tf-a: fix build with v2.14
2026-03-18 11:14 [ptxdist] [PATCH] host-tf-a: fix build with v2.14 Roland Hieber
@ 2026-03-23 12:34 ` Roland Hieber
0 siblings, 0 replies; 2+ messages in thread
From: Roland Hieber @ 2026-03-23 12:34 UTC (permalink / raw)
To: ptxdist
On Wed, Mar 18, 2026 at 12:14:04PM +0100, Roland Hieber wrote:
> TF-A >= v2.14 now tries to detect an ARM toolchain early in the Makefile
> and errors out if it cannot find one before even evaluating the
> 'fiptool' recipe. Even though we only use the host toolchain to build
> fiptool, set the same build environment as for the tf-a recipe to make
> it work again. HOST_TF_A is usually only selected by images, not by TF_A
> directly, so make sure that we can use TF_A_* variables with an
> additional 'select' in the platformconfig menu.
>
> (This problem only happens on build hosts without an aarch64-linux-gnu-*
> toolchain installed in /usr/bin/, to which TF-A defaults when no ARCH is
> set. However PTXdist includes the selected_toolchain in PATH when
> building host-tf-a, so a matching cross toolchain can always be found.)
>
> Signed-off-by: Roland Hieber <rhi@pengutronix.de>
> ---
> platforms/host-tf-a.in | 1 +
> rules/host-tf-a.make | 4 +++-
> rules/tf-a.make | 8 +++++---
> 3 files changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/platforms/host-tf-a.in b/platforms/host-tf-a.in
> index f8fd15c48937..9a77c7e8ddc3 100644
> --- a/platforms/host-tf-a.in
> +++ b/platforms/host-tf-a.in
> @@ -4,5 +4,6 @@ config HOST_TF_A
> tristate
> default y if ALLYES && TF_A
> select HOST_OPENSSL
> + select TF_A if BUILDTIME
> help
> This provides fiptool
> diff --git a/rules/host-tf-a.make b/rules/host-tf-a.make
> index 38f0006428e1..5b8045feefdf 100644
> --- a/rules/host-tf-a.make
> +++ b/rules/host-tf-a.make
> @@ -10,7 +10,9 @@
> #
> HOST_PACKAGES-$(PTXCONF_HOST_TF_A) += host-tf-a
>
> -HOST_TF_A_MAKE_OPT = fiptool
> +HOST_TF_A_MAKE_OPT = \
> + $(TF_A_SHARED_OPT) \
> + fiptool
Hm. Additional investigation showed that AARCH32_SP=sp_min was also needed here
to make it work on the build server. However I don't understand yet why a simple
'make fiptool' in a fresh TF-A Git checkout does the correct thing, and why it
doesn't work on the build server.
- Roland
>
> $(STATEDIR)/host-tf-a.install:
> @$(call targetinfo)
> diff --git a/rules/tf-a.make b/rules/tf-a.make
> index 6347112fcf1c..89b53d695775 100644
> --- a/rules/tf-a.make
> +++ b/rules/tf-a.make
> @@ -45,13 +45,15 @@ TF_A_WRAPPER_BLACKLIST := \
> TF_A_EXTRA_ARGS := $(call remove_quotes,$(PTXCONF_TF_A_EXTRA_ARGS))
> TF_A_BINDIR = $(TF_A_BUILD_DIR)/$(1)/$(if $(filter DEBUG=1,$(TF_A_EXTRA_ARGS)),debug,release)
> TF_A_BINDIR_BOARD = $(TF_A_BUILD_DIR)/$(1)/*/$(if $(filter DEBUG=1,$(TF_A_EXTRA_ARGS)),debug,release)
> -TF_A_MAKE_OPT := \
> - -C $(TF_A_DIR) \
> +TF_A_SHARED_OPT := \
> CROSS_COMPILE=$(BOOTLOADER_CROSS_COMPILE) \
> HOSTCC=$(HOSTCC) \
> ARCH=$(PTXCONF_TF_A_ARCH_STRING) \
> ARM_ARCH_MAJOR=$(PTXCONF_TF_A_ARM_ARCH_MAJOR) \
> - BUILD_STRING=$(PTXCONF_TF_A_VERSION) \
> + BUILD_STRING=$(PTXCONF_TF_A_VERSION)
> +TF_A_MAKE_OPT := \
> + -C $(TF_A_DIR) \
> + $(TF_A_SHARED_OPT) \
> $(TF_A_EXTRA_ARGS) \
> all
>
> --
> 2.47.3
>
>
--
Roland Hieber, Pengutronix e.K. | rhi@pengutronix.de |
Steuerwalder Str. 21 | https://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-03-23 12:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-18 11:14 [ptxdist] [PATCH] host-tf-a: fix build with v2.14 Roland Hieber
2026-03-23 12:34 ` Roland Hieber
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox