[U-Boot] suggested/stealable setups for robustness with switchable partitions?
Stefano Babic
sbabic at denx.de
Mon Jul 25 12:52:57 CEST 2016
Hi Robert,
On 25/07/2016 12:42, Robert P. J. Day wrote:
> 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.
>
Yes, of course :-)
> rday
>
> p.s. i also noticed a few boards in u-boot that explicitly work with
> "partition sets":
Do not let be confused by digging the environment into U-Boot. There are
much more boards as you can discover. In fact, you can see the "default"
environment, but on many boards the right environment is loaded in
factory as part of device tests. The default environment, linked with
u-boot, is not so important for many products.
It is also possible that what you are seeing here is not used at all
later, and replaced with some other scripts.
Best regards,
Stefano Babic
>
> $ 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.
>
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
More information about the U-Boot
mailing list