[U-Boot] [RESEND PATCH 2/3] mx28evk: Add 'nandboot' environment command

Stefano Babic sbabic at denx.de
Mon Oct 28 14:53:47 CET 2013


Hi Otavio,

On 28/10/2013 14:29, Otavio Salvador wrote:
> On Mon, Oct 28, 2013 at 11:21 AM, Wolfgang Denk <wd at denx.de> wrote:
>> Dear Otavio,
>>
>> In message <CAP9ODKpN+PMX1HP+7bEMP7u-Hc44oNc6PEpAn+nbzbQm8cDfrg at mail.gmail.com> you wrote:
>>>
>>>> Indeed. However, why cannot we do the right thing soon ?
>>>
>>> There're no pending patches to address the root problem yet (allowing
>>> changing /internal and default/ environment).
>>
>> Simon's patch set "env: Add support for environment files" does
>> exactly that.
> 
> Doing it without changing source code, directly into the binary?
> 
> From what I read it allows import / export but this is at runtime, I
> need it /before/ booting the board. So currently I need to patch the
> environment files for it.

The way I see with Simon's patch is to define a .env file for each use
case we can have. Because the environment is outside the configuration
file, we could select the right environment when we produce the binary.

Let's say we have two environments, one defined from you and the other
as "debian" environment. We could select the desired environment at
build time by the make command or adding an entry into boards.cfg,
exactly as we do now to select the imximage file with IMX_CONFIG (same
sources, different imximage.cfg).

I understand that even with Simon's patches we will not have a way to
have separate u-boot nad environment binaries, and then merge them
together. However, we have a way to select which environment type
(distro, minimal, ..) at build time.

> 
>>> I will rework the environments as .env files but I don't want to hold
>>> this change until this is accepted.
>>
>> Please be patient, like we all are.  It's better to wait a bit now,
>> then adding work now, and adding more work later to clean up the mess
>> again.
> 
> The work has already been done.
> 
>>> My patch is fine and could go in now as is. Once Simon's patches get
>>> in I will post another series reworking the environment to convert it
>>> to the .env file format but please don't block on this.
>>
>> I agree with Stefano that we should not add more to the already
>> existing amount of env settings but instead wait for a cleaner way.
>> Please be patient - you lose nothing here.
> 
> I really see no point in holding it as the work has been done already;
> it is Stefano call but I disagree with postpone it as work is done and
> being in use.

Another example is maybe not in your "wandboard: add Future Eletronics
7" WVGA LCD extension board". In that patch, you add a lot of stuff
inside CONFIG_EXTRA_ENV, that is perfectly suitable for your needs, but
it is maybe not suitable for someone else who has not a display or maybe
another LCD. But again, it fits then perfectly if we define different
.env files, and it is possible to select one of them at build time.

It is then not exactly as we started, that is having two different
images (u-boot and environemnt) and finding a way to merge them
together, but it is quite close.

> 
> I will comment on Simon's patch to clarify my understanding there.
> 

Fine, I will follow the discussion.

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================


More information about the U-Boot mailing list