DistroKit Mailinglist
 help / color / mirror / Atom feed
From: Johannes Zink <j.zink@pengutronix.de>
To: distrokit@pengutronix.de
Cc: Johannes Zink <j.zink@pengutronix.de>,
	Ahmad Fatoum <a.fatoum@pengutronix.de>,
	sha@pengutronix.de
Subject: [DistroKit] [PATCH] v8a: barebox: add missing defaultenv directory for MMC boot
Date: Wed, 13 Jul 2022 10:45:55 +0200	[thread overview]
Message-ID: <20220713084555.3371718-1-j.zink@pengutronix.de> (raw)

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 <a.fatoum@pengutronix.de>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Johannes Zink <j.zink@pengutronix.de>
---
 .../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




             reply	other threads:[~2022-07-13  8:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-13  8:45 Johannes Zink [this message]
2022-09-05 13:48 ` 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=20220713084555.3371718-1-j.zink@pengutronix.de \
    --to=j.zink@pengutronix.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=distrokit@pengutronix.de \
    --cc=sha@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