# cat /proc/mtd dev: size erasesize name mtd0: 00500000 00001000 "boot" mtd1: 00020000 00001000 "bootenv" mtd2: 00a80000 00001000 "kernel" mtd3: 00060000 00001000 "spare" # mtd_debug --help usage: mtd_debug info <device> mtd_debug read <device> <offset> <len> <dest-filename> mtd_debug write <device> <offset> <len> <source-filename> mtd_debug erase <device> <offset> <len> # mtd_debug info /dev/mtd0 mtd.type = MTD_NORFLASH mtd.flags = MTD_CAP_NORFLASH mtd.size = 5242880 (5M) mtd.erasesize = 4096 (4K) mtd.writesize = 1 mtd.oobsize = 0 regions = 0 # flash_eraseall --help flash_eraseall has been replaced by `flash_erase <mtddev> 0 0`; please use it Usage: flash_erase [options] MTD_DEVICE <start offset> <block count> Erase blocks of the specified MTD device. Specify a count of 0 to erase to end of device. -j, --jffs2 format the device for jffs2 -N, --noskipbad don't skip bad blocks -u, --unlock unlock sectors before erasing -q, --quiet do not display progress messages --silent same as --quiet --help display this help and exit --version output version information and exit # flash_eraseall /dev/mtd0 flash_eraseall has been replaced by `flash_erase <mtddev> 0 0`; please use it Erasing 4 Kibyte @ 0 -- -1 % complete Erasing 4 Kibyte @ 1000 -- -1 % complete Erasing 4 Kibyte @ 2000 -- -1 % complete Erasing 4 Kibyte @ 3000 -- -1 % complete Erasing 4 Kibyte @ 4000 -- -1 % complete ... Erasing 4 Kibyte @ 64004ff000 -- -100 % complete # flashcp /BOOT.BIN /dev/mtd0
(完)