From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Tue, 20 Jun 2023 15:29:39 +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 1qBbQS-00EQ7y-Eh for lore@lore.pengutronix.de; Tue, 20 Jun 2023 15:29:39 +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 1qBbQP-0002B4-VF; Tue, 20 Jun 2023 15:29:37 +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 1qBbQN-00020o-0y; Tue, 20 Jun 2023 15:29:35 +0200 Received: from [2a0a:edc0:0:1101:1d::54] (helo=dude05.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1qBbQL-008nnq-Hk; Tue, 20 Jun 2023 15:29:33 +0200 Received: from mol by dude05.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1qBbQK-00998X-36; Tue, 20 Jun 2023 15:29:32 +0200 From: Michael Olbrich To: distrokit@pengutronix.de Date: Tue, 20 Jun 2023 15:29:25 +0200 Message-Id: <20230620132931.2179983-2-m.olbrich@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230620132931.2179983-1-m.olbrich@pengutronix.de> References: <20230620132931.2179983-1-m.olbrich@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [DistroKit] [PATCH v2 1/7] platform-v8a: cleanup barebox firmware handling 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: Michael Olbrich 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 BAREBOX_INJECT_FILES is explicitly designed in such a way that all packages can add to it in their regular rules, so move the declarations accordingly. And only add to BAREBOX_INJECT_FILES if the package is acutally enabled. imx/imx-usb-loader is already part of BAREBOX_PROGS_HOST, so no need to add it. Move rk-usb-loader to rules/barebox.rockchip.make (it's explicitly loaded after rules/barebox.make) for now. This can be removed when this is added upstream. Signed-off-by: Michael Olbrich --- configs/platform-v8a/rules/barebox.rockchip.make | 12 ++++++++++++ configs/platform-v8a/rules/firmware-imx.make | 13 +++++++++++++ .../platform-v8a/rules/firmware-rockchip.make | 10 ++++++++++ .../platform-v8a/rules/post/barebox-fixup.make | 16 ---------------- 4 files changed, 35 insertions(+), 16 deletions(-) create mode 100644 configs/platform-v8a/rules/barebox.rockchip.make delete mode 100644 configs/platform-v8a/rules/post/barebox-fixup.make diff --git a/configs/platform-v8a/rules/barebox.rockchip.make b/configs/platform-v8a/rules/barebox.rockchip.make new file mode 100644 index 000000000000..17092a9b728c --- /dev/null +++ b/configs/platform-v8a/rules/barebox.rockchip.make @@ -0,0 +1,12 @@ +# -*-makefile-*- +# +# Copyright (C) 2023 by Michael Olbrich +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# TODO: remove this when it is added in PTXdist upstream +BAREBOX_PROGS_HOST += rk-usb-loader + +# vim: syntax=make diff --git a/configs/platform-v8a/rules/firmware-imx.make b/configs/platform-v8a/rules/firmware-imx.make index fbdd93a15971..7bf1701b3ce1 100644 --- a/configs/platform-v8a/rules/firmware-imx.make +++ b/configs/platform-v8a/rules/firmware-imx.make @@ -25,6 +25,19 @@ FIRMWARE_IMX_LICENSE_FILES := \ file://$(FIRMWARE_IMX_PKGDIR)/COPYING;md5=228c72f2a91452b8a03c4cab30f30ef9 FIRMWARE_IMX_SOURCE := $(SRCDIR)/$(FIRMWARE_IMX).$(FIRMWARE_IMX_SUFFIX) +# +# Firmware blobs for barebox +# +ifdef PTXCONF_FIRMWARE_IMX +BAREBOX_INJECT_FILES += imx8mm-bl31.bin:firmware/imx8mm-bl31.bin +BAREBOX_INJECT_FILES += imx8mp-bl31.bin:firmware/imx8mp-bl31.bin +BAREBOX_INJECT_FILES += imx8mq-bl31.bin:firmware/imx8mq-bl31.bin +BAREBOX_INJECT_FILES += ddr/synopsys/lpddr4_pmu_train_1d_dmem.bin:firmware/lpddr4_pmu_train_1d_dmem.bin +BAREBOX_INJECT_FILES += ddr/synopsys/lpddr4_pmu_train_1d_imem.bin:firmware/lpddr4_pmu_train_1d_imem.bin +BAREBOX_INJECT_FILES += ddr/synopsys/lpddr4_pmu_train_2d_dmem.bin:firmware/lpddr4_pmu_train_2d_dmem.bin +BAREBOX_INJECT_FILES += ddr/synopsys/lpddr4_pmu_train_2d_imem.bin:firmware/lpddr4_pmu_train_2d_imem.bin +endif + # ---------------------------------------------------------------------------- # Extract # ---------------------------------------------------------------------------- diff --git a/configs/platform-v8a/rules/firmware-rockchip.make b/configs/platform-v8a/rules/firmware-rockchip.make index dd50c865a037..694914800ed1 100644 --- a/configs/platform-v8a/rules/firmware-rockchip.make +++ b/configs/platform-v8a/rules/firmware-rockchip.make @@ -20,6 +20,16 @@ FIRMWARE_ROCKCHIP_SOURCE := $(SRCDIR)/$(FIRMWARE_ROCKCHIP).$(FIRMWARE_ROCKCHIP_S FIRMWARE_ROCKCHIP_DIR := $(BUILDDIR)/$(FIRMWARE_ROCKCHIP) FIRMWARE_ROCKCHIP_LICENSE := proprietary +# +# Firmware blobs for barebox +# +ifdef PTXCONF_FIRMWARE_ROCKCHIP +BAREBOX_INJECT_FILES += rk3568_bl31_v1.24.elf:firmware/rk3568-bl31.bin +BAREBOX_INJECT_FILES += rk3568_bl32_v1.05.bin:firmware/rk3568-op-tee.bin +BAREBOX_INJECT_FILES += rk3568_ddr_1560MHz_v1.08.bin:arch/arm/boards/rockchip-rk3568-evb/sdram-init.bin +BAREBOX_INJECT_FILES += rk3568_ddr_1560MHz_v1.08.bin:arch/arm/boards/radxa-rock3/sdram-init.bin +endif + # ---------------------------------------------------------------------------- # Prepare # ---------------------------------------------------------------------------- diff --git a/configs/platform-v8a/rules/post/barebox-fixup.make b/configs/platform-v8a/rules/post/barebox-fixup.make deleted file mode 100644 index 7c4ce40420ad..000000000000 --- a/configs/platform-v8a/rules/post/barebox-fixup.make +++ /dev/null @@ -1,16 +0,0 @@ -# Firmware blobs for Rockchip platforms -BAREBOX_INJECT_FILES += rk3568_bl31_v1.24.elf:firmware/rk3568-bl31.bin -BAREBOX_INJECT_FILES += rk3568_bl32_v1.05.bin:firmware/rk3568-op-tee.bin -BAREBOX_INJECT_FILES += rk3568_ddr_1560MHz_v1.08.bin:arch/arm/boards/rockchip-rk3568-evb/sdram-init.bin -BAREBOX_INJECT_FILES += rk3568_ddr_1560MHz_v1.08.bin:arch/arm/boards/radxa-rock3/sdram-init.bin -BAREBOX_PROGS_HOST += rk-usb-loader - -# Firmware blobs for NXP i.MX8M platforms -BAREBOX_INJECT_FILES += imx8mm-bl31.bin:firmware/imx8mm-bl31.bin -BAREBOX_INJECT_FILES += imx8mp-bl31.bin:firmware/imx8mp-bl31.bin -BAREBOX_INJECT_FILES += imx8mq-bl31.bin:firmware/imx8mq-bl31.bin -BAREBOX_INJECT_FILES += ddr/synopsys/lpddr4_pmu_train_1d_dmem.bin:firmware/lpddr4_pmu_train_1d_dmem.bin -BAREBOX_INJECT_FILES += ddr/synopsys/lpddr4_pmu_train_1d_imem.bin:firmware/lpddr4_pmu_train_1d_imem.bin -BAREBOX_INJECT_FILES += ddr/synopsys/lpddr4_pmu_train_2d_dmem.bin:firmware/lpddr4_pmu_train_2d_dmem.bin -BAREBOX_INJECT_FILES += ddr/synopsys/lpddr4_pmu_train_2d_imem.bin:firmware/lpddr4_pmu_train_2d_imem.bin -BAREBOX_PROGS_HOST += imx/imx-usb-loader -- 2.39.2