摘要 |
Disclosed are a novel storage-based embedded file system and realization method thereof. The system is provided with a serial peripheral interface not-and flash (SPI Nand flash) chip. The method comprises: after initialization of a system, determining that the system supports a SPI Nand flash chip; setting a memory technology device (MTD) layer interface corresponding to processing of a file, wherein the MTD layer interface is configured to be called when the SPI Nand flash chip is accessed; identifying and marking a bad block of the SPI Nand flash chip, and storing a marker of the bad block, wherein the stored bad block marker is configured such that a scheduled check is performed on the marked bad block when a file system accesses the SPI Nand flash chip; performing partition processing on the SPI Nand flash chip according to a preset condition; and during the processing of the file, accessing a designated partition of the SPI Nand flash chip to complete an access operation on the file. |