From: Michael Tretter <m.tretter@pengutronix.de>
To: distrokit@pengutronix.de
Cc: mtr@pengutronix.de, jzi@pengutronix.de
Subject: [DistroKit] [PATCH 16/20] v8a: rockchip: add Radxa Rock 3A image and blspec entry
Date: Mon, 5 Sep 2022 18:36:11 +0200 [thread overview]
Message-ID: <20220905163615.2807729-17-m.tretter@pengutronix.de> (raw)
In-Reply-To: <20220905163615.2807729-1-m.tretter@pengutronix.de>
From: Johannes Zink <j.zink@pengutronix.de>
Now that we have kernel, barebox and firmware in place, add rules for
building a bootspec-enabled image that's bootable on the Radxa ROCK-3A.
Signed-off-by: Johannes Zink <j.zink@pengutronix.de>
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
---
.../platform-v8a/config/images/rock3a.config | 33 ++++++++++++++++
configs/platform-v8a/platformconfig | 6 ++-
.../platform-v8a/platforms/blspec-rock3a.in | 5 +++
.../platform-v8a/platforms/image-rock3a.in | 10 +++++
.../projectroot/loader/entries/rock3a.conf | 6 +++
configs/platform-v8a/rules/blspec-rock3a.make | 38 +++++++++++++++++++
configs/platform-v8a/rules/image-rock3a.make | 32 ++++++++++++++++
7 files changed, 128 insertions(+), 2 deletions(-)
create mode 100644 configs/platform-v8a/config/images/rock3a.config
create mode 100644 configs/platform-v8a/platforms/blspec-rock3a.in
create mode 100644 configs/platform-v8a/platforms/image-rock3a.in
create mode 100644 configs/platform-v8a/projectroot/loader/entries/rock3a.conf
create mode 100644 configs/platform-v8a/rules/blspec-rock3a.make
create mode 100644 configs/platform-v8a/rules/image-rock3a.make
diff --git a/configs/platform-v8a/config/images/rock3a.config b/configs/platform-v8a/config/images/rock3a.config
new file mode 100644
index 000000000000..27de5f82c010
--- /dev/null
+++ b/configs/platform-v8a/config/images/rock3a.config
@@ -0,0 +1,33 @@
+image @IMAGE@ {
+ hdimage {
+ align = 1M
+ disk-signature = 0xf5feaddc
+ }
+ partition boot1 {
+ offset = 32k
+ size = 2M
+ in-partition-table = false
+ image = "barebox-rock3a.img-rockchip"
+ }
+ partition boot2 {
+ offset = 2080k
+ size = 2M
+ in-partition-table = false
+ image = "barebox-rock3a.img-rockchip"
+ }
+ partition barebox_environment {
+ offset = 4128k
+ size = 128k
+ in-partition-table = false
+ image = /dev/null
+ }
+ partition root-A {
+ offset = 5M
+ image = "root.ext2"
+ partition-type = 0x83
+ }
+ partition data {
+ partition-type = 0x83
+ size = 512M
+ }
+}
diff --git a/configs/platform-v8a/platformconfig b/configs/platform-v8a/platformconfig
index 78ec1aaada9e..1057ba5055a9 100644
--- a/configs/platform-v8a/platformconfig
+++ b/configs/platform-v8a/platformconfig
@@ -130,8 +130,8 @@ PTXCONF_KERNEL_IMAGE_RAW=y
# PTXCONF_KERNEL_IMAGE_SIMPLE is not set
PTXCONF_KERNEL_IMAGE="Image"
PTXCONF_KERNEL_DTB=y
-PTXCONF_KERNEL_DTS_PATH="${PTXDIST_PLATFORMCONFIG_SUBDIR}/dts:${KERNEL_DIR}/arch/${GENERIC_KERNEL_ARCH}/boot/dts:${KERNEL_DIR}/arch/${GENERIC_KERNEL_ARCH}/boot/dts/freescale"
-PTXCONF_KERNEL_DTS="armada-3720-community.dts imx8mm-evk.dts imx8mp-evk.dts imx8mq-evk.dts"
+PTXCONF_KERNEL_DTS_PATH="${PTXDIST_PLATFORMCONFIG_SUBDIR}/dts:${KERNEL_DIR}/arch/${GENERIC_KERNEL_ARCH}/boot/dts:${KERNEL_DIR}/arch/${GENERIC_KERNEL_ARCH}/boot/dts/freescale:${KERNEL_DIR}/arch/${GENERIC_KERNEL_ARCH}/boot/dts/rockchip"
+PTXCONF_KERNEL_DTS="armada-3720-community.dts imx8mm-evk.dts imx8mp-evk.dts imx8mq-evk.dts rk3568-rock-3a.dts"
# PTXCONF_KERNEL_DTBO is not set
# PTXCONF_KERNEL_CODE_SIGNING is not set
# PTXCONF_KERNEL_ZSTD is not set
@@ -192,6 +192,7 @@ PTXCONF_IMX_ATF=y
PTXCONF_BLSPEC_IMX8MM_EVK=y
PTXCONF_BLSPEC_IMX8MP_EVK=y
PTXCONF_BLSPEC_IMX8MQ_EVK=y
+PTXCONF_BLSPEC_ROCK3A=y
# end of bootloader spec entries
#
@@ -219,6 +220,7 @@ PTXCONF_IMAGE_KERNEL_INSTALL_EARLY=y
# end of Generate images/linuximage
# PTXCONF_IMAGE_RAUC is not set
+PTXCONF_IMAGE_ROCK3A=y
# PTXCONF_IMAGE_ROOT_CPIO is not set
PTXCONF_IMAGE_ROOT_EXT=y
PTXCONF_IMAGE_ROOT_EXT_SIZE="125%"
diff --git a/configs/platform-v8a/platforms/blspec-rock3a.in b/configs/platform-v8a/platforms/blspec-rock3a.in
new file mode 100644
index 000000000000..e54a102467d4
--- /dev/null
+++ b/configs/platform-v8a/platforms/blspec-rock3a.in
@@ -0,0 +1,5 @@
+## SECTION=blspec
+
+config BLSPEC_ROCK3A
+ tristate
+ prompt "/loader/entries/rock3a.conf bootloader spec entry"
diff --git a/configs/platform-v8a/platforms/image-rock3a.in b/configs/platform-v8a/platforms/image-rock3a.in
new file mode 100644
index 000000000000..cd09d1ec9087
--- /dev/null
+++ b/configs/platform-v8a/platforms/image-rock3a.in
@@ -0,0 +1,10 @@
+## SECTION=image
+
+config IMAGE_ROCK3A
+ tristate
+ select HOST_GENIMAGE
+ select IMAGE_ROOT_EXT
+ select BAREBOX_ROCKCHIP
+ prompt "Generate images/rock3a.img"
+ help
+ Generate an image for the Radxa ROCK3 Model A.
diff --git a/configs/platform-v8a/projectroot/loader/entries/rock3a.conf b/configs/platform-v8a/projectroot/loader/entries/rock3a.conf
new file mode 100644
index 000000000000..128e25a57f24
--- /dev/null
+++ b/configs/platform-v8a/projectroot/loader/entries/rock3a.conf
@@ -0,0 +1,6 @@
+title PTXdist - Pengutronix-DistroKit - ROCK-3A
+version @VERSION@
+options rootwait
+linux /boot/Image
+devicetree /boot/rk3568-rock-3a.dtb
+linux-appendroot true
diff --git a/configs/platform-v8a/rules/blspec-rock3a.make b/configs/platform-v8a/rules/blspec-rock3a.make
new file mode 100644
index 000000000000..eeaf82bfe093
--- /dev/null
+++ b/configs/platform-v8a/rules/blspec-rock3a.make
@@ -0,0 +1,38 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2020 by Sascha Hauer <s.hauer@pengutronix.de>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_BLSPEC_ROCK3A) += blspec-rock3a
+
+BLSPEC_ROCK3A_VERSION := 5.6.2
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/blspec-rock3a.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, blspec-rock3a)
+ @$(call install_fixup,blspec-rock3a,PRIORITY,optional)
+ @$(call install_fixup,blspec-rock3a,SECTION,base)
+ @$(call install_fixup,blspec-rock3a,AUTHOR,"Sascha Hauer <s.hauer@pengutronix.de>")
+ @$(call install_fixup,blspec-rock3a,DESCRIPTION,missing)
+
+ @$(call install_alternative, blspec-rock3a, 0, 0, 0644, \
+ /loader/entries/rock3a.conf)
+ @$(call install_replace, blspec-rock3a, /loader/entries/rock3a.conf, \
+ @VERSION@,'$(PTXDIST_BSP_AUTOVERSION)')$(ptx/nl)
+
+ @$(call install_finish,blspec-rock3a)
+
+ @$(call touch)
+
+# vim: syntax=make
diff --git a/configs/platform-v8a/rules/image-rock3a.make b/configs/platform-v8a/rules/image-rock3a.make
new file mode 100644
index 000000000000..2f0107b5e3e9
--- /dev/null
+++ b/configs/platform-v8a/rules/image-rock3a.make
@@ -0,0 +1,32 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2022 by Michael Riesch <michael.riesch@wolfvision.net>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+IMAGE_PACKAGES-$(PTXCONF_IMAGE_ROCK3A) += image-rock3a
+
+#
+# Paths and names
+#
+IMAGE_ROCK3A := image-rock3a
+IMAGE_ROCK3A_DIR := $(BUILDDIR)/$(IMAGE_ROCK3A)
+IMAGE_ROCK3A_IMAGE := $(IMAGEDIR)/rock3a.img
+IMAGE_ROCK3A_FILES := $(IMAGEDIR)/root.tgz
+IMAGE_ROCK3A_CONFIG := rock3a.config
+
+# ----------------------------------------------------------------------------
+# Image
+# ----------------------------------------------------------------------------
+
+$(IMAGE_ROCK3A_IMAGE):
+ @$(call targetinfo)
+ @$(call image/genimage, IMAGE_ROCK3A)
+ @$(call finish)
+
+# 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 ` [DistroKit] [PATCH 14/20] v8a: rockchip: add rule for rockchip firmware Michael Tretter
2022-09-05 16:36 ` [DistroKit] [PATCH 15/20] v8a: rockchip: add new barebox-rockchip rule Michael Tretter
2022-09-05 16:36 ` Michael Tretter [this message]
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-17-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