annotate README-linux @ 401:7d524c984100

Tweak nfs support Fix problem that caused a regression in busybox rm on directories with many files. Limit the feature to only compile with more recent kernels that have all the required features. Signed-off-by: Charles Manning <cdhmanning@gmail.com>
author Charles Manning <cdhmanning@gmail.com>
date Wed, 14 Apr 2010 11:24:26 +1200
parents d0784604eafd
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
169
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
1 Welcome to YAFFS, the first file system developed specifically for NAND flash.
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
2
391
d0784604eafd Fix typo (and check git is working)
Wookey <wookey@wookware.org>
parents: 199
diff changeset
3 It is now YAFFS2 - original YAFFS (YAFFS1) only supports 512-byte page
199
46acc51448c1 Fix minor typo.
colin <colin>
parents: 198
diff changeset
4 NAND and is now deprecated. YAFFS2 supports 512b page in 'YAFFS1
169
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
5 compatibility' mode (CONFIG_YAFFS_YAFFS1) and 2K or larger page NAND
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
6 in YAFFS2 mode (CONFIG_YAFFS_YAFFS2).
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
7
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
8
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
9 A note on licencing
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
10 -------------------
198
b7f785925166 Cleanup patch - Remove all trailing whitespace and fix a few typos.
wookey <wookey>
parents: 169
diff changeset
11 YAFFS is available under the GPL and via alternative licensing
169
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
12 arrangements with Aleph One. If you're using YAFFS as a Linux kernel
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
13 file system then it will be under the GPL. For use in other situations
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
14 you should discuss licensing issues with Aleph One.
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
15
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
16
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
17 Terminology
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
18 -----------
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
19 Page - NAND addressable unit (normally 512b or 2Kbyte size) - can
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
20 be read, written, marked bad. Has associated OOB.
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
21 Block - Eraseable unit. 64 Pages. (128K on 2K NAND, 32K on 512b NAND)
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
22 OOB - 'spare area' of each page for ECC, bad block marked and YAFFS
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
23 tags. 16 bytes per 512b - 64 bytes for 2K page size.
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
24 Chunk - Basic YAFFS addressable unit. Same size as Page.
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
25 Object - YAFFS Object: File, Directory, Link, Device etc.
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
26
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
27 YAFFS design
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
28 ------------
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
29
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
30 YAFFS is a log-structured filesystem. It is designed particularly for
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
31 NAND (as opposed to NOR) flash, to be flash-friendly, robust due to
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
32 journalling, and to have low RAM and boot time overheads. File data is
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
33 stored in 'chunks'. Chunks are the same size as NAND pages. Each page
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
34 is marked with file id and chunk number. These marking 'tags' are
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
35 stored in the OOB (or 'spare') region of the flash. The chunk number
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
36 is determined by dividing the file position by the chunk size. Each
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
37 chunk has a number of valid bytes, which equals the page size for all
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
38 except the last chunk in a file.
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
39
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
40 File 'headers' are stored as the first page in a file, marked as a
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
41 different type to data pages. The same mechanism is used to store
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
42 directories, device files, links etc. The first page describes which
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
43 type of object it is.
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
44
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
45 YAFFS2 never re-writes a page, because the spec of NAND chips does not
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
46 allow it. (YAFFS1 used to mark a block 'deleted' in the OOB). Deletion
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
47 is managed by moving deleted objects to the special, hidden 'unlinked'
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
48 directory. These records are preserved until all the pages containing
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
49 the object have been erased (We know when this happen by keeping a
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
50 count of chunks remaining on the system for each object - when it
198
b7f785925166 Cleanup patch - Remove all trailing whitespace and fix a few typos.
wookey <wookey>
parents: 169
diff changeset
51 reaches zero the object really is gone).
169
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
52
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
53 When data in a file is overwritten, the relevant chunks are replaced
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
54 by writing new pages to flash containing the new data but the same
198
b7f785925166 Cleanup patch - Remove all trailing whitespace and fix a few typos.
wookey <wookey>
parents: 169
diff changeset
55 tags.
169
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
56
198
b7f785925166 Cleanup patch - Remove all trailing whitespace and fix a few typos.
wookey <wookey>
parents: 169
diff changeset
57 Pages are also marked with a short (2 bit) serial number that
b7f785925166 Cleanup patch - Remove all trailing whitespace and fix a few typos.
wookey <wookey>
parents: 169
diff changeset
58 increments each time the page at this position is incremented. The
b7f785925166 Cleanup patch - Remove all trailing whitespace and fix a few typos.
wookey <wookey>
parents: 169
diff changeset
59 reason for this is that if power loss/crash/other act of demonic
b7f785925166 Cleanup patch - Remove all trailing whitespace and fix a few typos.
wookey <wookey>
parents: 169
diff changeset
60 forces happens before the replaced page is marked as discarded, it is
b7f785925166 Cleanup patch - Remove all trailing whitespace and fix a few typos.
wookey <wookey>
parents: 169
diff changeset
61 possible to have two pages with the same tags. The serial number is
169
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
62 used to arbitrate.
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
63
198
b7f785925166 Cleanup patch - Remove all trailing whitespace and fix a few typos.
wookey <wookey>
parents: 169
diff changeset
64 A block containing only discarded pages (termed a dirty block) is an
169
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
65 obvious candidate for garbage collection. Otherwise valid pages can be
198
b7f785925166 Cleanup patch - Remove all trailing whitespace and fix a few typos.
wookey <wookey>
parents: 169
diff changeset
66 copied off a block thus rendering the whole block discarded and ready
b7f785925166 Cleanup patch - Remove all trailing whitespace and fix a few typos.
wookey <wookey>
parents: 169
diff changeset
67 for garbage collection.
b7f785925166 Cleanup patch - Remove all trailing whitespace and fix a few typos.
wookey <wookey>
parents: 169
diff changeset
68
169
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
69 In theory you don't need to hold the file structure in RAM... you
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
70 could just scan the whole flash looking for pages when you need them.
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
71 In practice though you'd want better file access times than that! The
198
b7f785925166 Cleanup patch - Remove all trailing whitespace and fix a few typos.
wookey <wookey>
parents: 169
diff changeset
72 mechanism proposed here is to have a list of __u16 page addresses
169
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
73 associated with each file. Since there are 2^18 pages in a 128MB NAND,
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
74 a __u16 is insufficient to uniquely identify a page but is does
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
75 identify a group of 4 pages - a small enough region to search
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
76 exhaustively. This mechanism is clearly expandable to larger NAND
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
77 devices - within reason. The RAM overhead with this approach is approx
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
78 2 bytes per page - 512kB of RAM for a whole 128MB NAND.
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
79
198
b7f785925166 Cleanup patch - Remove all trailing whitespace and fix a few typos.
wookey <wookey>
parents: 169
diff changeset
80 Boot-time scanning to build the file structure lists only requires
169
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
81 one pass reading NAND. If proper shutdowns happen the current RAM
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
82 summary of the filesystem status is saved to flash, called
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
83 'checkpointing'. This saves re-scanning the flash on startup, and gives
198
b7f785925166 Cleanup patch - Remove all trailing whitespace and fix a few typos.
wookey <wookey>
parents: 169
diff changeset
84 huge boot/mount time savings.
169
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
85
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
86 YAFFS regenerates its state by 'replaying the tape' - i.e. by
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
87 scanning the chunks in their allocation order (i.e. block sequence ID
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
88 order), which is usually different form the media block order. Each
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
89 block is still only read once - starting from the end of the media and
198
b7f785925166 Cleanup patch - Remove all trailing whitespace and fix a few typos.
wookey <wookey>
parents: 169
diff changeset
90 working back.
169
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
91
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
92 YAFFS tags in YAFFS1 mode:
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
93
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
94 18-bit Object ID (2^18 files, i.e. > 260,000 files). File id 0- is not
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
95 valid and indicates a deleted page. File od 0x3ffff is also not valid.
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
96 Synonymous with inode.
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
97 2-bit serial number
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
98 20-bit Chunk ID within file. Limit of 2^20 chunks/pages per file (i.e.
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
99 > 500MB max file size). Chunk ID 0 is the file header for the file.
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
100 10-bit counter of the number of bytes used in the page.
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
101 12 bit ECC on tags
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
102
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
103 YAFFS tags in YAFFS2 mode:
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
104 4 bytes 32-bit chunk ID
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
105 4 bytes 32-bit object ID
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
106 2 bytes Number of data bytes in this chunk
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
107 4 bytes Sequence number for this block
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
108 3 bytes ECC on tags
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
109 12 bytes ECC on data (3 bytes per 256 bytes of data)
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
110
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
111
198
b7f785925166 Cleanup patch - Remove all trailing whitespace and fix a few typos.
wookey <wookey>
parents: 169
diff changeset
112 Page allocation and garbage collection
b7f785925166 Cleanup patch - Remove all trailing whitespace and fix a few typos.
wookey <wookey>
parents: 169
diff changeset
113
b7f785925166 Cleanup patch - Remove all trailing whitespace and fix a few typos.
wookey <wookey>
parents: 169
diff changeset
114 Pages are allocated sequentially from the currently selected block.
b7f785925166 Cleanup patch - Remove all trailing whitespace and fix a few typos.
wookey <wookey>
parents: 169
diff changeset
115 When all the pages in the block are filled, another clean block is
b7f785925166 Cleanup patch - Remove all trailing whitespace and fix a few typos.
wookey <wookey>
parents: 169
diff changeset
116 selected for allocation. At least two or three clean blocks are
b7f785925166 Cleanup patch - Remove all trailing whitespace and fix a few typos.
wookey <wookey>
parents: 169
diff changeset
117 reserved for garbage collection purposes. If there are insufficient
b7f785925166 Cleanup patch - Remove all trailing whitespace and fix a few typos.
wookey <wookey>
parents: 169
diff changeset
118 clean blocks available, then a dirty block ( ie one containing only
169
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
119 discarded pages) is erased to free it up as a clean block. If no dirty
198
b7f785925166 Cleanup patch - Remove all trailing whitespace and fix a few typos.
wookey <wookey>
parents: 169
diff changeset
120 blocks are available, then the dirtiest block is selected for garbage
b7f785925166 Cleanup patch - Remove all trailing whitespace and fix a few typos.
wookey <wookey>
parents: 169
diff changeset
121 collection.
b7f785925166 Cleanup patch - Remove all trailing whitespace and fix a few typos.
wookey <wookey>
parents: 169
diff changeset
122
b7f785925166 Cleanup patch - Remove all trailing whitespace and fix a few typos.
wookey <wookey>
parents: 169
diff changeset
123 Garbage collection is performed by copying the valid data pages into
b7f785925166 Cleanup patch - Remove all trailing whitespace and fix a few typos.
wookey <wookey>
parents: 169
diff changeset
124 new data pages thus rendering all the pages in this block dirty and
b7f785925166 Cleanup patch - Remove all trailing whitespace and fix a few typos.
wookey <wookey>
parents: 169
diff changeset
125 freeing it up for erasure. I also like the idea of selecting a block
169
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
126 at random some small percentage of the time - thus reducing the chance
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
127 of wear differences.
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
128
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
129 YAFFS is single-threaded. Garbage-collection is done as a parasitic
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
130 task of writing data. So each time some data is written, a bit of
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
131 pending garbage collection is done. More pages are garbage-collected
198
b7f785925166 Cleanup patch - Remove all trailing whitespace and fix a few typos.
wookey <wookey>
parents: 169
diff changeset
132 when free space is tight.
169
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
133
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
134
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
135 Flash writing
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
136
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
137 YAFFS only ever writes each page once, complying with the requirements
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
138 of the most restricitve NAND devices.
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
139
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
140 Wear levelling
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
141
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
142 This comes as a side-effect of the block-allocation strategy. Data is
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
143 always written on the next free block, so they are all used equally.
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
144 Blocks containing data that is written but never erased will not get
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
145 back into the free list, so wear is levelled over only blocks which
198
b7f785925166 Cleanup patch - Remove all trailing whitespace and fix a few typos.
wookey <wookey>
parents: 169
diff changeset
146 are free or become free, not blocks which never change.
169
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
147
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
148
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
149
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
150 Some helpful info
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
151 -----------------
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
152
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
153 Formatting a YAFFS device is simply done by erasing it.
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
154
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
155 Making an initial filesystem can be tricky because YAFFS uses the OOB
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
156 and thus the bytes that get written depend on the YAFFS data (tags),
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
157 and the ECC bytes and bad block markers which are dictated by the
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
158 hardware and/or the MTD subsystem. The data layout also depends on the
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
159 device page size (512b or 2K). Because YAFFS is only responsible for
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
160 some of the OOB data, generating a filesystem offline requires
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
161 detailed knowledge of what the other parts (MTD and NAND
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
162 driver/hardware) are going to do.
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
163
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
164 To make a YAFFS filesystem you have 3 options:
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
165
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
166 1) Boot the system with an empty NAND device mounted as YAFFS and copy
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
167 stuff on.
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
168
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
169 2) Make a filesystem image offline, then boot the system and use
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
170 MTDutils to write an image to flash.
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
171
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
172 3) Make a filesystem image offline and use some tool like a bootloader to
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
173 write it to flash.
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
174
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
175 Option 1 avoids a lot of issues because all the parts
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
176 (YAFFS/MTD/hardware) all take care of their own bits and (if you have
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
177 put things together properly) it will 'just work'. YAFFS just needs to
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
178 know how many bytes of the OOB it can use. However sometimes it is not
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
179 practical.
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
180
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
181 Option 2 lets MTD/hardware take care of the ECC so the filesystem
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
182 image just had to know which bytes to use for YAFFS Tags.
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
183
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
184 Option 3 is hardest as the image creator needs to know exactly what
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
185 ECC bytes, endianness and algorithm to use as well as which bytes are
198
b7f785925166 Cleanup patch - Remove all trailing whitespace and fix a few typos.
wookey <wookey>
parents: 169
diff changeset
186 available to YAFFS.
169
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
187
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
188 mkyaffs2image creates an image suitable for option 3 for the
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
189 particular case of yaffs2 on 2K page NAND with default MTD layout.
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
190
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
191 mkyaffsimage creates an equivalent image for 512b page NAND (i.e.
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
192 yaffs1 format).
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
193
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
194 Bootloaders
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
195 -----------
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
196
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
197 A bootloader using YAFFS needs to know how MTD is laying out the OOB
198
b7f785925166 Cleanup patch - Remove all trailing whitespace and fix a few typos.
wookey <wookey>
parents: 169
diff changeset
198 so that it can skip bad blocks.
169
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
199
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
200 YAFFS Tracing
f21ca5a6152e Add updated readme
wookey <wookey>
parents:
diff changeset
201 -------------