From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Thu, 08 Jun 2023 11:19: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 1q7Bnw-00FYvV-Cn for lore@lore.pengutronix.de; Thu, 08 Jun 2023 11:19: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 1q7Bnu-0000GW-2B; Thu, 08 Jun 2023 11:19:38 +0200 Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q7Bno-0000G5-4j; Thu, 08 Jun 2023 11:19:32 +0200 Received: from mol by pty.hi.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1q7Bnn-00GgXt-Ko; Thu, 08 Jun 2023 11:19:31 +0200 Date: Thu, 8 Jun 2023 11:19:31 +0200 From: Michael Olbrich To: Ahmad Fatoum Message-ID: Mail-Followup-To: Ahmad Fatoum , distrokit@pengutronix.de References: <20230602145957.902307-1-m.olbrich@pengutronix.de> <20230602145957.902307-2-m.olbrich@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 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: 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.ext.pengutronix.de); SAEximRunCond expanded to false On Fri, Jun 02, 2023 at 06:40:55PM +0200, Ahmad Fatoum wrote: > On 02.06.23 16:59, Michael Olbrich wrote: > > 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 > > What magic includes this file? I originally introduced this because I needed it to include generated makefiles for cargo. So I added a generic mechanism to source all ..make files directly after .make. This works for the cargo use-case, but also to extend package rules in simple ways to avoid copying the rule. Michael > Patch looks fine though: > > Reviewed-by: Ahmad Fatoum > > > @@ -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 > > -- > 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 | > > > -- 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 |