<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>
</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>
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"
<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>