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 05/10] barebox: deploy new barebox-raspberry-pi.img
Date: Fri, 30 Sep 2022 18:21:54 +0200	[thread overview]
Message-ID: <20220930162159.814389-6-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20220930162159.814389-1-a.fatoum@pengutronix.de>

The generic barebox-dt-2nd.img mimics Linux and allows booting barebox
with an external device tree as if it were a kernel. We employ this for
using the same image for Rpi 2 and 3 by placing barebox device trees
into the FAT boot partition and having the VideoCore pass the correct
device tree to barebox.

While this works, it means the VideoCore won't patch the kernel device
tree, but many users depend on the VideoCore to apply overlays for
kernel consumption. While this could be done in barebox instead, it
doesn't have the familiar config.txt interface and it doesn't cover some
of the more obscure magic the videocore does: e.g. when applying an
overlay configuring the USBOTG, the VideCore will reconfigure clocks as
a side effect of applying the overlay.

For this reason, barebox now also has a barebox-raspberry-pi.img that
behaves the same as barebox-dt-2nd.img with the difference that it has
the multiple device trees built-in. It's already being generated since
updating to the new release, so let's make use of this.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 configs/platform-v7a/config/images/rpi2.config | 7 +------
 configs/platform-v7a/rules/barebox-rpi2.make   | 4 ++--
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/configs/platform-v7a/config/images/rpi2.config b/configs/platform-v7a/config/images/rpi2.config
index 08329ff34dc8..08bb33b125a5 100644
--- a/configs/platform-v7a/config/images/rpi2.config
+++ b/configs/platform-v7a/config/images/rpi2.config
@@ -1,12 +1,7 @@
 image rpi2-boot.vfat {
 	vfat {
 		files = { @FIRMWARE_RPI2@ }
-		file barebox.img { image = barebox-dt-2nd-rpi.img }
- 		file bcm2836-rpi-2-b.dtb { image = barebox-bcm2836-rpi-2.dtb }
- 		file bcm2837-rpi-3-b.dtb { image = barebox-bcm2837-rpi-3.dtb }
- 		file bcm2837-rpi-3-a-plus.dtb { image = barebox-bcm2837-rpi-3.dtb }
- 		file bcm2837-rpi-3-b-plus.dtb { image = barebox-bcm2837-rpi-3.dtb }
- 		file bcm2837-rpi-cm3-io3.dtb { image = barebox-bcm2837-rpi-cm3.dtb }
+		file barebox.img { image = barebox-raspberry-pi.img }
 	}
 	size = 32M
 }
diff --git a/configs/platform-v7a/rules/barebox-rpi2.make b/configs/platform-v7a/rules/barebox-rpi2.make
index f1dff400a624..ec2f5212a71d 100644
--- a/configs/platform-v7a/rules/barebox-rpi2.make
+++ b/configs/platform-v7a/rules/barebox-rpi2.make
@@ -84,8 +84,8 @@ $(STATEDIR)/barebox-rpi2.targetinstall:
 	@$(foreach dtb, $(wildcard $(BAREBOX_RPI2_DTB_DIR)/*.dtb), \
 		install -m 644 \
 			$(dtb) $(IMAGEDIR)/barebox-$(notdir $(dtb))$(ptx/nl))
-	@install -m 644 $(BAREBOX_RPI2_BUILD_DIR)/images/barebox-dt-2nd.img \
-			$(IMAGEDIR)/barebox-dt-2nd-rpi.img
+	@install -m 644 $(BAREBOX_RPI2_BUILD_DIR)/images/barebox-raspberry-pi.img \
+			$(IMAGEDIR)/barebox-raspberry-pi.img
 	@$(call touch)
 
 # ----------------------------------------------------------------------------
-- 
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 ` Ahmad Fatoum [this message]
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 ` [DistroKit] [PATCH 08/10] v7a: rpi4: add boot loader spec support Ahmad Fatoum
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-6-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