From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 10 Feb 2023 20:36:24 +0100 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 1pQZC6-003QMX-CB for lore@lore.pengutronix.de; Fri, 10 Feb 2023 20:36:24 +0100 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 1pQZC2-0006J1-MT; Fri, 10 Feb 2023 20:36:22 +0100 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 1pQZBx-00063Q-BX for distrokit@pengutronix.de; Fri, 10 Feb 2023 20:36:17 +0100 Received: from [2a0a:edc0:0:1101:1d::28] (helo=dude02.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pQZBv-0043fB-HL for distrokit@pengutronix.de; Fri, 10 Feb 2023 20:36:16 +0100 Received: from mfe by dude02.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pQZBu-008zkh-H5 for distrokit@pengutronix.de; Fri, 10 Feb 2023 20:36:14 +0100 From: Marco Felsch To: distrokit@pengutronix.de Date: Fri, 10 Feb 2023 20:36:05 +0100 Message-Id: <20230210193612.2143905-8-m.felsch@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230210193612.2143905-1-m.felsch@pengutronix.de> References: <20230210193612.2143905-1-m.felsch@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [DistroKit] [PATCH 07/14] v8a: barebox-imx8m: make use of the INJECT_FILES mechanism 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: , 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 Use the mainline available mechanism to copy the required firmware artifacts. This also align the code with the barebox-rockchip.make file. Signed-off-by: Marco Felsch --- configs/platform-v8a/rules/barebox-imx8m.make | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/configs/platform-v8a/rules/barebox-imx8m.make b/configs/platform-v8a/rules/barebox-imx8m.make index 0d88f46..4fac9d4 100644 --- a/configs/platform-v8a/rules/barebox-imx8m.make +++ b/configs/platform-v8a/rules/barebox-imx8m.make @@ -31,6 +31,19 @@ BAREBOX_IMX8M_BUILD_OOT := KEEP # Prepare # ---------------------------------------------------------------------------- +BAREBOX_IMX8M_INJECT_PATH := ${PTXDIST_SYSROOT_TARGET}/usr/lib + +# TF-A firmware blobs +BAREBOX_IMX8M_INJECT_FILES += firmware/imx8mm-bl31.bin +BAREBOX_IMX8M_INJECT_FILES += firmware/imx8mp-bl31.bin +BAREBOX_IMX8M_INJECT_FILES += firmware/imx8mq-bl31.bin + +# DRAM firmware blobs +BAREBOX_IMX8M_INJECT_FILES += firmware/ddr/synopsys/lpddr4_pmu_train_1d_dmem.bin:firmware/lpddr4_pmu_train_1d_dmem.bin +BAREBOX_IMX8M_INJECT_FILES += firmware/ddr/synopsys/lpddr4_pmu_train_1d_imem.bin:firmware/lpddr4_pmu_train_1d_imem.bin +BAREBOX_IMX8M_INJECT_FILES += firmware/ddr/synopsys/lpddr4_pmu_train_2d_dmem.bin:firmware/lpddr4_pmu_train_2d_dmem.bin +BAREBOX_IMX8M_INJECT_FILES += firmware/ddr/synopsys/lpddr4_pmu_train_2d_imem.bin:firmware/lpddr4_pmu_train_2d_imem.bin + # use host pkg-config for host tools BAREBOX_IMX8M_PATH := PATH=$(HOST_PATH) @@ -64,16 +77,7 @@ endif $(STATEDIR)/barebox-imx8m.prepare: $(BAREBOX_IMX8M_CONFIG) @$(call targetinfo) @$(call world/prepare, BAREBOX_IMX8M) - - @for i in lpddr4_pmu_train_1d_dmem.bin lpddr4_pmu_train_1d_imem.bin \ - lpddr4_pmu_train_2d_dmem.bin lpddr4_pmu_train_2d_imem.bin ; do \ - cp $(PTXCONF_SYSROOT_TARGET)/usr/lib/firmware/ddr/synopsys/$$i $(BAREBOX_IMX8M_DIR)/firmware/; \ - done - - @for i in m p q; do \ - cp $(PTXCONF_SYSROOT_TARGET)/usr/lib/firmware/imx8m$$i-bl31.bin \ - $(BAREBOX_IMX8M_DIR)/firmware/; \ - done + @$(call world/inject, BAREBOX_IMX8M) @rm -f "$(BAREBOX_IMX8M_BUILD_DIR)/.ptxdist-defaultenv" @ln -s "$(call ptx/in-platformconfigdir, barebox-common-defaultenv)" \ -- 2.30.2