References and materials:
“Uboot sf command usage” kickxxx
When running the development board, it prompts the following alarm:
cp: can't stat '/progs/rec/*': No such file or directory
/dev/mtdblock5
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000010: 0xdde4 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000014: 0x9a31 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000018: 0x2648 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000001c: 0xb317 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000020: 0xe2ae instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000024: 0x36f7 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000028: 0xe9f5 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000002c: 0xecb9 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000030: 0xc0b5 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000034: 0x5339 instead
jffs2: Further such events for this erase block will not be printed
………… ………… …………
………… ………… …………
………… ………… …………
jffs2: Empty flash at 0x00072000 ends at 0x00072010
jffs2: Empty flash at 0x00074000 ends at 0x00074004
jffs2: Empty flash at 0x00074008 ends at 0x00074010
jffs2: Empty flash at 0x00076000 ends at 0x00076010
jffs2: Empty flash at 0x00078000 ends at 0x0007800c
jffs2: Empty flash at 0x0007a000 ends at 0x0007a010
jffs2: Empty flash at 0x0007c000 ends at 0x0007c010
jffs2: Empty flash at 0x0007e000 ends at 0x0007e010
jffs2: Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
jffs2: empty_blocks 0, bad_blocks 0, c->nr_blocks 8
mount: mounting /dev/mtdblock5 on /etc/conf.d/ failed: Input/output error
/home/bashrc.sh: line 38: can't create /proc/sys/vm/extra_free_kbytes: nonexistent directory
probe 0x0;
SF probe 0x0; sf erase 0x780000 0x800000
SF read erase
read erase
SF read erase
SF read erase
SF read>se
SF read erase>r> SF write erase
SF read erase
SF read erase
SF read erase
SF read erase
SF write
command th> | explain th> | use example th> | meaning th> tr> |
---|---|---|---|
sf, the probe [[bus:] cs] [hz] [mode] td> | init flash device on given SPI bus and chip Select td> | td> | td> tr> |
td> | td> | td> | td> tr> |
sf, read addr offset len td> | read 'len bytes starting at "offset" to the memory at "addr" td> | sf, read 0x82000000 0x10000 0x20000 | ash offset 0x10000(64KB), length 0x20000(128KB), 0x82000000 Offset and length minimum unit operation is Byte td> tr> |
td> | td> | td> | td> tr> |
sf, write addr offset len td> | write 'len bytes from memor at' addr to flash at "offset" td> | 0 x82000000 sf, write 0x0 0x20000 TD> | 8200 0000 bytes, 0x0 bytes, 0x20000 bytes, 0x0 bytes, 0x0 bytes, 0x0 bytes, 0x0 bytes Offset and length minimum unit operation is Byte td> tr> |
td> | td> | td> | td> tr> |
sf, erase offset [+] len td> | erase 'len bytes from' offset '+' len 'round up' len 'to block size td> | sf, erase 0 x0 0x10000 | ase block at offset 0x0 to 0x10000 Erase block at offset 0x0 Offset and len parameters must be erase block aligned td> tr> |
td> | td> | td> | td> tr> |
sf, update addr offset len td> | erase and write 'len bytes from the memory at "addr" to flash the at "Offset" td> | td> | td> tr> tbody> table> From the SF command, we can see several points: p> Support Byte level read and write operation, support random access. |