From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Tue, 28 May 2024 08:33:05 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sBqOP-000r7k-04 for lore@lore.pengutronix.de; Tue, 28 May 2024 08:33:05 +0200 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1sBqON-0002UX-TC; Tue, 28 May 2024 08:33:03 +0200 Received: from mail.thorsis.com ([2003:a:e28:26e4::10]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sBqOJ-0002UG-SF; Tue, 28 May 2024 08:33:00 +0200 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id D64F31485A7D; Tue, 28 May 2024 08:32:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thorsis.com; s=dkim; t=1716877979; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=J+tA2NfwvVYvqxOdkqCaKeSyBCY5YRXjX5E7bVQH7XM=; b=KGESPbdF4sWKq73ZqX0kHg0BvQTWqIzKD8zJk1Sm5sya8pdN+oz6bBf022XDcI8LMz0sEU HaXDi9Kx2KWKzyevhPBYRXAWHcuEXli0vb9AhQNyALVJe3oHOz+umJPof28EWPWD1laJeE VdxUSWfmTe6ZP2sSP8dE7v2eI1a6rFxZybcQ/nPAGc8zB4H33SsVDDOzlMK84wAeXK694C r1V/2QdTtCK2Z5S2nVzJZU3X5KF7flY9Yqr23HQuxusvq3LjgUKbaIhUC8XWFy+aGD91Jg cwK6/paW1r9mwmMiPSPw7878vES0Hh2CSQX/NM5X9wGEQ3POyU1DSdxh96th5A== Date: Tue, 28 May 2024 08:32:57 +0200 From: Alexander Dahl To: Robert Schwebel Message-ID: <20240528-spongy-tilt-134e654e098b@thorsis.com> Mail-Followup-To: Robert Schwebel , distrokit@pengutronix.de References: <20240425080303.171897-1-ada@thorsis.com> <20240425080303.171897-7-ada@thorsis.com> <20240425-unlivable-approval-c55177db2d5c@thorsis.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/2.2.12 (2023-09-09) X-Last-TLS-Session-Version: TLSv1.3 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.whiteo.stw.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-3.0 required=4.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Subject: Re: [DistroKit] [PATCH 6/9] platform: v8a: firmware-imx: Move barebox injects to separate package 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.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false Hello Robert, Am Mon, May 27, 2024 at 06:15:51PM +0200 schrieb Robert Schwebel: > On Thu, Apr 25, 2024 at 02:33:57PM +0200, Alexander Dahl wrote: > > Hei hei, > > > > Am Thu, Apr 25, 2024 at 10:02:59AM +0200 schrieb Alexander Dahl: > > > This is what 'barebox_firmware' was invented for. Done to avoid > > > cluttering the firmware-imx package even more. > > > > > > Before duplicating the firmware-imx package files in an upper layer and > > > adding more such stuff for a different bootloader, we rather move this > > > stuff to multiple barebox_firmware packages (which can also sit in other > > > layers) and inject files from there. > > > > > > The same approach can then be followed by other bootloaders depending on > > > firmware-imx package. This way we can depend on firmware-imx from one, > > > the other, or both bootloaders, respectively their firmware packages, > > > without the need to touch the firmware-imx package itself. > > > > > > Approach inspired by the patch series which introduced that > > > infrastructure in ptxdist. > > > > > > Link: https://lore.ptxdist.org/ptxdist/20220129070330.2601433-6-michael.riesch@wolfvision.net/ > > > Signed-off-by: Alexander Dahl > > > --- > > > configs/platform-v8a/platformconfig | 1 + > > > configs/platform-v8a/platforms/barebox.imx.in | 12 +++++++++ > > > .../platform-v8a/platforms/firmware-imx.in | 2 -- > > > configs/platform-v8a/rules/barebox.imx.make | 26 +++++++++++++++++++ > > > configs/platform-v8a/rules/firmware-imx.make | 20 -------------- > > > 5 files changed, 39 insertions(+), 22 deletions(-) > > > create mode 100644 configs/platform-v8a/platforms/barebox.imx.in > > > create mode 100644 configs/platform-v8a/rules/barebox.imx.make > > > > > > diff --git a/configs/platform-v8a/platformconfig b/configs/platform-v8a/platformconfig > > > index 65c767a..ba33191 100644 > > > --- a/configs/platform-v8a/platformconfig > > > +++ b/configs/platform-v8a/platformconfig > > > @@ -183,6 +183,7 @@ PTXCONF_BAREBOX_BUILDSYSTEM_VERSION="${PTXDIST_VCS_VERSION}" > > > PTXCONF_BAREBOX_MD5="dcb443c48b64662b52974502c502427e" > > > PTXCONF_BAREBOX_CONFIG="barebox.config" > > > PTXCONF_BAREBOX_FIRMWARE=y > > > +PTXCONF_BAREBOX_NEEDS_FIRMWARE_IMX=y > > > PTXCONF_BAREBOX_EXTRA_ENV=y > > > PTXCONF_BAREBOX_EXTRA_ENV_PATH="barebox-common-defaultenv" > > > # PTXCONF_BAREBOX_BAREBOXENV is not set > > > diff --git a/configs/platform-v8a/platforms/barebox.imx.in b/configs/platform-v8a/platforms/barebox.imx.in > > > new file mode 100644 > > > index 0000000..971fc9b > > > --- /dev/null > > > +++ b/configs/platform-v8a/platforms/barebox.imx.in > > > @@ -0,0 +1,12 @@ > > > +## SECTION=barebox_firmware > > > + > > > +config BAREBOX_NEEDS_FIRMWARE_IMX > > > + bool > > > + prompt "barebox needs firmware-imx" > > > + help > > > + Select this if barebox needs the non-free IMX firmware blobs. > > > + > > > +config BAREBOX_DEPENDENCIES > > > + tristate > > > + select FIRMWARE_IMX if BAREBOX_NEEDS_FIRMWARE_IMX > > > + select FIRMWARE_IMX_BOOTIMAGE_IMX8 if BAREBOX_NEEDS_FIRMWARE_IMX > > > diff --git a/configs/platform-v8a/platforms/firmware-imx.in b/configs/platform-v8a/platforms/firmware-imx.in > > > index c93e9f8..a08afbe 100644 > > > --- a/configs/platform-v8a/platforms/firmware-imx.in > > > +++ b/configs/platform-v8a/platforms/firmware-imx.in > > > @@ -56,6 +56,4 @@ endif > > > > > > config BAREBOX_DEPENDENCIES > > > tristate > > > - select FIRMWARE_IMX > > > - select FIRMWARE_IMX_BOOTIMAGE_IMX8 > > > select TF_A > > > > After speaking about this in IRC … I think defining a dependency from > > barebox to tf-a here is in the wrong place. I mean this is the > > firmware-imx package. This dependency should go to something like > > platforms/barebox.tf-a.in right? > > I'll drop this here. I don't understand. My comment was more an additional remark for reference. From my point of view the barebox dependency to tf_a is somewhat independent from the one to firmware_imx. I think both should be removed from the firmware_imx package, but this patch is only about one of them. Greets Alex > > > > > Greets > > Alex > > > > > diff --git a/configs/platform-v8a/rules/barebox.imx.make b/configs/platform-v8a/rules/barebox.imx.make > > > new file mode 100644 > > > index 0000000..4c6404c > > > --- /dev/null > > > +++ b/configs/platform-v8a/rules/barebox.imx.make > > > @@ -0,0 +1,26 @@ > > > +# -*-makefile-*- > > > +# > > > +# Copyright (C) 2024 by Alexander Dahl > > > +# > > > +# For further information about the PTXdist project and license conditions > > > +# see the README file. > > > +# > > > + > > > +ifdef PTXCONF_FIRMWARE_IMX > > > +BAREBOX_INJECT_FILES += imx8mm-bl31.bin:firmware/imx8mm-bl31.bin > > > +BAREBOX_INJECT_FILES += imx8mn-bl31.bin:firmware/imx8mn-bl31.bin > > > +BAREBOX_INJECT_FILES += imx8mp-bl31.bin:firmware/imx8mp-bl31.bin > > > +BAREBOX_INJECT_FILES += imx8mq-bl31.bin:firmware/imx8mq-bl31.bin > > > +ifdef PTXCONF_FIRMWARE_IMX_BOOTIMAGE_IMX8 > > > +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_INJECT_FILES += ddr/synopsys/ddr4_dmem_1d.bin:firmware/ddr4_dmem_1d.bin > > > +BAREBOX_INJECT_FILES += ddr/synopsys/ddr4_dmem_2d.bin:firmware/ddr4_dmem_2d.bin > > > +BAREBOX_INJECT_FILES += ddr/synopsys/ddr4_imem_1d.bin:firmware/ddr4_imem_1d.bin > > > +BAREBOX_INJECT_FILES += ddr/synopsys/ddr4_imem_2d.bin:firmware/ddr4_imem_2d.bin > > > +endif > > > +endif > > > + > > > +# vim: syntax=make > > > diff --git a/configs/platform-v8a/rules/firmware-imx.make b/configs/platform-v8a/rules/firmware-imx.make > > > index 1cdc3ee..906691c 100644 > > > --- a/configs/platform-v8a/rules/firmware-imx.make > > > +++ b/configs/platform-v8a/rules/firmware-imx.make > > > @@ -26,26 +26,6 @@ FIRMWARE_IMX_LICENSE := NXP-Software-License-Agreement > > > FIRMWARE_IMX_LICENSE_FILES := \ > > > file://COPYING;md5=44a8052c384584ba09077e85a3d1654f > > > > > > -# > > > -# Firmware blobs for barebox > > > -# > > > -ifdef PTXCONF_FIRMWARE_IMX > > > -BAREBOX_INJECT_FILES += imx8mm-bl31.bin:firmware/imx8mm-bl31.bin > > > -BAREBOX_INJECT_FILES += imx8mn-bl31.bin:firmware/imx8mn-bl31.bin > > > -BAREBOX_INJECT_FILES += imx8mp-bl31.bin:firmware/imx8mp-bl31.bin > > > -BAREBOX_INJECT_FILES += imx8mq-bl31.bin:firmware/imx8mq-bl31.bin > > > -ifdef PTXCONF_FIRMWARE_IMX_BOOTIMAGE_IMX8 > > > -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_INJECT_FILES += ddr/synopsys/ddr4_dmem_1d.bin:firmware/ddr4_dmem_1d.bin > > > -BAREBOX_INJECT_FILES += ddr/synopsys/ddr4_dmem_2d.bin:firmware/ddr4_dmem_2d.bin > > > -BAREBOX_INJECT_FILES += ddr/synopsys/ddr4_imem_1d.bin:firmware/ddr4_imem_1d.bin > > > -BAREBOX_INJECT_FILES += ddr/synopsys/ddr4_imem_2d.bin:firmware/ddr4_imem_2d.bin > > > -endif > > > -endif > > > - > > > # ---------------------------------------------------------------------------- > > > # Extract > > > # ---------------------------------------------------------------------------- > > > -- > > > 2.39.2 > > > > > > > > > > > > -- > Pengutronix e.K. | Dipl.-Ing. Robert Schwebel | > Steuerwalder Str. 21 | https://www.pengutronix.de/ | > 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 | > -- Alexander Dahl Thorsis Technologies GmbH T +49 391 544 563 1000 Industrieautomation Oststr. 18 F +49 391 544 563 9099 T +49 391 544 563 3036 39114 Magdeburg https://www.thorsis.com/ Sitz der Gesellschaft: Magdeburg Amtsgericht Stendal HRB 30646 Geschäftsführer: Dipl.-Inf. Michael Huschke