1UBINIZE(8)                  System Manager's Manual                 UBINIZE(8)
2
3
4

NAME

6       ubinize - a tool for generating UBI images
7

SYNOPSIS

9       ubinize [-o filename] [-p <bytes>] [-m <bytes>] [-s <bytes>] [-O <num>]
10       [-e <num>] [-x <num>] [-Q <num>] [-v] [-h]  [-V]  [--output=<filename>]
11       [--peb-size=<bytes>]  [--min-io-size=<bytes>] [--sub-page-size=<bytes>]
12       [--vid-hdr-offset=<num>]   [--erase-counter=<num>]    [--ubi-ver=<num>]
13       [--image-seq=<num>] [--verbose] [--help] [--version] ini-file
14

DESCRIPTION

16       An  UBI  image  may  contain  one  or more UBI volumes which have to be
17       defined in the input configuration ini-file. The ini file  defines  all
18       the  UBI  volumes - their characteristics and the contents, but it does
19       not define the characteristics of the flash the UBI image is  generated
20       for.  Instead,  the  flash characteristics are defined via the command-
21       line options. Note, if not sure about some of the command-line  parame‐
22       ters, do not specify them and let the utility use default values.
23

OPTIONS

25       -o, --output=file
26              Specify output file
27
28       -p, --peb-size=bytes
29              Size  of  the physical eraseblock of the flash this UBI image is
30              created for in bytes, kilobytes (KiB), or megabytes (MiB).  This
31              parameter is mandatory.
32
33       -m, --min-io-size=bytes
34              Minimum input/output unit size of the flash in bytes
35
36       -s, --sub-page-size=bytes
37              Minimum  input/output  unit  used for UBI headers, e.g. sub-page
38              size in case of NAND flash (equivalent to the minimum input/out‐
39              put unit size by default).
40
41       -O, --vid-hdr-offset=num
42              Offset  if  the VID header from start of the physical eraseblock
43              (default is the next minimum I/O unit or sub-page after  the  EC
44              header)
45
46       -e, --erase-counter=num
47              The erase counter value to put to EC headers (default is 0).
48
49       -x, --ubi-ver=num
50              UBI version number to put to EC headers (default is 1).
51
52       -Q, --image-seq=num
53              32-bit  UBI  image  sequence  number to use (by default a random
54              number is picked).
55
56       -v, --verbose
57              Be verbose.
58
59       -h, --help
60              Print a help message and exit.
61
62       -V, --version
63              Print program version and exit.
64

EXAMPLE

66       ubinize -o ubi.img -p 16KiB -m 512 -s 256 cfg.ini
67
68       Create UBI image ubi.img as described by configuration file cfg.ini.
69
70       A physical erase block on the flash is 16KiB in size and has  512  byte
71       pages with 256 byte sub-pages.
72

INI-FILE FORMAT

74       The  input  configuration ini-file describes all the volumes which have
75       to be included to the output UBI image. Each volume is described in its
76       own  section  which  may  be named arbitrarily. The section consists on
77       "key=value" pairs, for example:
78
79           [jffs2-volume]
80           mode=ubi
81           image=../jffs2.img
82           vol_id=1
83           vol_size=30MiB
84           vol_type=dynamic
85           vol_name=jffs2_volume
86           vol_flags=autoresize
87           vol_alignment=1
88
89       This example configuration file tells the  utility  to  create  an  UBI
90       image  with  one  volume  with  ID  1, volume size 30MiB, the volume is
91       dynamic, has name jffs2_volume, autoresize volume flag,  and  alignment
92       1.
93
94       The  image=../jffs2.img  line tells the utility to take the contents of
95       the volume from the ../jffs2.img file. The size of the image  file  has
96       to be less or equivalent to the volume size (30MiB).
97
98       The  mode=ubi  line  is  mandatory  and  just  tells  that  the section
99       describes an UBI volume - other section  modes  may  be  added  in  the
100       future.
101
102       Notes:
103
104       ·   Size  in  vol_size  might  be  specified kilobytes (KiB), megabytes
105           (MiB), gigabytes (GiB) or bytes (no modifier).
106
107       ·   If "vol_size" key is absent, the  volume  size  is  assumed  to  be
108           equivalent to the size of the image file (defined by "image" key).
109
110       ·   If the "image" is absent, the volume is assumed to be empty
111
112       ·   Volume  alignment  must  not be greater than the logical eraseblock
113           size.
114
115       ·   One ini file may contain arbitrary number of sections, the  utility
116           will  put  all  the volumes which are described by these section to
117           the output UBI image file.
118

AUTHORS

120       Man page written by David Oberhollenzer, based on the help text of
121       the ubinize utility written by Artem Bityutskiy and Oliver Lohmann.
122

REPORTING BUGS

124       Report mtd-utils bugs to the Linux mtd mailing list.
125
126       Linux mtd mailing list: <linux-mtd@lists.infradead.org>
127
128       Linux mtd home page: <http://www.linux-mtd.infradead.org/>
129

AVAILABILITY

131       The ubinize command is part of the mtd-utils package and  is  available
132       from ftp://ftp.infradead.org/pub/mtd-utils/.
133
135       Copyright © International Business Machines Corp., 2006
136       Copyright © 2008 Nokia Corporation
137       Copyright © 2016 sigma star gmbh
138
139       License GPLv2: GNU GPL version 2 <http://gnu.org/licenses/gpl2.html>.
140       This  is  free  software:  you  are free to change and redistribute it.
141       There is NO WARRANTY, to the extent permitted by law.
142

SEE ALSO

144       mkfs.jffs2(1)
145
146
147
148mtd-utils                       September 2016                      UBINIZE(8)
Impressum