mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Stefan Christ <s.christ@phytec.de>
To: "Eric Bénard" <eric@eukrea.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v2] barebox update: add note after successful update
Date: Tue, 9 Jun 2015 11:05:11 +0200	[thread overview]
Message-ID: <20150609090511.GA2453@lws-christ> (raw)
In-Reply-To: <20150605095919.35bae12b@e6520eb.localdomain>

Hi Eric,

> maybe loadenv -d; saveenv is less invasive than saveenv -z in order to
> preserve nv ?

Please correct me if I'm wrong. 'loadenv -d' will reset all nv variables which
are already defined in the default environment. Only variables which are not in
the default environment are left as is.

The same holds for all files in /env/. If they don't exist in the default
environment, they won't be overwritten. Right?

Hmm. I would prefer to cleanup the whole environment for the user, so no left
over files may interfere the boot process. That guarantees a consistent state
of the environment, which should work as-is.

What are your thoughts?

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

On Fri, Jun 05, 2015 at 09:59:19AM +0200, Eric Bénard wrote:
> Hi Stefan,
> 
> Le Fri, 5 Jun 2015 09:51:25 +0200,
> Stefan Christ <s.christ@phytec.de> a écrit :
> 
> > Some users of the barebox_update command forget to erase the external
> > barebox environment after updating the barebox. Using an old barebox
> > environment leads to various problems if there were major changes.
> > 
> > So add a gentle reminder after the successful update.
> > 
> > Signed-off-by: Stefan Christ <s.christ@phytec.de>
> > ---
> > v2: Add explanation howto to clean up the environment
> > ---
> >  common/bbu.c | 9 ++++++++-
> >  1 file changed, 8 insertions(+), 1 deletion(-)
> > 
> > diff --git a/common/bbu.c b/common/bbu.c
> > index 7fb154a..d23b864 100644
> > --- a/common/bbu.c
> > +++ b/common/bbu.c
> > @@ -113,8 +113,15 @@ int barebox_update(struct bbu_data *data)
> >  	if (ret == -EINTR)
> >  		printf("update aborted\n");
> >  
> > -	if (!ret)
> > +	if (!ret) {
> >  		printf("update succeeded\n");
> > +		if (IS_ENABLED(CONFIG_ENV_HANDLING)) {
> > +			printf("You maybe want to erase the barebox environment now.\n");
> > +			printf("After booting the flashed barebox you can use\n");
> > +			printf("    $ saveenv -z; loadenv\n");
> > +			printf("to do that.\n");
> > +		}
> > +	}
> 
> maybe loadenv -d; saveenv is less invasive than saveenv -z in order to
> preserve nv ?
> 
> Eric

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

  reply	other threads:[~2015-06-09  9:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-05  7:51 Stefan Christ
2015-06-05  7:51 ` Stefan Christ
2015-06-05  7:59   ` Eric Bénard
2015-06-09  9:05     ` Stefan Christ [this message]
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=20150609090511.GA2453@lws-christ \
    --to=s.christ@phytec.de \
    --cc=barebox@lists.infradead.org \
    --cc=eric@eukrea.com \
    /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