ubinize.8 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. .TH UBINIZE 8 "September 2016" "mtd-utils"
  2. .SH NAME
  3. ubinize \- a tool for generating UBI images
  4. .SH SYNOPSIS
  5. .B ubinize
  6. [-o filename] [-p <bytes>] [-m <bytes>] [-s <bytes>] [-O <num>] [-e <num>]
  7. [-x <num>] [-Q <num>] [-v] [-h] [-V] [--output=<filename>] [--peb-size=<bytes>]
  8. [--min-io-size=<bytes>] [--sub-page-size=<bytes>] [--vid-hdr-offset=<num>]
  9. [--erase-counter=<num>] [--ubi-ver=<num>] [--image-seq=<num>] [--verbose]
  10. [--help] [--version] ini-file
  11. .SH DESCRIPTION
  12. An UBI image may contain one or more UBI volumes which have to be defined in
  13. the input configuration ini-file. The ini file defines all the UBI volumes \-
  14. their characteristics and the contents, but it does not define the
  15. characteristics of the flash the UBI image is generated for. Instead, the
  16. flash characteristics are defined via the command-line options. Note, if not
  17. sure about some of the command-line parameters, do not specify them and let
  18. the utility use default values.
  19. .SH OPTIONS
  20. .TP
  21. .BR \-o , " \-\-output=\fIfile\fP"
  22. Specify output file
  23. .TP
  24. .BR \-p , " \-\-peb\-size=\fIbytes\fP"
  25. Size of the physical eraseblock of the flash this UBI image is created for
  26. in bytes, kilobytes (KiB), or megabytes (MiB). This parameter is mandatory.
  27. .TP
  28. .BR \-m , " \-\-min\-io-size=\fIbytes\fP"
  29. Minimum input/output unit size of the flash in bytes
  30. .TP
  31. .BR \-s , " \-\-sub\-page\-size=\fIbytes\fP"
  32. Minimum input/output unit used for UBI headers, e.g. sub-page size in case
  33. of NAND flash (equivalent to the minimum input/output unit size by default).
  34. .TP
  35. .BR \-O , " \-\-vid\-hdr\-offset=\fInum\fP"
  36. Offset if the VID header from start of the physical eraseblock (default is the
  37. next minimum I/O unit or sub-page after the EC header)
  38. .TP
  39. .BR \-e , " \-\-erase\-counter=\fInum\fP"
  40. The erase counter value to put to EC headers (default is 0).
  41. .TP
  42. .BR \-x , " \-\-ubi\-ver=\fInum\fP"
  43. UBI version number to put to EC headers (default is 1).
  44. .TP
  45. .BR \-Q , " \-\-image\-seq=\fInum\fP"
  46. 32-bit UBI image sequence number to use (by default a random number is picked).
  47. .TP
  48. .BR \-v , " \-\-verbose"
  49. Be verbose.
  50. .TP
  51. .BR \-h , " \-\-help"
  52. Print a help message and exit.
  53. .TP
  54. .BR \-V , " \-\-version"
  55. Print program version and exit.
  56. .SH EXAMPLE
  57. ubinize -o ubi.img -p 16KiB -m 512 -s 256 cfg.ini
  58. Create UBI image \fIubi.img\fP as described by configuration file
  59. \fIcfg.ini\fP.
  60. A physical erase block on the flash is \fI16KiB\fP in size and has \fI512\fP
  61. byte pages with \fI256\fP byte sub-pages.
  62. .SH INI-FILE FORMAT
  63. The input configuration ini-file describes all the volumes which have to
  64. be included to the output UBI image. Each volume is described in its own
  65. section which may be named arbitrarily. The section consists on
  66. "key=value" pairs, for example:
  67. .PP
  68. .in +4n
  69. .nf
  70. [jffs2\-volume]
  71. mode=ubi
  72. image=../jffs2.img
  73. vol_id=1
  74. vol_size=30MiB
  75. vol_type=dynamic
  76. vol_name=jffs2_volume
  77. vol_flags=autoresize
  78. vol_alignment=1
  79. .fi
  80. .in
  81. This example configuration file tells the utility to create an UBI image
  82. with one volume with ID 1, volume size 30MiB, the volume is dynamic, has
  83. name \fIjffs2_volume\fP, \fIautoresize\fP volume flag, and alignment 1.
  84. The \fBimage=../jffs2.img\fP line tells the utility to take the contents of
  85. the volume from the \fB../jffs2.img\fP file. The size of the image file has
  86. to be less or equivalent to the volume size (30MiB).
  87. The \fBmode=ubi\fP line is mandatory and just tells that the section describes
  88. an UBI volume \- other section modes may be added in the future.
  89. Notes:
  90. .IP \[bu] 4
  91. Size in vol_size might be specified kilobytes (KiB), megabytes (MiB),
  92. gigabytes (GiB) or bytes (no modifier).
  93. .IP \[bu]
  94. If "vol_size" key is absent, the volume size is assumed to be
  95. equivalent to the size of the image file (defined by "image" key).
  96. .IP \[bu]
  97. If the "image" is absent, the volume is assumed to be empty
  98. .IP \[bu]
  99. Volume alignment must not be greater than the logical eraseblock size.
  100. .IP \[bu]
  101. One ini file may contain arbitrary number of sections, the utility will
  102. put all the volumes which are described by these section to the output
  103. UBI image file.
  104. .SH AUTHORS
  105. .nf
  106. Man page written by David Oberhollenzer, based on the help text of
  107. the ubinize utility written by Artem Bityutskiy and Oliver Lohmann.
  108. .fi
  109. .SH REPORTING BUGS
  110. Report mtd-utils bugs to the Linux mtd mailing list.
  111. .TP
  112. Linux mtd mailing list: <linux-mtd@lists.infradead.org>
  113. .TP
  114. Linux mtd home page: <http://www.linux-mtd.infradead.org/>
  115. .SH AVAILABILITY
  116. The ubinize command is part of the mtd-utils package and is available from
  117. ftp://ftp.infradead.org/pub/mtd-utils/.
  118. .SH COPYRIGHT
  119. Copyright \(co International Business Machines Corp., 2006
  120. .br
  121. Copyright \(co 2008 Nokia Corporation
  122. .br
  123. Copyright \(co 2016 sigma star gmbh
  124. License GPLv2: GNU GPL version 2 <http://gnu.org/licenses/gpl2.html>.
  125. .br
  126. This is free software: you are free to change and redistribute it.
  127. There is NO WARRANTY, to the extent permitted by law.
  128. .SH SEE ALSO
  129. .BR mkfs.jffs2 (1)