June 2017
Intermediate to advanced
478 pages
13h 14m
English
The character devices are the most important: they allow you to access the underlying flash memory as an array of bytes so that you can read and write (program) the flash. It also implements a number of ioctl functions that allow you to erase blocks and to manage the OOB area on NAND chips. The following list is taken from include/uapi/mtd/mtd-abi.h:
| IOCTL | Description |
| MEMGETINFO |
Gets basic MTD characteristic information |
| MEMERASE | Erases blocks in the MTD partition |
| MEMWRITEOOB | Writes out-of-band data for the page |
| MEMREADOOB | Reads out-of-band data for the page |
| MEMLOCK | Locks the chip (if supported) |
| MEMUNLOCK | Unlocks the chip (if supported) |
| MEMGETREGIONCOUNT | Gets the number of erase regions: non-zero ... |
Read now
Unlock full access