Dear Heiko Schocher,
> But there is a possibility to prevent one copy, if TEXT_BASE =
> relocation address = CONFIG_SYS_NAND_U_BOOT_DST
> 
> In this case nand_spl code copies u-boot from nand to
> CONFIG_SYS_NAND_U_BOOT_DST. As this is equal to the relocation address,
> no need to copy code in relocate_code().
> 
> But as codesize changes (and with it relocation address) this
> is not a perfect solution.

Worse: it would certainly crash since the original and relocated memory
areas must not overlap - they sure would with even the slightest size change.

That idea should not be promoted any further.

I would recommend that we add code to check for overlapping relocation into
board.c and print a panic message if an overlap is detected.

Best Regards,
Reinhard
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to