[U-Boot] [PATCH v2 3/3] image: Allow images to indicate they're loadable at any address

Wolfgang Denk
2011-11-08T21:17:55Z

Dear Stephen,

In message <20111108194433.7C9A013BE0C5@gemini.denx.de> I wrote:
>
> > Are you willing to entertain extending bootm to recognize a third image
> > format if this makes the patches less invasive, and/or leads to more
> > maintainable code?
>
> I have to admit that I don't like the idea, but I will not argue over
> hard facts. But please keep in mind that bootz support shall be a
> configuration option, that can be selected or omittet at build time.
> My feeling is that this would require quite a number of new #ifdef's
> if you try to add it into the existing code.

Thinking about this again I wonder if this is really what is needed.
Why do we need a third image format?

What would happen if we just create a new image type IH_TYPE_ZIMAGE?

Then you can use plain "bootm", and probably most of the existing
code. A few tests may need to be extended by some "|| (type ==
IH_TYPE_ZIMAGE)", and in the end you can just skip the parts that deal
with loading and starting.

For the sake of consistency, such images should be built with
IH_COMP_NONE, then.

What do you think?

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
"There are three principal ways to lose money: wine, women, and en-
gineers. While the first two are more pleasant, the third is by far
the more certain." -- Baron Rothschild, ca. 1800