[U-Boot] [RFC 3/4] env: Create an environment transition method

Maxime Ripard maxime.ripard at free-electrons.com
Tue Oct 31 17:08:44 UTC 2017


Hi Wolfgang,

On Wed, Oct 25, 2017 at 05:26:46PM +0200, Wolfgang Denk wrote:
> Dear Maxime,
> 
> In message <20171025122601.28224-4-maxime.ripard at free-electrons.com> you wrote:
> > The current environment has been hardcoded to an offset that starts to be
> > an issue given the current size of our main U-Boot binary.
> > 
> > Introduce an environment method from storing the environment raw in the MMC
> > to a file in a FAT partition. Eventually, and hopefully before we reach
> > that limit again, we will have most of our users using that setup, and
> > we'll be able to retire the raw environment, and gain more room for the
> > U-Boot binary.
> > 
> > Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>
> > ---
> >  cmd/nvedit.c                   |  1 +
> >  env/Kconfig                    | 12 ++++++---
> >  env/Makefile                   |  1 +
> >  env/sunxi-transition.c         | 59 ++++++++++++++++++++++++++++++++++++++++++
> >  include/configs/sunxi-common.h |  2 +-
> >  include/environment.h          |  1 +
> >  6 files changed, 72 insertions(+), 4 deletions(-)
> >  create mode 100644 env/sunxi-transition.c
> 
> I wonder why you need such a lot of code, and especiallay many
> changes in global files for a feature which is probably of no use to
> anybody else.
> 
> Can the same not be acchieved by a little scripting and clever use of
> "env export", file write, and "env import" commands?

I guess we'd need to compile support for multiple environments in this
case so that we can import from either the old (raw MMC) or the new
one (FS-based), and then save it to either of them.

> Such scripting would have a lot of benefits: no need to touch any
> code (especially not global code), and you don't need a new
> version of U-Boot to "fix" all existing systems.
> 
> I guess I must be missing some key requirement but I can't see it?

One thing I'd really like would be to make it as smooth and without
intervention as possible.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171031/664cd8b8/attachment.sig>


More information about the U-Boot mailing list