From: Wolfgang Denk Date: Thu, 10 Nov 2011 12:59:03 +0100 Subject: [U-Boot] [PATCH 1/2] image: Implement IH_TYPE_KERNEL_ANYLOAD In-Reply-To: <1320860840-6347-1-git-send-email-swarren@nvidia.com> References: <1320860840-6347-1-git-send-email-swarren@nvidia.com> Message-ID: <20111110115903.F01EC13BE0E2@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 <1320860840-6347-1-git-send-email-swarren@nvidia.com> you wrote: > The legacy uImage format includes an absolute load and entry-point > address. When bootm operates on a kernel uImage in memory that isn't > loaded at the address in the image's load address, U-Boot will copy > the image to its address in the header. > > Some kernel images can actually be loaded and used at any arbitrary > address. An example is an ARM Linux kernel zImage file. To represent You write: an example is... Are there other Linux kernel image types in addition to zImage that have this property? > this capability, IH_TYPE_KERNEL_ANYLOAD is implemented, which operates I don't like this name. "ANYLOAD" doesn't really make sense to me; I would interpet this as "U-Boot is free to load the image to any address it likes" - which is not what I think you mean. I guess "IH_TYPE_KERNEL_NOLOAD" would better mach what the code is supposed to do. But then, I'd like "IH_TYPE_ZIMAGE" even better - assuming of course that only zImages are used here. Are we sure about this? > + if (images.os.type == IH_TYPE_KERNEL_ANYLOAD) { > + images.os.load = images.os.image_start; > + images.ep += images.os.load; > + } I'm not sure if we give up flexibility here without need. Suggestion: IH_TYPE_KERNEL_NOLOAD images should read the entry point address from the image header, and interpret it as an offset relative to the image_start. This adds basicly no code size, an no effort if you don't want to use it (when running mkimage you will probably always use "-a 0 -e 0" anyway), but in case you ever need a different EP you have it, more or less for free. > + { IH_TYPE_KERNEL_ANYLOAD, "kernel_anyload", "Kernel Image (any load address)", }, ...IH_TYPE_KERNEL_NOLOAD ..."Kernel Image (no loading done)" ? 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 I'm a programmer: I don't buy software, I write it. -- Tom Christiansen