[U-Boot-Users] arm linux images with load address == entry point

Wolfgang Denk wd at denx.de
Thu Mar 15 21:25:03 CET 2007


In message <20070315155550.GA7760 at lala> you wrote:
> 
> the make target "uImage" in the linux kernel calls mkimage as follows:
...
> i.e. sets the load address and the entry point to the same address.

This may, or may not be ok.

> If I understand do_bootm and do_bootm_linux (for arm, in
> lib_arm/armlinux.c) correctly, the first asserts that the image is
> loaded to the load address[1] and the latter jumps to entry point.

You download the image  to  an  arbitrary  address  which  should  be
sufficiently  out  of  the  way  of  the [load_addr,load_addr+size of
uncompressed kernel] area. The bootm will  (uncompress  &)  copy  the
image to the load_addr, and jumpt to the entry point.

> For an image created with the above rule from the vanilla kernel, that
> means, jump to the header (instead of the actual image at entry point +
> 0x40).

No. The header will not be copied by U-Boot's "bootm" command.

> So I think the linux rule is wrong, or did I miss anything?

Yes. You talk about two addresses, but there are three.

> PS: Linux uses entry point == load address == 0 for PowerPC.  Didn't
> look in the PowerPC version of bootm_linux, but maybe it has the same
> problem?

It works the same in this respect. Note that I write *it works*.

> [1] For Linux this is not needed, because the decompressor (at least for
> 2.6) is position independant.  But that's another topic.

Right - the decompressor  itself  is  not  needed,  as  it's  already
included  in U-Boot. Adding it to the Kernel image just wastes memroy
and time as it makes booting slower.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office:  Kirchenstr. 5,       D-82194 Groebenzell,            Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
When choosing between two evils, I always like to take the  one  I've
never tried before.                     -- Mae West, "Klondike Annie"




More information about the U-Boot mailing list