[U-Boot-Users] Multi-file problem
Rick Bronson
rick at efn.org
Wed Oct 22 00:02:47 CEST 2003
Hi,
I found a problem with Mutli-file use of mkimage (using "-T multi")
and fixed in my old u-boot-0.4.0 but my fix seemed to filter through
too many files when I tried to do it (more correctly) on the cvs tree.
Here's the problem (using 21-Oct-03 cvs files):
When this address in cmd_bootm.c:1122 inside print_image_hdr() (is
caculated:
ulong *len_ptr = (ulong *)((ulong)hdr + sizeof(image_header_t));
it points to memory that wasn't copied back on cmd_bootm.c:174:
memmove (&header, (char *)addr, sizeof(image_header_t));
because len_ptr points to the address header[1] and the memmove only
moved header[0]. So I changed line 140 to:
image_header_t header[2]; /* enough room for multi-image's size bytes too */
and all occurances of memmove (&header... from:
memmove (&header, (char *)addr, sizeof(image_header_t));
to:
memmove (&header, (char *)addr, sizeof(header));
But cmd_autoscript.c,common_util.c, armlinux.c uses &header and I'm
not sure if this is the right fix. Maybe someone who knows this
stuff can give me some direction.
Thanks much.
Rick
More information about the U-Boot
mailing list