From 7196ab6c37ce7dcd7c6141b24d5fa8f18c2c858c Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Mon, 30 Nov 2009 18:54:06 +0200 Subject: [PATCH] nandsim: tell about the cache_file parameter Signed-off-by: Artem Bityutskiy --- faq/nand.xml | 10 +++++++--- faq/ubifs.xml | 16 ++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/faq/nand.xml b/faq/nand.xml index 907d5b5..d105d63 100644 --- a/faq/nand.xml +++ b/faq/nand.xml @@ -182,9 +182,9 @@ Yes, you can. The requirements are the same as for boot-loaders

NAND simulator (nandsim) 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 (0x90) - 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 (0x90) - consult the flash manual. The following are examples of input parameters:

@@ -231,6 +231,10 @@ flash manual. The following are examples of input parameters: +

If you do not have enough RAM, you can make nandsim emulate the +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., what does JFFS2 do in case of bit-flips or write errors).

diff --git a/faq/ubifs.xml b/faq/ubifs.xml index 2bc298c..886759e 100644 --- a/faq/ubifs.xml +++ b/faq/ubifs.xml @@ -471,13 +471,13 @@ large --max-leb-cnt value to achieve better performance.

regular files), while UBIFS works on top of UBI devices (see here).

-

However, there is a very hacky way to make UBIFS work with a file-backed +

However, there is an unusual way to make UBIFS work with a file-backed image using NAND simulator (see here). -Originally nandsim has been created to emulate NAND flashes in -RAM, but there is a -patch -which teaches nandsim to use a file instead of memory. Try -something like

+If your image is not very big, then you can create a RAM-backed +nandsim 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 nandsim MTD device using the cache_file +nandsim module option. Below is an example:

 # 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 \
 

See here for more instructions about using UBIFS with nandsim.

-

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.

-

What is "favor LZO" compression?

-- 2.49.0