From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 26 Apr 2024 10:03:38 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1s0GYU-000rMT-0s for lore@lore.pengutronix.de; Fri, 26 Apr 2024 10:03:38 +0200 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1s0GYT-000261-7k; Fri, 26 Apr 2024 10:03:37 +0200 Received: from mail.thorsis.com ([217.92.40.78]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s0GYK-000243-91; Fri, 26 Apr 2024 10:03:31 +0200 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 359EA148339B; Fri, 26 Apr 2024 10:03:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thorsis.com; s=dkim; t=1714118607; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=QdAoTW4JkjMkbNKPuQlqKDDzg1oKz+aj2DTLP8MZHr0=; b=Q7Lx1HI+TaBqf2Kn2PvQ9lOv4Ifzehmb+GEasyssI850JDA3AtQlVjiSz/kjB4HRR4O5sH 32a/rrpSyqCJq/13KjTjKKow5g5PvX/zX2BWo5B2yG18nPB50Dc1Vj8umafWg9O3kL/vR7 rYKSJsHZkq6oanpbSQfdRxj2TojzdtrEq04nE0BRyj+BIUDZyJcoFSeJu2SFzxnlseP9pt AypKnEknWh489mMK6yIL5WoALB+ET9naJeAoecBrtwLP0b8dxxpMtOOyJ+PL/kB+QeoAyt vDtW2PDEtI9QYe3JvW7rds5UQfO2CBc+xhq/WV80evl46Ezr9B/yjXBvX7Us+g== Date: Fri, 26 Apr 2024 10:03:19 +0200 From: Alexander Dahl To: Ahmad Fatoum Message-ID: <20240426-lyrics-manager-9affa0516da9@thorsis.com> Mail-Followup-To: Ahmad Fatoum , distrokit@pengutronix.de References: <20240315211240.3016716-1-a.fatoum@pengutronix.de> <20240315211240.3016716-11-a.fatoum@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240315211240.3016716-11-a.fatoum@pengutronix.de> User-Agent: Mutt/2.2.12 (2023-09-09) X-Last-TLS-Session-Version: TLSv1.3 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.whiteo.stw.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-2.8 required=4.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Subject: Re: [DistroKit] [PATCH 10/12] v7a: stm32mp: add TF-A recipe for STM32MP13 X-BeenThere: distrokit@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: DistroKit Mailinglist List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: distrokit@pengutronix.de Sender: "DistroKit" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: distrokit-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false Hello Ahmad, sorry to hook in here again, but a clean DistroKit build fails on `ptxdist get tf-a-stm32mp13` which is essentially the same problem as already fixed with 3e11c53d98c0 ("tf-a: Change download URL") for the generic tf-a package … see below. Am Fri, Mar 15, 2024 at 10:12:38PM +0100 schrieb Ahmad Fatoum: > We have two ways of doing multi-image builds with TF-A: > > - STM32MP15-specific: Multiple device trees can be supplied and TF-A > is built once and linked with each DT in turn. This was contributed > to TF-A for DistroKit purposes, but ST broke the compatibility for > STM32MP13, which requires to be built separately. > > - PTXdist-specific: The PTXdist rule can built multiple platforms in > different build directories. This requires however that the options > used are the same, except for platform. We unfortunately need to > change the option between our two TF-A build though. > > Therefore, let's duplicate the upstream TF-A rule for the STM32MP13 and > configure it for use with OP-TEE. > > Signed-off-by: Ahmad Fatoum > --- > configs/platform-v7a/platformconfig | 1 + > .../platform-v7a/platforms/tf-a-stm32mp13.in | 12 ++ > .../platform-v7a/rules/tf-a-stm32mp13.make | 110 ++++++++++++++++++ > 3 files changed, 123 insertions(+) > create mode 100644 configs/platform-v7a/platforms/tf-a-stm32mp13.in > create mode 100644 configs/platform-v7a/rules/tf-a-stm32mp13.make > > diff --git a/configs/platform-v7a/platformconfig b/configs/platform-v7a/platformconfig > index c502a5e44b40..1ff25470bfd6 100644 > --- a/configs/platform-v7a/platformconfig > +++ b/configs/platform-v7a/platformconfig > @@ -203,6 +203,7 @@ PTXCONF_OPTEE=y > PTXCONF_OPTEE_PLATFORM="stm32mp1" > PTXCONF_OPTEE_PLATFORM_FLAVOUR="135F_DK" > PTXCONF_OPTEE_CFG="CFG_TEE_CORE_LOG_LEVEL=2 CFG_WITH_PAGER=n" > +# PTXCONF_TF_A_STM32MP13 is not set > PTXCONF_TF_A=y > PTXCONF_TF_A_URL="https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/snapshot" > PTXCONF_TF_A_VERSION="v2.10" > diff --git a/configs/platform-v7a/platforms/tf-a-stm32mp13.in b/configs/platform-v7a/platforms/tf-a-stm32mp13.in > new file mode 100644 > index 000000000000..0dd58041ec19 > --- /dev/null > +++ b/configs/platform-v7a/platforms/tf-a-stm32mp13.in > @@ -0,0 +1,12 @@ > +## SECTION=bootloader > + > +menuconfig TF_A_STM32MP13 > + select BOOTLOADER > + select HOST_DTC > + prompt "ARM Trusted Firmware-A for STM32MP13 with OP-TEE" > + depends on ARCH_ARM > + bool > + help > + ARM Trusted Firmware-A for STM32MP13 series SoCs with OP-TEE enabled. > + Currently, these can't be built in the same build as the > + STM32MP15 with SP_min. > diff --git a/configs/platform-v7a/rules/tf-a-stm32mp13.make b/configs/platform-v7a/rules/tf-a-stm32mp13.make > new file mode 100644 > index 000000000000..36feb25e6e76 > --- /dev/null > +++ b/configs/platform-v7a/rules/tf-a-stm32mp13.make > @@ -0,0 +1,110 @@ > +# -*-makefile-*- > +# > +# Copyright (C) 2018 by Rouven Czerwinski > +# 2019 by Ahmad Fatoum > +# > +# For further information about the PTXdist project and license conditions > +# see the README file. > +# > + > +# > +# We provide this package > +# > +PACKAGES-$(PTXCONF_TF_A_STM32MP13) += tf-a-stm32mp13 > + > +# > +# Paths and names > +# > +TF_A_STM32MP13_VERSION := $(call ptx/config-version, PTXCONF_TF_A) > +TF_A_STM32MP13_MD5 := $(call ptx/config-md5, PTXCONF_TF_A) > +TF_A_STM32MP13 := tf-a-stm32mp13-$(TF_A_STM32MP13_VERSION) > +TF_A_STM32MP13_SUFFIX := tar.gz > +TF_A_STM32MP13_URL := https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/snapshot/$(TF_A_STM32MP13_VERSION).$(TF_A_STM32MP13_SUFFIX) This fails if someone deselects pkg 'tf-a' (after deselecting all images depending on it). TF_A_STM32MP13_VERSION and TF_A_STM32MP13_MD5 won't get a valid value then. I thought about setting TF_A_STM32MP13_URL to PTXCONF_TF_A_URL to fix the URL problem, but that would have the same problem. I see three possibilities: 1) hardcode everything in this duplicated package 'tf-a-stm32mp13' 2) create a dependency to the generic 'tf-a' package which might be built without real reason then maybe 3) move that version, md5, and url stuff in some extra 'common' package (would not make it possible to use the tf-a package from ptxdist anymore?) Greets Alex > +TF_A_STM32MP13_SOURCE := $(SRCDIR)/$(TF_A_STM32MP13).$(TF_A_STM32MP13_SUFFIX) > +TF_A_STM32MP13_DIR := $(BUILDDIR)/$(TF_A_STM32MP13) > +TF_A_STM32MP13_BUILDDIR := $(TF_A_STM32MP13_DIR)/build > +TF_A_STM32MP13_BUILD_OOT := YES > +TF_A_STM32MP13_LICENSE := BSD-3-Clause AND BSD-2-Clause \ > + AND (GPL-2.0-or-later OR BSD-2-Clause) \ > + AND (NCSA OR MIT) \ > + AND Zlib \ > + AND (GPL-2.0-or-later OR BSD-3-Clause) > + > +# ---------------------------------------------------------------------------- > +# Prepare > +# ---------------------------------------------------------------------------- > + > +TF_A_STM32MP13_PLATFORMS := stm32mp1 > +TF_A_STM32MP13_ARTIFACTS := tf-a-*.stm32 fdts/*-fw-config.dtb > + > +TF_A_STM32MP13_WRAPPER_BLACKLIST := \ > + $(PTXDIST_LOWLEVEL_WRAPPER_BLACKLIST) > + > +TF_A_STM32MP13_PATH := PATH=$(CROSS_PATH) > +TF_A_STM32MP13_MAKE_OPT := \ > + -C $(TF_A_STM32MP13_DIR) \ > + CROSS_COMPILE=$(BOOTLOADER_CROSS_COMPILE) \ > + HOSTCC=$(HOSTCC) \ > + ARCH=aarch32 \ > + ARM_ARCH_MAJOR=7 \ > + BUILD_STRING=$(TF_A_STM32MP13_VERSION) \ > + DTB_FILE_NAME='stm32mp135f-dk.dtb' \ > + STM32MP_EMMC=1 STM32MP_SDMMC=1 \ > + STM32MP_RAW_NAND=1 STM32MP_SPI_NAND=1 STM32MP_SPI_NOR=1 \ > + STM32MP_USB_PROGRAMMER=1 \ > + AARCH32_SP=optee \ > + all > + > +TF_A_STM32MP13_CONF_TOOL := NO > + > +# ---------------------------------------------------------------------------- > +# Compile > +# ---------------------------------------------------------------------------- > + > +TF_A_STM32MP13_MAKE_ENV := $(CROSS_ENV) > + > +$(STATEDIR)/tf-a-stm32mp13.compile: > + @$(call targetinfo) > + > + @$(foreach plat, $(TF_A_STM32MP13_PLATFORMS), \ > + $(call compile, TF_A_STM32MP13, \ > + $(TF_A_STM32MP13_MAKE_OPT) PLAT=$(plat))$(ptx/nl)) > + > + @$(call touch) > + > +# ---------------------------------------------------------------------------- > +# Install > +# ---------------------------------------------------------------------------- > + > +tf-a-stm32mp13/inst_plat = $(foreach artifact, \ > + $(foreach pattern, $(TF_A_STM32MP13_ARTIFACTS), \ > + $(wildcard $(TF_A_STM32MP13_BUILDDIR)/$(1)/$(if $(filter DEBUG=1,TF_A_STM32MP13_MAKE_OPT),debug,release)/$(pattern))), \ > + install -v -D -m 644 $(artifact) \ > + $(2)/$(1)-$(notdir $(artifact))$(ptx/nl)) > + > +tf-a-stm32mp13/inst_bins = $(foreach plat, $(TF_A_STM32MP13_PLATFORMS), $(call tf-a-stm32mp13/inst_plat,$(plat),$(1))) > + > +$(STATEDIR)/tf-a-stm32mp13.install: > + @$(call targetinfo) > + @$(call tf-a-stm32mp13/inst_bins,$(TF_A_STM32MP13_PKGDIR)/usr/lib/firmware) > + @$(call touch) > + > +# ---------------------------------------------------------------------------- > +# Target-Install > +# ---------------------------------------------------------------------------- > + > +$(STATEDIR)/tf-a-stm32mp13.targetinstall: > + @$(call targetinfo) > + @$(call tf-a-stm32mp13/inst_bins,$(IMAGEDIR)) > + @$(call touch) > + > +# ---------------------------------------------------------------------------- > +# Clean > +# ---------------------------------------------------------------------------- > + > +$(STATEDIR)/tf-a-stm32mp13.clean: > + @$(call targetinfo) > + @rm -vf $(addprefix $(IMAGEDIR)/, $(notdir $(TF_A_STM32MP13_ARTIFACTS_SRC))) > + @$(call clean_pkg, TF_A_STM32MP13) > + > +# vim: syntax=make > -- > 2.39.2 > >