mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Roland Hieber <rhi@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH] host-tf-a: fix build with v2.14
Date: Mon, 23 Mar 2026 13:34:00 +0100	[thread overview]
Message-ID: <1774268261-d094820fd7025d84fc76e40c@pty> (raw)
In-Reply-To: <20260318111403.842617-2-rhi@pengutronix.de>

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 |



      reply	other threads:[~2026-03-23 12:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-18 11:14 Roland Hieber
2026-03-23 12:34 ` Roland Hieber [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1774268261-d094820fd7025d84fc76e40c@pty \
    --to=rhi@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox