[U-Boot] suggested/stealable setups for robustness with switchable partitions?

Robert P. J. Day rpjday at crashcourse.ca
Mon Jul 25 12:42:54 CEST 2016


On Fri, 22 Jul 2016, Wolfgang Denk wrote:

> Dear Robert,
>
> In message <alpine.LFD.2.20.1607221314020.1878 at localhost.localdomain> you wrote:
> >
> >   followup to my earlier post, i'll keep this short as i want to
> > do some research first, but i'm looking for setups where target
> > boards have dual partitions that switch between active and
> > inactive for reliability.
>
> Switching partitions is usually not some isolated feature, but part
> of a software update and reliable fall back configuration.  In
> U-Boot, it is usually found in combination with the boot counter
> feature; in Linux, it usually requires support of a (hardware)
> watchdog.
>
> Once you reached that point, you probably want to look at the
> swupdate [1] project and read it's documentation...
>
> [1] http://git.denx.de/?p=swupdate.git;a=summary

  ironically, i was already digging into swupdate when you mentioned
it, since i saw it was one of stefano's projects so i assumed it would
play nicely with u-boot.

rday

p.s. i also noticed a few boards in u-boot that explicitly work with
"partition sets":

$ grep -r partitionset *
board/siemens/taurus/taurus.c:	char *partitionset_active = NULL;
board/siemens/taurus/taurus.c:	partitionset_active = getenv("partitionset_active");
board/siemens/taurus/taurus.c:	if (partitionset_active) {
board/siemens/taurus/taurus.c:		if (partitionset_active[0] == 'A')
board/siemens/taurus/taurus.c:			setenv("partitionset_active", "B");
board/siemens/taurus/taurus.c:			setenv("partitionset_active", "A");
board/siemens/taurus/taurus.c:		printf("partitionset_active missing.\n");
include/configs/etamin.h:		"setenv ${partitionset_active} true;" \
include/configs/siemens-am33x-common.h:				"setenv ${partitionset_active} true;" \
include/configs/siemens-am33x-common.h:					"setenv partitionset_active B; " \
include/configs/siemens-am33x-common.h:					"setenv partitionset_active A; " \
include/configs/siemens-am33x-common.h:		"echo set ${partitionset_active}...;" \
include/configs/siemens-am33x-common.h:	"partitionset_active=A\0" \
include/configs/siemens-am33x-common.h:		"echo Set partitionset_active variable to 'A' " \
include/configs/siemens-am33x-common.h:		"setenv ${partitionset_active} true;" \
include/configs/siemens-am33x-common.h:		"setenv ${partitionset_active} true;" \
include/configs/taurus.h:	"partitionset_active=A\0"
$

so i'm trying to collect all of this and write it up in one (public)
place, so i can use it for an upcoming embedded linux class.

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================



More information about the U-Boot mailing list