Nandflash and file system, OOB data Literacy ......
Source: Internet
Author: User
The size of each page of NAND Flash is (512 + 16) bytes (there are other formats of nandflash, such as the size of each page (256 + 8), (2048 + 64), etc ), the 512 bytes are the data storage area, and the 16 bytes are called the OOB (Out ofband) area. Usually stores bad block tags in the OOB area, and the ECC verification code of the first 512 bytes.
Cramfs and jffs2 file system image files do not contain OOB content. If you burn them into norflash, it is a simple "tiled" relationship. If you burn them into NAND flash, then, the nandflash Driver First skips the broken Blocks Based on the OOB mark, and then writes a page of data (512 bytes) to calculate the ECC verification code of the 512 bytes, finally, it is written to the OOB area, so that the loop. The size of the cramfs and jffs2 file system image files is usually an integer multiple of 512.
The format of the image files in the yaffs file system is different from those in the following format, the file itself contains OOB data (which contains bad block tags, ECC verification code, and other yaffs-related information ). Therefore, when writing data, you do not need to calculate the ECC value. First, check whether the block is bad (skip), write 512 bytes of data, and finally write 16 bytes of OOB data, this loop. The size of the image file in the yaffs file system is an integer multiple of (512 + 16.
Note: When burning the yaffs file system image, the first available (not bad) block in the partition should also be skipped.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.