
Dear Cunsuo Guo,
In message AANLkTin=D7T-JQB4BFNYiZPT8WbZX5Kjy-fqyabyZRAZ@mail.gmail.com you wrote:
Why try to read from NAND to RAM in the relocation part of start.S, where you would not be able to use C or BSS variables?
Because S3C2410 can _ONLY_ take the first 4KBytes into RAM (Basically some
hidden microcode in the S3C2410 takes care of copying the first 4KB of NAND flash into RAM), so the rest code must be relocated into RAM from NAND by the U-Boot code itself. Of course, there's no C environment set up yet, all job should be done by assembly code.
This is not really different from how NAND booting works on many other boards.
It is definitely not a reason to use assembly only.
Instead, the standard nand_spl approach should be used.
Best regards,
Wolfgang Denk