* [U-Boot] u-boot retries with fallback to other images
@ 2015-12-06 4:19 Brendan Simon
2015-12-07 6:23 ` Wolfgang Denk
0 siblings, 1 reply; 4+ messages in thread
From: Brendan Simon @ 2015-12-06 4:19 UTC (permalink / raw)
To: u-boot
Hi,
Is there any documentation or u-boot support for having a list of boot
images to try, starting with the first in the list, trying 1, 2 or 3
times, then trying the next in the list.
e.g. boot kernel at mmcblk0p3, then mmcblk0p2, then mmcblk1p2, then
tftp/nfs last resort fallback ?
or
boot off partition 3 of eMMC, then partition2 of eMMC, then
partition 2 of SD card, then tftp/nfs ?
I've seen some info on google that says this is possible. I'm just
looking for good documentation that can explain how to set it all up.
Thanks,
Brendan.
^ permalink raw reply [flat|nested] 4+ messages in thread* [U-Boot] u-boot retries with fallback to other images 2015-12-06 4:19 [U-Boot] u-boot retries with fallback to other images Brendan Simon @ 2015-12-07 6:23 ` Wolfgang Denk 2015-12-07 10:45 ` Brendan Simon 0 siblings, 1 reply; 4+ messages in thread From: Wolfgang Denk @ 2015-12-07 6:23 UTC (permalink / raw) To: u-boot Dear Brendan, In message <5663B74E.7000204@etrix.com.au> you wrote: > > Is there any documentation or u-boot support for having a list of boot > images to try, starting with the first in the list, trying 1, 2 or 3 > times, then trying the next in the list. > > e.g. boot kernel at mmcblk0p3, then mmcblk0p2, then mmcblk1p2, then > tftp/nfs last resort fallback ? > or > boot off partition 3 of eMMC, then partition2 of eMMC, then > partition 2 of SD card, then tftp/nfs ? Define a set of boot commands, say bootcmd1, bootcmd2, ... and then simply do run bootcmd1; run bootcmd2; ... The furst one that succeeds will not return. Note that the key problem with such a simplistic approach is that it will not help you in case an image looks OK, but hangs during boot - in that case, you need a watchdow and support for the bootcount feature. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "It is better to have tried and failed than to have failed to try, but the result's the same." - Mike Dennison ^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] u-boot retries with fallback to other images 2015-12-07 6:23 ` Wolfgang Denk @ 2015-12-07 10:45 ` Brendan Simon 2015-12-07 17:38 ` Wolfgang Denk 0 siblings, 1 reply; 4+ messages in thread From: Brendan Simon @ 2015-12-07 10:45 UTC (permalink / raw) To: u-boot Hi Wolfgang, On 7/12/2015 5:23 PM, Wolfgang Denk wrote: > Dear Brendan, > > In message <5663B74E.7000204@etrix.com.au> you wrote: >> Is there any documentation or u-boot support for having a list of boot >> images to try, starting with the first in the list, trying 1, 2 or 3 >> times, then trying the next in the list. >> >> e.g. boot kernel at mmcblk0p3, then mmcblk0p2, then mmcblk1p2, then >> tftp/nfs last resort fallback ? >> or >> boot off partition 3 of eMMC, then partition2 of eMMC, then >> partition 2 of SD card, then tftp/nfs ? > Define a set of boot commands, say bootcmd1, bootcmd2, ... > and then simply do > > run bootcmd1; run bootcmd2; ... > > The furst one that succeeds will not return. > > Note that the key problem with such a simplistic approach is that it > will not help you in case an image looks OK, but hangs during boot - > in that case, you need a watchdow and support for the bootcount > feature. > > Best regards, > Wolfgang Denk Yes, the watchdog and bootcount feature is the advanced stuff I'm looking for. I would think this has been implemented numerous times, and I didn't want to reinvent the wheel if there was some commonly used infrastructure to support this. If software does boot, then at some stage would set a u-boot variable to say everything booted ok, so that it can be used again on next boot. My use case is not that uncommon -- lots of embedded devices installed in remote locations that are not easily accessible, but require remote monitor and software updates. Is there anything that is "standard" in u-boot to support this? Or any work that is published that has attempted this? Thanks, Brendan. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] u-boot retries with fallback to other images 2015-12-07 10:45 ` Brendan Simon @ 2015-12-07 17:38 ` Wolfgang Denk 0 siblings, 0 replies; 4+ messages in thread From: Wolfgang Denk @ 2015-12-07 17:38 UTC (permalink / raw) To: u-boot Dear Brendan, In message <5665634E.8050004@etrix.com.au> you wrote: > > > Note that the key problem with such a simplistic approach is that it > > will not help you in case an image looks OK, but hangs during boot - > > in that case, you need a watchdow and support for the bootcount > > feature. ... > Yes, the watchdog and bootcount feature is the advanced stuff I'm > looking for. > I would think this has been implemented numerous times, and I didn't > want to reinvent the wheel if there was some commonly used > infrastructure to support this. Indeed both watchdog support and bootcounter are standard features that are in active use by a number of boards. > My use case is not that uncommon -- lots of embedded devices installed > in remote locations that are not easily accessible, but require remote > monitor and software updates. Indeed - a pretty common requirement. > Is there anything that is "standard" in u-boot to support this? > Or any work that is published that has attempted this? It's all in mainline... Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Committee, n.: A group of men who individually can do nothing but as a group decide that nothing can be done. - Fred Allen ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-12-07 17:38 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-12-06 4:19 [U-Boot] u-boot retries with fallback to other images Brendan Simon 2015-12-07 6:23 ` Wolfgang Denk 2015-12-07 10:45 ` Brendan Simon 2015-12-07 17:38 ` Wolfgang Denk
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox