DistroKit Mailinglist
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: distrokit@pengutronix.de
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [DistroKit] [PATCH 08/10] v7a: rpi4: add boot loader spec support
Date: Fri, 30 Sep 2022 18:21:57 +0200	[thread overview]
Message-ID: <20220930162159.814389-9-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20220930162159.814389-1-a.fatoum@pengutronix.de>

We now build device trees and have a kernel capable of booting on the
Raspberry Pi 4b, so generate bootloader spec entries as well. We add
an entry for the Raspberry Pi 400 as well. This is untested, but isn't
costly to enable.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 configs/platform-v7a/platformconfig           |  1 +
 configs/platform-v7a/platforms/blspec-rpi4.in |  5 +++
 projectroot/loader/entries/rpi400.conf        |  6 +++
 projectroot/loader/entries/rpi4b.conf         |  6 +++
 rules/blspec-rpi4.make                        | 38 +++++++++++++++++++
 5 files changed, 56 insertions(+)
 create mode 100644 configs/platform-v7a/platforms/blspec-rpi4.in
 create mode 100644 projectroot/loader/entries/rpi400.conf
 create mode 100644 projectroot/loader/entries/rpi4b.conf
 create mode 100644 rules/blspec-rpi4.make

diff --git a/configs/platform-v7a/platformconfig b/configs/platform-v7a/platformconfig
index 645e8e801b71..93ed5d93668f 100644
--- a/configs/platform-v7a/platformconfig
+++ b/configs/platform-v7a/platformconfig
@@ -229,6 +229,7 @@ PTXCONF_BLSPEC_NITROGEN6X=y
 PTXCONF_BLSPEC_RIOTBOARD=y
 PTXCONF_BLSPEC_RPI2=y
 PTXCONF_BLSPEC_RPI3=y
+PTXCONF_BLSPEC_RPI4=y
 PTXCONF_BLSPEC_RPICM3=y
 PTXCONF_BLSPEC_SABRELITE=y
 PTXCONF_BLSPEC_SAMA5D27_GIANTBOARD=y
diff --git a/configs/platform-v7a/platforms/blspec-rpi4.in b/configs/platform-v7a/platforms/blspec-rpi4.in
new file mode 100644
index 000000000000..0c0ce14f47bf
--- /dev/null
+++ b/configs/platform-v7a/platforms/blspec-rpi4.in
@@ -0,0 +1,5 @@
+## SECTION=blspec
+
+config BLSPEC_RPI4
+	tristate
+	prompt "/loader/entries/rpi4*.conf bootloader spec entries"
diff --git a/projectroot/loader/entries/rpi400.conf b/projectroot/loader/entries/rpi400.conf
new file mode 100644
index 000000000000..4d212c0b9e71
--- /dev/null
+++ b/projectroot/loader/entries/rpi400.conf
@@ -0,0 +1,6 @@
+title		Raspberry Pi 400 - Pengutronix-DistroKit
+version		4.6
+options		rootwait rw
+linux		/boot/zImage
+devicetree	/boot/bcm2711-rpi-400.dtb
+linux-appendroot true
diff --git a/projectroot/loader/entries/rpi4b.conf b/projectroot/loader/entries/rpi4b.conf
new file mode 100644
index 000000000000..c0fd6f1fa5d8
--- /dev/null
+++ b/projectroot/loader/entries/rpi4b.conf
@@ -0,0 +1,6 @@
+title		Raspberry Pi 4b - Pengutronix-DistroKit
+version		4.6
+options		rootwait rw
+linux		/boot/zImage
+devicetree	/boot/bcm2711-rpi-4-b.dtb
+linux-appendroot true
diff --git a/rules/blspec-rpi4.make b/rules/blspec-rpi4.make
new file mode 100644
index 000000000000..50a5f88ac9cf
--- /dev/null
+++ b/rules/blspec-rpi4.make
@@ -0,0 +1,38 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2022 by Ahmad Fatoum <a.fatoum@pengutronix.de>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_BLSPEC_RPI4) += blspec-rpi4
+
+BLSPEC_RPI4_VERSION	:= 4.6
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/blspec-rpi4.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, blspec-rpi4)
+	@$(call install_fixup,blspec-rpi4,PRIORITY,optional)
+	@$(call install_fixup,blspec-rpi4,SECTION,base)
+	@$(call install_fixup,blspec-rpi4,AUTHOR,"Ahmad Fatoum <a.fatoum@pengutronix.de>")
+	@$(call install_fixup,blspec-rpi4,DESCRIPTION,missing)
+
+	@$(call install_alternative, blspec-rpi4, 0, 0, 0644, \
+		/loader/entries/rpi4b.conf)
+	@$(call install_alternative, blspec-rpi4, 0, 0, 0644, \
+		/loader/entries/rpi400.conf)
+
+	@$(call install_finish,blspec-rpi4)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.30.2




  parent reply	other threads:[~2022-09-30 16:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-30 16:21 [DistroKit] [PATCH 00/10] v7a: add Raspberry Pi 4 32-bit support Ahmad Fatoum
2022-09-30 16:21 ` [DistroKit] [PATCH 01/10] v7a: barebox: version bump v2022.06.0 → v2022.09.0 Ahmad Fatoum
2022-09-30 16:21 ` [DistroKit] [PATCH 02/10] v7a: barebox: switch to new broken-cd device parameter Ahmad Fatoum
2022-09-30 16:21 ` [DistroKit] [PATCH 03/10] v7a: rpi2: move rpi-firmware directory to top-level workspace Ahmad Fatoum
2022-09-30 16:21 ` [DistroKit] [PATCH 04/10] rpi-firmware: Update firmware to v1.20220331 for Rpi4 support Ahmad Fatoum
2022-09-30 16:21 ` [DistroKit] [PATCH 05/10] barebox: deploy new barebox-raspberry-pi.img Ahmad Fatoum
2022-09-30 16:21 ` [DistroKit] [PATCH 06/10] v7a: kernel: configure for 32-bit Raspberry Pi 4 support Ahmad Fatoum
2022-09-30 16:21 ` [DistroKit] [PATCH 07/10] v7a: dts: build Raspberry Pi 4 device trees Ahmad Fatoum
2022-09-30 16:21 ` Ahmad Fatoum [this message]
2022-09-30 16:21 ` [DistroKit] [PATCH 09/10] v7a: rpi4: place DT into /boot for VideoCore consumption Ahmad Fatoum
2022-09-30 16:21 ` [DistroKit] [PATCH 10/10] v7a: barebox: enable of_diff command Ahmad Fatoum
2022-09-30 16:55 ` [DistroKit] [PATCH 00/10] v7a: add Raspberry Pi 4 32-bit 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=20220930162159.814389-9-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=distrokit@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