From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Thu, 25 Apr 2024 10:03:19 +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 1rzu4d-00GKFE-1Q for lore@lore.pengutronix.de; Thu, 25 Apr 2024 10:03:19 +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 1rzu4c-0001Pg-Bg; Thu, 25 Apr 2024 10:03:18 +0200 Received: from mail.thorsis.com ([217.92.40.78]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rzu4X-0001Ak-MD for distrokit@pengutronix.de; Thu, 25 Apr 2024 10:03:14 +0200 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id C1AA7148DA0C for ; Thu, 25 Apr 2024 10:03:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thorsis.com; s=dkim; t=1714032190; h=from:subject:date:message-id:to:mime-version: content-transfer-encoding:in-reply-to:references; bh=yn3eYSWkNgU321Bkq5DD/k9EVy64EcUvB1EMu5DZc1M=; b=DshY82iJ5edPkMfO2gz0SaqL58YsFfGaiPZmTYB+ooWQcCRvM2a6nGg0b/px3epOawvy7l 7n9EiKKl/sNzDEunSJZv77iURxZnTkbp7dWZpVPHuRY0RLSFqr6VhhIWENqmjJfPmx3Twt af1zDWxeT/rT2n3eLXwrvYNsOku9qp1/AkTcddjgUViH6S5mrOOEaZy54/IVlQELGjkKK4 x99xvSK4im2FFgq5tLzLHElERKE5gfy+2W3scBCGQbaWZR6yyUEvwKFx08cNNWO0p88Xnh lfp8StFC1mx+55xiumFv2oIbp8YYNwfpkSrmQ1tghAXdB0Xz8f7Ki4KWuie5cw== From: Alexander Dahl To: distrokit@pengutronix.de Date: Thu, 25 Apr 2024 10:03:00 +0200 Message-Id: <20240425080303.171897-8-ada@thorsis.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240425080303.171897-1-ada@thorsis.com> References: <20240425080303.171897-1-ada@thorsis.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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=-2.8 required=4.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Subject: [DistroKit] [PATCH 7/9] platform: v8a: firmware-rockchip: 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: , 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 This is what 'barebox_firmware' was invented for. Done to avoid cluttering the firmware-rockchip package with bootloader specific stuff. Approach inspired by the patch series which introduced that infrastructure in ptxdist. Same as with firmware-imx package. Link: https://lore.ptxdist.org/ptxdist/20220129070330.2601433-6-michael.riesch@wolfvision.net/ Signed-off-by: Alexander Dahl --- configs/platform-v8a/platformconfig | 1 + .../platforms/barebox.rockchip.in | 14 +++++++++++++ .../platforms/firmware-rockchip.in | 5 ----- .../platform-v8a/rules/barebox.rockchip.make | 20 +++++++++++++++++++ .../platform-v8a/rules/firmware-rockchip.make | 10 ---------- 5 files changed, 35 insertions(+), 15 deletions(-) create mode 100644 configs/platform-v8a/platforms/barebox.rockchip.in diff --git a/configs/platform-v8a/platformconfig b/configs/platform-v8a/platformconfig index ba33191..342aa11 100644 --- a/configs/platform-v8a/platformconfig +++ b/configs/platform-v8a/platformconfig @@ -184,6 +184,7 @@ PTXCONF_BAREBOX_MD5="dcb443c48b64662b52974502c502427e" PTXCONF_BAREBOX_CONFIG="barebox.config" PTXCONF_BAREBOX_FIRMWARE=y PTXCONF_BAREBOX_NEEDS_FIRMWARE_IMX=y +PTXCONF_BAREBOX_NEEDS_FIRMWARE_ROCKCHIP=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.rockchip.in b/configs/platform-v8a/platforms/barebox.rockchip.in new file mode 100644 index 0000000..3291085 --- /dev/null +++ b/configs/platform-v8a/platforms/barebox.rockchip.in @@ -0,0 +1,14 @@ +## SECTION=barebox_firmware + +config BAREBOX_NEEDS_FIRMWARE_ROCKCHIP + bool + prompt "barebox needs firmware-rockchip" + help + Select this if barebox needs the non-free Rockchip firmware blobs. + +config BAREBOX_DEPENDENCIES + tristate + select FIRMWARE_ROCKCHIP if BAREBOX_NEEDS_FIRMWARE_ROCKCHIP + select FIRMWARE_ROCKCHIP_RK3568_SDRAM if BAREBOX_NEEDS_FIRMWARE_ROCKCHIP + select FIRMWARE_ROCKCHIP_RK356x_BL31 if BAREBOX_NEEDS_FIRMWARE_ROCKCHIP + select FIRMWARE_ROCKCHIP_RK356x_BL32 if BAREBOX_NEEDS_FIRMWARE_ROCKCHIP diff --git a/configs/platform-v8a/platforms/firmware-rockchip.in b/configs/platform-v8a/platforms/firmware-rockchip.in index 87a1490..aa70241 100644 --- a/configs/platform-v8a/platforms/firmware-rockchip.in +++ b/configs/platform-v8a/platforms/firmware-rockchip.in @@ -39,8 +39,3 @@ config FIRMWARE_ROCKCHIP_RK356x_BL32 and the Rockchip RK3568 EVB1 board. endif - -config BAREBOX_DEPENDENCIES - tristate - select FIRMWARE_ROCKCHIP - diff --git a/configs/platform-v8a/rules/barebox.rockchip.make b/configs/platform-v8a/rules/barebox.rockchip.make index 17092a9..fad39c9 100644 --- a/configs/platform-v8a/rules/barebox.rockchip.make +++ b/configs/platform-v8a/rules/barebox.rockchip.make @@ -9,4 +9,24 @@ # TODO: remove this when it is added in PTXdist upstream BAREBOX_PROGS_HOST += rk-usb-loader +# +# Firmware blobs for barebox +# +ifdef PTXCONF_FIRMWARE_ROCKCHIP + +ifdef PTXCONF_FIRMWARE_ROCKCHIP_RK356x_BL31 +BAREBOX_INJECT_FILES += rk3568_bl31_v1.24.elf:firmware/rk3568-bl31.bin +endif + +ifdef PTXCONF_FIRMWARE_ROCKCHIP_RK356x_BL32 +BAREBOX_INJECT_FILES += rk3568_bl32_v1.05.bin:firmware/rk3568-op-tee.bin +endif + +ifdef PTXCONF_FIRMWARE_ROCKCHIP_RK3568_SDRAM +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 + +endif + # vim: syntax=make diff --git a/configs/platform-v8a/rules/firmware-rockchip.make b/configs/platform-v8a/rules/firmware-rockchip.make index 6949148..dd50c86 100644 --- a/configs/platform-v8a/rules/firmware-rockchip.make +++ b/configs/platform-v8a/rules/firmware-rockchip.make @@ -20,16 +20,6 @@ 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 # ---------------------------------------------------------------------------- -- 2.39.2