blob: b67a35178a0fec45521e27e8242216213df1f0a5 [file] [log] [blame]
Nobuhiro Iwamatsucd153552010-06-16 10:38:24 +09001.TH MKIMAGE 1 "2010-05-16"
2
3.SH NAME
4mkimage \- Generate image for U-Boot
5.SH SYNOPSIS
6.B mkimage
Simon Glass80e4df82013-06-13 15:10:03 -07007.RB "\-l [" "uimage file name" "]"
8
9.B mkimage
10.RB [\fIoptions\fP] " \-f [" "image tree source file" "]" " [" "uimage file name" "]"
11
12.B mkimage
Simon Glass95d77b42013-06-13 15:10:05 -070013.RB [\fIoptions\fP] " \-F [" "uimage file name" "]"
14
15.B mkimage
Simon Glass80e4df82013-06-13 15:10:03 -070016.RB [\fIoptions\fP] " (legacy mode)"
17
Nobuhiro Iwamatsucd153552010-06-16 10:38:24 +090018.SH "DESCRIPTION"
19The
20.B mkimage
21command is used to create images for use with the U-Boot boot loader.
Horst Kronstorfer7aecfdd2011-12-21 04:31:23 +000022These images can contain the linux kernel, device tree blob, root file
Nobuhiro Iwamatsucd153552010-06-16 10:38:24 +090023system image, firmware images etc., either separate or combined.
24
25.B mkimage
26supports two different formats:
27
Horst Kronstorfer7aecfdd2011-12-21 04:31:23 +000028The old
Nobuhiro Iwamatsucd153552010-06-16 10:38:24 +090029.I legacy image
30format concatenates the individual parts (for example, kernel image,
31device tree blob and ramdisk image) and adds a 64 bytes header
32containing information about target architecture, operating system,
33image type, compression method, entry points, time stamp, checksums,
34etc.
35
Horst Kronstorfer7aecfdd2011-12-21 04:31:23 +000036The new
Nobuhiro Iwamatsucd153552010-06-16 10:38:24 +090037.I FIT (Flattened Image Tree) format
Horst Kronstorfer7aecfdd2011-12-21 04:31:23 +000038allows for more flexibility in handling images of various types and also
Simon Glass80e4df82013-06-13 15:10:03 -070039enhances integrity protection of images with stronger checksums. It also
40supports verified boot.
Nobuhiro Iwamatsucd153552010-06-16 10:38:24 +090041
42.SH "OPTIONS"
43
44.B List image information:
45
46.TP
47.BI "\-l [" "uimage file name" "]"
48mkimage lists the information contained in the header of an existing U-Boot image.
49
50.P
51.B Create old legacy image:
52
53.TP
54.BI "\-A [" "architecture" "]"
Loïc Minier3f1266d2011-01-04 02:32:36 +010055Set architecture. Pass \-h as the architecture to see the list of supported architectures.
Nobuhiro Iwamatsucd153552010-06-16 10:38:24 +090056
57.TP
58.BI "\-O [" "os" "]"
59Set operating system. bootm command of u-boot changes boot method by os type.
Loïc Minier3f1266d2011-01-04 02:32:36 +010060Pass \-h as the OS to see the list of supported OS.
Nobuhiro Iwamatsucd153552010-06-16 10:38:24 +090061
62.TP
63.BI "\-T [" "image type" "]"
64Set image type.
Loïc Minier3f1266d2011-01-04 02:32:36 +010065Pass \-h as the image to see the list of supported image type.
Nobuhiro Iwamatsucd153552010-06-16 10:38:24 +090066
67.TP
68.BI "\-C [" "compression type" "]"
69Set compression type.
Loïc Minier3f1266d2011-01-04 02:32:36 +010070Pass \-h as the compression to see the list of supported compression type.
Nobuhiro Iwamatsucd153552010-06-16 10:38:24 +090071
72.TP
73.BI "\-a [" "load addess" "]"
74Set load address with a hex number.
75
76.TP
77.BI "\-e [" "entry point" "]"
78Set entry point with a hex number.
79
80.TP
Simon Glass80e4df82013-06-13 15:10:03 -070081.BI "\-l"
82List the contents of an image.
83
84.TP
Nobuhiro Iwamatsucd153552010-06-16 10:38:24 +090085.BI "\-n [" "image name" "]"
86Set image name to 'image name'.
87
88.TP
89.BI "\-d [" "image data file" "]"
90Use image data from 'image data file'.
91
92.TP
93.BI "\-x"
94Set XIP (execute in place) flag.
95
96.P
97.B Create FIT image:
98
99.TP
Simon Glass4f610422013-06-13 15:10:06 -0700100.BI "\-c [" "comment" "]"
101Specifies a comment to be added when signing. This is typically a useful
102message which describes how the image was signed or some other useful
103information.
104
105.TP
Horst Kronstorfer49fbf432011-12-23 05:40:20 +0000106.BI "\-D [" "dtc options" "]"
Nobuhiro Iwamatsucd153552010-06-16 10:38:24 +0900107Provide special options to the device tree compiler that is used to
108create the image.
109
110.TP
Horst Kronstorfer49fbf432011-12-23 05:40:20 +0000111.BI "\-f [" "image tree source file" "]"
Horst Kronstorfer7aecfdd2011-12-21 04:31:23 +0000112Image tree source file that describes the structure and contents of the
Nobuhiro Iwamatsucd153552010-06-16 10:38:24 +0900113FIT image.
114
Simon Glass80e4df82013-06-13 15:10:03 -0700115.TP
Simon Glass95d77b42013-06-13 15:10:05 -0700116.BI "\-F"
117Indicates that an existing FIT image should be modified. No dtc
118compilation is performed and the -f flag should not be given.
119This can be used to sign images with additional keys after initial image
120creation.
121
122.TP
Simon Glass80e4df82013-06-13 15:10:03 -0700123.BI "\-k [" "key_directory" "]"
124Specifies the directory containing keys to use for signing. This directory
125should contain a private key file <name>.key for use with signing and a
126certificate <name>.crt (containing the public key) for use with verification.
127
Simon Glasse29495d2013-06-13 15:10:04 -0700128.TP
129.BI "\-K [" "key_destination" "]"
130Specifies a compiled device tree binary file (typically .dtb) to write
131public key information into. When a private key is used to sign an image,
132the corresponding public key is written into this file for for run-time
133verification. Typically the file here is the device tree binary used by
134CONFIG_OF_CONTROL in U-Boot.
135
Horst Kronstorfer7aecfdd2011-12-21 04:31:23 +0000136.SH EXAMPLES
Nobuhiro Iwamatsucd153552010-06-16 10:38:24 +0900137
138List image information:
139.nf
140.B mkimage -l uImage
141.fi
142.P
143Create legacy image with compressed PowerPC Linux kernel:
144.nf
145.B mkimage -A powerpc -O linux -T kernel -C gzip \\\\
146.br
147.B -a 0 -e 0 -n Linux -d vmlinux.gz uImage
148.fi
149.P
150Create FIT image with compressed PowerPC Linux kernel:
151.nf
152.B mkimage -f kernel.its kernel.itb
153.fi
Simon Glasse29495d2013-06-13 15:10:04 -0700154.P
155Create FIT image with compressed kernel and sign it with keys in the
156/public/signing-keys directory. Add corresponding public keys into u-boot.dtb,
157skipping those for which keys cannot be found. Also add a comment.
158.nf
159.B mkimage -f kernel.its -k /public/signing-keys -K u-boot.dtb \\\\
160-c "Kernel 3.8 image for production devices" kernel.itb
161.fi
Nobuhiro Iwamatsucd153552010-06-16 10:38:24 +0900162
Simon Glass95d77b42013-06-13 15:10:05 -0700163.P
164Update an existing FIT image, signing it with additional keys.
165Add corresponding public keys into u-boot.dtb. This will resign all images
166with keys that are available in the new directory. Images that request signing
167with unavailable keys are skipped.
168.nf
169.B mkimage -F -k /secret/signing-keys -K u-boot.dtb \\\\
170-c "Kernel 3.8 image for production devices" kernel.itb
171.fi
172
Nobuhiro Iwamatsucd153552010-06-16 10:38:24 +0900173.SH HOMEPAGE
174http://www.denx.de/wiki/U-Boot/WebHome
175.PP
176.SH AUTHOR
177This manual page was written by Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Simon Glass80e4df82013-06-13 15:10:03 -0700178and Wolfgang Denk <wd@denx.de>. It was updated for image signing by
179Simon Glass <sjg@chromium.org>.