From mboxrd@z Thu Jan 1 00:00:00 1970
Received: from mms2.broadcom.com ([216.31.210.18])
by bombadil.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux))
id 1ORYeX-0005qi-Pp
for linux-mtd@lists.infradead.org; Wed, 23 Jun 2010 22:42:46 +0000
From: "Brian Norris"
| Pin(s) | Function |
| /SE | Spare area Enable |
| R/B | Ready / Busy Output |
As it is neccecary to use the spare area, the /SE (Spare area Enable) pin should +
As it is necessary to use the spare area, the /SE (Spare area Enable) pin should be tied to GND. /CE, CLE and ALE should be GPIO pins or latched signals. It's possible to use address lines for ALE and CLE, but you have to take care about the timing restrictions of the chip !
@@ -103,8 +103,8 @@ of your NAND chip. Data hold time after rising edge of /WE is different to data time after rising edge of chipselect lines!I/O 0-7(15) are connected to the databus D0-D7(D15). The /WP pin can be used for write protection or connected to VCC to enable writes unconditionally. As NAND flash uses -a command driven programming and erasing, an accidential write or erase is not -likely to happen. The Ready / Busy output is not neccecary for operation, +a command driven programming and erasing, an accidental write or erase is not +likely to happen. The Ready / Busy output is not necessary for operation, but it can be tied to a GPIO or an interrupt line.
@@ -115,7 +115,7 @@ likely to happen. The Ready / Busy output is not neccecary for operation,One major problem for using NAND Flash is, that you cannot write as often as you want to a page. The consecutive writes to a page, before erasing it again, are restricted to 1-3 writes, depending on the manufacturers specifications. This applies -similar to the spare area. This makes it neccecary for the filesystem to handle a writebuffer, +similar to the spare area. This makes it necessary for the filesystem to handle a writebuffer, which contains data, that is less than a page
At the moment there are only a few filesystems, which support NAND
There is currently no support for the wide spread SmartMedia DOS-FAT filesystem, mainly because it's not a reliable filesystem for industrial usage. It's ok for multimedia applications. The hardware support layer is designed to support an @@ -156,11 +156,11 @@ area is the storage of the cleanmarker
| Offset | Content | Comment |
| 0x06 | Clean marker byte 0 | This byte indicates that a -block was erased under JFFS2 control. If the page was succesfully erased +block was erased under JFFS2 control. If the page was successfully erased this byte in the first page of a block is programmed to 0x85. In the remaining pages this byte is reserved |
| 0x07 | Clean marker byte 1 | This byte indicates that a -block was erased under JFFS2 control. If the page was succesfully erased this +block was erased under JFFS2 control. If the page was successfully erased this byte in the first page of a block is programmed to 0x19. In the remaining pages this byte is reserved |
| Offset | Content | Comment |
| 0x08 | Clean marker byte 0 | This byte indicates that a -block was erased under JFFS2 control. If the page was succesfully erased +block was erased under JFFS2 control. If the page was successfully erased this byte in the first page of a block is programmed to 0x85. In the remaining pages this byte is reserved |
| 0x09 | Clean marker byte 1 | This byte indicates that a -block was erased under JFFS2 control. If the page was succesfully erased +block was erased under JFFS2 control. If the page was successfully erased this byte in the first page of a block is programmed to 0x19. In the remaining pages this byte is reserved |
| 0x0a | Clean marker byte 2 | This byte indicates that a -block was erased under JFFS2 control. If the page was succesfully erased +block was erased under JFFS2 control. If the page was successfully erased this byte in the first page of a block is programmed to 0x03. In the remaining pages this byte is reserved |
| 0x0b | Clean marker byte 3 | This byte indicates that a -block was erased under JFFS2 control. If the page was succesfully erased +block was erased under JFFS2 control. If the page was successfully erased this byte in the first page of a block is programmed to 0x20. In the remaining pages this byte is reserved |
| 0x0c | Clean marker byte 4 | This byte indicates that a -block was erased under JFFS2 control. If the page was succesfully erased +block was erased under JFFS2 control. If the page was successfully erased this byte in the first page of a block is programmed to 0x08. In the remaining pages this byte is reserved |
| 0x0d | Clean marker byte 5 | This byte indicates that a -block was erased under JFFS2 control. If the page was succesfully erased +block was erased under JFFS2 control. If the page was successfully erased this byte in the first page of a block is programmed to 0x00. In the remaining pages this byte is reserved |
| 0x0e | Clean marker byte 6 | This byte indicates that a -block was erased under JFFS2 control. If the page was succesfully erased +block was erased under JFFS2 control. If the page was successfully erased this byte in the first page of a block is programmed to 0x00. In the remaining pages this byte is reserved |
| 0x0f | Clean marker byte 7 | This byte indicates that a -block was erased under JFFS2 control. If the page was succesfully erased +block was erased under JFFS2 control. If the page was successfully erased this byte in the first page of a block is programmed to 0x00. In the remaining pages this byte is reserved |
| Offset | Content | Comment |
| 0x10 | Clean marker byte 0 | This byte indicates that a -block was erased under JFFS2 control. If the page was succesfully erased +block was erased under JFFS2 control. If the page was successfully erased this byte in the first page of a block is programmed to 0x85. In the remaining pages this byte is reserved |
| 0x11 | Clean marker byte 1 | This byte indicates that a -block was erased under JFFS2 control. If the page was succesfully erased +block was erased under JFFS2 control. If the page was successfully erased this byte in the first page of a block is programmed to 0x19. In the remaining pages this byte is reserved |
| 0x12 | Clean marker byte 2 | This byte indicates that a -block was erased under JFFS2 control. If the page was succesfully erased +block was erased under JFFS2 control. If the page was successfully erased this byte in the first page of a block is programmed to 0x03. In the remaining pages this byte is reserved |
| 0x13 | Clean marker byte 3 | This byte indicates that a -block was erased under JFFS2 control. If the page was succesfully erased +block was erased under JFFS2 control. If the page was successfully erased this byte in the first page of a block is programmed to 0x20. In the remaining pages this byte is reserved |
| 0x14 | Clean marker byte 4 | This byte indicates that a -block was erased under JFFS2 control. If the page was succesfully erased +block was erased under JFFS2 control. If the page was successfully erased this byte in the first page of a block is programmed to 0x08. In the remaining pages this byte is reserved |
| 0x15 | Clean marker byte 5 | This byte indicates that a -block was erased under JFFS2 control. If the page was succesfully erased +block was erased under JFFS2 control. If the page was successfully erased this byte in the first page of a block is programmed to 0x00. In the remaining pages this byte is reserved |
| 0x16 | Clean marker byte 6 | This byte indicates that a -block was erased under JFFS2 control. If the page was succesfully erased +block was erased under JFFS2 control. If the page was successfully erased this byte in the first page of a block is programmed to 0x00. In the remaining pages this byte is reserved |
| 0x17 | Clean marker byte 7 | This byte indicates that a -block was erased under JFFS2 control. If the page was succesfully erased +block was erased under JFFS2 control. If the page was successfully erased this byte in the first page of a block is programmed to 0x00. In the remaining pages this byte is reserved |
the MTD driver just provides a mount point for JFFS2. The generic NAND -driver provides all functions, which are neccecary to identify, read, write -and erase NAND Flash. The hardware dependend functions are provided by -the hardware driver. They provide mainly the hardware access informations and +driver provides all functions, which are necessary to identify, read, write +and erase NAND Flash. The hardware dependent functions are provided by +the hardware driver. They provide mainly the hardware access information and functions for the generic NAND driver. For YAFFS applies the same.
diff --git a/doc/onenand.xml b/doc/onenand.xml index c8fdd6e..e3bf69b 100644 --- a/doc/onenand.xml +++ b/doc/onenand.xml @@ -50,35 +50,35 @@ Nand chips with 2048 byte pagesize and 64 byte OOB size| Offset | Content | Comment |
| 0x02 | Clean marker byte 0 | This byte indicates that a -block was erased under JFFS2 control. If the page was succesfully erased +block was erased under JFFS2 control. If the page was successfully erased this byte in the first page of a block is programmed to 0x85. In the remaining pages this byte is reserved |
| 0x03 | Clean marker byte 1 | This byte indicates that a -block was erased under JFFS2 control. If the page was succesfully erased +block was erased under JFFS2 control. If the page was successfully erased this byte in the first page of a block is programmed to 0x19. In the remaining pages this byte is reserved |
| 0x04 | Clean marker byte 2 | This byte indicates that a -block was erased under JFFS2 control. If the page was succesfully erased +block was erased under JFFS2 control. If the page was successfully erased this byte in the first page of a block is programmed to 0x03. In the remaining pages this byte is reserved |
| 0x0e | Clean marker byte 3 | This byte indicates that a -block was erased under JFFS2 control. If the page was succesfully erased +block was erased under JFFS2 control. If the page was successfully erased this byte in the first page of a block is programmed to 0x20. In the remaining pages this byte is reserved |
| 0x0f | Clean marker byte 4 | This byte indicates that a -block was erased under JFFS2 control. If the page was succesfully erased +block was erased under JFFS2 control. If the page was successfully erased this byte in the first page of a block is programmed to 0x08. In the remaining pages this byte is reserved |
| 0x12 | Clean marker byte 5 | This byte indicates that a -block was erased under JFFS2 control. If the page was succesfully erased +block was erased under JFFS2 control. If the page was successfully erased this byte in the first page of a block is programmed to 0x00. In the remaining pages this byte is reserved |
| 0x13 | Clean marker byte 6 | This byte indicates that a -block was erased under JFFS2 control. If the page was succesfully erased +block was erased under JFFS2 control. If the page was successfully erased this byte in the first page of a block is programmed to 0x00. In the remaining pages this byte is reserved |
| 0x14 | Clean marker byte 7 | This byte indicates that a -block was erased under JFFS2 control. If the page was succesfully erased +block was erased under JFFS2 control. If the page was successfully erased this byte in the first page of a block is programmed to 0x00. In the remaining pages this byte is reserved |
The yaffs2 can run on OneNAND
-If your yaffs2 dosen't work, please check this patch
+If your yaffs2 doesn't work, please check this patch
Here is a short list of the main UBI features:
CRC-32 checksum for this record.Each record descripes one UBI volume and record index in the volume table +
Each record describes one UBI volume and record index in the volume table array corresponds to the volume ID. I.e, UBI volume 0 is described by record 0 in the volume table, and so on. Count of records in the volume table is limited by the LEB size, but cannot be greater than 128. This means that UBI devices @@ -377,7 +377,7 @@ volumes.
When attaching the MTD device, UBI makes sure that the 2 volume table copies -are equivalent. If they are not equevalent, which may be caused by an unclean +are equivalent. If they are not equivalent, which may be caused by an unclean reboot, UBI picks the one from LEB0 and copies it to LEB1 of the layout volume (because it is newer). If one of the volume table copies is corrupted, UBI restores it from the other volume table copy.
@@ -817,7 +817,7 @@ order to build in-RAM EC and EBA tables.The drawbacks of this design are poor scalability and relatively high overhead on NAND flashes (e.g., the overhead is 1.5%-3% of flash space in case of a NAND flash with 2KiB NAND page and 128KiB eraseblock). The advantages are -simple binary format and robustness, as the result of symplicity.
+simple binary format and robustness, as the result of simplicity.Nonetheless, it is always possible to create UBI2 which would maintain the tables in separate flash areas. UBI2 would not be compatible with UBI because @@ -1182,7 +1182,7 @@ function (just above the body of the function).
-Before sending a bug report:
Please, attach all the bug-related messages including the UBI messages from
the kernel ring buffer, which may be collected using the dmesg
utility or using minicom with serial console capturing. Please,
-describe how the problem can be reproduced (if it can be). The bugreport
+describe how the problem can be reproduced (if it can be). The bug report
should be sent to the MTD mailing list. Please,
do not send private e-mails to UBI authors, always CC the mailing
list!
UBIFS supports on-the-flight compression, which means it compresses data -before writing them to the flash media, and de-compresses before reading them, +
UBIFS supports on-the-fly compression, which means it compresses data +before writing them to the flash media, and decompresses before reading them, and this is absolutely transparent to the users. UBIFS compresses only regular files data. Directories, device nodes and so on are not compressed. Meta-data and the indexing information are not compressed as well.
@@ -856,11 +856,11 @@ it will already be in the cache. you should be careful. It is also worth noting that bulk-read feature cannot help on highly fragmented file-systems. Although UBIFS does not fragment file-systems (e.g., the Garbage-Collector does not re-order data nodes), but -UBIFS does not try to de-fragment them. For example, if you write a file +UBIFS does not try to defragment them. For example, if you write a file sequentially, it won't be fragmented. But if you write more than one file at a time, they may become fragmented (well, this also depends on how write-back -flushes the changes), and UBIFS won't automatically de-fragment them. However, -it is possible to implement a background de-fragmentator. It is also possible +flushes the changes), and UBIFS won't automatically defragment them. However, +it is possible to implement a background defragmenter. It is also possible to have per-inode journal head and avoid mixing data nodes belonging to different inodes in the same LEB. So there is room for improvements. @@ -1208,7 +1208,7 @@ at the UBIFS mailing list. -Before sending a bug report, please, try to do the following:
You have to install libraries the tools depend on. Please, find diff --git a/faq/jffs2.xml b/faq/jffs2.xml index 50f525f..1bc8680 100644 --- a/faq/jffs2.xml +++ b/faq/jffs2.xml @@ -19,11 +19,11 @@
@@ -295,7 +295,7 @@ the kernel command line to use it as a root filesystem
-How is ensured, that data is written to flash?
+How do I ensure that data is written to flash?
On NOR FLASH each write goes directly into the FLASH.
@@ -321,14 +321,14 @@ dismounted, the filesystem should be remounted read only on shutdown. In the case of JFFS2 this will cause the garbage collector to flush its write buffers. Failure to do this may cause the filesystem to generate warnings regarding bad CRC. These are partially collected garbage blocks which will be rescheduled -for garbage collection some time later. This kind of behaviour may also be +for garbage collection some time later. This kind of behavior may also be observed after a system crash. -There are several possibilities to do so:
@@ -408,7 +408,7 @@ time. -The mkfs.jffs2 utility requires the ACL and
diff --git a/faq/nand.xml b/faq/nand.xml
index d105d63..a9188c5 100644
--- a/faq/nand.xml
+++ b/faq/nand.xml
@@ -13,12 +13,12 @@
@@ -78,7 +78,7 @@ utilities may be used. If you are going to use this partition with JFFS2, then
it is recommended to use -j or --jffs2 options. This
will write the so called "clean-marker" to the out of band area, so you can
mount the file-system and no further formatting is needed. This is also
-necessary before you copy a FS-image to the chip.
+necessary before you copy a filesystem image to the chip.
@@ -236,10 +236,10 @@ flash on top of a file. Please, use the cache_file nandsim module
parameter.
nandsim can emulate various errors and report wear statistics,
-which is extrimely useful when testing how flash software handles errors (e.g.,
+which is extremely useful when testing how flash software handles errors (e.g.,
what does JFFS2 do in case of bit-flips or write errors).
Note, theoretically nandsim can emulate 16-bit bus witdth
+
Note, theoretically nandsim can emulate 16-bit bus width
devices, but it this may not work.
In the Linux configuration menu, go to "Device Drivers" -> "Memory Technology Devices (MTD)" -> "UBI - Unsorted block images", @@ -50,7 +50,7 @@ kernel or be built as a kernel module.
-Each MTD device has a name and a number, which you may find out by
examining the /proc/mtd file. The preferable way to attach
@@ -112,7 +112,7 @@ numbers.
Use the ubimkvol and ubirmvol
utilities. For example, the below command
@@ -133,7 +133,7 @@ $ ubirmvol /dev/ubi0 -n 0
-
There is an additional driver called gluebi which can emulate
fake MTD devices for each UBI volume and JFFS2 can be used with these emulated
@@ -192,7 +192,7 @@ flashing programs.
Use the ubiformat
@@ -217,7 +217,7 @@ for those who implement a custom UBI flasher.
UBI images may be created using the
ubinize utility. This
@@ -317,7 +317,7 @@ UBI-aware flashing programs should work in
If you run kernel version 2.6.30 or later, the easiest
@@ -347,7 +347,7 @@ there).
Use the ubiformat
@@ -515,7 +515,7 @@ ubi.mtd=0,2048
-
Please, refer this section.
@@ -575,7 +575,7 @@ them properly. -If your NAND flash supports
sub-pages, UBI will use them. But
@@ -625,7 +625,7 @@ avoid using the -s parameter.
Please, read here
@@ -706,7 +706,7 @@ can do about it but without re-designing. Here are some ideas -df reports too few free space?Since UBIFS works on top of UBI, you have to enable UBI first (see here).
@@ -122,7 +122,7 @@ appreciated. -The modern way of mounting UBIFS is mounting UBI volume character device nodes, e.g.:
@@ -196,7 +196,7 @@ UBI volumes. -Creating UBIFS images might be a little trickier than creating JFFS2 images. First of all, you have to understand that UBIFS works on top of UBI which works @@ -549,7 +549,7 @@ in the kernel.
-The first obvious reason is that ubiformat preserves erase
counters, so you do not lose your wear-leveling information when flashing new
@@ -595,7 +595,7 @@ written once and only once after the erasure. If you use
-
The mkfs.ubifs utility requires zlib, lzo and
uuid libraries. The former two are used for compressing the data, and the
@@ -611,7 +611,7 @@ information about other dependencies in the mtd-utils tree.
Changing a file atomically means changing its contents in a way that unclean
reboots could not lead to any corruption or inconsistency in the file. The only
@@ -778,7 +778,7 @@ the df report is changing, you will notice that the amount of free
space continuously grows until reaches its final value. This happens because the
kernel starts writing the dirty data back by time-out (5 sec by default) and
the amount of dirty data goes down, making the df report more
-precize.
If you want to have as precise free space prediction as possible - synchronize the file-system. This not only flushes dirty data to the media, @@ -806,7 +806,7 @@ accurate is free space reporting.
-UBIFS compression may be disabled for whole file system during the image
creation time using the " The same way as with any MTD device. Here is an example of how to load
Unfortunately, at the moment there are no user-space tools which can
-un-wrap UBI and UBIFS images. UBIFS cannot be loop-back mounted as well,
+unwrap UBI and UBIFS images. UBIFS cannot be loop-back mounted as well,
because it does not work with block devices. However, there is a hacky way to un-wrap UBI/UBIFS images. But you have
+ However, there is a hacky way to unwrap UBI/UBIFS images. But you have
to make sure you have UBIFS support in your host machine. UBIFS is a relatively
new file system and is not supported by all Linux distributions. But at least
Fedora 11 does include it. If you use up-to-date UBIFS which includes commit
This error means that you are trying to mount too small UBI volume.
Probably because you flash is too small? Try to use JFFS2 then, becasue it
suits small flashes better since it has much lower space overhead. Indeed,
-UBIFS sotores much more indexing information on the flash media than JFFS2, so
+UBIFS stores much more indexing information on the flash media than JFFS2, so
it has much higher overhead. Also, UBI has some overhead (see
here). Thus, if you have a small flash
device (e.g., about 64MiB), it makes sense to consider using JFFS2.-x none"
-How to use UBIFS with nandsim?
+How do I use UBIFS with nandsim?
nandsim, create an UBI volume and mount it.How to extract files from an UBI/UBIFS image?
+How do I extract files from an UBI/UBIFS image?
How to detect if UBIFS became read-only?
+How do I detect if UBIFS became read-only?
2fde99cb55fb9d9b88180512a5e8a5d939d27fec
@@ -1178,7 +1178,7 @@ I get: "init_constants_early: too few LEBs (12), min. is 17"
If you are using the ancient 2.4 kernel, that's probably -because you're interested in stabliity -- it is old and long-tested +because you're interested in stablity -- it is old and long-tested code. If that's what you want, then you should use the original JFFS2 code which is part of the 2.4 kernel. It's old and slow and doesn't support NAND flash, but it is stable, and is maintained.
-- 1.7.1