Notes about linux MTD(Memory Technology Devices)
本文将mark下linux MTD(Memory Technology Devices)的相关notes。
Introduction
In embedded Linux systems, raw flash memory,such as NOR and NAND flash,is accessed using the Memory Technology Device (MTD) subsystem. MTD provides low-level interfaces for reading, erasing, and writing to flash blocks.
Architecture

MTD Layers
The MTD subsystem is organized into three main layers:
- Chip Drivers: Interfaces for specific NOR/NAND flash chips.
- MTD Core: Common APIs and internal logic.
- User-Space Interfaces: Exposes flash as character (/dev/mtdX) or block (/dev/mtdblockX) devices.

MTD character drivers allow us to access the flash memory as an array of bytes so that we can read and write (program) the flash.
The MTD block driver’s purpose is to present flash memory as a block device, which we can use to format and mount a filesystem.
参考资料: