From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Wed, 03 Apr 2024 13:54:37 +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 1rrzCP-0063RW-18 for lore@lore.pengutronix.de; Wed, 03 Apr 2024 13:54:37 +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 1rrzCO-0004hz-SS; Wed, 03 Apr 2024 13:54:36 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rrzCN-0004hk-Ob; Wed, 03 Apr 2024 13:54:35 +0200 Received: from [2a0a:edc0:2:b01:1d::c5] (helo=pty.whiteo.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rrzCN-00AAQP-C4; Wed, 03 Apr 2024 13:54:35 +0200 Received: from mol by pty.whiteo.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rrzCN-00CQfL-0w; Wed, 03 Apr 2024 13:54:35 +0200 Date: Wed, 3 Apr 2024 13:54:35 +0200 From: Michael Olbrich To: Ahmad Fatoum Message-ID: Mail-Followup-To: Ahmad Fatoum , distrokit@pengutronix.de References: <20240403103924.3168404-1-a.fatoum@pengutronix.de> <20240403103924.3168404-9-a.fatoum@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240403103924.3168404-9-a.fatoum@pengutronix.de> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain Subject: Re: [DistroKit] [PATCH v2 8/8] v7a: stm32mp: add image recipe for STM32MP135F-DK 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 On Wed, Apr 03, 2024 at 12:39:24PM +0200, Ahmad Fatoum wrote: > Now, that we have TF-A, OP-TEE, barebox and kernel in-place, let's build > an image that combines all of them that can be booted by writing to the > SD-Card of the STM32MP135F-DK. > > Notably missing is Ethernet support as that's not mainline yet. > > Signed-off-by: Ahmad Fatoum > Link: https://lore.pengutronix.de/20240315211240.3016716-13-a.fatoum@pengutronix.de > Signed-off-by: Robert Schwebel > --- > v1 -> v2: > - use barebox environment partition type GUID > --- > .../config/images/stm32mp-optee.config | 61 +++++++++++++++++++ > configs/platform-v7a/platformconfig | 3 +- > .../platforms/image-stm32mp135f-dk.in | 13 ++++ > .../rules/image-stm32mp135f-dk.make | 34 +++++++++++ > 4 files changed, 110 insertions(+), 1 deletion(-) > create mode 100644 configs/platform-v7a/config/images/stm32mp-optee.config > create mode 100644 configs/platform-v7a/platforms/image-stm32mp135f-dk.in > create mode 100644 configs/platform-v7a/rules/image-stm32mp135f-dk.make > > diff --git a/configs/platform-v7a/config/images/stm32mp-optee.config b/configs/platform-v7a/config/images/stm32mp-optee.config > new file mode 100644 > index 000000000000..c1be91eb49d8 > --- /dev/null > +++ b/configs/platform-v7a/config/images/stm32mp-optee.config > @@ -0,0 +1,61 @@ > +image @IMAGE@ { > + hdimage { > + align = 1M > + partition-table-type = gpt > + gpt-no-backup = true > + } > + > + /* below three partitions are unused when booting from eMMC boot partition */ > + partition fsbl1 { > + image = "stm32mp1-tf-a-@STM32MP_BOARD@.stm32" > + size = 256K > + } > + partition fsbl2 { > + image = "stm32mp1-tf-a-@STM32MP_BOARD@.stm32" > + size = 256K > + } > + partition fip { > + image = "@STM32MP_BOARD@.fip" > + size = 2M > + } > + > + partition barebox-environment { > + partition-type-uuid = "6c3737f2-07f8-45d1-ad45-15d260aab24d" > + size = 1M > + } > + partition barebox-state { > + partition-type-uuid = "4778ed65-bf42-45fa-9c5b-287a1dc4aab1" I think genimage should be new enough to use partition-type-uuid = "barebox-state" > + size = 1M > + } > + partition root-A { > + partition-type-uuid = 69dad710-2ce4-4e3c-b16c-21a1d49abed3 # root-arm partition-type-uuid = "root-arm" And please be consistent with quoting. Michael > + image = root.ext2 > + } > +} > + > +image @STM32MP_BOARD@-emmcboot.img { > + hdimage { > + partition-table = false > + } > + > + partition fsbl { > + image = "stm32mp1-tf-a-@STM32MP_BOARD@.stm32" > + size = 256K > + } > + > + partition fip { > + image = "@STM32MP_BOARD@.fip" > + offset = 256K > + } > +} > + > +image @STM32MP_BOARD@.fip { > + fip { > + fw-config = "stm32mp1-@STM32MP_BOARD@-fw-config.dtb" > + hw-config = "@STM32MP_BOARD@.dtb-bb" > + nt-fw = "barebox-stm32mp-generic-bl33.img" > + tos-fw = { "tee-header_v2.bin", "tee-pager_v2.bin", "tee-pageable_v2.bin" } > + } > + size = 2M > +} > +/* vim: set tabstop=8 noexpandtab : */ > diff --git a/configs/platform-v7a/platformconfig b/configs/platform-v7a/platformconfig > index cef14be54d87..9fc6b59c5285 100644 > --- a/configs/platform-v7a/platformconfig > +++ b/configs/platform-v7a/platformconfig > @@ -203,7 +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 CFG_GP_SOCKETS=n CFG_TA_MBEDTLS_SELF_TEST=n" > -# PTXCONF_TF_A_STM32MP13 is not set > +PTXCONF_TF_A_STM32MP13=y > 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" > @@ -293,6 +293,7 @@ PTXCONF_IMAGE_RPI2=y > PTXCONF_IMAGE_SABRELITE=y > PTXCONF_IMAGE_SAMA5D27_GIANTBOARD=y > PTXCONF_IMAGE_SAMA5D27_SOM1_EK=y > +PTXCONF_IMAGE_STM32MP135F_DK=y > PTXCONF_IMAGE_STM32MP157C_DK2=y > PTXCONF_IMAGE_STM32MP157C_EV1=y > PTXCONF_IMAGE_UDOO_NEO=y > diff --git a/configs/platform-v7a/platforms/image-stm32mp135f-dk.in b/configs/platform-v7a/platforms/image-stm32mp135f-dk.in > new file mode 100644 > index 000000000000..4b06817a7dfc > --- /dev/null > +++ b/configs/platform-v7a/platforms/image-stm32mp135f-dk.in > @@ -0,0 +1,13 @@ > +## SECTION=image > + > +config IMAGE_STM32MP135F_DK > + tristate > + select HOST_GENIMAGE > + select HOST_TF_A > + select IMAGE_ROOT_EXT > + select TF_A_STM32MP13 > + select OPTEE > + select BAREBOX_STM32MP > + prompt "Generate images/stm32mp135f-dk.hdimg" > + help > + Generate GPT image for the STM32MP135F-DK > diff --git a/configs/platform-v7a/rules/image-stm32mp135f-dk.make b/configs/platform-v7a/rules/image-stm32mp135f-dk.make > new file mode 100644 > index 000000000000..c7fefb2f0432 > --- /dev/null > +++ b/configs/platform-v7a/rules/image-stm32mp135f-dk.make > @@ -0,0 +1,34 @@ > +# -*-makefile-*- > +# > +# Copyright (C) 2017 by Sascha Hauer > +# > +# For further information about the PTXdist project and license conditions > +# see the README file. > +# > + > +# > +# We provide this package > +# > +IMAGE_PACKAGES-$(PTXCONF_IMAGE_STM32MP135F_DK) += image-stm32mp135f-dk > + > +IMAGE_STM32MP135F_DK_ENV := STM32MP_BOARD=stm32mp135f-dk > + > +# > +# Paths and names > +# > +IMAGE_STM32MP135F_DK := image-stm32mp135f-dk > +IMAGE_STM32MP135F_DK_DIR := $(BUILDDIR)/$(IMAGE_STM32MP135F_DK) > +IMAGE_STM32MP135F_DK_IMAGE := $(IMAGEDIR)/stm32mp135f-dk.hdimg > +IMAGE_STM32MP135F_DK_FILES := $(IMAGEDIR)/root.tgz > +IMAGE_STM32MP135F_DK_CONFIG := stm32mp-optee.config > + > +# ---------------------------------------------------------------------------- > +# Image > +# ---------------------------------------------------------------------------- > + > +$(IMAGE_STM32MP135F_DK_IMAGE): > + @$(call targetinfo) > + @$(call image/genimage, IMAGE_STM32MP135F_DK) > + @$(call finish) > + > +# vim: syntax=make > -- > 2.39.2 > > > -- 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 |