From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Mon, 11 Dec 2023 11:35:15 +0100 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rCdd4-000KqO-1O for lore@lore.pengutronix.de; Mon, 11 Dec 2023 11:35:15 +0100 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1rCdd4-0006Ta-Qm; Mon, 11 Dec 2023 11:35:14 +0100 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rCdd3-0006T7-OA; Mon, 11 Dec 2023 11:35:13 +0100 Received: from [2a0a:edc0:2:b01:1d::c5] (helo=pty.whiteo.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rCdd3-00F4nR-Bh; Mon, 11 Dec 2023 11:35:13 +0100 Received: from rhi by pty.whiteo.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1rCdd3-00ASJQ-2d; Mon, 11 Dec 2023 11:35:13 +0100 Date: Mon, 11 Dec 2023 11:35:13 +0100 From: Roland Hieber To: Ahmad Fatoum Message-ID: <20231211103513.7lyyryvz2lqopyut@pengutronix.de> References: <20231205095929.3469672-1-a.fatoum@pengutronix.de> <20231205095929.3469672-3-a.fatoum@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20231205095929.3469672-3-a.fatoum@pengutronix.de> Subject: Re: [DistroKit] [PATCH 2/2] v8a: barebox: env: fix boot for i.MX8M EVKs 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: distrokit@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.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false On Tue, Dec 05, 2023 at 10:59:30AM +0100, Ahmad Fatoum wrote: > Rockchip RK35* and i.MX8M* share the same barebox environment, but RAUC > and bootchooser were only configured for the Rockchip boards, rendering > the i.MX boards unbootable. Fix this by adding bootchooser as boot > target only for the radxa,rock3a. > > While at it, we switch to using the new of_compatible command. This is > likey more stable than the Model string and allows easy extension in > future by additional compatibles. Seems very reasonable to me. > Signed-off-by: Ahmad Fatoum Reviewed-by: Roland Hieber > --- > .../platform-v8a/barebox-common-defaultenv/init/bootsource | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/configs/platform-v8a/barebox-common-defaultenv/init/bootsource b/configs/platform-v8a/barebox-common-defaultenv/init/bootsource > index fe63bbbe099b..af47c82c1001 100644 > --- a/configs/platform-v8a/barebox-common-defaultenv/init/bootsource > +++ b/configs/platform-v8a/barebox-common-defaultenv/init/bootsource > @@ -7,10 +7,11 @@ fi > > if [ "$bootsource" = mmc ]; then > detect mmc$bootsource_instance > - global.boot.default="bootchooser net" > + global.boot.default="mmc$bootsource_instance net" > fi > > -if [ "${global.model}" = "Radxa ROCK3 Model A" ]; then > +if of_compatible -k radxa,rock3a; then > + global.boot.default="bootchooser net" > global bootchooser.state_prefix="state.bootstate" > global bootchooser.targets="system0 system1" > global bootchooser.system0.boot="mmc1.root-A" > -- > 2.39.2 > > > -- Roland Hieber, Pengutronix e.K. | r.hieber@pengutronix.de | Steuerwalder Str. 21 | https://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |