[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 23:46:58 CET 2011


Dear Stephen Warren,

In message <4EB9ACDF.90702 at nvidia.com> you wrote:
>
> > What would happen if we just create a new image type IH_TYPE_ZIMAGE?
> 
> That would cover the kernel uImage case. We'd also need a new image type
> for "use in place" FDTs, since that also gets relocated to the image
> load address before use. I think initrds don't for some reason.

Did you check how PPC handles this?  We usually load the DTB as a
separate file (the plain DTB, not any image) and just pass it's
address to the bootm command.  U-Boot then knows how to handle the DTB
on a specific board.

Why would an image type for DTBs be needed?

> Another advantage of directly recognizing non-uImage-wrapper zImage,
> initrd, and FDT (in either bootm or bootz), is that distros wouldn't
> have to run mkimage ever; they could just dump the kernel in e.g.
> /boot/zImage (plus say /boot/initrd.img and /boot/fdt.bin), and expect
> U-Boot to pick it up and use it without any further processing. This
> would isolate more of the distro kernel install scripts from U-Boot, and
> keep them generic.

I have no real preference for one implementation versus the other. My
gut feeling is that bootm + IH_TYPE_ZIMAGE is much more straightfor-
ward, leaner and easier to implement. But it will add the 64 byte
uImage header which might be a nuisance in some cases. On the other
hand, bootz as to implement all the existing code again for handling
ramdisk/initrd and DTB, basicly identically. And you miss features
you might find useful in some cases - like that uImages have a name,
a timestamp, or a checksum, so you can identify and verify what has
been loaded.

I would go for IH_TYPE_ZIMAGE, but I'm not going to implement it.

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
Men will always be men -- no matter where they are.
	-- Harry Mudd, "Mudd's Women", stardate 1329.8


More information about the U-Boot mailing list