mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v2] barebox update: add note after successful update
@ 2015-06-05  7:51 Stefan Christ
  2015-06-05  7:51 ` Stefan Christ
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Christ @ 2015-06-05  7:51 UTC (permalink / raw)
  To: s.hauer; +Cc: barebox

Hi Sascha,

On Fri, May 29, 2015 at 09:22:50AM +0200, Sascha Hauer wrote:
> > Oh, I didn't know that the "-z" argument exits. Nice.
> > 
> > Ok, but what about the situation when a user boots the barebox from sdcard and
> > uses the barebox_update handler to flash a barebox to NAND. In such case
> > 'saveenv -z' overwrites the environment on the sdcard.
> 
> I still have no good answer to this :/
> 
> I may also happen that the updated barebox comes with a different
> partition layout so that you can't properly erase the environment from
> the currently running barebox. At some point we thought about adding
> some version counter to the environment so that the updated barebox
> could either issue a warning when an outdated environment is detected
> or ignore it completely. This would of course mean we must not forget to
> increase the version when we do an incompatible change.
> 
> Sascha

Here is the second version of the patch. I added some further explanations for
the user, howto cleanup the environment. I think a mostly working advice is to
boot the new barebox, which is flashed by the barebox_update command, and then
to execute

   $ saveenv -z; loadenv

This should restore the default environment in the running barebox and update
the stored environment. Am I correct?

The advice works when the bootsource is different than the flash target and
when the partition layout changes.

Mit freundlichen Grüßen / Kind regards,
        Stefan Christ

Stefan Christ (1):
  barebox update: add note after successful update

 common/bbu.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

-- 
1.9.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-06-18  9:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-05  7:51 [PATCH v2] barebox update: add note after successful update Stefan Christ
2015-06-05  7:51 ` Stefan Christ
2015-06-05  7:59   ` Eric Bénard
2015-06-09  9:05     ` Stefan Christ
2015-06-15 10:20   ` Stefan Christ
2015-06-16 13:52     ` Sascha Hauer
2015-06-18  7:57       ` Stefan Christ
2015-06-18  9:10         ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox