Hi Heiko,

On 08/24/2012 12:17 PM, Heiko Schocher wrote:
>> BTW: There also seems to be a bug in some of the SPL loaders:
>>
>> For example in drivers/mtd/nand/nand_spl_load.c:
>>
>>              ...
>>              if (header->ih_os == IH_OS_LINUX) {
>>                      /* happy - was a linux */
>>                      nand_spl_load_image(CONFIG_SYS_NAND_SPL_KERNEL_OFFS,
>>                              spl_image.size, (void *)spl_image.load_addr);
>>
>> The problem here is that the last 64 bytes of the image are not
>> copied to SDRAM. Since the header is copied which is not included
>> in the spl_image.size variable.

Okay. I just noticed that it's not a bug. spl_image.size is set to
header->ih_size + header_size. So 64 is added and the complete payload
is copied.

I still would like to move to my suggestion to not copy the header and
use the mkimage header values ih_load and ih_ep directly. Right now I
don't see any showstopper for doing it this way. I'll send a patch to
change this shortly (if everything works out).

Stay tuned...

Thanks,
Stefan

--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: off...@denx.de
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to