mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Konstantin Kletschke <konstantin.kletschke@inside-m2m.de>
To: barebox@lists.infradead.org
Subject: Boot from SD if SD-Card is present - Beaglebone Black
Date: Sun, 1 May 2022 18:18:48 +0200	[thread overview]
Message-ID: <Ym6y6LXmdC9h3u4n@Hephaistos> (raw)

Hi All,

I have a Beaglebone Black whith internal MMC and external SD-Card
interface.

I boot from internal MMC always. The system itself aways boots from
internal MMC.

Is there a way - may be scriptable in boot entry - to start system from
external SD-Card, if it is present?

Normally I boot this way, bootchooser select system0 or system1:

#!/bin/sh

mount mmc1.1

global.bootm.image=/mnt/mmc1.1/boot/zImage
global.bootm.oftree=/mnt/mmc1.1/boot/am335x-boneblack.dtb
global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"

If I stop autoboot and want to use external SD-Card I manually select
insidem2m_sd as a boot entry:

#!/bin/sh

mount mmc0.1

global.bootm.image=/mnt/mmc0.1/boot/zImage
global.bootm.oftree=/mnt/mmc0.1/boot/am335x-boneblack.dtb
global.linux.bootargs.dyn.root="root=/dev/mmcblk1p2 rootfstype=ext4 rootwait"

Can this be something like:

IF external SD-CARD IS PRESENT bootentry is insidem2m_sd ELSE
bootchooser

?

Please obey if you are inspecting the CMDLINE, in more recent Kernels
the mmcblk0 and mmcblk1 numbering is exchanged.


Kind Regards
Konstantin


-- 
INSIDE M2M GmbH
Konstantin Kletschke
Berenbosteler Straße 76 B
30823 Garbsen

Telefon: +49 (0) 5137 90950136
Mobil: +49 (0) 151 15256238
Fax: +49 (0) 5137 9095010

konstantin.kletschke@inside-m2m.de
http://www.inside-m2m.de 

Geschäftsführung: Michael Emmert, Ingo Haase, Dr. Fred Könemann, Derek Uhlig
HRB: 111204, AG Hannover


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


             reply	other threads:[~2022-05-01 16:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-01 16:18 Konstantin Kletschke [this message]
2022-05-02  6:35 ` Ahmad Fatoum
2022-05-03 14:14   ` Konstantin Kletschke
2022-05-05  7:06     ` Sascha Hauer
2022-05-05  7:24       ` Konstantin Kletschke
2022-05-05  8:25         ` Sascha Hauer
2022-05-05  8:58           ` Konstantin Kletschke
2022-05-05  9:38           ` Konstantin Kletschke
2022-05-06 12:20             ` Ahmad Fatoum
2022-05-09  8:04               ` Konstantin Kletschke

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=Ym6y6LXmdC9h3u4n@Hephaistos \
    --to=konstantin.kletschke@inside-m2m.de \
    --cc=barebox@lists.infradead.org \
    --subject='Re: Boot from SD if SD-Card is present - Beaglebone Black' \
    /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

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