mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* Boot from SD if SD-Card is present - Beaglebone Black
@ 2022-05-01 16:18 Konstantin Kletschke
  2022-05-02  6:35 ` Ahmad Fatoum
  0 siblings, 1 reply; 10+ messages in thread
From: Konstantin Kletschke @ 2022-05-01 16:18 UTC (permalink / raw)
  To: barebox

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


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

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

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-01 16:18 Boot from SD if SD-Card is present - Beaglebone Black Konstantin Kletschke
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

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