]>
Commit | Line | Data |
---|---|---|
cd153556 NI |
1 | .TH MKIMAGE 1 "2010-05-16" |
2 | ||
3 | .SH NAME | |
4 | mkimage \- Generate image for U-Boot | |
5 | .SH SYNOPSIS | |
6 | .B mkimage | |
80e4df8a SG |
7 | .RB "\-l [" "uimage file name" "]" |
8 | ||
9 | .B mkimage | |
10 | .RB [\fIoptions\fP] " \-f [" "image tree source file" "]" " [" "uimage file name" "]" | |
11 | ||
95d77b44 SG |
12 | .B mkimage |
13 | .RB [\fIoptions\fP] " \-F [" "uimage file name" "]" | |
14 | ||
80e4df8a SG |
15 | .B mkimage |
16 | .RB [\fIoptions\fP] " (legacy mode)" | |
17 | ||
cd153556 NI |
18 | .SH "DESCRIPTION" |
19 | The | |
20 | .B mkimage | |
21 | command is used to create images for use with the U-Boot boot loader. | |
7aecfdd0 | 22 | These images can contain the linux kernel, device tree blob, root file |
cd153556 NI |
23 | system image, firmware images etc., either separate or combined. |
24 | ||
25 | .B mkimage | |
26 | supports two different formats: | |
27 | ||
7aecfdd0 | 28 | The old |
cd153556 NI |
29 | .I legacy image |
30 | format concatenates the individual parts (for example, kernel image, | |
31 | device tree blob and ramdisk image) and adds a 64 bytes header | |
32 | containing information about target architecture, operating system, | |
33 | image type, compression method, entry points, time stamp, checksums, | |
34 | etc. | |
35 | ||
7aecfdd0 | 36 | The new |
cd153556 | 37 | .I FIT (Flattened Image Tree) format |
7aecfdd0 | 38 | allows for more flexibility in handling images of various types and also |
80e4df8a SG |
39 | enhances integrity protection of images with stronger checksums. It also |
40 | supports verified boot. | |
cd153556 NI |
41 | |
42 | .SH "OPTIONS" | |
43 | ||
44 | .B List image information: | |
45 | ||
46 | .TP | |
47 | .BI "\-l [" "uimage file name" "]" | |
48 | mkimage 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" "]" | |
3f1266d6 | 55 | Set architecture. Pass \-h as the architecture to see the list of supported architectures. |
cd153556 NI |
56 | |
57 | .TP | |
58 | .BI "\-O [" "os" "]" | |
59 | Set operating system. bootm command of u-boot changes boot method by os type. | |
3f1266d6 | 60 | Pass \-h as the OS to see the list of supported OS. |
cd153556 NI |
61 | |
62 | .TP | |
63 | .BI "\-T [" "image type" "]" | |
64 | Set image type. | |
3f1266d6 | 65 | Pass \-h as the image to see the list of supported image type. |
cd153556 NI |
66 | |
67 | .TP | |
68 | .BI "\-C [" "compression type" "]" | |
69 | Set compression type. | |
3f1266d6 | 70 | Pass \-h as the compression to see the list of supported compression type. |
cd153556 NI |
71 | |
72 | .TP | |
73 | .BI "\-a [" "load addess" "]" | |
74 | Set load address with a hex number. | |
75 | ||
76 | .TP | |
77 | .BI "\-e [" "entry point" "]" | |
78 | Set entry point with a hex number. | |
79 | ||
80e4df8a SG |
80 | .TP |
81 | .BI "\-l" | |
82 | List the contents of an image. | |
83 | ||
cd153556 NI |
84 | .TP |
85 | .BI "\-n [" "image name" "]" | |
86 | Set image name to 'image name'. | |
87 | ||
88 | .TP | |
89 | .BI "\-d [" "image data file" "]" | |
90 | Use image data from 'image data file'. | |
91 | ||
92 | .TP | |
93 | .BI "\-x" | |
94 | Set XIP (execute in place) flag. | |
95 | ||
96 | .P | |
97 | .B Create FIT image: | |
98 | ||
4f610427 SG |
99 | .TP |
100 | .BI "\-c [" "comment" "]" | |
101 | Specifies a comment to be added when signing. This is typically a useful | |
102 | message which describes how the image was signed or some other useful | |
103 | information. | |
104 | ||
cd153556 | 105 | .TP |
49fbf437 | 106 | .BI "\-D [" "dtc options" "]" |
cd153556 NI |
107 | Provide special options to the device tree compiler that is used to |
108 | create the image. | |
109 | ||
110 | .TP | |
8e35bb07 | 111 | .BI "\-f [" "image tree source file" " | " "auto" "]" |
7aecfdd0 | 112 | Image tree source file that describes the structure and contents of the |
cd153556 NI |
113 | FIT image. |
114 | ||
8e35bb07 SG |
115 | This can be automatically generated for some simple cases. |
116 | Use "-f auto" for this. In that case the arguments -d, -A, -O, -T, -C, -a | |
117 | and -e are used to specify the image to include in the FIT and its attributes. | |
118 | No .its file is required. | |
119 | ||
95d77b44 SG |
120 | .TP |
121 | .BI "\-F" | |
122 | Indicates that an existing FIT image should be modified. No dtc | |
758497c3 | 123 | compilation is performed and the \-f flag should not be given. |
95d77b44 SG |
124 | This can be used to sign images with additional keys after initial image |
125 | creation. | |
126 | ||
80e4df8a SG |
127 | .TP |
128 | .BI "\-k [" "key_directory" "]" | |
129 | Specifies the directory containing keys to use for signing. This directory | |
130 | should contain a private key file <name>.key for use with signing and a | |
131 | certificate <name>.crt (containing the public key) for use with verification. | |
132 | ||
e29495d3 SG |
133 | .TP |
134 | .BI "\-K [" "key_destination" "]" | |
135 | Specifies a compiled device tree binary file (typically .dtb) to write | |
136 | public key information into. When a private key is used to sign an image, | |
137 | the corresponding public key is written into this file for for run-time | |
138 | verification. Typically the file here is the device tree binary used by | |
139 | CONFIG_OF_CONTROL in U-Boot. | |
140 | ||
399c744b SG |
141 | .TP |
142 | .BI "\-r | |
143 | Specifies that keys used to sign the FIT are required. This means that they | |
144 | must be verified for the image to boot. Without this option, the verification | |
145 | will be optional (useful for testing but not for release). | |
146 | ||
7aecfdd0 | 147 | .SH EXAMPLES |
cd153556 NI |
148 | |
149 | List image information: | |
150 | .nf | |
151 | .B mkimage -l uImage | |
152 | .fi | |
153 | .P | |
154 | Create legacy image with compressed PowerPC Linux kernel: | |
155 | .nf | |
156 | .B mkimage -A powerpc -O linux -T kernel -C gzip \\\\ | |
157 | .br | |
158 | .B -a 0 -e 0 -n Linux -d vmlinux.gz uImage | |
159 | .fi | |
160 | .P | |
161 | Create FIT image with compressed PowerPC Linux kernel: | |
162 | .nf | |
163 | .B mkimage -f kernel.its kernel.itb | |
164 | .fi | |
e29495d3 SG |
165 | .P |
166 | Create FIT image with compressed kernel and sign it with keys in the | |
167 | /public/signing-keys directory. Add corresponding public keys into u-boot.dtb, | |
168 | skipping those for which keys cannot be found. Also add a comment. | |
169 | .nf | |
170 | .B mkimage -f kernel.its -k /public/signing-keys -K u-boot.dtb \\\\ | |
758497c3 | 171 | .br |
3837ce65 | 172 | .B -c """Kernel 3.8 image for production devices""" kernel.itb |
e29495d3 | 173 | .fi |
cd153556 | 174 | |
95d77b44 SG |
175 | .P |
176 | Update an existing FIT image, signing it with additional keys. | |
177 | Add corresponding public keys into u-boot.dtb. This will resign all images | |
178 | with keys that are available in the new directory. Images that request signing | |
179 | with unavailable keys are skipped. | |
180 | .nf | |
181 | .B mkimage -F -k /secret/signing-keys -K u-boot.dtb \\\\ | |
758497c3 | 182 | .br |
3837ce65 | 183 | .B -c """Kernel 3.8 image for production devices""" kernel.itb |
95d77b44 SG |
184 | .fi |
185 | ||
8e35bb07 SG |
186 | .P |
187 | Create a FIT image containing a kernel, using automatic mode. No .its file | |
188 | is required. | |
189 | .nf | |
190 | .B mkimage -f auto -A arm -O linux -T kernel -C none -a 43e00000 -e 0 \\\\ | |
191 | .br | |
192 | .B -c """Kernel 4.4 image for production devices""" -d vmlinuz kernel.itb | |
193 | .fi | |
194 | ||
cd153556 NI |
195 | .SH HOMEPAGE |
196 | http://www.denx.de/wiki/U-Boot/WebHome | |
197 | .PP | |
198 | .SH AUTHOR | |
199 | This manual page was written by Nobuhiro Iwamatsu <iwamatsu@nigauri.org> | |
80e4df8a SG |
200 | and Wolfgang Denk <wd@denx.de>. It was updated for image signing by |
201 | Simon Glass <sjg@chromium.org>. |