From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 30 Sep 2022 18:22:16 +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 1oeImF-001ZFR-Vl for lore@lore.pengutronix.de; Fri, 30 Sep 2022 18:22:15 +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 1oeImD-0006OL-T0; Fri, 30 Sep 2022 18:22:13 +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 1oeImA-0006GO-J1; Fri, 30 Sep 2022 18:22:10 +0200 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1oeImB-003pqc-Dq; Fri, 30 Sep 2022 18:22:09 +0200 Received: from afa by dude04.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1oeIm8-003SIs-MX; Fri, 30 Sep 2022 18:22:08 +0200 From: Ahmad Fatoum To: distrokit@pengutronix.de Date: Fri, 30 Sep 2022 18:21:54 +0200 Message-Id: <20220930162159.814389-6-a.fatoum@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220930162159.814389-1-a.fatoum@pengutronix.de> References: <20220930162159.814389-1-a.fatoum@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [DistroKit] [PATCH 05/10] barebox: deploy new barebox-raspberry-pi.img 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: Ahmad Fatoum 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 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 --- 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