UBINIZE(8) System Manager's Manual UBINIZE(8) NAME ubinize - a tool for generating UBI images SYNOPSIS ubinize [-o filename] [-p ] [-m ] [-s ] [-O ] [-e ] [-x ] [-Q ] [-v] [-h] [-V] [--output=] [--peb-size=] [--min-io-size=] [--sub-page-size=] [--vid-hdr-offset=] [--erase-counter=] [--ubi-ver=] [--image-seq=] [--verbose] [--help] [--version] ini-file DESCRIPTION An UBI image may contain one or more UBI volumes which have to be defined in the input configuration ini-file. The ini file defines all the UBI volumes - their characteristics and the contents, but it does not define the characteristics of the flash the UBI image is generated for. Instead, the flash characteristics are defined via the command- line options. Note, if not sure about some of the command-line parameters, do not specify them and let the utility use default values. OPTIONS -o, --output=file Specify output file -p, --peb-size=bytes Size of the physical eraseblock of the flash this UBI image is created for in bytes, kilobytes (KiB), or megabytes (MiB). This parameter is mandatory. -m, --min-io-size=bytes Minimum input/output unit size of the flash in bytes -s, --sub-page-size=bytes Minimum input/output unit used for UBI headers, e.g. sub-page size in case of NAND flash (equivalent to the minimum input/output unit size by default). -O, --vid-hdr-offset=num Offset if the VID header from start of the physical eraseblock (default is the next minimum I/O unit or sub-page after the EC header) -e, --erase-counter=num The erase counter value to put to EC headers (default is 0). -x, --ubi-ver=num UBI version number to put to EC headers (default is 1). -Q, --image-seq=num 32-bit UBI image sequence number to use (by default a random number is picked). -v, --verbose Be verbose. -h, --help Print a help message and exit. -V, --version Print program version and exit. EXAMPLE ubinize -o ubi.img -p 16KiB -m 512 -s 256 cfg.ini Create UBI image ubi.img as described by configuration file cfg.ini. A physical erase block on the flash is 16KiB in size and has 512 byte pages with 256 byte sub-pages. INI-FILE FORMAT The input configuration ini-file describes all the volumes which have to be included to the output UBI image. Each volume is described in its own section which may be named arbitrarily. The section consists on "key=value" pairs, for example: [jffs2-volume] mode=ubi image=../jffs2.img vol_id=1 vol_size=30MiB vol_type=dynamic vol_name=jffs2_volume vol_flags=autoresize vol_alignment=1 This example configuration file tells the utility to create an UBI image with one volume with ID 1, volume size 30MiB, the volume is dynamic, has name jffs2_volume, autoresize volume flag, and alignment 1. The image=../jffs2.img line tells the utility to take the contents of the volume from the ../jffs2.img file. The size of the image file has to be less or equivalent to the volume size (30MiB). The mode=ubi line is mandatory and just tells that the section describes an UBI volume - other section modes may be added in the future. Notes: o Size in vol_size might be specified kilobytes (KiB), megabytes (MiB), gigabytes (GiB) or bytes (no modifier). o If "vol_size" key is absent, the volume size is assumed to be equivalent to the size of the image file (defined by "image" key). o If the "image" is absent, the volume is assumed to be empty o Volume alignment must not be greater than the logical eraseblock size. o One ini file may contain arbitrary number of sections, the utility will put all the volumes which are described by these section to the output UBI image file. AUTHORS Man page written by David Oberhollenzer, based on the help text of the ubinize utility written by Artem Bityutskiy and Oliver Lohmann. REPORTING BUGS Report mtd-utils bugs to the Linux mtd mailing list. Linux mtd mailing list: Linux mtd home page: AVAILABILITY The ubinize command is part of the mtd-utils package and is available from ftp://ftp.infradead.org/pub/mtd-utils/. COPYRIGHT Copyright (C) International Business Machines Corp., 2006 Copyright (C) 2008 Nokia Corporation Copyright (C) 2016 sigma star gmbh License GPLv2: GNU GPL version 2 . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO mkfs.jffs2(1) mtd-utils September 2016 UBINIZE(8)