]> www.infradead.org Git - mtd-www.git/commitdiff
nandsim: tell about the cache_file parameter
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Mon, 30 Nov 2009 16:54:06 +0000 (18:54 +0200)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Mon, 30 Nov 2009 16:54:06 +0000 (18:54 +0200)
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
faq/nand.xml
faq/ubifs.xml

index 907d5b583941749eed87a1c8eabf9c30fd35bf30..d105d63b2eaf5a400f4d33216d4721df00ff4880 100644 (file)
@@ -182,9 +182,9 @@ Yes, you can. The requirements are the same as for boot-loaders
 
 <P>
 NAND simulator (<CODE>nandsim</CODE>) is an extremely useful debugging and
-development tool which simulates NAND flashes in RAM. To select the simulated
-flash type one should specify ID bytes of your flashe - the onese which are
-returned by the "Read ID" command (<CODE>0x90</CODE>) - consult the
+development tool which simulates NAND flashes in RAM or a file. To select the
+simulated flash type one should specify ID bytes of your flashe - the onese
+which are returned by the "Read ID" command (<CODE>0x90</CODE>) - consult the
 flash manual. The following are examples of input parameters:
 </P>
 
@@ -231,6 +231,10 @@ flash manual. The following are examples of input parameters:
 </LI>
 </OL>
 
+<P>If you do not have enough RAM, you can make <CODE>nandsim</CODE> emulate the
+flash on top of a file. Please, use the <CODE>cache_file</CODE> nandsim module
+parameter.</P>
+
 <P><CODE>nandsim</CODE> can emulate various errors and report wear statistics,
 which is extrimely useful when testing how flash software handles errors (e.g.,
 what does JFFS2 do in case of bit-flips or write errors).</P>
index 2bc298cedc16463bf7ed553846bf87103f188eeb..886759e37ceb39d4eb7a4c03aa9f1e13972d7eb5 100644 (file)
@@ -471,13 +471,13 @@ large <code>--max-leb-cnt</code> value to achieve better performance.</p>
 regular files), while UBIFS works on top of UBI devices
 (see <a href="../doc/ubifs.html#L_rednote">here</a>).</p>
 
-<p>However, there is a very hacky way to make UBIFS work with a file-backed
+<p>However, there is an unusual way to make UBIFS work with a file-backed
 image using NAND simulator (see <a href="nand.html#L_nand_nandsim">here</a>).
-Originally <code>nandsim</code> has been created to emulate NAND flashes in
-RAM, but there is a
-<a href="http://lists.infradead.org/pipermail/linux-mtd/2008-May/021810.html">patch</a>
-which teaches <code>nandsim</code> to use a file instead of memory. Try
-something like</p>
+If your image is not very big, then you can create a RAM-backed
+<code>nandsim</code> MTD device, then copy your image to that emulated MTD
+device. If the image is large and you do not have that much RAM, you can create
+a file-backed <code>nandsim</code> MTD device using the <code>cache_file</code>
+<code>nandsim</code> module option. Below is an example:</p>
 
 <pre>
 # Create a 1GiB emulated MTD device backed by regular file "my_image"
@@ -488,10 +488,6 @@ $ modprobe nandsim cache_file=my_image first_id_byte=0xec second_id_byte=0xd3 \
 <p>See <a href="ubifs.html#L_ubifs_nandsim">here</a> for more instructions
 about using UBIFS with nandsim.</p>
 
-<p>But be warned that this patch has not been well tested, it is not in
-mainline yet, and it has been created for development and debugging purposes,
-but not for production use.</p>
-
 
 
 <h2><a name="L_favor_lzo">What is "favor LZO" compression?</a></h2>