From patchwork Wed Apr 4 21:27:06 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [mtd-www] UBI FAQ: suggest omission of vol_size option Date: Wed, 04 Apr 2012 11:27:06 -0000 From: Daniel Drake X-Patchwork-Id: 150808 Message-Id: <20120404212706.970C69D401E@zog.reactivated.net> To: linux-mtd@lists.infradead.org OLPC set vol_size based on the size of the target NAND and found out that it resulted in some systems being unbootable, where such systems had a lot of bad blocks on their flash. For distributors such as OLPC wishing to maximize robustness in the face of varying bad block counts, it makes a lot of sense to avoid the vol_size option and let it be calculated automatically. Document this. Signed-off-by: Daniel Drake --- faq/ubi.xml | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/faq/ubi.xml b/faq/ubi.xml index 7133867..c9f1c57 100644 --- a/faq/ubi.xml +++ b/faq/ubi.xml @@ -299,6 +299,20 @@ actually has to be at least 225MiB in size. Of course it may be larger, in which case the "rootfs" volume will be re-sized and take the rest of the flash space (because of the auto-resize flag).

+

+The implications of the above paragraph are important. The +vol_size option effectively represents the minimum size of the +flash where the volume will be installed. If you are working with multiple +devices (i.e. you are producing an image to be flashed on various devices, +even when 'identical'), the amount of usable flash will vary because +some devices have more bad blocks than others. Excluding the +vol_size option will cause vol_size to be automatically +calculated based on the size of the input image, and this will produce +maximum robustness in the face of varying numbers of bad blocks on target +devices. You can combine this with the autoresize functionality so that the +maximum amount of free space is made available upon first mount. +

+

Also, the config_data.img and rootfs.img input files do not have to be 512KiB and 220MiB respectively, but may be smaller if they contain less data. In this case the resulting ubi.img file