From: Michael Tretter <m.tretter@pengutronix.de>
To: distrokit@pengutronix.de
Cc: mtr@pengutronix.de, jzi@pengutronix.de
Subject: [DistroKit] [PATCH 14/20] v8a: rockchip: add rule for rockchip firmware
Date: Mon, 5 Sep 2022 18:36:09 +0200 [thread overview]
Message-ID: <20220905163615.2807729-15-m.tretter@pengutronix.de> (raw)
In-Reply-To: <20220905163615.2807729-1-m.tretter@pengutronix.de>
From: Johannes Zink <j.zink@pengutronix.de>
There are prebuilt binaries by Rockchip for SDRAM configuration of the
board we use. Add a rule to download them off Github.
This rule also downloads BL31 (TF-A) and BL32 (OP-TEE) binaries, which
we will eventually compile from source. However, as of now, Rockchip did
not release the source code and we have to use use the prebuilt
binaries. Any board specific setup we need will happen within Barebox.
Signed-off-by: Johannes Zink <j.zink@pengutronix.de>
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
---
configs/platform-v8a/platformconfig | 6 ++
.../platform-v8a/rules/firmware-rockchip.in | 41 ++++++++++
.../platform-v8a/rules/firmware-rockchip.make | 74 +++++++++++++++++++
3 files changed, 121 insertions(+)
create mode 100644 configs/platform-v8a/rules/firmware-rockchip.in
create mode 100644 configs/platform-v8a/rules/firmware-rockchip.make
diff --git a/configs/platform-v8a/platformconfig b/configs/platform-v8a/platformconfig
index e71e64972435..e00371be7a1c 100644
--- a/configs/platform-v8a/platformconfig
+++ b/configs/platform-v8a/platformconfig
@@ -265,3 +265,9 @@ PTXCONF_FIRMWARE_IMX=y
#
# non-free firmware blobs
#
+PTXCONF_FIRMWARE_ROCKCHIP=y
+# PTXCONF_FIRMWARE_ROCKCHIP_RK3566_SDRAM is not set
+PTXCONF_FIRMWARE_ROCKCHIP_RK3568_SDRAM=y
+PTXCONF_FIRMWARE_ROCKCHIP_RK356x_BL31=y
+PTXCONF_FIRMWARE_ROCKCHIP_RK356x_BL32=y
+# end of non-free firmware blobs
diff --git a/configs/platform-v8a/rules/firmware-rockchip.in b/configs/platform-v8a/rules/firmware-rockchip.in
new file mode 100644
index 000000000000..aa702416df00
--- /dev/null
+++ b/configs/platform-v8a/rules/firmware-rockchip.in
@@ -0,0 +1,41 @@
+## SECTION=non_free_firmware
+
+menuconfig FIRMWARE_ROCKCHIP
+ bool
+ prompt "Rockchip firmware binaries "
+ help
+ Rockchip prebuilt SDRAM initialization and TF-A binaries.
+
+if FIRMWARE_ROCKCHIP
+
+config FIRMWARE_ROCKCHIP_RK3566_SDRAM
+ bool
+ prompt "RK3566 SDRAM init"
+ help
+ Rockchip RK3566 SDRAM initialization binary.
+ Compatible with e.g., the Pine64 Quartz64 Model A board.
+
+config FIRMWARE_ROCKCHIP_RK3568_SDRAM
+ bool
+ prompt "RK3568 SDRAM init"
+ help
+ Rockchip RK3568 SDRAM initialization binary.
+ Compatible with e.g., the Rockchip RK3568 EVB1 board.
+
+config FIRMWARE_ROCKCHIP_RK356x_BL31
+ bool
+ prompt "RK356x BL31 binary"
+ help
+ Rockchip RK3566/RK3568 BL31 binary.
+ Compatible with e.g., the Pine64 Quartz64 Model A board
+ and the Rockchip RK3568 EVB1 board.
+
+config FIRMWARE_ROCKCHIP_RK356x_BL32
+ bool
+ prompt "RK356x BL32 binary"
+ help
+ Rockchip RK3566/RK3568 BL32 binary.
+ Compatible with e.g., the Pine64 Quartz64 Model A board
+ and the Rockchip RK3568 EVB1 board.
+
+endif
diff --git a/configs/platform-v8a/rules/firmware-rockchip.make b/configs/platform-v8a/rules/firmware-rockchip.make
new file mode 100644
index 000000000000..dd50c865a037
--- /dev/null
+++ b/configs/platform-v8a/rules/firmware-rockchip.make
@@ -0,0 +1,74 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2021 by Michael Tretter <m.tretter@pengutronix.de>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_FIRMWARE_ROCKCHIP) += firmware-rockchip
+
+FIRMWARE_ROCKCHIP_VERSION := 2021-06-01-g7d631e0d
+FIRMWARE_ROCKCHIP_MD5 := 4ca62f76ca75019dc708c4cb7cc31b0a
+FIRMWARE_ROCKCHIP := firmware-rockchip-$(FIRMWARE_ROCKCHIP_VERSION)
+FIRMWARE_ROCKCHIP_SUFFIX := zip
+FIRMWARE_ROCKCHIP_URL := https://github.com/rockchip-linux/rkbin/archive/$(FIRMWARE_ROCKCHIP_VERSION).$(FIRMWARE_ROCKCHIP_SUFFIX)
+FIRMWARE_ROCKCHIP_SOURCE := $(SRCDIR)/$(FIRMWARE_ROCKCHIP).$(FIRMWARE_ROCKCHIP_SUFFIX)
+FIRMWARE_ROCKCHIP_DIR := $(BUILDDIR)/$(FIRMWARE_ROCKCHIP)
+FIRMWARE_ROCKCHIP_LICENSE := proprietary
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+FIRMWARE_ROCKCHIP_CONF_TOOL := NO
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/firmware-rockchip.compile:
+ @$(call targetinfo)
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/firmware-rockchip.install:
+ @$(call targetinfo)
+
+ifdef PTXCONF_FIRMWARE_ROCKCHIP_RK3566_SDRAM
+ install -v -D -m644 $(FIRMWARE_ROCKCHIP_DIR)/bin/rk35/rk3566_ddr_1056MHz_v1.08.bin \
+ $(FIRMWARE_ROCKCHIP_PKGDIR)/usr/lib/firmware/rk3566_ddr_1056MHz_v1.08.bin
+endif
+
+ifdef PTXCONF_FIRMWARE_ROCKCHIP_RK3568_SDRAM
+ install -v -D -m644 $(FIRMWARE_ROCKCHIP_DIR)/bin/rk35/rk3568_ddr_1560MHz_v1.08.bin \
+ $(FIRMWARE_ROCKCHIP_PKGDIR)/usr/lib/firmware/rk3568_ddr_1560MHz_v1.08.bin
+endif
+
+ifdef PTXCONF_FIRMWARE_ROCKCHIP_RK356x_BL31
+ install -v -D -m644 $(FIRMWARE_ROCKCHIP_DIR)/bin/rk35/rk3568_bl31_v1.24.elf \
+ $(FIRMWARE_ROCKCHIP_PKGDIR)/usr/lib/firmware/rk3568_bl31_v1.24.elf
+endif
+
+ifdef PTXCONF_FIRMWARE_ROCKCHIP_RK356x_BL32
+ install -v -D -m644 $(FIRMWARE_ROCKCHIP_DIR)/bin/rk35/rk3568_bl32_v1.05.bin \
+ $(FIRMWARE_ROCKCHIP_PKGDIR)/usr/lib/firmware/rk3568_bl32_v1.05.bin
+endif
+
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/firmware-rockchip.targetinstall:
+ @$(call targetinfo)
+ @$(call touch)
+
+# vim: syntax=make
--
2.30.2
next prev parent reply other threads:[~2022-09-05 16:36 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-05 16:35 [DistroKit] [PATCH 00/20] Add Radxa Rock 3A support Michael Tretter
2022-09-05 16:35 ` [DistroKit] [PATCH 01/20] v8a: kernel: version bump v5.15 -> v5.19 Michael Tretter
2022-09-05 16:35 ` [DistroKit] [PATCH 02/20] v8a: kernel: disable ACPI Michael Tretter
2022-09-05 16:35 ` [DistroKit] [PATCH 03/20] v8a: kernel: disable VIRTUALIZATION Michael Tretter
2022-09-05 16:35 ` [DistroKit] [PATCH 04/20] v8a: kernel: disable DRM Michael Tretter
2022-09-05 16:36 ` [DistroKit] [PATCH 05/20] v8a: kernel: disable SOUND Michael Tretter
2022-09-05 16:36 ` [DistroKit] [PATCH 06/20] v8a: kernel: disable MEDIA_SUPPORT Michael Tretter
2022-09-05 16:36 ` [DistroKit] [PATCH 07/20] v8a: kernel: disable CHROME_PLATFORMS Michael Tretter
2022-09-05 16:36 ` [DistroKit] [PATCH 08/20] v8a: kernel: disable SPMI Michael Tretter
2022-09-05 16:36 ` [DistroKit] [PATCH 09/20] v8a: kernel: disable SLIMBUS Michael Tretter
2022-09-05 16:36 ` [DistroKit] [PATCH 10/20] v8a: kernel: disable network drivers except for FEC and STMMAC Michael Tretter
2022-09-05 16:36 ` [DistroKit] [PATCH 11/20] v8a: kernel: enable SCMI based drivers Michael Tretter
2022-09-05 16:36 ` [DistroKit] [PATCH 12/20] v8a: kernel: add Rockchip RK356x support Michael Tretter
2022-09-05 16:36 ` [DistroKit] [PATCH 13/20] v8a: barebox: move default environment Michael Tretter
2022-09-05 16:36 ` Michael Tretter [this message]
2022-09-05 16:36 ` [DistroKit] [PATCH 15/20] v8a: rockchip: add new barebox-rockchip rule Michael Tretter
2022-09-05 16:36 ` [DistroKit] [PATCH 16/20] v8a: rockchip: add Radxa Rock 3A image and blspec entry Michael Tretter
2022-09-05 16:36 ` [DistroKit] [PATCH 17/20] v8a: rockchip: provide barebox-rock3a.norimg recovery image Michael Tretter
2022-09-05 16:36 ` [DistroKit] [PATCH 18/20] v8a: rockchip: copy default barebox env Michael Tretter
2022-09-05 16:36 ` [DistroKit] [PATCH 19/20] v8a: rock3a: workaround SDR-UHS1 detection Michael Tretter
2022-09-05 16:36 ` [DistroKit] [PATCH 20/20] doc: v8a: rock3a: Add documentation Michael Tretter
2022-09-05 21:32 ` [DistroKit] [PATCH 00/20] Add Radxa Rock 3A support Robert Schwebel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220905163615.2807729-15-m.tretter@pengutronix.de \
--to=m.tretter@pengutronix.de \
--cc=distrokit@pengutronix.de \
--cc=jzi@pengutronix.de \
--cc=mtr@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox