DistroKit Mailinglist
 help / color / mirror / Atom feed
* [DistroKit] [PATCH] v8a: barebox: add missing defaultenv directory for MMC boot
@ 2022-07-13  8:45 Johannes Zink
  2022-09-05 13:48 ` Robert Schwebel
  0 siblings, 1 reply; 2+ messages in thread
From: Johannes Zink @ 2022-07-13  8:45 UTC (permalink / raw)
  To: distrokit; +Cc: Johannes Zink, Ahmad Fatoum, sha

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




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [DistroKit] [PATCH] v8a: barebox: add missing defaultenv directory for MMC boot
  2022-07-13  8:45 [DistroKit] [PATCH] v8a: barebox: add missing defaultenv directory for MMC boot Johannes Zink
@ 2022-09-05 13:48 ` Robert Schwebel
  0 siblings, 0 replies; 2+ messages in thread
From: Robert Schwebel @ 2022-09-05 13:48 UTC (permalink / raw)
  To: Johannes Zink; +Cc: distrokit, Ahmad Fatoum, sha

On Wed, Jul 13, 2022 at 10:45:55AM +0200, Johannes Zink wrote:
> 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

Applied to next.

rsc
-- 
Pengutronix e.K.                           | Dipl.-Ing. Robert Schwebel  |
Steuerwalder Str. 21                       | https://www.pengutronix.de/ |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-9    |



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-05 13:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-13  8:45 [DistroKit] [PATCH] v8a: barebox: add missing defaultenv directory for MMC boot Johannes Zink
2022-09-05 13:48 ` Robert Schwebel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox