Atleast there is a way (albeit slow) to dump the U-Boot environment variables from NAND to file. You can probably use this method to dump the entire NAND or just the sections you are interested in (such as uImage or rootfs) . However, I'm not sure restoring them is a good idea, because really, I have no idea how OOB data works on NAND devices.
Should it be dumped with or without OOB data? Can anyone give a good explaination of what different uses this has?
I installed openocd 0.5 which is available @ http://packages.debian.org/wheezy/openocd
Connect and run server:
openocd -f /usr/share/openocd/scripts/board/sheevaplug.cfg
Then connect with nc:
nc localhost 4444
Dump the NAND environment variables. I used the addresses specified in /usr/share/openocd/scripts/board/sheevaplug.cfg:
target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x000000d3 pc: 0xffff0000
MMU: disabled, D-Cache: disabled, I-Cache: disabled
nand probe 0
NAND flash device 'NAND 512MiB 3.3V 8-bit (Samsung)' found
#0: NAND 512MiB 3.3V 8-bit (Samsung) pagesize: 2048, buswidth: 8,
blocksize: 131072, blocks: 4096
nand dump 0 /tmp/uboot-botech-dev-env.bin 0xa0000 0x40000
dumped 270336 bytes in 1084.018311s (0.244 KiB/s)
As you can see, dumping a 264K file took about 18 minutes. That's close to 2400 baud. I assume this has something to do with OpenOCD communicating over what is virtually a serial line (libftdi). Anyone know how to bump up the speed ?
This way of cloning with OpenOCD would make it very easy to massproduce plugs with OEM software. But also a good way to make backups.