mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Juergen Borleis <jbe@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: envfs: provide an intentional way to ignore an existing external environment
Date: Thu, 31 Jul 2014 09:14:25 +0200	[thread overview]
Message-ID: <20140731071425.GQ6146@pengutronix.de> (raw)
In-Reply-To: <1406715606-6821-1-git-send-email-jbe@pengutronix.de>

Hello,

On Wed, Jul 30, 2014 at 12:20:03PM +0200, Juergen Borleis wrote:
> Some use cases are using the barebox's built-in environment only, but still
> provide an external environment store to save a modified environment (for
> development purposes for example).
> In this case barebox works as intended even if the external store is empty
> and thus invalid. But even if it is an intentional behavior, barebox emits an
> error message due to an invalid content in the external store (CRC error).
> 
> Because this error message will confuse a new user (how to know if this error
> message is important or can be ignored?) and it is a bad style to ship
> intentionally working systems with error messages, the following change set
> adds an "empty environment" feature to barebox.
> 
> This change set adds a new option to the saveenv command which will write an
> empty environment without content. But it will be marked as a placeholder and
> thus should be "ignored" and barebox falls back to its built-in default
> environment.
> 
> With this feature we now get:
> 
>  - if the environment store is empty, we still see an error message and
>    barebox still falls back to its built-in default environment
>  - if the environment store contains the new placeholder environment, there
>    will be no error message but barebox falls back to its built-in default
>    environment as well ("intentional behaviour")
>  - if the environment store contains a regular environment (modified compared
>    to the built-in one) barebox will continue to use it and ignores its
>    built-in default environment instead.

Compared with storing the default environment in the external store the
only difference is that you don't need to modify it if you change the
internal one, right?

I wonder what the targeted use case is. A rescue barebox to repair a
borken bootloader and/or environment? If so I'd implemented a different
solution: To make the rescue barebox completely independant from the
state of the hardware, introduce a config symbol (say NO_AUTOLOAD_ENV)
that makes barebox only use the default environment. With this you could
still explicitly load and save the external env.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

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

  parent reply	other threads:[~2014-07-31  7:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-30 10:20 Juergen Borleis
2014-07-30 10:20 ` [PATCH 1/3] " Juergen Borleis
2014-07-30 10:20 ` [PATCH 2/3] saveenv: change API to be able to forward special flags into the envfs superblock Juergen Borleis
2014-07-30 10:20 ` [PATCH 3/3] saveenv: provide a zeroed/empty/ignore environment Juergen Borleis
2014-07-30 15:28 ` envfs: provide an intentional way to ignore an existing external environment Jan Lübbe
2014-07-30 21:09   ` Sascha Hauer
2014-07-31  7:14 ` Uwe Kleine-König [this message]
2014-07-31  7:33   ` Juergen Borleis
2014-07-31  7:44     ` Uwe Kleine-König
2014-07-31  8:03       ` Juergen Borleis
2014-08-06  3:56       ` Jean-Christophe PLAGNIOL-VILLARD
2014-08-06  7:04       ` Michael Olbrich
2014-08-06  7:28         ` Uwe Kleine-König
2014-08-06 10:41           ` Michael Olbrich

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=20140731071425.GQ6146@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=jbe@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