From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Mon, 25 Jul 2022 14:04:58 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1oFwpX-0035nI-7X for lore@lore.pengutronix.de; Mon, 25 Jul 2022 14:04:58 +0200 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1oFwpU-0000M6-UW; Mon, 25 Jul 2022 14:04:56 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oFwpM-0000II-NH; Mon, 25 Jul 2022 14:04:48 +0200 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1oFwpL-0036bK-Ux; Mon, 25 Jul 2022 14:04:47 +0200 Received: from afa by dude04.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1oFwpK-005R6m-Tf; Mon, 25 Jul 2022 14:04:46 +0200 From: Ahmad Fatoum To: distrokit@pengutronix.de Date: Mon, 25 Jul 2022 14:04:43 +0200 Message-Id: <20220725120445.1295669-6-a.fatoum@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220725120445.1295669-1-a.fatoum@pengutronix.de> References: <20220725120445.1295669-1-a.fatoum@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [DistroKit] [PATCH 6/8] v7a: tf-a: switch to FIP image 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: Ahmad Fatoum 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.ext.pengutronix.de); SAEximRunCond expanded to false We have everything in place now to switch from stm32image to FIP. This gives us upstream support for factory bootstrap via DFU and avoids the breakage on v2.8, which will be the first release removing support of the deprecated stm32image format. Signed-off-by: Ahmad Fatoum --- .../platform-v7a/config/images/stm32mp.config | 19 +++++++++++++++---- configs/platform-v7a/platformconfig | 3 ++- .../platform-v7a/platforms/image-lxa-mc1.in | 1 + .../platforms/image-stm32mp157c-dk2.in | 1 + .../platforms/image-stm32mp157c-ev1.in | 1 + .../platform-v7a/rules/barebox-stm32mp.make | 4 +--- configs/platform-v7a/rules/image-lxa-mc1.make | 4 +--- .../rules/image-stm32mp157c-dk2.make | 4 +--- .../rules/image-stm32mp157c-ev1.make | 4 +--- 9 files changed, 24 insertions(+), 17 deletions(-) diff --git a/configs/platform-v7a/config/images/stm32mp.config b/configs/platform-v7a/config/images/stm32mp.config index eb6065c64c1a..52d0d0e8aa97 100644 --- a/configs/platform-v7a/config/images/stm32mp.config +++ b/configs/platform-v7a/config/images/stm32mp.config @@ -5,15 +5,15 @@ image @IMAGE@ { gpt-no-backup = true } partition fsbl1 { - image = "stm32mp1-tf-a-@STM32MP_BOARD_FSBL@.stm32" + image = "stm32mp1-tf-a-@STM32MP_BOARD@.stm32" size = 256K } partition fsbl2 { - image = "stm32mp1-tf-a-@STM32MP_BOARD_FSBL@.stm32" + image = "stm32mp1-tf-a-@STM32MP_BOARD@.stm32" size = 256K } - partition ssbl { - image = "barebox-@STM32MP_BOARD_SSBL@.img" + partition fip { + image = "@STM32MP_BOARD@.fip" size = 1M } partition barebox-environment { @@ -26,4 +26,15 @@ image @IMAGE@ { size = 100M } } + +image @STM32MP_BOARD@.fip { + fip { + fw-config = "stm32mp1-@STM32MP_BOARD@-fw-config.dtb" + hw-config = "barebox-@STM32MP_BOARD@.dtb" + nt-fw = "barebox-stm32mp-generic-bl33.img" + tos-fw = { "stm32mp1-bl32.bin" } + tos-fw-config = "stm32mp1-@STM32MP_BOARD@-bl32.dtb" + } + size = 1M +} /* vim: set tabstop=8 noexpandtab : */ diff --git a/configs/platform-v7a/platformconfig b/configs/platform-v7a/platformconfig index 1444356360ac..5b5c8bc383fe 100644 --- a/configs/platform-v7a/platformconfig +++ b/configs/platform-v7a/platformconfig @@ -204,7 +204,7 @@ PTXCONF_TF_A_ARM_ARCH_MAJOR_7=y # PTXCONF_TF_A_ARM_ARCH_MAJOR_8_32_BIT is not set PTXCONF_TF_A_ARM_ARCH_MAJOR=7 PTXCONF_TF_A_PLATFORMS="stm32mp1" -PTXCONF_TF_A_EXTRA_ARGS="DTB_FILE_NAME='stm32mp157c-dk2.dtb stm32mp157c-ev1.dtb stm32mp157c-lxa-mc1.dtb' STM32MP_EMMC=1 STM32MP_SDMMC=1 STM32MP_USE_STM32IMAGE=1" +PTXCONF_TF_A_EXTRA_ARGS="DTB_FILE_NAME='stm32mp157c-dk2.dtb stm32mp157c-ev1.dtb stm32mp157c-lxa-mc1.dtb' STM32MP_EMMC=1 STM32MP_SDMMC=1 STM32MP_USB_PROGRAMMER=1" PTXCONF_TF_A_ARTIFACTS="tf-a-*.stm32 bl32.bin fdts/*-fw-config.dtb fdts/*-bl32.dtb" # @@ -316,6 +316,7 @@ PTXCONF_HOST_M4=y PTXCONF_HOST_MTOOLS=y PTXCONF_HOST_SYSTEM_BC=y PTXCONF_HOST_UTIL_LINUX_NG=y +PTXCONF_HOST_TF_A=y # # non-free firmware blobs diff --git a/configs/platform-v7a/platforms/image-lxa-mc1.in b/configs/platform-v7a/platforms/image-lxa-mc1.in index baae9c47edd4..affb04eed9de 100644 --- a/configs/platform-v7a/platforms/image-lxa-mc1.in +++ b/configs/platform-v7a/platforms/image-lxa-mc1.in @@ -3,6 +3,7 @@ config IMAGE_LXA_MC1 tristate select HOST_GENIMAGE + select HOST_TF_A select IMAGE_ROOT_EXT select BAREBOX_STM32MP select TF_A diff --git a/configs/platform-v7a/platforms/image-stm32mp157c-dk2.in b/configs/platform-v7a/platforms/image-stm32mp157c-dk2.in index d7b9c235edaa..d146b96bac70 100644 --- a/configs/platform-v7a/platforms/image-stm32mp157c-dk2.in +++ b/configs/platform-v7a/platforms/image-stm32mp157c-dk2.in @@ -3,6 +3,7 @@ config IMAGE_STM32MP157C_DK2 tristate select HOST_GENIMAGE + select HOST_TF_A select IMAGE_ROOT_EXT select BAREBOX_STM32MP select TF_A diff --git a/configs/platform-v7a/platforms/image-stm32mp157c-ev1.in b/configs/platform-v7a/platforms/image-stm32mp157c-ev1.in index d0b60a4956c4..7bc91af9e34c 100644 --- a/configs/platform-v7a/platforms/image-stm32mp157c-ev1.in +++ b/configs/platform-v7a/platforms/image-stm32mp157c-ev1.in @@ -3,6 +3,7 @@ config IMAGE_STM32MP157C_EV1 tristate select HOST_GENIMAGE + select HOST_TF_A select IMAGE_ROOT_EXT select BAREBOX_STM32MP select TF_A diff --git a/configs/platform-v7a/rules/barebox-stm32mp.make b/configs/platform-v7a/rules/barebox-stm32mp.make index aeb141f2729b..24df76194860 100644 --- a/configs/platform-v7a/rules/barebox-stm32mp.make +++ b/configs/platform-v7a/rules/barebox-stm32mp.make @@ -45,9 +45,7 @@ BAREBOX_STM32MP_CONF_OPT := \ BAREBOX_STM32MP_MAKE_OPT := $(BAREBOX_STM32MP_CONF_OPT) BAREBOX_STM32MP_IMAGES := \ - images/barebox-stm32mp15xx-dkx.img \ - images/barebox-stm32mp15x-ev1.img \ - images/barebox-stm32mp157c-lxa-mc1.img + images/barebox-stm32mp-generic-bl33.img BAREBOX_STM32MP_FIP_DTBS := \ stm32mp157c-dk2.dtb \ diff --git a/configs/platform-v7a/rules/image-lxa-mc1.make b/configs/platform-v7a/rules/image-lxa-mc1.make index 058a9d100e11..333a5f606104 100644 --- a/configs/platform-v7a/rules/image-lxa-mc1.make +++ b/configs/platform-v7a/rules/image-lxa-mc1.make @@ -11,9 +11,7 @@ # IMAGE_PACKAGES-$(PTXCONF_IMAGE_LXA_MC1) += image-lxa-mc1 -IMAGE_LXA_MC1_ENV := \ - STM32MP_BOARD_FSBL=stm32mp157c-lxa-mc1 \ - STM32MP_BOARD_SSBL=stm32mp157c-lxa-mc1 +IMAGE_LXA_MC1_ENV := STM32MP_BOARD=stm32mp157c-lxa-mc1 # # Paths and names diff --git a/configs/platform-v7a/rules/image-stm32mp157c-dk2.make b/configs/platform-v7a/rules/image-stm32mp157c-dk2.make index 7c0f4424936a..fb14c7a95fa9 100644 --- a/configs/platform-v7a/rules/image-stm32mp157c-dk2.make +++ b/configs/platform-v7a/rules/image-stm32mp157c-dk2.make @@ -11,9 +11,7 @@ # IMAGE_PACKAGES-$(PTXCONF_IMAGE_STM32MP157C_DK2) += image-stm32mp157c-dk2 -IMAGE_STM32MP157C_DK2_ENV := \ - STM32MP_BOARD_FSBL=stm32mp157c-dk2 \ - STM32MP_BOARD_SSBL=stm32mp15xx-dkx +IMAGE_STM32MP157C_DK2_ENV := STM32MP_BOARD=stm32mp157c-dk2 # # Paths and names diff --git a/configs/platform-v7a/rules/image-stm32mp157c-ev1.make b/configs/platform-v7a/rules/image-stm32mp157c-ev1.make index 862ea5a866ce..297b0f639c7b 100644 --- a/configs/platform-v7a/rules/image-stm32mp157c-ev1.make +++ b/configs/platform-v7a/rules/image-stm32mp157c-ev1.make @@ -11,9 +11,7 @@ # IMAGE_PACKAGES-$(PTXCONF_IMAGE_STM32MP157C_EV1) += image-stm32mp157c-ev1 -IMAGE_STM32MP157C_EV1_ENV := \ - STM32MP_BOARD_FSBL=stm32mp157c-ev1 \ - STM32MP_BOARD_SSBL=stm32mp15x-ev1 +IMAGE_STM32MP157C_EV1_ENV := STM32MP_BOARD=stm32mp157c-ev1 # # Paths and names -- 2.30.2