[PATCH v2] barebox update: add note after successful update

Stefan Christ s.christ at phytec.de
Fri Jun 5 00:51:24 PDT 2015


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




More information about the barebox mailing list