[U-Boot] Booting uncompressed uImages

David Peverley pev at sketchymonkey.com
Wed Jun 15 19:00:32 CEST 2011


Hi all,

I've got an interesting issue with a MIPS board I'm working on. The
uncompressed uImage has been created with a Load Address of 0x80500000
and an Entry Point of 0x80504590. This gets TFTP's into RAM at
0x8055b728. When I run a "bootm 0x8055b728" this image fails to run.
Tracing through the code, I see that in bootm_load_os() it follows the
IH_COMP_NONE path for non XIP images. This should copy the uImage to
the load address so it can be executed.

However, the copy command is :
	memmove_wd ((void *)load, (void *)image_start,
		image_len, CHUNKSZ);

This actually copies the image 'payload' instead of the whole uImage
thereby dropping 64 bytes from the front of the copy and moving the
entry point. (I've verified this by breaking into the process and
looking at the source and destinations of the copy and comparing to an
XIP bootm invocation) I've scratched my head as I'm really surprised
that it behaves this way with a zillion boards out there, BUT from
digging via google it seems that the world and his/her dog nearly
always use the same address for both load address and entry point
which subsequently masks this behaviour in that particular case. I've
verified that if I change to :
	memmove_wd ((void *)load, (void *)blob_start,
		image_len + (blob_end - blob_start), CHUNKSZ);
Then the kernel boot works as I'd expect it to.

Can anyone sanity-check my reasoning here and tell me if this is the
correct fix or if I'm being mislead by something more insidious that
just happens to present itself in this way....?

Cheers!

~Pev


More information about the U-Boot mailing list