1MKIMAGE(1)                  General Commands Manual                 MKIMAGE(1)
2
3
4

NAME

6       mkimage - Generate image for U-Boot
7

SYNOPSIS

9       mkimage -l [uimage file name]
10
11       mkimage [options] -f [image tree source file] [uimage file name]
12
13       mkimage [options] -F [uimage file name]
14
15       mkimage [options] (legacy mode)
16
17

DESCRIPTION

19       The  mkimage  command  is used to create images for use with the U-Boot
20       boot loader.  These images can contain the linux  kernel,  device  tree
21       blob,  root file system image, firmware images etc., either separate or
22       combined.
23
24       mkimage supports two different formats:
25
26       The old legacy image format  concatenates  the  individual  parts  (for
27       example,  kernel  image, device tree blob and ramdisk image) and adds a
28       64 bytes header containing information about target architecture, oper‐
29       ating system, image type, compression method, entry points, time stamp,
30       checksums, etc.
31
32       The new FIT (Flattened Image Tree) format allows for  more  flexibility
33       in handling images of various types and also enhances integrity protec‐
34       tion of images with stronger checksums. It also supports verified boot.
35
36

OPTIONS

38       List image information:
39
40
41       -l [uimage file name]
42              mkimage lists the information contained  in  the  header  of  an
43              existing U-Boot image.
44
45
46       Create old legacy image:
47
48
49       -A [architecture]
50              Set architecture. Pass -h as the architecture to see the list of
51              supported architectures.
52
53
54       -O [os]
55              Set operating system.  bootm  command  of  u-boot  changes  boot
56              method  by  os  type.  Pass -h as the OS to see the list of sup‐
57              ported OS.
58
59
60       -T [image type]
61              Set image type.  Pass -h as the image to see the  list  of  sup‐
62              ported image type.
63
64
65       -C [compression type]
66              Set  compression  type.   Pass  -h as the compression to see the
67              list of supported compression type.
68
69
70       -a [load address]
71              Set load address with a hex number.
72
73
74       -e [entry point]
75              Set entry point with a hex number.
76
77
78       -l     List the contents of an image.
79
80
81       -n [image name]
82              Set image name to 'image name'.
83
84
85       -d [image data file]
86              Use image data from 'image data file'.
87
88
89       -x     Set XIP (execute in place) flag.
90
91
92       Create FIT image:
93
94
95       -b [device tree file]
96              Appends the device tree binary file (.dtb) to the FIT.
97
98
99       -c [comment]
100              Specifies a comment to be added when signing. This is  typically
101              a  useful  message  which  describes how the image was signed or
102              some other useful information.
103
104
105       -D [dtc options]
106              Provide special options to the device tree compiler that is used
107              to create the image.
108
109
110       -E     After  processing, move the image data outside the FIT and store
111              a data offset in the FIT. Images will be placed  one  after  the
112              other  immediately  after  the  FIT,  with each one aligned to a
113              4-byte boundary. The existing 'data' property in each image will
114              be  replaced  with  'data-offset' and 'data-size' properties.  A
115              'data-offset' of 0 indicates that it starts in the first (4-byte
116              aligned) byte after the FIT.
117
118
119       -f [image tree source file | auto]
120              Image tree source file that describes the structure and contents
121              of the FIT image.
122
123              This can be automatically generated for some simple cases.   Use
124              "-f  auto"  for this. In that case the arguments -d, -A, -O, -T,
125              -C, -a and -e are used to specify the image to  include  in  the
126              FIT and its attributes.  No .its file is required.
127
128
129       -F     Indicates  that an existing FIT image should be modified. No dtc
130              compilation is performed and the -f flag should  not  be  given.
131              This  can be used to sign images with additional keys after ini‐
132              tial image creation.
133
134
135       -i [ramdisk_file]
136              Appends the ramdisk file to the FIT.
137
138
139       -k [key_directory]
140              Specifies the directory containing keys to use for signing. This
141              directory  should  contain a private key file <name>.key for use
142              with signing and a certificate <name>.crt (containing the public
143              key) for use with verification.
144
145
146       -K [key_destination]
147              Specifies a compiled device tree binary file (typically .dtb) to
148              write public key information into. When a private key is used to
149              sign an image, the corresponding public key is written into this
150              file for for run-time verification. Typically the file  here  is
151              the device tree binary used by CONFIG_OF_CONTROL in U-Boot.
152
153
154       -p [external position]
155              Place  external  data  at  a  static  external position. See -E.
156              Instead of writing a 'data-offset' property defining the  offset
157              from  the  end  of  the  FIT, -p will use 'data-position' as the
158              absolute position from the base of the FIT.
159
160
161       -r     Specifies that keys used to sign  the  FIT  are  required.  This
162              means  that they must be verified for the image to boot. Without
163              this option, the verification will be optional (useful for test‐
164              ing but not for release).
165
166
167       -t     Update the timestamp in the FIT.
168
169              Normally  the FIT timestamp is created the first time mkimage is
170              run on a FIT, when converting the source .its to the binary .fit
171              file. This corresponds to using the -f flag. But if the original
172              input to mkimage is a binary file (already  compiled)  then  the
173              timestamp is assumed to have been set previously.
174
175

EXAMPLES

177       List image information:
178       mkimage -l uImage
179
180       Create legacy image with compressed PowerPC Linux kernel:
181       mkimage -A powerpc -O linux -T kernel -C gzip \
182       -a 0 -e 0 -n Linux -d vmlinux.gz uImage
183
184       Create FIT image with compressed PowerPC Linux kernel:
185       mkimage -f kernel.its kernel.itb
186
187       Create  FIT  image  with compressed kernel and sign it with keys in the
188       /public/signing-keys directory. Add corresponding public keys  into  u-
189       boot.dtb,  skipping  those  for  which keys cannot be found. Also add a
190       comment.
191       mkimage -f kernel.its -k /public/signing-keys -K u-boot.dtb \
192       -c "Kernel 3.8 image for production devices" kernel.itb
193
194
195       Update an existing FIT image, signing it  with  additional  keys.   Add
196       corresponding  public keys into u-boot.dtb. This will resign all images
197       with keys that are available in the new directory. Images that  request
198       signing with unavailable keys are skipped.
199       mkimage -F -k /secret/signing-keys -K u-boot.dtb \
200       -c "Kernel 3.8 image for production devices" kernel.itb
201
202
203       Create  a  FIT image containing a kernel, using automatic mode. No .its
204       file is required.
205       mkimage -f auto -A arm -O linux -T kernel -C none -a 43e00000 -e 0 \
206       -c "Kernel 4.4 image for production devices" -d vmlinuz kernel.itb
207
208       Create a FIT image containing a kernel  and  some  device  tree  files,
209       using automatic mode. No .its file is required.
210       mkimage -f auto -A arm -O linux -T kernel -C none -a 43e00000 -e 0 \
211       -c "Kernel 4.4 image for production devices" -d vmlinuz \
212       -b /path/to/rk3288-firefly.dtb -b /path/to/rk3288-jerry.dtb kernel.itb
213
214

HOMEPAGE

216       http://www.denx.de/wiki/U-Boot/WebHome
217

AUTHOR

219       This   manual   page   was   written   by   Nobuhiro   Iwamatsu   <iwa‐
220       matsu@nigauri.org> and Wolfgang Denk <wd@denx.de>. It was  updated  for
221       image signing by Simon Glass <sjg@chromium.org>.
222
223
224
225                                  2010-05-16                        MKIMAGE(1)
Impressum