From mboxrd@z Thu Jan 1 00:00:00 1970
Received: from mail-vx0-f177.google.com ([209.85.220.177])
by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux))
id 1QMvqT-0000xj-IS
for linux-mtd@lists.infradead.org; Thu, 19 May 2011 05:32:26 +0000
Received: by vxd2 with SMTP id 2so2094864vxd.36
for
An alternative to this approach is to enable the "free space fixup" option
+when generating the UBIFS file system using mkfs.ubifs. This will
+allow your flasher to not have to worry about 0xFF bytes at the end
+of PEBs, which is particularly useful if you need to use an industrial flash
+programmer to write a UBI image. More information is available
+here.
0xFF properly (see
+here) or that your UBIFS image
+was generated with the "free space fixup" flag set (see
+here).
Another possibility is that your flash reports that it supports sub-pages, but does not actually support diff --git a/faq/ubifs.xml b/faq/ubifs.xml index f1e063c..6e010b5 100644 --- a/faq/ubifs.xml +++ b/faq/ubifs.xml @@ -20,6 +20,7 @@
ubiformat.
+why you should use ubiformat, or generate your UBIFS images with
+the free space fixup flag if that
+is not possible.
@@ -594,6 +597,35 @@ written once and only once after the erasure. If you use
nandwrite, some pages are written twice - once by
nandwrite, and once by UBIFS.
+If you can not use ubiformat, an alternative is to set the
+"free space fixup" flag when generating the UBIFS image (see
+here).
Because of subtle ECC errors that can arise when programming NAND flash
+(see here), ubiformat
+is the recommended way of flashing a UBI image which contains a UBIFS file
+system. However, this is not always possible - for example, some embedded
+devices are manufactured using an industrial NAND flash programmer which has
+no knowledge of UBI or UBIFS.
The -F option causes mkfs.ubifs to set a special
+flag in the superblock, which triggers a "free space fixup" procedure in the
+kernel the very first time the filesystem is mounted. This fixup procedure
+involves finding all empty pages in the UBIFS file system and re-erasing them.
+This ensures that NAND pages which contain all 0xFF data get
+fully erased, which removes any problematic non-0xFF data from
+their OOB areas.
This option is supported if you are running a kernel version
+2.6.40 or higher. Note that ubiformat is still the
+preferred flashing method if the image is not being flashed for the first time,
+since it preserves existing erase counters (while using nandwrite
+or its equivalent does not).