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

Stephen Warren swarren at nvidia.com
Wed Oct 26 08:37:59 CEST 2011


Simon Glass wrote at Tuesday, October 25, 2011 6:01 PM:
> On Mon, Oct 24, 2011 at 6:59 AM, Stephen Warren <swarren at nvidia.com> wrote:
> > The legacy uImage format includes an absolute load and entry-
> > point address. When presented with a uImage in memory that
> > isn't loaded at the address in the image's load address,
> > U-Boot will relocate the image to its address in the header.
> >
> > Some payloads can actually be loaded and used at any arbitrary
> > address. An example is an ARM Linux kernel zImage file. This
> > is useful when sharing a single zImage across multiple boards
> > with different memory layouts, or U-Boot builds with different
> > ${load_addr} since sharing a single absolute load address may
> > not be possible.
> >
> > With this config option enabled, an image header may contain a
> > load address of -1/0xffffffff. This indicates the image can
> > operate at any load address, and U-Boot will avoid automtically
> > copying it anywhere. In this case, the entry-point field is
> > specified relative to the start of the image payload.
> >
> > Signed-off-by: Stephen Warren <swarren at nvidia.com>
> 
> How do I test this one, please?

When running mkimage, specify -1 or 0xffffffff as the load address, and
0 as the entry point (zImages have code right at the beginning of the
image).

Then, for various arbitrary ${loadaddr}, do e.g.:

ext2load ${devtype} ${devnum}:${rootpart} ${loadaddr} /boot/vmlinux.uimg
bootm ${loadaddr}

It should work for any ${loadaddr} (providing the ext2load doesn't
over-write U-Boot!)

-- 
nvpublic



More information about the U-Boot mailing list