From patchwork Wed Oct 11 11:09:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?S=C3=A9bastien_Szymanski?= X-Patchwork-Id: 1846802 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4S5FzG58XLz23jd for ; Thu, 12 Oct 2023 01:49:29 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 9E54B40A65; Wed, 11 Oct 2023 14:49:26 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 9E54B40A65 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DJ7ZpEPZFSj6; Wed, 11 Oct 2023 14:49:25 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id 97374403AE; Wed, 11 Oct 2023 14:49:24 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 97374403AE X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 055291BF299 for ; Wed, 11 Oct 2023 14:49:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id D27A3824F4 for ; Wed, 11 Oct 2023 14:49:22 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org D27A3824F4 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ojtf5oyQZuzc for ; Wed, 11 Oct 2023 14:49:21 +0000 (UTC) X-Greylist: delayed 8405 seconds by postgrey-1.37 at util1.osuosl.org; Wed, 11 Oct 2023 14:49:20 UTC DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org D29CD824DC Received: from 1.mo550.mail-out.ovh.net (1.mo550.mail-out.ovh.net [178.32.127.22]) by smtp1.osuosl.org (Postfix) with ESMTPS id D29CD824DC for ; Wed, 11 Oct 2023 14:49:20 +0000 (UTC) Received: from director4.ghost.mail-out.ovh.net (unknown [10.108.4.80]) by mo550.mail-out.ovh.net (Postfix) with ESMTP id 35F75299A4 for ; Wed, 11 Oct 2023 11:10:13 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-gj8s2 (unknown [10.110.103.246]) by director4.ghost.mail-out.ovh.net (Postfix) with ESMTPS id BECE01FE61; Wed, 11 Oct 2023 11:10:12 +0000 (UTC) Received: from armadeus.com ([37.59.142.99]) by ghost-submission-6684bf9d7b-gj8s2 with ESMTPSA id SOpALZSCJmUtsQAAOOc7LA (envelope-from ); Wed, 11 Oct 2023 11:10:12 +0000 X-OVh-ClientIp: 92.148.253.243 From: =?utf-8?q?S=C3=A9bastien_Szymanski?= To: buildroot@buildroot.org Date: Wed, 11 Oct 2023 13:09:29 +0200 Message-ID: <20231011110932.4425-2-sebastien.szymanski@armadeus.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231011110932.4425-1-sebastien.szymanski@armadeus.com> References: <20231011110932.4425-1-sebastien.szymanski@armadeus.com> MIME-Version: 1.0 X-Ovh-Tracer-Id: 9409427000443202539 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvkedrheekgdefhecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkffojghfgggtgfesthekredtredtjeenucfhrhhomhepuforsggrshhtihgvnhcuufiihihmrghnshhkihcuoehsvggsrghsthhivghnrdhsiiihmhgrnhhskhhisegrrhhmrgguvghushdrtghomheqnecuggftrfgrthhtvghrnhepfeelkeefheekvdeuveeiteduhfeglefhgfffvdfffeelveevveeiudevteefvdehnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepuddvjedrtddrtddruddpledvrddugeekrddvheefrddvgeefpdefjedrheelrddugedvrdelleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepoehsvggsrghsthhivghnrdhsiiihmhgrnhhskhhisegrrhhmrgguvghushdrtghomheqpdhnsggprhgtphhtthhopedupdhrtghpthhtohepsghuihhlughrohhothessghuihhlughrohhothdrohhrghdpoffvtefjohhsthepmhhoheehtddpmhhouggvpehsmhhtphhouhht X-Mailman-Original-Authentication-Results: garm.ovh; auth=pass (GARM-99G00324dfb467-93a7-4ccb-842e-4c4de15aab1d, D325CBA16CF7D2396D5DBDA76F1DA3B90F182274) smtp.auth=sebastien.szymanski@armadeus.com Subject: [Buildroot] [PATCH 1/4] package/imx-mkimage: bump version to lf-6.1.36-2.1.0 X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gary Bisson , Refik Tuzakli , Erik Larsson , Thomas Petazzoni , Fabio Estevam Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Bump imx-mkimage to the latest version to gain i.MX9 support. Patch 0001 and 0004 are merged upstream: https://github.com/nxp-imx/imx-mkimage/commit/ff23c4fd84bb88d73b52a0ccad733522d2faa477 https://github.com/nxp-imx/imx-mkimage/commit/bce82912c8206edd0cc97af8c6b30240229fae7f Patch 0002 is no more needed, BUILD_LDFLAGS var is now available: https://github.com/nxp-imx/imx-mkimage/commit/8185a000a7c6af562e773da812c6c8d141815531 Signed-off-by: Sébastien Szymanski --- ...overriding-BL32-and-BL33-not-only-BL.patch | 60 ------------------ .../0002-Add-LDFLAGS-to-link-step.patch | 26 -------- ...rt-for-overriding-BL31-BL32-and-BL33.patch | 61 ------------------- package/imx-mkimage/imx-mkimage.hash | 2 +- package/imx-mkimage/imx-mkimage.mk | 7 ++- 5 files changed, 5 insertions(+), 151 deletions(-) delete mode 100644 package/imx-mkimage/0001-Add-support-for-overriding-BL32-and-BL33-not-only-BL.patch delete mode 100644 package/imx-mkimage/0002-Add-LDFLAGS-to-link-step.patch delete mode 100644 package/imx-mkimage/0004-Add-support-for-overriding-BL31-BL32-and-BL33.patch diff --git a/package/imx-mkimage/0001-Add-support-for-overriding-BL32-and-BL33-not-only-BL.patch b/package/imx-mkimage/0001-Add-support-for-overriding-BL32-and-BL33-not-only-BL.patch deleted file mode 100644 index 66891ac8e758..000000000000 --- a/package/imx-mkimage/0001-Add-support-for-overriding-BL32-and-BL33-not-only-BL.patch +++ /dev/null @@ -1,60 +0,0 @@ -From a4993eda7483cd01662f3f3e2965e7a568cb7178 Mon Sep 17 00:00:00 2001 -From: Erik Larsson -Date: Thu, 8 Mar 2018 19:04:37 +0100 -Subject: [PATCH] Add support for overriding BL32 and BL33 not only BL31 - -Signed-off-by: Erik Larsson -Signed-off-by: Christopher Dahlberg -Signed-off-by: Marcus Folkesson ---- - iMX8M/mkimage_fit_atf.sh | 16 ++++++++-------- - 1 file changed, 8 insertions(+), 8 deletions(-) - -diff --git a/iMX8M/mkimage_fit_atf.sh b/iMX8M/mkimage_fit_atf.sh -index 4f2b3f3..0444ff0 100755 ---- a/iMX8M/mkimage_fit_atf.sh -+++ b/iMX8M/mkimage_fit_atf.sh -@@ -18,23 +18,23 @@ if [ ! -f $BL31 ]; then - echo "ERROR: BL31 file $BL31 NOT found" >&2 - exit 0 - else -- echo "bl31.bin size: " >&2 -- ls -lct bl31.bin | awk '{print $5}' >&2 -+ echo "$BL31 size: " >&2 -+ ls -lct $BL31 | awk '{print $5}' >&2 - fi - --BL32="tee.bin" -+[ -z "$BL32" ] && BL32="tee.bin" - LOADABLES="\"atf-1\"" - - if [ ! -f $BL32 ]; then - BL32=/dev/null - else - echo "Building with TEE support, make sure your bl31 is compiled with spd. If you do not want tee, please delete tee.bin" >&2 -- echo "tee.bin size: " >&2 -- ls -lct tee.bin | awk '{print $5}' >&2 -+ echo "$BL32 size: " >&2 -+ ls -lct $BL32 | awk '{print $5}' >&2 - LOADABLES="$LOADABLES, \"tee-1\"" - fi - --BL33="u-boot-nodtb.bin" -+[ -z "$BL33" ] && BL33="u-boot-nodtb.bin" - DEK_BLOB="dek_blob_fit_dummy.bin" - - if [ ! -f $DEK_BLOB ]; then -@@ -49,8 +49,8 @@ if [ ! -f $BL33 ]; then - exit 0 - else - -- echo "u-boot-nodtb.bin size: " >&2 -- ls -lct u-boot-nodtb.bin | awk '{print $5}' >&2 -+ echo "$BL33 size: " >&2 -+ ls -lct $BL33 | awk '{print $5}' >&2 - fi - - for dtname in $* --- -2.31.1 - diff --git a/package/imx-mkimage/0002-Add-LDFLAGS-to-link-step.patch b/package/imx-mkimage/0002-Add-LDFLAGS-to-link-step.patch deleted file mode 100644 index 086e634d2318..000000000000 --- a/package/imx-mkimage/0002-Add-LDFLAGS-to-link-step.patch +++ /dev/null @@ -1,26 +0,0 @@ -From b7ace564b419a05a375a205fd4df8933716b241a Mon Sep 17 00:00:00 2001 -From: Erik Larsson -Date: Tue, 6 Mar 2018 12:28:39 +0100 -Subject: [PATCH] Add LDFLAGS to link step - -Signed-off-by: Erik Larsson ---- - iMX8M/soc.mak | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/iMX8M/soc.mak b/iMX8M/soc.mak -index 4bfdc37..806b805 100644 ---- a/iMX8M/soc.mak -+++ b/iMX8M/soc.mak -@@ -84,7 +84,7 @@ FW_DIR = imx-boot/imx-boot-tools/$(PLAT) - $(MKIMG): mkimage_imx8.c - @echo "PLAT="$(PLAT) "HDMI="$(HDMI) - @echo "Compiling mkimage_imx8" -- $(CC) $(CFLAGS) mkimage_imx8.c -o $(MKIMG) -lz -+ $(CC) $(CFLAGS) mkimage_imx8.c -o $(MKIMG) $(LDFLAGS) -lz - - lpddr4_imem_1d = lpddr4_pmu_train_1d_imem$(LPDDR_FW_VERSION).bin - lpddr4_dmem_1d = lpddr4_pmu_train_1d_dmem$(LPDDR_FW_VERSION).bin --- -2.31.1 - diff --git a/package/imx-mkimage/0004-Add-support-for-overriding-BL31-BL32-and-BL33.patch b/package/imx-mkimage/0004-Add-support-for-overriding-BL31-BL32-and-BL33.patch deleted file mode 100644 index 494aaf156659..000000000000 --- a/package/imx-mkimage/0004-Add-support-for-overriding-BL31-BL32-and-BL33.patch +++ /dev/null @@ -1,61 +0,0 @@ -From b1e77d8ccabc6a3910ede2441ff567326291a355 Mon Sep 17 00:00:00 2001 -From: Thomas Perrot -Date: Tue, 26 Apr 2022 15:10:04 +0200 -Subject: [PATCH] Add support for overriding BL31, BL32 and BL33 - -Signed-off-by: Thomas Perrot ---- - iMX8M/print_fit_hab.sh | 14 +++++++++----- - 1 file changed, 9 insertions(+), 5 deletions(-) - -diff --git a/iMX8M/print_fit_hab.sh b/iMX8M/print_fit_hab.sh -index b915115..dbc28f2 100755 ---- a/iMX8M/print_fit_hab.sh -+++ b/iMX8M/print_fit_hab.sh -@@ -1,12 +1,16 @@ - #!/bin/bash - --BL32="tee.bin" -- - let fit_off=$1 - - # keep backward compatibility - [ -z "$TEE_LOAD_ADDR" ] && TEE_LOAD_ADDR="0xfe000000" - -+[ -z "$BL31" ] && BL31="bl31.bin" -+ -+[ -z "$BL32" ] && BL32="tee.bin" -+ -+[ -z "$BL33" ] && BL33="u-boot-nodtb.bin" -+ - if [ -z "$ATF_LOAD_ADDR" ]; then - echo "ERROR: BL31 load address is not set" >&2 - exit 0 -@@ -26,7 +30,7 @@ else - let uboot_sign_off=$((fit_off - 0x8000 - ivt_off + 0x3000)) - fi - --let uboot_size=$(ls -lct u-boot-nodtb.bin | awk '{print $5}') -+let uboot_size=$(ls -lct $BL33 | awk '{print $5}') - let uboot_load_addr=0x40200000 - - let last_sign_off=$(((uboot_sign_off + uboot_size + 3) & ~3)) -@@ -64,13 +68,13 @@ done - - let atf_sign_off=$((last_sign_off)) - let atf_load_addr=$ATF_LOAD_ADDR --let atf_size=$(ls -lct bl31.bin | awk '{print $5}') -+let atf_size=$(ls -lct $BL31 | awk '{print $5}') - - if [ ! -f $BL32 ]; then - let tee_size=0x0 - let tee_sign_off=$((atf_sign_off + atf_size)) - else -- let tee_size=$(ls -lct tee.bin | awk '{print $5}') -+ let tee_size=$(ls -lct $BL32 | awk '{print $5}') - - let tee_sign_off=$(((atf_sign_off + atf_size + 3) & ~3)) - let tee_load_addr=$TEE_LOAD_ADDR --- -2.31.1 - diff --git a/package/imx-mkimage/imx-mkimage.hash b/package/imx-mkimage/imx-mkimage.hash index 8346fd64b1fb..070d2eee7c61 100644 --- a/package/imx-mkimage/imx-mkimage.hash +++ b/package/imx-mkimage/imx-mkimage.hash @@ -1,3 +1,3 @@ # Locally calculated -sha256 593bd94aac027844bc58c62aae55557c14e1f8a99e68ba235a46f083759df3d4 imx-mkimage-lf-5.10.72_2.2.0.tar.gz +sha256 fd538dc571ce06609d6a4d9ee8cfd7d0c93ec4685afa9f1079e5a5931ad3bdbc imx-mkimage-lf-6.1.36_2.1.0.tar.gz sha256 231f7edcc7352d7734a96eef0b8030f77982678c516876fcb81e25b32d68564c COPYING diff --git a/package/imx-mkimage/imx-mkimage.mk b/package/imx-mkimage/imx-mkimage.mk index 54c948e0d308..d5598692663e 100644 --- a/package/imx-mkimage/imx-mkimage.mk +++ b/package/imx-mkimage/imx-mkimage.mk @@ -4,7 +4,7 @@ # ################################################################################ -IMX_MKIMAGE_VERSION = lf-5.10.72_2.2.0 +IMX_MKIMAGE_VERSION = lf-6.1.36_2.1.0 IMX_MKIMAGE_SITE = $(call github,nxp-imx,imx-mkimage,$(IMX_MKIMAGE_VERSION)) IMX_MKIMAGE_LICENSE = GPL-2.0+ IMX_MKIMAGE_LICENSE_FILES = COPYING @@ -15,7 +15,8 @@ ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M)$(BR2_PACKAGE_FREESCALE_IMX_PLA define HOST_IMX_MKIMAGE_BUILD_CMDS $(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) \ CFLAGS="$(HOST_CFLAGS) -std=c99" \ - -C $(@D)/iMX8M -f soc.mak mkimage_imx8 + BUILD_LDFLAGS="$(HOST_LDFLAGS)" \ + -C $(@D)/iMX8M SOC_DIR=iMX8M -f soc.mak mkimage_imx8 endef define HOST_IMX_MKIMAGE_INSTALL_CMDS $(INSTALL) -D -m 755 $(@D)/iMX8M/mkimage_imx8 $(HOST_DIR)/bin/mkimage_imx8 @@ -23,7 +24,7 @@ define HOST_IMX_MKIMAGE_INSTALL_CMDS $(INSTALL) -D -m 755 $(@D)/iMX8M/print_fit_hab.sh $(HOST_DIR)/bin/print_fit_hab.sh endef else -# i.MX8 and i.MX8X +# i.MX8, i.MX8X and i.MX9 define HOST_IMX_MKIMAGE_BUILD_CMDS $(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) \ CFLAGS="$(HOST_CFLAGS) -std=c99" \ From patchwork Wed Oct 11 11:09:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?S=C3=A9bastien_Szymanski?= X-Patchwork-Id: 1846589 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4S59JJ2mtdz23jd for ; Wed, 11 Oct 2023 22:18:54 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 42091409F0; Wed, 11 Oct 2023 11:18:51 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 42091409F0 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id um5J1H8tY5PG; Wed, 11 Oct 2023 11:18:50 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 1DE1B40AB9; Wed, 11 Oct 2023 11:18:49 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 1DE1B40AB9 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 1C3EB1BF84C for ; Wed, 11 Oct 2023 11:18:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id E850C409F0 for ; Wed, 11 Oct 2023 11:18:46 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org E850C409F0 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5_Yf4PSoCn8h for ; Wed, 11 Oct 2023 11:18:45 +0000 (UTC) X-Greylist: delayed 508 seconds by postgrey-1.37 at util1.osuosl.org; Wed, 11 Oct 2023 11:18:44 UTC DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org E6F1940AB9 Received: from 6.mo575.mail-out.ovh.net (6.mo575.mail-out.ovh.net [46.105.63.100]) by smtp4.osuosl.org (Postfix) with ESMTPS id E6F1940AB9 for ; Wed, 11 Oct 2023 11:18:44 +0000 (UTC) Received: from director4.ghost.mail-out.ovh.net (unknown [10.109.143.220]) by mo575.mail-out.ovh.net (Postfix) with ESMTP id 8E2712750B for ; Wed, 11 Oct 2023 11:10:14 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-gj8s2 (unknown [10.110.103.246]) by director4.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 310711FE54; Wed, 11 Oct 2023 11:10:14 +0000 (UTC) Received: from armadeus.com ([37.59.142.99]) by ghost-submission-6684bf9d7b-gj8s2 with ESMTPSA id uCM9CpaCJmUtsQAAOOc7LA (envelope-from ); Wed, 11 Oct 2023 11:10:14 +0000 X-OVh-ClientIp: 92.148.253.243 From: =?utf-8?q?S=C3=A9bastien_Szymanski?= To: buildroot@buildroot.org Date: Wed, 11 Oct 2023 13:09:30 +0200 Message-ID: <20231011110932.4425-3-sebastien.szymanski@armadeus.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231011110932.4425-1-sebastien.szymanski@armadeus.com> References: <20231011110932.4425-1-sebastien.szymanski@armadeus.com> MIME-Version: 1.0 X-Ovh-Tracer-Id: 9409708474861022187 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvkedrheekgdefhecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkffojghfgggtgfesthekredtredtjeenucfhrhhomhepuforsggrshhtihgvnhcuufiihihmrghnshhkihcuoehsvggsrghsthhivghnrdhsiiihmhgrnhhskhhisegrrhhmrgguvghushdrtghomheqnecuggftrfgrthhtvghrnheptdehjefhgfdvgfetgeegjedvveelffejgedugeegvdefleelkeetleefhfeukeeknecuffhomhgrihhnpehngihprdgtohhmnecukfhppeduvdejrddtrddtrddupdelvddrudegkedrvdehfedrvdegfedpfeejrdehledrudegvddrleelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpeeoshgvsggrshhtihgvnhdrshiihihmrghnshhkihesrghrmhgruggvuhhsrdgtohhmqedpnhgspghrtghpthhtohepuddprhgtphhtthhopegsuhhilhgurhhoohhtsegsuhhilhgurhhoohhtrdhorhhgpdfovfetjfhoshhtpehmohehjeehpdhmohguvgepshhmthhpohhuth X-Mailman-Original-Authentication-Results: garm.ovh; auth=pass (GARM-99G003b4f40498-583d-4c30-8340-0bcd71b5578d, D325CBA16CF7D2396D5DBDA76F1DA3B90F182274) smtp.auth=sebastien.szymanski@armadeus.com Subject: [Buildroot] [PATCH 2/4] package/freescale-imx: add i.MX91 and i.MX93 SoC support X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gary Bisson , Refik Tuzakli , Erik Larsson , Thomas Petazzoni , Fabio Estevam Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" This commit adds i.MX91 and i.MX93 support to Buildroot. https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-9-processors:IMX9-PROCESSORS There is no i.MX95 software provided by NXP at the moment that's why i.MX95 is left behind. Adapt package firmware-imx for the LPPDR4 firwmares binaries. Signed-off-by: Sébastien Szymanski --- package/freescale-imx/Config.in | 8 +++++++ package/freescale-imx/firmware-imx/Config.in | 9 ++++++++ .../firmware-imx/firmware-imx.mk | 23 +++++++++++++++++++ 3 files changed, 40 insertions(+) diff --git a/package/freescale-imx/Config.in b/package/freescale-imx/Config.in index fe3f265941a8..192b1c0d70d1 100644 --- a/package/freescale-imx/Config.in +++ b/package/freescale-imx/Config.in @@ -61,6 +61,12 @@ config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8DXL bool "imx8dxl" +config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91 + bool "imx91" + +config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93 + bool "imx93" + endchoice config BR2_PACKAGE_FREESCALE_IMX_PLATFORM @@ -80,6 +86,8 @@ config BR2_PACKAGE_FREESCALE_IMX_PLATFORM default "IMX8MM" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM default "IMX8MN" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MN default "IMX8MP" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MP + default "IMX91" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91 + default "IMX93" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93 config BR2_PACKAGE_FREESCALE_IMX_HAS_VPU bool diff --git a/package/freescale-imx/firmware-imx/Config.in b/package/freescale-imx/firmware-imx/Config.in index 087ddef8771b..7be6761253c9 100644 --- a/package/freescale-imx/firmware-imx/Config.in +++ b/package/freescale-imx/firmware-imx/Config.in @@ -55,6 +55,8 @@ config BR2_PACKAGE_FIRMWARE_IMX_NEEDS_DDR_FW default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MN default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MP + default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91 + default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93 if BR2_PACKAGE_FIRMWARE_IMX_NEEDS_DDR_FW @@ -73,11 +75,15 @@ config BR2_PACKAGE_FIRMWARE_IMX_LPDDR4 config BR2_PACKAGE_FIRMWARE_IMX_DDR4 bool "DDR4" + depends on !BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91 + depends on !BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93 help Use DDR4 binaries (i.e.: ddr4_*_201810.bin). config BR2_PACKAGE_FIRMWARE_IMX_DDR3 bool "DDR3" + depends on !BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91 + depends on !BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93 help Use DDR3 binaries (i.e.: ddr3_*_201810.bin). @@ -89,6 +95,9 @@ config BR2_PACKAGE_FIRMWARE_IMX_DDR_VERSION # unconditionally use HW version 201810 when DDR3/DDR4 was # selected default "201810" if BR2_PACKAGE_FIRMWARE_IMX_DDR3 || BR2_PACKAGE_FIRMWARE_IMX_DDR4 + default "202201" if \ + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91 || \ + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93 help Use a specific version of the imx ddr binaries. Leaving this field empty will select the default version. diff --git a/package/freescale-imx/firmware-imx/firmware-imx.mk b/package/freescale-imx/firmware-imx/firmware-imx.mk index 66ef8c3930be..a08e8c4fb097 100644 --- a/package/freescale-imx/firmware-imx/firmware-imx.mk +++ b/package/freescale-imx/firmware-imx/firmware-imx.mk @@ -43,11 +43,33 @@ endef FIRMWARE_IMX_DDR_VERSION = $(call qstrip,$(BR2_PACKAGE_FIRMWARE_IMX_DDR_VERSION)) ifneq ($(FIRMWARE_IMX_DDR_VERSION),) FIRMWARE_IMX_DDR_VERSION_SUFFIX = _$(FIRMWARE_IMX_DDR_VERSION) +ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91)$(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93),y) +FIRMWARE_IMX_DDR_VERSION_SUFFIX = _v$(FIRMWARE_IMX_DDR_VERSION) +endif endif ifeq ($(BR2_PACKAGE_FIRMWARE_IMX_LPDDR4),y) FIRMWARE_IMX_DDRFW_DIR = $(@D)/firmware/ddr/synopsys +ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91)$(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93),y) +define FIRMWARE_IMX_INSTALL_IMAGE_DDR_FW + # Create padded versions of lpddr4_pmu_* and generate lpddr4_pmu_train_fw.bin. + # lpddr4_pmu_train_fw.bin is needed when generating imx9-boot-sd.bin + # which is done in post-image script. + $(call FIRMWARE_IMX_PREPARE_DDR_FW, \ + lpddr4_imem_1d$(FIRMWARE_IMX_DDR_VERSION_SUFFIX), + lpddr4_dmem_1d$(FIRMWARE_IMX_DDR_VERSION_SUFFIX), + lpddr4_pmu_train_1d_fw) + $(call FIRMWARE_IMX_PREPARE_DDR_FW, \ + lpddr4_imem_2d$(FIRMWARE_IMX_DDR_VERSION_SUFFIX), + lpddr4_dmem_2d$(FIRMWARE_IMX_DDR_VERSION_SUFFIX), + lpddr4_pmu_train_2d_fw) + cat $(FIRMWARE_IMX_DDRFW_DIR)/lpddr4_pmu_train_1d_fw.bin \ + $(FIRMWARE_IMX_DDRFW_DIR)/lpddr4_pmu_train_2d_fw.bin > \ + $(BINARIES_DIR)/lpddr4_pmu_train_fw.bin + ln -sf $(BINARIES_DIR)/lpddr4_pmu_train_fw.bin $(BINARIES_DIR)/ddr_fw.bin +endef +else define FIRMWARE_IMX_INSTALL_IMAGE_DDR_FW # Create padded versions of lpddr4_pmu_* and generate lpddr4_pmu_train_fw.bin. # lpddr4_pmu_train_fw.bin is needed when generating imx8-boot-sd.bin @@ -71,6 +93,7 @@ define FIRMWARE_IMX_INSTALL_IMAGE_DDR_FW cp $(FIRMWARE_IMX_DDRFW_DIR)/lpddr4*.bin $(BINARIES_DIR)/ endef endif +endif ifeq ($(BR2_PACKAGE_FIRMWARE_IMX_DDR4),y) FIRMWARE_IMX_DDRFW_DIR = $(@D)/firmware/ddr/synopsys From patchwork Wed Oct 11 11:09:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?S=C3=A9bastien_Szymanski?= X-Patchwork-Id: 1846699 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4S5Bsv5BhXz1yqN for ; Wed, 11 Oct 2023 23:29:39 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id D0AE7611FD; Wed, 11 Oct 2023 12:29:36 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org D0AE7611FD X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 25aDkioNYasL; Wed, 11 Oct 2023 12:29:35 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id EF8CB611E2; Wed, 11 Oct 2023 12:29:34 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org EF8CB611E2 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 686781BF2E5 for ; Wed, 11 Oct 2023 12:29:32 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 418A2611E2 for ; Wed, 11 Oct 2023 12:29:32 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 418A2611E2 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id k4B1DCjRBrzt for ; Wed, 11 Oct 2023 12:29:30 +0000 (UTC) X-Greylist: delayed 3602 seconds by postgrey-1.37 at util1.osuosl.org; Wed, 11 Oct 2023 12:29:30 UTC DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 0C88360FB9 Received: from 13.mo581.mail-out.ovh.net (13.mo581.mail-out.ovh.net [87.98.150.175]) by smtp3.osuosl.org (Postfix) with ESMTPS id 0C88360FB9 for ; Wed, 11 Oct 2023 12:29:29 +0000 (UTC) Received: from director4.ghost.mail-out.ovh.net (unknown [10.108.4.136]) by mo581.mail-out.ovh.net (Postfix) with ESMTP id EE18924AC1 for ; Wed, 11 Oct 2023 11:10:14 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-gj8s2 (unknown [10.110.103.246]) by director4.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 930D21FE9C; Wed, 11 Oct 2023 11:10:14 +0000 (UTC) Received: from armadeus.com ([37.59.142.99]) by ghost-submission-6684bf9d7b-gj8s2 with ESMTPSA id UDdvIpaCJmUtsQAAOOc7LA (envelope-from ); Wed, 11 Oct 2023 11:10:14 +0000 X-OVh-ClientIp: 92.148.253.243 From: =?utf-8?q?S=C3=A9bastien_Szymanski?= To: buildroot@buildroot.org Date: Wed, 11 Oct 2023 13:09:31 +0200 Message-ID: <20231011110932.4425-4-sebastien.szymanski@armadeus.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231011110932.4425-1-sebastien.szymanski@armadeus.com> References: <20231011110932.4425-1-sebastien.szymanski@armadeus.com> MIME-Version: 1.0 X-Ovh-Tracer-Id: 9409708473000258539 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvkedrheekgdefhecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkffojghfgggtgfesthekredtredtjeenucfhrhhomhepuforsggrshhtihgvnhcuufiihihmrghnshhkihcuoehsvggsrghsthhivghnrdhsiiihmhgrnhhskhhisegrrhhmrgguvghushdrtghomheqnecuggftrfgrthhtvghrnhephfekteeugfeufefhkefhfeelteetffduffdvleeluddvveehgeejtdefhffggeefnecukfhppeduvdejrddtrddtrddupdelvddrudegkedrvdehfedrvdegfedpfeejrdehledrudegvddrleelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpeeoshgvsggrshhtihgvnhdrshiihihmrghnshhkihesrghrmhgruggvuhhsrdgtohhmqedpnhgspghrtghpthhtohepuddprhgtphhtthhopegsuhhilhgurhhoohhtsegsuhhilhgurhhoohhtrdhorhhgpdfovfetjfhoshhtpehmohehkedupdhmohguvgepshhmthhpohhuth X-Mailman-Original-Authentication-Results: garm.ovh; auth=pass (GARM-99G0038c47398f-71e8-40e7-9a12-7ae0e621209b, D325CBA16CF7D2396D5DBDA76F1DA3B90F182274) smtp.auth=sebastien.szymanski@armadeus.com Subject: [Buildroot] [PATCH 3/4] package/freescale-imx/firmware-sentinel: new package X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gary Bisson , Refik Tuzakli , Erik Larsson , Thomas Petazzoni , Fabio Estevam Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" This package provides firmware blobs for the i.MX9 Edgelock secure enclave (ELE). Signed-off-by: Sébastien Szymanski --- package/freescale-imx/Config.in | 1 + .../freescale-imx/firmware-sentinel/Config.in | 34 +++++++++++++++++++ .../firmware-sentinel/firmware-sentinel.hash | 4 +++ .../firmware-sentinel/firmware-sentinel.mk | 27 +++++++++++++++ 4 files changed, 66 insertions(+) create mode 100644 package/freescale-imx/firmware-sentinel/Config.in create mode 100644 package/freescale-imx/firmware-sentinel/firmware-sentinel.hash create mode 100644 package/freescale-imx/firmware-sentinel/firmware-sentinel.mk diff --git a/package/freescale-imx/Config.in b/package/freescale-imx/Config.in index 192b1c0d70d1..4d31bcc4f4cf 100644 --- a/package/freescale-imx/Config.in +++ b/package/freescale-imx/Config.in @@ -126,6 +126,7 @@ source "package/freescale-imx/imx-vpu/Config.in" source "package/freescale-imx/imx-vpu-hantro/Config.in" source "package/freescale-imx/imx-vpuwrap/Config.in" source "package/freescale-imx/firmware-imx/Config.in" +source "package/freescale-imx/firmware-sentinel/Config.in" source "package/freescale-imx/imx-sc-firmware/Config.in" source "package/freescale-imx/imx-seco/Config.in" source "package/freescale-imx/imx-vpu-hantro-daemon/Config.in" diff --git a/package/freescale-imx/firmware-sentinel/Config.in b/package/freescale-imx/firmware-sentinel/Config.in new file mode 100644 index 000000000000..9ceecd5a39dc --- /dev/null +++ b/package/freescale-imx/firmware-sentinel/Config.in @@ -0,0 +1,34 @@ +config BR2_PACKAGE_FIRMWARE_SENTINEL + bool "firmware-sentinel" + depends on BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91 || \ + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93 + help + Firmware blobs for the i.MX9 Edgelock secure enclave (ELE). + + This library is provided by Freescale as-is and doesn't have + an upstream. + +if BR2_PACKAGE_FIRMWARE_SENTINEL + +choice + prompt "i.MX Sentinel Firmware Release" + help + Select the appropriate ahab container image to install + to match the iMX asics revision. + + Note - mismatches result in a failure to boot + +config BR2_PACKAGE_FIRMWARE_SENTINEL_A0 + bool "A0" + +config BR2_PACKAGE_FIRMWARE_SENTINEL_A1 + bool "A1" + +endchoice + +config BR2_PACKAGE_FIRMWARE_SENTINEL_AHAB_CONTAINER_IMAGE + string + default "mx93a0-ahab-container.img" if BR2_PACKAGE_FIRMWARE_SENTINEL_A0 + default "mx93a1-ahab-container.img" if BR2_PACKAGE_FIRMWARE_SENTINEL_A1 + +endif # BR2_PACKAGE_FIRMWARE_SENTINEL diff --git a/package/freescale-imx/firmware-sentinel/firmware-sentinel.hash b/package/freescale-imx/firmware-sentinel/firmware-sentinel.hash new file mode 100644 index 000000000000..1a9ff0543250 --- /dev/null +++ b/package/freescale-imx/firmware-sentinel/firmware-sentinel.hash @@ -0,0 +1,4 @@ +# Locally calculated +sha256 269480417a8ae9aa4cc4101ab947287fc33455a931021dbdc4d9badb5212bceb firmware-sentinel-0.11.bin +sha256 de37a0bcbf1717b910c1a53ea6eab853c404e61e8143bb6c081d39f532571e54 COPYING +sha256 c800aaca3a7e9f470d99d7cde0a48c95982ed601d4c306f7b8f43f3710054f28 SCR.txt diff --git a/package/freescale-imx/firmware-sentinel/firmware-sentinel.mk b/package/freescale-imx/firmware-sentinel/firmware-sentinel.mk new file mode 100644 index 000000000000..f68467194cbc --- /dev/null +++ b/package/freescale-imx/firmware-sentinel/firmware-sentinel.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# firmware-sentinel +# +################################################################################ + +FIRMWARE_SENTINEL_VERSION = 0.11 +FIRMWARE_SENTINEL_SITE = $(FREESCALE_IMX_SITE) +FIRMWARE_SENTINEL_SOURCE = firmware-sentinel-$(FIRMWARE_SENTINEL_VERSION).bin + +FIRMWARE_SENTINEL_LICENSE = NXP Semiconductor Software License Agreement +FIRMWARE_SENTINEL_LICENSE_FILES = COPYING SCR.txt +FIRMWARE_SENTINEL_REDISTRIBUTE = NO + +FIRMWARE_SENTINEL_INSTALL_IMAGES = YES + +define FIRMWARE_SENTINEL_EXTRACT_CMDS + $(call NXP_EXTRACT_HELPER,$(FIRMWARE_SENTINEL_DL_DIR)/$(FIRMWARE_SENTINEL_SOURCE)) +endef + +FIRMWARE_SENTINEL_AHAB_CONTAINER_IMAGE = $(call qstrip,$(BR2_PACKAGE_FIRMWARE_SENTINEL_AHAB_CONTAINER_IMAGE)) + +define FIRMWARE_SENTINEL_INSTALL_IMAGES_CMDS + cp $(@D)/$(FIRMWARE_SENTINEL_AHAB_CONTAINER_IMAGE) $(BINARIES_DIR)/ahab-container.img +endef + +$(eval $(generic-package)) From patchwork Wed Oct 11 11:09:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?S=C3=A9bastien_Szymanski?= X-Patchwork-Id: 1846621 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4S59zP2MLsz23jd for ; Wed, 11 Oct 2023 22:49:21 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 5423E4154D; Wed, 11 Oct 2023 11:49:19 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 5423E4154D X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LD9q3xU-ogW9; Wed, 11 Oct 2023 11:49:16 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 2C9A541B5C; Wed, 11 Oct 2023 11:49:15 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 2C9A541B5C X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 1CD4A1BF84C for ; Wed, 11 Oct 2023 11:49:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id EA7544042D for ; Wed, 11 Oct 2023 11:49:12 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org EA7544042D X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4qp1PLms9X3j for ; Wed, 11 Oct 2023 11:49:11 +0000 (UTC) Received: from 6.mo575.mail-out.ovh.net (6.mo575.mail-out.ovh.net [46.105.63.100]) by smtp2.osuosl.org (Postfix) with ESMTPS id 370CB4021C for ; Wed, 11 Oct 2023 11:49:11 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 370CB4021C Received: from director4.ghost.mail-out.ovh.net (unknown [10.108.16.176]) by mo575.mail-out.ovh.net (Postfix) with ESMTP id 601C627335 for ; Wed, 11 Oct 2023 11:10:15 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-gj8s2 (unknown [10.110.103.246]) by director4.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 04C791FE08; Wed, 11 Oct 2023 11:10:14 +0000 (UTC) Received: from armadeus.com ([37.59.142.99]) by ghost-submission-6684bf9d7b-gj8s2 with ESMTPSA id +CBqO5aCJmUtsQAAOOc7LA (envelope-from ); Wed, 11 Oct 2023 11:10:14 +0000 X-OVh-ClientIp: 92.148.253.243 From: =?utf-8?q?S=C3=A9bastien_Szymanski?= To: buildroot@buildroot.org Date: Wed, 11 Oct 2023 13:09:32 +0200 Message-ID: <20231011110932.4425-5-sebastien.szymanski@armadeus.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231011110932.4425-1-sebastien.szymanski@armadeus.com> References: <20231011110932.4425-1-sebastien.szymanski@armadeus.com> MIME-Version: 1.0 X-Ovh-Tracer-Id: 9409989948264999915 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvkedrheekgdefhecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkffojghfgggtgfesthekredtredtjeenucfhrhhomhepuforsggrshhtihgvnhcuufiihihmrghnshhkihcuoehsvggsrghsthhivghnrdhsiiihmhgrnhhskhhisegrrhhmrgguvghushdrtghomheqnecuggftrfgrthhtvghrnheptdehjefhgfdvgfetgeegjedvveelffejgedugeegvdefleelkeetleefhfeukeeknecuffhomhgrihhnpehngihprdgtohhmnecukfhppeduvdejrddtrddtrddupdelvddrudegkedrvdehfedrvdegfedpfeejrdehledrudegvddrleelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpeeoshgvsggrshhtihgvnhdrshiihihmrghnshhkihesrghrmhgruggvuhhsrdgtohhmqedpnhgspghrtghpthhtohepuddprhgtphhtthhopegsuhhilhgurhhoohhtsegsuhhilhgurhhoohhtrdhorhhgpdfovfetjfhoshhtpehmohehjeehpdhmohguvgepshhmthhpohhuth X-Mailman-Original-Authentication-Results: garm.ovh; auth=pass (GARM-99G0037a9db24f-e18a-4dda-9d7e-015057503fb3, D325CBA16CF7D2396D5DBDA76F1DA3B90F182274) smtp.auth=sebastien.szymanski@armadeus.com Subject: [Buildroot] [PATCH 4/4] configs/freescale_imx93evk: new defconfig X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gary Bisson , Refik Tuzakli , Erik Larsson , Thomas Petazzoni , Fabio Estevam Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" This patch adds support for the NXP i.MX 93 11x11 EVK board [1]. [1] https://www.nxp.com/design/development-boards/i-mx-evaluation-and-development-boards/i-mx-93-evaluation-kit:i.MX93EVK Signed-off-by: Sébastien Szymanski --- .../common/imx/genimage.cfg.template_imx9 | 41 +++++++++++ .../common/imx/imx9-bootloader-prepare.sh | 34 +++++++++ board/freescale/common/imx/post-image.sh | 4 + board/freescale/imx93evk/readme.txt | 73 +++++++++++++++++++ configs/freescale_imx93evk_defconfig | 38 ++++++++++ 5 files changed, 190 insertions(+) create mode 100644 board/freescale/common/imx/genimage.cfg.template_imx9 create mode 100755 board/freescale/common/imx/imx9-bootloader-prepare.sh create mode 100644 board/freescale/imx93evk/readme.txt create mode 100644 configs/freescale_imx93evk_defconfig diff --git a/board/freescale/common/imx/genimage.cfg.template_imx9 b/board/freescale/common/imx/genimage.cfg.template_imx9 new file mode 100644 index 000000000000..10e192ce5774 --- /dev/null +++ b/board/freescale/common/imx/genimage.cfg.template_imx9 @@ -0,0 +1,41 @@ +# Minimal SD card image for the Freescale iMX9 boards +# +# We mimic the .sdcard Freescale's image format: +# * the SD card must have 32 kB free space at the beginning, +# * U-Boot is integrated into imx9-boot-sd.bin and is dumped as is, +# * a FAT partition at offset 8MB is containing Image and DTB files +# * a single root filesystem partition is required (ext2, ext3 or ext4) +# + +image boot.vfat { + vfat { + label = "boot" + files = { + %FILES% + } + } + size = 64M +} + +image sdcard.img { + hdimage { + } + + partition imx-boot { + in-partition-table = "no" + image = "imx9-boot-sd.bin" + offset = %IMXOFFSET% + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + offset = 8M + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext2" + } +} diff --git a/board/freescale/common/imx/imx9-bootloader-prepare.sh b/board/freescale/common/imx/imx9-bootloader-prepare.sh new file mode 100755 index 000000000000..3c3757354d63 --- /dev/null +++ b/board/freescale/common/imx/imx9-bootloader-prepare.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash + +main () +{ + SPL_LOAD_ADDR=0x2049A000 + ATF_LOAD_ADDR=0x204E0000 + if grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91=y$" ${BR2_CONFIG}; then + SPL_LOAD_ADDR=0x204A0000 + ATF_LOAD_ADDR=0x204C0000 + fi + + dd if=${BINARIES_DIR}/u-boot-spl.bin of=${BINARIES_DIR}/u-boot-spl-padded.bin bs=4 conv=sync + cat ${BINARIES_DIR}/u-boot-spl-padded.bin ${BINARIES_DIR}/ddr_fw.bin > ${BINARIES_DIR}/u-boot-spl-ddr.bin + + ${HOST_DIR}/bin/mkimage_imx8 -commit > ${BINARIES_DIR}/mkimg.commit + cat ${BINARIES_DIR}/u-boot.bin ${BINARIES_DIR}/mkimg.commit > ${BINARIES_DIR}/u-boot-hash.bin + rm -f ${BINARIES_DIR}/mkimg.commit + + if grep -Eq "^BR2_TARGET_OPTEE_OS=y$" ${BR2_CONFIG}; then + ${HOST_DIR}/bin/mkimage_imx8 -soc IMX9 -c -ap ${BINARIES_DIR}/bl31.bin a35 ${ATF_LOAD_ADDR} -ap ${BINARIES_DIR}/u-boot-hash.bin a35 0x80200000 -ap ${BINARIES_DIR}/tee.bin a35 0x96000000 -out ${BINARIES_DIR}/u-boot-atf-container.img + else + ${HOST_DIR}/bin/mkimage_imx8 -soc IMX9 -c -ap ${BINARIES_DIR}/bl31.bin a35 ${ATF_LOAD_ADDR} -ap ${BINARIES_DIR}/u-boot-hash.bin a35 0x80200000 -out ${BINARIES_DIR}/u-boot-atf-container.img + fi + + ${HOST_DIR}/bin/mkimage_imx8 -soc IMX9 -append ${BINARIES_DIR}/ahab-container.img -c -ap ${BINARIES_DIR}/u-boot-spl-ddr.bin a35 ${SPL_LOAD_ADDR} -out ${BINARIES_DIR}/imx9-boot-sd.bin + + flashbin_size=$(wc -c ${BINARIES_DIR}/imx9-boot-sd.bin | awk '{print $1}') + pad_cnt=$(($((flashbin_size + 0x400 - 1)) / 0x400)) + dd if=${BINARIES_DIR}/u-boot-atf-container.img of=${BINARIES_DIR}/imx9-boot-sd.bin bs=1K seek=${pad_cnt} + + exit $? +} + +main $@ diff --git a/board/freescale/common/imx/post-image.sh b/board/freescale/common/imx/post-image.sh index c359ef6032a6..3df7e820938b 100755 --- a/board/freescale/common/imx/post-image.sh +++ b/board/freescale/common/imx/post-image.sh @@ -48,6 +48,10 @@ genimage_type() echo "genimage.cfg.template_imx8" elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8DXL=y$" ${BR2_CONFIG}; then echo "genimage.cfg.template_imx8" + elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91=y$" ${BR2_CONFIG}; then + echo "genimage.cfg.template_imx9" + elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93=y$" ${BR2_CONFIG}; then + echo "genimage.cfg.template_imx9" elif grep -Eq "^BR2_LINUX_KERNEL_INSTALL_TARGET=y$" ${BR2_CONFIG}; then if grep -Eq "^BR2_TARGET_UBOOT_SPL=y$" ${BR2_CONFIG}; then echo "genimage.cfg.template_no_boot_part_spl" diff --git a/board/freescale/imx93evk/readme.txt b/board/freescale/imx93evk/readme.txt new file mode 100644 index 000000000000..f34624dd32e4 --- /dev/null +++ b/board/freescale/imx93evk/readme.txt @@ -0,0 +1,73 @@ +********************* +NXP i.MX93 EVK board +********************* + +This file documents the Buildroot support for the i.MX 93 EVK board. + +Build +===== + +First, configure Buildroot for the i.MX 93 EVK board: + + make freescale_imx93evk_defconfig + +Build all components: + + make + +You will find in output/images/ the following files: + - ahab-container.img + - bl31.bin + - boot.vfat + - ddr_fw.bin + - Image + - imx93-11x11-evk.dtb + - imx9-boot-sd.bin + - lpddr4_pmu_train_fw.bin + - rootfs.ext2 + - rootfs.ext4 + - rootfs.tar + - sdcard.img + - u-boot-atf-container.img + - u-boot.bin + - u-boot-hash.bin + - u-boot-spl.bin + - u-boot-spl-ddr.bin + - u-boot-spl-padded.bin + +Create a bootable SD card +========================= + +To determine the device associated to the SD card have a look in the +/proc/partitions file: + + cat /proc/partitions + +Buildroot prepares a bootable "sdcard.img" image in the output/images/ +directory, ready to be dumped on a SD card. Launch the following +command as root: + + dd if=output/images/sdcard.img of=/dev/ + +*** WARNING! This will destroy all the card content. Use with care! *** + +For details about the medium image layout, see the definition in +board/freescale/common/imx/genimage.cfg.template_imx9. + +Boot the i.MX 93 EVK board +=============================== + +To boot your newly created system (refer to the i.MX 8M Plus EVK Documentation +[1] for guidance): +- insert the SD card in the SD slot of the board; +- Configure the switches as follows (X = "don't care"): +SW1301: 0100 SW1301[1-4] +- put a micro USB cable into the Debug USB Port and connect using a terminal + emulator at 115200 bps, 8n1; +- power on the board. + +Enjoy! + +References +========== +[1] https://www.nxp.com/document/guide/getting-started-with-the-i-mx93-evk:GS-IMX93EVK diff --git a/configs/freescale_imx93evk_defconfig b/configs/freescale_imx93evk_defconfig new file mode 100644 index 000000000000..f0e4a95930c6 --- /dev/null +++ b/configs/freescale_imx93evk_defconfig @@ -0,0 +1,38 @@ +BR2_aarch64=y +BR2_cortex_a55=y +BR2_ARM_FPU_VFPV4D16=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_1=y +BR2_DL_DIR="/home/sszy/development/buildroot-download" +BR2_TARGET_GENERIC_GETTY_PORT="ttyLP0" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/imx9-bootloader-prepare.sh board/freescale/common/imx/post-image.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,nxp-imx,linux-imx,lf-6.1.22-2.0.0)/linux-imx-lf-6.1.22-2.0.0.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="imx_v8" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="freescale/imx93-11x11-evk" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y +BR2_PACKAGE_FREESCALE_IMX=y +BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93=y +BR2_PACKAGE_FIRMWARE_IMX=y +BR2_PACKAGE_FIRMWARE_SENTINEL=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="120M" +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL_LOCATION="$(call github,nxp-imx,imx-atf,lf-6.1.22-2.0.0)/imx-atf-lf-6.1.22-2.0.0.tar.gz" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="imx93" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,nxp-imx,uboot-imx,lf-6.1.22-2.0.0)/uboot-imx-lf-6.1.22-2.0.0.tar.gz" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="imx93_11x11_evk" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_SPL=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_IMX_MKIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y