Dumps NAND flash image via U-Boot serial interface.
This is definitely not a hack tool, because it merely uses the U-Boot UART interface already exposed by the vendor.
Use default-features = false when using this as a dependency.
This reads the NAND flash data in a slow but generic manner (command nand dump
or nand read.raw plus md.l), trying to maintain compatibility with different U-Boot versions,
making NAND dump within U-Boot builds without usb and mmc (SD) subsystems possible.
However, the speed of this method is the slowest: about 1.7 KB/s (nand dump without CRC check),
or around 2.3KB/s (nand read.raw and md with CRC check), under baud rate 115,200.
The speed should be much faster if the U-Boot shell is available through an USB virtual serial port.
The dump result can be checked by crc32 command if a start offset of a target RAM space is
given to this utility. The size of this space must be enough for one NAND page with OOB.
Note that this is more reliable; it is also faster than reading with nand dump.
Empty page checking can be enabled if the target RAM region is given; this doubles the size of the used RAM region, speeding up dumping of empty pages.
Quick verifying of a given image is supported; CRC32 values of current page data read from U-Boot can be checked against that image, and only the differences need to be dumped for creating a new image.
Convertion between the data+OOB interleaved dump file (for Linux nanddump or some NAND chip
programmers) and the seperated data dump file plus OOB dump file (for U-Boot operation)
is supported here.
One who implements any of these features may become the owner of this crate:
- Support using
savescommand (if available) to perform faster reads. - Support erasing and programming (reconstruction is required).