* [U-Boot] suggested/stealable setups for robustness with switchable partitions?
@ 2016-07-22 17:18 Robert P. J. Day
2016-07-22 21:47 ` Wolfgang Denk
0 siblings, 1 reply; 5+ messages in thread
From: Robert P. J. Day @ 2016-07-22 17:18 UTC (permalink / raw)
To: u-boot
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.
first, i can see that there are some examples in u-boot already.
there's the taurus board:
http://git.denx.de/?p=u-boot.git;a=blob;f=include/configs/taurus.h;h=882a4e5dbffff4aa59ca87a61548f1e0df224da1;hb=HEAD
http://git.denx.de/?p=u-boot.git;a=blob;f=board/siemens/taurus/taurus.c;h=8da24be56838a23e064055fe3bfbea3eb78fb321;hb=HEAD
etamin:
http://git.denx.de/?p=u-boot.git;a=blob;f=include/configs/etamin.h;h=4919cfe3536462fa3a8d62a90f660d6ff5e0bf14;hb=HEAD
siemens-am33x-common.h:
http://git.denx.de/?p=u-boot.git;a=blob;f=include/configs/siemens-am33x-common.h;h=eab665c2866b66702593bd0feed04f85cdbe872a;hb=HEAD
am335x_shc.h:
http://git.denx.de/?p=u-boot.git;a=blob;f=include/configs/am335x_shc.h;h=f2484cb17020e541c47beb39fcce60943260d045;hb=HEAD
so i'll do some reading before i ask more specific questions. but if
you have pointers to other examples, i'm probably going to write a
wiki page summarizing this so others can check it out.
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] suggested/stealable setups for robustness with switchable partitions?
2016-07-22 17:18 [U-Boot] suggested/stealable setups for robustness with switchable partitions? Robert P. J. Day
@ 2016-07-22 21:47 ` Wolfgang Denk
2016-07-25 10:42 ` Robert P. J. Day
0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Denk @ 2016-07-22 21:47 UTC (permalink / raw)
To: u-boot
Dear Robert,
In message <alpine.LFD.2.20.1607221314020.1878@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
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
"Unix is simple, but it takes a genius to understand the simplicity."
- Dennis Ritchie
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] suggested/stealable setups for robustness with switchable partitions?
2016-07-22 21:47 ` Wolfgang Denk
@ 2016-07-25 10:42 ` Robert P. J. Day
2016-07-25 10:52 ` Stefano Babic
0 siblings, 1 reply; 5+ messages in thread
From: Robert P. J. Day @ 2016-07-25 10:42 UTC (permalink / raw)
To: u-boot
On Fri, 22 Jul 2016, Wolfgang Denk wrote:
> Dear Robert,
>
> In message <alpine.LFD.2.20.1607221314020.1878@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
========================================================================
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] suggested/stealable setups for robustness with switchable partitions?
2016-07-25 10:42 ` Robert P. J. Day
@ 2016-07-25 10:52 ` Stefano Babic
2016-07-25 11:01 ` Robert P. J. Day
0 siblings, 1 reply; 5+ messages in thread
From: Stefano Babic @ 2016-07-25 10:52 UTC (permalink / raw)
To: u-boot
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@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
=====================================================================
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] suggested/stealable setups for robustness with switchable partitions?
2016-07-25 10:52 ` Stefano Babic
@ 2016-07-25 11:01 ` Robert P. J. Day
0 siblings, 0 replies; 5+ messages in thread
From: Robert P. J. Day @ 2016-07-25 11:01 UTC (permalink / raw)
To: u-boot
On Mon, 25 Jul 2016, Stefano Babic wrote:
> Hi Robert,
>
> On 25/07/2016 12:42, Robert P. J. Day wrote:
> > 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"
> > $
oh, i understand that, i was just noting another component that can
come into play if someone *wants* to do it as is being done above,
unless it's overridden at the factory.
a couple more bootlimit/autoboot questions coming later as i try to
pull all this together and finish writing it up, so others don't have
to do as much reading as me. :-)
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-07-25 11:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-22 17:18 [U-Boot] suggested/stealable setups for robustness with switchable partitions? Robert P. J. Day
2016-07-22 21:47 ` Wolfgang Denk
2016-07-25 10:42 ` Robert P. J. Day
2016-07-25 10:52 ` Stefano Babic
2016-07-25 11:01 ` Robert P. J. Day
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.