From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Sun, 05 Dec 2021 01:57:01 +0100 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1mtfpt-0007WS-Rk for lore@lore.pengutronix.de; Sun, 05 Dec 2021 01:57:01 +0100 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 1mtfpt-0006XO-9m; Sun, 05 Dec 2021 01:57:01 +0100 Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mtfpe-0006X4-06; Sun, 05 Dec 2021 01:56:46 +0100 Received: from rhi by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1mtfpd-00024Q-JW; Sun, 05 Dec 2021 01:56:45 +0100 Date: Sun, 5 Dec 2021 01:56:45 +0100 From: Roland Hieber To: Michael Riesch Message-ID: <20211205005645.7s3ydb6km36zujzm@pengutronix.de> References: <20211203165440.1180588-1-michael.riesch@wolfvision.net> <20211203165440.1180588-3-michael.riesch@wolfvision.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211203165440.1180588-3-michael.riesch@wolfvision.net> User-Agent: NeoMutt/20180716 Subject: Re: [ptxdist] [PATCH 2/3] add package for rockchip firmware binaries X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: ptxdist@pengutronix.de, michael.tretter@pengutronix.de Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false On Fri, Dec 03, 2021 at 05:54:39PM +0100, Michael Riesch wrote: > Rockchip provides the SDRAM initialization as well as BL31/BL32 > firmware for their SoCs in binary from. Add a package that downloads > those binaries for further use in e.g., barebox. > > Signed-off-by: Michael Tretter > [revised and extended Kconfig] > Signed-off-by: Michael Riesch > --- > platforms/firmware-rockchip.in | 35 ++++++++++++++++ > rules/firmware-rockchip.make | 75 ++++++++++++++++++++++++++++++++++ > 2 files changed, 110 insertions(+) > create mode 100644 platforms/firmware-rockchip.in > create mode 100644 rules/firmware-rockchip.make > > diff --git a/platforms/firmware-rockchip.in b/platforms/firmware-rockchip.in > new file mode 100644 > index 000000000..3b7c996bb > --- /dev/null > +++ b/platforms/firmware-rockchip.in > @@ -0,0 +1,35 @@ > +## 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. > + > +config FIRMWARE_ROCKCHIP_RK3568_SDRAM > + bool > + prompt "RK3568 SDRAM init" > + help > + Rockchip RK3568 SDRAM initialization binary. > + > +config FIRMWARE_ROCKCHIP_RK356x_BL31 > + bool > + prompt "RK356x BL31 binary" > + help > + Rockchip RK3566/RK3568 BL31 binary. > + > +config FIRMWARE_ROCKCHIP_RK356x_BL32 > + bool > + prompt "RK356x BL32 binary" > + help > + Rockchip RK3566/RK3568 BL32 binary. > + > +endif > diff --git a/rules/firmware-rockchip.make b/rules/firmware-rockchip.make > new file mode 100644 > index 000000000..54a0b7493 > --- /dev/null > +++ b/rules/firmware-rockchip.make > @@ -0,0 +1,75 @@ > +# -*-makefile-*- > +# > +# Copyright (C) 2021 by Michael Tretter > +# > +# 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 := bfb7b9601b88784e263c2cc6baa5da9f > +FIRMWARE_ROCKCHIP := firmware-rockchip-$(FIRMWARE_ROCKCHIP_VERSION) > +FIRMWARE_ROCKCHIP_SUFFIX := tar.xz > +FIRMWARE_ROCKCHIP_URL := \ > + git://github.com/rockchip-linux/rkbin;tag=$(FIRMWARE_ROCKCHIP_VERSION) GitHub will stop serving the git:// protocol starting next year [1]. You should be able to just use the usual archive URLs instead with the git-describe-like version. This way you also don't need to clone the whole git repo first: https://github.com/rockchip-linux/rkbin/archive/$(FIRMWARE_ROCKCHIP_VERSION).zip (but you only get .zips from it.) [1]: https://github.blog/2021-09-01-improving-git-protocol-security-github/ > +FIRMWARE_ROCKCHIP_SOURCE := $(SRCDIR)/$(FIRMWARE_ROCKCHIP).$(FIRMWARE_ROCKCHIP_SUFFIX) > +FIRMWARE_ROCKCHIP_DIR := $(BUILDDIR)/$(FIRMWARE_ROCKCHIP) > +FIRMWARE_ROCKCHIP_LICENSE := unknown My Chinese is not good enough, but we should probably classify this as proprietary. > + > +# ---------------------------------------------------------------------------- > +# Prepare > +# ---------------------------------------------------------------------------- > + > +FIRMWARE_ROCKCHIP_CONF_TOOL:= NO Please add a space before the walrus operator. > + > +# ---------------------------------------------------------------------------- > +# 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) Nothing installed on the target? Are they for compile-time use only? - Roland > + @$(call touch) > + > +# vim: syntax=make > -- > 2.30.2 -- Roland Hieber, Pengutronix e.K. | r.hieber@pengutronix.de | Steuerwalder Str. 21 | https://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de