[U-Boot] [PATCH v1 1/3] Make mmc init come before env_relocate

Wolfgang Denk wd at denx.de
Wed Sep 23 14:43:19 CEST 2009


Dear Konrad Mattheis,

In message <F32E8C2599F37641BB4E3F3AC4A3C412016D265C4FE3 at ws> you wrote:
> 
> >I don't like that, and therefore tend to NAK the whole approach.
> 
> I understand why you would like to NAK the approach, but this is not
> only interesting for this type of ARM. And more and more ARM devices
> allow direct boot from SD-Card,... and so everybody ask for that I need
> another storage just for the environment variables. In the production
> you also have to program this storage. So I think you will get
> this question more and more. Or more and more patches that are not
> in the mainline.

I understand the requirements, but I disagree with your conclusions,
and with the implementation.

Booting from some storage device (whatever it may be) is one thing,
but selecting the storage medium for the U-Boot environment is a
different thing.

> For me the question is if where a good way to implement this feature?
> Do you have a good suggestion for solving the problem of initializations
> steps?

Well, there are IMO two fundamental questions:

1) Where do we store the environment?

   Even if you load the U-Boot binary from - say - MMC/SDCard, there
   is most probably also another storage medium available on your
   board which may be easier to use (i. e. available before
   relocation to RAM) and thus more appropriate to use.

   Also, not storing the environment on changable media has the
   affect that it will allow for persistent settings even when you
   change the mdium you boot from. This may or may not be an
   advantage, depending on your requirements. My guess is that it
   would be an advantage in most applications.

2) How do we implement this?

   Assuming you load the U-Boot binary from - say - MMC/SDCard, you
   must already have some code running that can do this. Then why
   should that very same code not be able to load the envrionment from
   the same MMC/SDCard as well? In the worst case you could make it
   one big blob that gets loaded in one go.

   Why do you think we need U-Boot's MMC/SDCard drivers to perform the
   initial load of the environment from the external storage?


Thus I suggest two approaches to solve the problem, which both have
their specific features and advantages, and probably should be not
considered as alternatives, but used in combination, at least
optionally.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
We, the unwilling, led by the unknowing, are doing the impossible for
the ungrateful. We have done so much, for so long, with so little, we
are now qualified to do anything with nothing.


More information about the U-Boot mailing list