I'm trying to "clone" our working (development) NAND flash so I can then program it into multiple boards. My initial idea was to use U-Boot to read the NAND flash contents:
U-Boot# nand read 0x80000000 0 0x4000000
and then write that data to a file on the MMC / SD Card.
"Cloning" then becomes a simple matter of reading the file from the MMC / SD card and writing it to flash:
U-Boot# fatload mmc 0 0x80000000 clone.bin
U-Boot#: nand erase.chip
U-Boot# nand write.i 0x80000000 0 0x4000000
Well, that was the idea. In practice I'm currently stuck on the part where I try to write the NAND flash data to the MMC / SD card. There doesn't appear to be any way to write to the card, that I can see anyway.
Any suggestions on how to do this (or suggestions on alternate ways of achieving the same goal)? Thanks.