Boot from SD if SD-Card is present - Beaglebone Black

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux