[U-Boot-Users] arm linux images with load address == entry point
ukleinek at informatik.uni-freiburg.de
Thu Mar 15 16:55:50 CET 2007
the make target "uImage" in the linux kernel calls mkimage as follows:
$(MKIMAGE) -A arm -O linux -T kernel \
-C none -a $(ZRELADDR) -e $(ZRELADDR) \
-n 'Linux-$(KERNELRELEASE)' -d $< $@
i.e. sets the load address and the entry point to the same address.
This part is unchanged since it was introduced in 2003.
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 and the latter jumps to 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 +
So I think the linux rule is wrong, or did I miss anything?
The U-Boot I have on my target here has somewhere after the crc check in
do_bootm the following:
hdr->ih_load = htonl(addr);
hdr->ih_ep = htonl(addr + 0x40);
(Actually it's still worse, load_addr instead of addr is used ...)
This works but is ugly.
I wonder how other people using U-Boot + Linux on ARM handle that.
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
 For Linux this is not needed, because the decompressor (at least for
2.6) is position independant. But that's another topic.
More information about the U-Boot