[U-Boot] [PATCH v2 3/3] image: Allow images to indicate they're loadable at any address
Wolfgang Denk
wd at denx.de
Tue Nov 8 20:44:33 CET 2011
Dear Stephen Warren,
In message <74CDBE0F657A3D45AFBB94109FB122FF173F9A5424 at HQMAIL01.nvidia.com> you wrote:
>
> > bootm is for uImage format. I see no sense in "extending" it.
>
> bootm already supports two completely different formats; legacy uImage
> and FIT images. To me, it seems logical to simply add support for a third
> image format for the kernel at least. Do you completely disagree with
> this? Well, bootm would need to recognize raw (non-uImage-wrapped) initrd
> and FDT blobs too, since currently bootm expects everything to be
> uImage-wrapped.
Right, once you start this way you will quickly have a mess.
Yes, bootm supports both uImage and FIT format images, which are
considered "U-Boot native" image formats. For other formats we use
different commands - there is "bootelf" for ELF files, or there is
bootvx() to boot VxWorks images.
Given the different set of requirements for zImage it makes more sense
to me to provide a separate command for it. This will also allow for
less #ifdef's for the case you do not want to enable "bootz" support
in the configuration.
> One potential advantage of extending bootz to recognize zImage directly
> would be the re-use of the overall bootm flow and arch functions such as
> arch/arm/lib/bootm.c:do_bootm_linux(). I /think/ that creating a new
I guess this is a typo above, and you mean "extending bootm" ? Well,
imagine how many #ifdef's would be needed to make this "bootz" support
configurable.
> separate bootz command would require duplicating a lot of code and might
> make re-using do_bootm_linux() more complex, although again I'd need to
> look at the code in more detail to say for sure.
Eventually common parts may be factored out.
> 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.
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
It usually takes more than three weeks to prepare a good impromptu
speech. - Mark Twain
More information about the U-Boot
mailing list