mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Stefan Christ <s.christ@phytec.de>
To: s.hauer@pengutronix.de
Cc: barebox@lists.infradead.org
Subject: [PATCH v2] barebox update: add note after successful update
Date: Fri, 5 Jun 2015 09:51:24 +0200	[thread overview]
Message-ID: <1433490685-27486-1-git-send-email-s.christ@phytec.de> (raw)

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

             reply	other threads:[~2015-06-05  7:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-05  7:51 Stefan Christ [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1433490685-27486-1-git-send-email-s.christ@phytec.de \
    --to=s.christ@phytec.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox