Add a README for the image maker
[yaffs2.git] / direct / test-framework / yaffs2_image_maker / README
1 How to use the image maker
2
3 The purpose of this image maker is to create image files that can be burned into NAND.
4
5 This image maker is set up to create image files for a flash that is:
6 * 2k pages used ad "chunks"
7 * 64 pages per block.
8 * Inband tags
9
10 If those are not the parameters that you require then it is easy enough to modify the tool.
11
12 The image maker takes a sub-directory and copies all the files and directories over to a yaffs NAND simulation.
13 The data from the NAND simulator simulates pages with 2k bytes of data area, then 64 bytes of spare.
14 Since the spare is not used (because inband tags are used), the final step is to copy the data part of each page
15 into the final image file.
16
17
18 The resulting inmage file is a multiple of 2k bytes.
19
20 To program this into a NAND flash:
21
22 1. Erase the NAND flash.
23 2. Put the flash device into ECC mode. The NAND will then write the ECC data into the spare area automatically.
24 3. Starting at the first block to be used for Yaffs:
25    a. Check if the block is good. If it is bad skip over that block.
26    b. For 64 times (ie. each page in the block)
27      i.   Read a 2k byte page of data from the image file.
28      ii.  Write that 2k bytes into the page of flash.
29      iii. Verify if required.
30      iv.  If the write fails, then mark the block as bad and rewrite the data in the next block.
31
32 Note:
33  It is Ok if there are bad blocks. Yaffs is designed to handle bad blocks.
34
35