From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Mon, 05 Sep 2022 18:36:33 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1oVF5L-007hyp-9D for lore@lore.pengutronix.de; Mon, 05 Sep 2022 18:36:33 +0200 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 1oVF5J-0002Vm-St; Mon, 05 Sep 2022 18:36:29 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oVF5A-000273-HW; Mon, 05 Sep 2022 18:36:20 +0200 Received: from [2a0a:edc0:0:1101:1d::39] (helo=dude03.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1oVF57-00460H-LG; Mon, 05 Sep 2022 18:36:19 +0200 Received: from mtr by dude03.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1oVF56-00BmRT-EX; Mon, 05 Sep 2022 18:36:16 +0200 From: Michael Tretter To: distrokit@pengutronix.de Date: Mon, 5 Sep 2022 18:36:11 +0200 Message-Id: <20220905163615.2807729-17-m.tretter@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220905163615.2807729-1-m.tretter@pengutronix.de> References: <20220905163615.2807729-1-m.tretter@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [DistroKit] [PATCH 16/20] v8a: rockchip: add Radxa Rock 3A image and blspec entry 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: mtr@pengutronix.de, jzi@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.ext.pengutronix.de); SAEximRunCond expanded to false From: Johannes Zink 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 Signed-off-by: Michael Tretter --- .../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 +# +# 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 ") + @$(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 +# +# 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