From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Wed, 13 Jul 2022 10:46:07 +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 1oBY0W-005oh4-2V for lore@lore.pengutronix.de; Wed, 13 Jul 2022 10:46:07 +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 1oBY0U-0005Fp-Bf; Wed, 13 Jul 2022 10:46:06 +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 1oBY0P-0005Ed-Vj; Wed, 13 Jul 2022 10:46:02 +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 1oBY0P-000fwY-9e; Wed, 13 Jul 2022 10:46:01 +0200 Received: from jzi by dude03.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1oBY0O-00E9Af-7Y; Wed, 13 Jul 2022 10:46:00 +0200 From: Johannes Zink To: distrokit@pengutronix.de Date: Wed, 13 Jul 2022 10:45:55 +0200 Message-Id: <20220713084555.3371718-1-j.zink@pengutronix.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [DistroKit] [PATCH] v8a: barebox: add missing defaultenv directory for MMC boot 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: Johannes Zink , Ahmad Fatoum , sha@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 MMC images generated by DistroKit for i.MX8M family of EVK boards did not boot beyond bootloader shell without manual intervention, because there was no environment compiled in telling barebox where to load the kernel from. Add this missing environment, so we can boot directly to userspace shell with DistroKit-generated i.MX8M SD-Card images. Fixes: f1d8cd1 ("Add barebox for i.MX8M boards") Co-developed-by: Ahmad Fatoum Signed-off-by: Ahmad Fatoum Signed-off-by: Johannes Zink --- .../barebox-imx8m-defaultenv/init/bootsource | 11 +++++++++++ .../nv/linux.bootargs.loglevel | 1 + 2 files changed, 12 insertions(+) create mode 100644 configs/platform-v8a/barebox-imx8m-defaultenv/init/bootsource create mode 100644 configs/platform-v8a/barebox-imx8m-defaultenv/nv/linux.bootargs.loglevel diff --git a/configs/platform-v8a/barebox-imx8m-defaultenv/init/bootsource b/configs/platform-v8a/barebox-imx8m-defaultenv/init/bootsource new file mode 100644 index 0000000..0dfb309 --- /dev/null +++ b/configs/platform-v8a/barebox-imx8m-defaultenv/init/bootsource @@ -0,0 +1,11 @@ +#!/bin/sh + +if [ -n "${nv.boot.default}" ]; then + exit +fi + + +if [ "$bootsource" = mmc ]; then + detect mmc$bootsource_instance + global.boot.default="mmc$bootsource_instance net" +fi diff --git a/configs/platform-v8a/barebox-imx8m-defaultenv/nv/linux.bootargs.loglevel b/configs/platform-v8a/barebox-imx8m-defaultenv/nv/linux.bootargs.loglevel new file mode 100644 index 0000000..705752c --- /dev/null +++ b/configs/platform-v8a/barebox-imx8m-defaultenv/nv/linux.bootargs.loglevel @@ -0,0 +1 @@ +loglevel=5 systemd.log_level=warning systemd.show_status=auto -- 2.30.2