summaryrefslogtreecommitdiffstats
path: root/platforms/image_ubi.in
diff options
context:
space:
mode:
authorLuotao Fu <l.fu@pengutronix.de>2010-05-31 13:12:25 +0200
committerLuotao Fu <l.fu@pengutronix.de>2010-05-31 15:00:53 +0200
commit0f6d3545be554301717ac51d82fb07cfbfbd63fd (patch)
treee6c69a6b8a1ddc5151010f6765293715677a11bc /platforms/image_ubi.in
parent72aca8e0d0c54493b36f2a3c064d335fcd88a45b (diff)
downloadptxdist-0f6d3545be554301717ac51d82fb07cfbfbd63fd.tar.gz
ptxdist-0f6d3545be554301717ac51d82fb07cfbfbd63fd.tar.xz
[ptxdist] enhance ubi image creation
This one reworks the UBI image relevant stuffs. Creating a root volume is a selectable option, though mandatory, now. Split out the volume specific options from UBI generic options, so that we could add options for further volumes later. Also updated the help text and Add some enhancement to the makefile in printing and macro usage. Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
Diffstat (limited to 'platforms/image_ubi.in')
-rw-r--r--platforms/image_ubi.in68
1 files changed, 56 insertions, 12 deletions
diff --git a/platforms/image_ubi.in b/platforms/image_ubi.in
index f67923503..601051e0a 100644
--- a/platforms/image_ubi.in
+++ b/platforms/image_ubi.in
@@ -3,21 +3,17 @@
menuconfig IMAGE_UBI
bool
select IMAGE_UBIFS
- prompt "Generate images/root.ubi "
+ select IMAGE_UBI_ROOT_VOL
+ prompt "Generate UBI Image "
help
- Build an ubi image of the root filesystem. This image is suitable for
- writing to raw flash devices.
+ Build ubi formated image(s) for the root file system and an
+ optional data partition. UBI is faster and robuster than JFFS2,
+ we recommend strongly the usage of UBI if you want a file
+ system for raw flash devices. The image(s) can be directly
+ written to e.g. an mtd partition on a raw flash devices.
if IMAGE_UBI
-config IMAGE_UBI_VOLUME_SIZE
- string
- prompt "ubi volume size"
- default "<invalid>"
- help
- ptxdist currently creates ubi images with only one volume in it. Specify
- its size here.
-
config IMAGE_UBI_SUB_PAGE_SIZE
string
prompt "Sub page size"
@@ -42,5 +38,53 @@ config IMAGE_UBI_PEB_SIZE
This option is passed to the -p option of ubinize. Gain the
correct value from 'mtdinfo -u' on your target.
-endif
+menuconfig IMAGE_UBI_ROOT_VOL
+ bool
+ select IMAGE_UBIFS_ROOT
+ default y
+ prompt "Create root volume "
+ help
+ Create a root volume with the content of root.ubifs. You will
+ most probably want to activate this option is essential since
+ otherwise the final ubi image will not contain a root file
+ system.
+
+if IMAGE_UBI_ROOT_VOL
+config IMAGE_UBI_ROOT_VOL_SIZE
+ string
+ prompt "root volume size"
+ default "<invalid>"
+ help
+ Give the root volume size here. You can use size unit like
+ "KiB" or "MiB".
+
+ The volume size must be greater than than the actual ubifs
+ file. Further the sum of all volumes in an UBI image should
+ be slightly smaller than the mtd device, to wich the image
+ will be flashed. The spare place is supposed to be used for
+ Jounal and other UBI header informations. We recommend a
+ ratio between spare place and the actual size of the mtd
+ partion at about 10% or higher. It is OK to define a big
+ amount of spare place. The UBI System will scan for available
+ space during first boot and expand the volume to the maximal
+ usable size after reserving internally used blocks.
+
+ An example: Our UBI image is supposed to contain a single "root"
+ volume. The mtd partition, onto which we will flash the UBI
+ image has a size of 32MiB. Our actual rootfs.ubifs has a size
+ of 16MiB. Than we should define our root volume size between
+ 16MiB and 29MiB. We decide for 25MiB. During the boot process
+ the UBI system detects a mtd partiton of 32MiB. After reserving
+ 2MiB for internal use it will expand our volume automatically to
+ 30MiB.
+
+config IMAGE_UBI_ROOT_VOL_NAME
+ string
+ prompt "root volume name"
+ default "root"
+ help
+ Give the root volume name here. Default is "root".
+
+endif
+endif