From: Wolfgang Denk Date: Tue, 08 Nov 2011 23:46:58 +0100 Subject: [U-Boot] [PATCH v2 3/3] image: Allow images to indicate they're loadable at any address In-Reply-To: <4EB9ACDF.90702@nvidia.com> References: <1320164902-24190-1-git-send-email-swarren@nvidia.com> <20111108083840.40E5113BE08A@gemini.denx.de> <201111081235.05464.marek.vasut@gmail.com> <20111108115053.3ED0413BE0C1@gemini.denx.de> <74CDBE0F657A3D45AFBB94109FB122FF173F9A5424@HQMAIL01.nvidia.com> <20111108194433.7C9A013BE0C5@gemini.denx.de> <20111108211755.BF30513BE08A@gemini.denx.de> <4EB9ACDF.90702@nvidia.com> Message-ID: <20111108224658.53CFE189301F@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Stephen Warren, In message <4EB9ACDF.90702@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