Sean Anderson | 5746e40 | 2022-06-25 13:12:18 -0400 | [diff] [blame] | 1 | .\" SPDX-License-Identifier: GPL-2.0 |
| 2 | .\" Copyright (C) 2022 Sean Anderson <seanga2@gmail.com> |
| 3 | .\" Copyright (C) 2013-20 Simon Glass <sjg@chromium.org> |
| 4 | .\" Copyright (C) 2010 Nobuhiro Iwamatsu <iwamatsu@nigauri.org> |
| 5 | .\" Copyright (C) 2010 Wolfgang Denk <wd@denx.de> |
| 6 | .TH MKIMAGE 1 2022-06-11 U-Boot |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 7 | . |
Nobuhiro Iwamatsu | 9711cf6 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 8 | .SH NAME |
Sean Anderson | 9ed02c0 | 2022-06-25 13:12:14 -0400 | [diff] [blame] | 9 | mkimage \- generate images for U-Boot |
Nobuhiro Iwamatsu | 9711cf6 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 10 | .SH SYNOPSIS |
Sean Anderson | 9028386 | 2022-06-25 13:12:08 -0400 | [diff] [blame] | 11 | .SY mkimage |
| 12 | .OP \-T type |
| 13 | .BI \-l\~ image-file-name |
| 14 | .YS |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 15 | . |
Sean Anderson | 9028386 | 2022-06-25 13:12:08 -0400 | [diff] [blame] | 16 | .SY mkimage |
| 17 | .RI [ option\~ .\|.\|.\&] |
| 18 | .OP \-T type |
| 19 | .I image-file-name |
| 20 | .YS |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 21 | . |
Sean Anderson | 9028386 | 2022-06-25 13:12:08 -0400 | [diff] [blame] | 22 | .SY mkimage |
| 23 | .RI [ option\~ .\|.\|.\&] |
| 24 | .BI \-f\~ image-tree-source-file\c |
Massimo Pegorer | 13878dd | 2023-01-05 10:31:09 +0100 | [diff] [blame] | 25 | .RB | auto\c |
| 26 | .RB | auto-conf |
Sean Anderson | 9028386 | 2022-06-25 13:12:08 -0400 | [diff] [blame] | 27 | .I image-file-name |
| 28 | .YS |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 29 | . |
Sean Anderson | 9028386 | 2022-06-25 13:12:08 -0400 | [diff] [blame] | 30 | .SY mkimage |
| 31 | .RI [ option\~ .\|.\|.\&] |
| 32 | .BI \-F\~ image-file-name |
| 33 | .YS |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 34 | . |
Sean Anderson | d72a059 | 2022-06-25 13:12:11 -0400 | [diff] [blame] | 35 | .SH DESCRIPTION |
Nobuhiro Iwamatsu | 9711cf6 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 36 | The |
| 37 | .B mkimage |
Sean Anderson | 5f3aa38 | 2022-06-25 13:12:15 -0400 | [diff] [blame] | 38 | command is used to create images for use with the U-Boot boot loader. These |
| 39 | images can contain the Linux kernel, device tree blob, root file system image, |
| 40 | firmware images etc., either separate or combined. |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 41 | .P |
Nobuhiro Iwamatsu | 9711cf6 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 42 | .B mkimage |
Sean Anderson | 5f3aa38 | 2022-06-25 13:12:15 -0400 | [diff] [blame] | 43 | supports many image formats. Some of these formats may be used by embedded boot |
| 44 | firmware to load U-Boot. Others may be used by U-Boot to load Linux (or some |
| 45 | other kernel): |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 46 | .P |
Sean Anderson | 5f3aa38 | 2022-06-25 13:12:15 -0400 | [diff] [blame] | 47 | The legacy image format concatenates the individual parts (for example, kernel |
| 48 | image, device tree blob and ramdisk image) and adds a 64 byte header containing |
| 49 | information about the target architecture, operating system, image type, |
| 50 | compression method, entry points, time stamp, checksums, etc. |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 51 | .P |
Horst Kronstorfer | e6b37cf | 2011-12-21 04:31:23 +0000 | [diff] [blame] | 52 | The new |
Sean Anderson | 5f3aa38 | 2022-06-25 13:12:15 -0400 | [diff] [blame] | 53 | .I FIT |
| 54 | (Flattened Image Tree) format allows for more flexibility in handling images of |
| 55 | various types and also enhances integrity protection of images with stronger |
| 56 | checksums. It also supports verified boot. |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 57 | . |
Sean Anderson | d72a059 | 2022-06-25 13:12:11 -0400 | [diff] [blame] | 58 | .SH OPTIONS |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 59 | . |
Sean Anderson | 41b1ca9 | 2022-06-25 13:12:12 -0400 | [diff] [blame] | 60 | .SS General options |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 61 | . |
Nobuhiro Iwamatsu | 9711cf6 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 62 | .TP |
Sean Anderson | e4045c0 | 2022-06-25 13:12:13 -0400 | [diff] [blame] | 63 | .B \-h |
Sean Anderson | c4567c5 | 2022-06-25 13:12:19 -0400 | [diff] [blame] | 64 | .TQ |
| 65 | .B \-\-help |
Sean Anderson | e4045c0 | 2022-06-25 13:12:13 -0400 | [diff] [blame] | 66 | Print a help message and exit. |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 67 | . |
Pali Rohár | cdf0d1c | 2022-02-13 01:09:46 +0100 | [diff] [blame] | 68 | .TP |
Sean Anderson | e4045c0 | 2022-06-25 13:12:13 -0400 | [diff] [blame] | 69 | .B \-l |
Sean Anderson | c4567c5 | 2022-06-25 13:12:19 -0400 | [diff] [blame] | 70 | .TQ |
| 71 | .B \-\-list |
Sean Anderson | 5f3aa38 | 2022-06-25 13:12:15 -0400 | [diff] [blame] | 72 | .B mkimage |
| 73 | lists the information contained in the header of an existing U-Boot image. |
Sean Anderson | e4045c0 | 2022-06-25 13:12:13 -0400 | [diff] [blame] | 74 | . |
| 75 | .TP |
| 76 | .B \-s |
Sean Anderson | c4567c5 | 2022-06-25 13:12:19 -0400 | [diff] [blame] | 77 | .TQ |
| 78 | .B \-\-no\-copy |
Sean Anderson | e4045c0 | 2022-06-25 13:12:13 -0400 | [diff] [blame] | 79 | Don't copy in the image data. Depending on the image type, this may create |
| 80 | just the header, everything but the image data, or nothing at all. |
| 81 | . |
| 82 | .TP |
Sean Anderson | d72a059 | 2022-06-25 13:12:11 -0400 | [diff] [blame] | 83 | .BI \-T " image-type" |
Sean Anderson | c4567c5 | 2022-06-25 13:12:19 -0400 | [diff] [blame] | 84 | .TQ |
| 85 | .BI \-\-type " image-type" |
Sean Anderson | 5f3aa38 | 2022-06-25 13:12:15 -0400 | [diff] [blame] | 86 | Parse image file as |
| 87 | .IR image-type . |
| 88 | Pass |
| 89 | .B list |
| 90 | as |
| 91 | .I image-type |
| 92 | to see the list of supported image types. If this option is absent, then it |
| 93 | defaults to |
| 94 | .B kernel |
| 95 | (legacy image). If this option is absent when |
| 96 | .B \-l |
| 97 | is passed, then |
| 98 | .B mkimage |
| 99 | will attempt to automatically detect the image type. Not all image types support |
| 100 | automatic detection, so it may be necessary to pass |
| 101 | .B \-T |
| 102 | explicitly. |
| 103 | .IP |
| 104 | When creating a FIT image with |
| 105 | .BR \-f , |
| 106 | the image type is always set to |
| 107 | .BR flat_dt . |
| 108 | In this case, |
| 109 | .B \-T |
| 110 | specifies the image node's \(oqtype\(cq property. If |
| 111 | .B \-T |
| 112 | is absent, then the \(oqtype\(cq property will default to |
| 113 | .BR kernel . |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 114 | . |
Sean Anderson | 138d271 | 2022-04-08 16:08:39 -0400 | [diff] [blame] | 115 | .TP |
Sean Anderson | d72a059 | 2022-06-25 13:12:11 -0400 | [diff] [blame] | 116 | .B \-q |
Sean Anderson | c4567c5 | 2022-06-25 13:12:19 -0400 | [diff] [blame] | 117 | .TQ |
| 118 | .B \-\-quiet |
Sean Anderson | e4045c0 | 2022-06-25 13:12:13 -0400 | [diff] [blame] | 119 | Quiet. Don't print the image header. |
| 120 | . |
| 121 | .TP |
| 122 | .B \-v |
Sean Anderson | c4567c5 | 2022-06-25 13:12:19 -0400 | [diff] [blame] | 123 | .TQ |
| 124 | .B \-\-verbose |
Sean Anderson | e4045c0 | 2022-06-25 13:12:13 -0400 | [diff] [blame] | 125 | Verbose. Print file names as they are added to the image. |
| 126 | . |
| 127 | .TP |
| 128 | .B \-V |
Sean Anderson | c4567c5 | 2022-06-25 13:12:19 -0400 | [diff] [blame] | 129 | .TQ |
| 130 | .B \-\-version |
Sean Anderson | e4045c0 | 2022-06-25 13:12:13 -0400 | [diff] [blame] | 131 | Print version information and exit. |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 132 | . |
Sean Anderson | 41b1ca9 | 2022-06-25 13:12:12 -0400 | [diff] [blame] | 133 | .SS General image-creation options |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 134 | . |
Nobuhiro Iwamatsu | 9711cf6 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 135 | .TP |
Sean Anderson | d72a059 | 2022-06-25 13:12:11 -0400 | [diff] [blame] | 136 | .BI \-A " architecture" |
Sean Anderson | c4567c5 | 2022-06-25 13:12:19 -0400 | [diff] [blame] | 137 | .TQ |
| 138 | .BI \-\-architecture " architecture" |
Sean Anderson | 5f3aa38 | 2022-06-25 13:12:15 -0400 | [diff] [blame] | 139 | Set the architecture. Pass |
| 140 | .B \-h |
| 141 | as the architecture to see the list of supported architectures. If |
| 142 | .B \-A |
| 143 | is absent, it defaults to |
| 144 | .BR ppc . |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 145 | . |
Nobuhiro Iwamatsu | 9711cf6 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 146 | .TP |
Sean Anderson | d72a059 | 2022-06-25 13:12:11 -0400 | [diff] [blame] | 147 | .BI \-O " os" |
Sean Anderson | c4567c5 | 2022-06-25 13:12:19 -0400 | [diff] [blame] | 148 | .TQ |
| 149 | .BI \-\-os " os" |
Sean Anderson | 5f3aa38 | 2022-06-25 13:12:15 -0400 | [diff] [blame] | 150 | Set the operating system. The U-Boot |
| 151 | .I bootm |
| 152 | command changes boot method based on the OS type. |
| 153 | Pass |
| 154 | .B \-h |
| 155 | as the |
| 156 | .I os |
| 157 | to see the list of supported OSs. If |
| 158 | .B \-O |
| 159 | is absent, it defaults to |
| 160 | .BR linux . |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 161 | . |
Nobuhiro Iwamatsu | 9711cf6 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 162 | .TP |
Sean Anderson | d72a059 | 2022-06-25 13:12:11 -0400 | [diff] [blame] | 163 | .BI \-C " compression-type" |
Sean Anderson | c4567c5 | 2022-06-25 13:12:19 -0400 | [diff] [blame] | 164 | .TQ |
| 165 | .BI \-\-compression " compression-type" |
Sean Anderson | 5f3aa38 | 2022-06-25 13:12:15 -0400 | [diff] [blame] | 166 | Set the compression type. The image data should have already been compressed |
| 167 | using this compression type. |
| 168 | .B mkimage |
| 169 | will not automatically compress image data. |
| 170 | Pass |
| 171 | .B \-h |
| 172 | as the |
| 173 | .I compression-type |
| 174 | to see the list of supported compression types. If |
| 175 | .B \-C |
| 176 | is absent, it defaults to |
| 177 | .BR gzip . |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 178 | . |
Nobuhiro Iwamatsu | 9711cf6 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 179 | .TP |
Sean Anderson | d72a059 | 2022-06-25 13:12:11 -0400 | [diff] [blame] | 180 | .BI \-a " load-address" |
Sean Anderson | c4567c5 | 2022-06-25 13:12:19 -0400 | [diff] [blame] | 181 | .TQ |
| 182 | .BI \-\-load\-address " load-address" |
Sean Anderson | 5f3aa38 | 2022-06-25 13:12:15 -0400 | [diff] [blame] | 183 | Set the absolute address to load the image data to. |
| 184 | .I load-address |
| 185 | will be interpreted as a hexadecimal number. |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 186 | . |
Nobuhiro Iwamatsu | 9711cf6 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 187 | .TP |
Sean Anderson | d72a059 | 2022-06-25 13:12:11 -0400 | [diff] [blame] | 188 | .BI \-e " entry-point" |
Sean Anderson | c4567c5 | 2022-06-25 13:12:19 -0400 | [diff] [blame] | 189 | .TQ |
| 190 | .BI \-\-entry\-point " entry-point" |
Sean Anderson | 5f3aa38 | 2022-06-25 13:12:15 -0400 | [diff] [blame] | 191 | Set the absolute address of the image entry point. The U-Boot |
| 192 | .I bootm |
| 193 | command will jump to this address after loading the image. |
| 194 | .I entry-point |
| 195 | will be interpreted as a hexadecimal number. |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 196 | . |
Nobuhiro Iwamatsu | 9711cf6 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 197 | .TP |
Sean Anderson | 4db3285 | 2022-06-25 13:12:20 -0400 | [diff] [blame] | 198 | .BI \-n " primary-configuration" |
Sean Anderson | c4567c5 | 2022-06-25 13:12:19 -0400 | [diff] [blame] | 199 | .TQ |
Sean Anderson | 4db3285 | 2022-06-25 13:12:20 -0400 | [diff] [blame] | 200 | .BI \-\-config " primary-configuration" |
| 201 | Images may require additional configuration not specified with other options, |
| 202 | often in a image-type-specific format. The image types which support this |
| 203 | option and the format of their configuration are listed in |
| 204 | .BR CONFIGURATION . |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 205 | . |
Nobuhiro Iwamatsu | 9711cf6 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 206 | .TP |
Sean Anderson | 4db3285 | 2022-06-25 13:12:20 -0400 | [diff] [blame] | 207 | .BI \-R " secondary-configuration" |
Sean Anderson | c4567c5 | 2022-06-25 13:12:19 -0400 | [diff] [blame] | 208 | .TQ |
Sean Anderson | 4db3285 | 2022-06-25 13:12:20 -0400 | [diff] [blame] | 209 | .BI \-\-secondary\-config " secondary-configuration" |
| 210 | Some image types support a second set of configuration data. The image types |
| 211 | which support secondary configuration and the formap of their configuration are |
| 212 | listed in |
| 213 | .BR CONFIGURATION . |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 214 | . |
Sean Anderson | 138d271 | 2022-04-08 16:08:39 -0400 | [diff] [blame] | 215 | .TP |
Sean Anderson | d72a059 | 2022-06-25 13:12:11 -0400 | [diff] [blame] | 216 | .BI \-d " image-data-file" |
Sean Anderson | c4567c5 | 2022-06-25 13:12:19 -0400 | [diff] [blame] | 217 | .TQ |
| 218 | .BI \-\-image " image-data-file" |
Sean Anderson | 5f3aa38 | 2022-06-25 13:12:15 -0400 | [diff] [blame] | 219 | Use image data from |
| 220 | .IR image-data-file . |
| 221 | If the |
| 222 | .I image-type |
| 223 | is |
| 224 | .BR multi , |
| 225 | then multiple images may be specified, separated by colons: |
| 226 | .RS |
| 227 | .IP |
| 228 | .IR image-data-file [\fB:\fP image-data-file .\|.\|.] |
| 229 | .RE |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 230 | . |
Nobuhiro Iwamatsu | 9711cf6 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 231 | .TP |
Sean Anderson | d72a059 | 2022-06-25 13:12:11 -0400 | [diff] [blame] | 232 | .B \-x |
Sean Anderson | c4567c5 | 2022-06-25 13:12:19 -0400 | [diff] [blame] | 233 | .TQ |
| 234 | .B \-\-xip |
Sean Anderson | 5f3aa38 | 2022-06-25 13:12:15 -0400 | [diff] [blame] | 235 | Set the |
| 236 | .I XIP |
| 237 | (execute in place) flag. The U-Boot |
| 238 | .I bootm |
| 239 | command will not load the image data, and instead will assume it is already |
| 240 | accessible at the load address (such as via memory-mapped flash). |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 241 | . |
Sean Anderson | 41b1ca9 | 2022-06-25 13:12:12 -0400 | [diff] [blame] | 242 | .SS Options for creating FIT images |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 243 | . |
Nobuhiro Iwamatsu | 9711cf6 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 244 | .TP |
Sean Anderson | d72a059 | 2022-06-25 13:12:11 -0400 | [diff] [blame] | 245 | .BI \-b " device-tree-file" |
Sean Anderson | c4567c5 | 2022-06-25 13:12:19 -0400 | [diff] [blame] | 246 | .TQ |
| 247 | .BI \-\-device\-tree " device-tree-file" |
Andreas Bießmann | f400158 | 2016-05-01 03:01:27 +0200 | [diff] [blame] | 248 | Appends the device tree binary file (.dtb) to the FIT. |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 249 | . |
Simon Glass | bd8bc5d | 2016-02-22 22:55:52 -0700 | [diff] [blame] | 250 | .TP |
Sean Anderson | d72a059 | 2022-06-25 13:12:11 -0400 | [diff] [blame] | 251 | .BI \-c " comment" |
Sean Anderson | c4567c5 | 2022-06-25 13:12:19 -0400 | [diff] [blame] | 252 | .TQ |
| 253 | .BI \-\-comment " comment" |
Sean Anderson | 5f3aa38 | 2022-06-25 13:12:15 -0400 | [diff] [blame] | 254 | Specifies a comment to be added when signing. This is typically a message which |
| 255 | describes how the image was signed or some other useful information. |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 256 | . |
Simon Glass | bf27d3d | 2013-06-13 15:10:06 -0700 | [diff] [blame] | 257 | .TP |
Sean Anderson | d72a059 | 2022-06-25 13:12:11 -0400 | [diff] [blame] | 258 | .BI \-D " dtc-options" |
Sean Anderson | c4567c5 | 2022-06-25 13:12:19 -0400 | [diff] [blame] | 259 | .TQ |
| 260 | .BI \-\-dtcopts " dtc-options" |
Sean Anderson | 5f3aa38 | 2022-06-25 13:12:15 -0400 | [diff] [blame] | 261 | Provide additional options to the device tree compiler when creating the image. |
| 262 | See |
| 263 | .BR dtc (1) |
| 264 | for documentation of possible options. If |
| 265 | .B \-D |
| 266 | is absent, it defaults to |
| 267 | .BR "\-I dts \-O dtb \-p 500" . |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 268 | . |
Nobuhiro Iwamatsu | 9711cf6 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 269 | .TP |
Sean Anderson | d72a059 | 2022-06-25 13:12:11 -0400 | [diff] [blame] | 270 | .BI \-E |
Sean Anderson | c4567c5 | 2022-06-25 13:12:19 -0400 | [diff] [blame] | 271 | .TQ |
| 272 | .BI \-\-external |
Simon Glass | afd728c | 2016-02-22 22:55:53 -0700 | [diff] [blame] | 273 | After processing, move the image data outside the FIT and store a data offset |
Sean Anderson | 5f3aa38 | 2022-06-25 13:12:15 -0400 | [diff] [blame] | 274 | in the FIT. Images will be placed one after the other immediately after the FIT, |
| 275 | with each one aligned to a 4-byte boundary. The existing \(oqdata\(cq property |
| 276 | in each image will be replaced with \(oqdata-offset\(cq and \(oqdata-size\(cq |
| 277 | properties. A \(oqdata-offset\(cq of 0 indicates that it starts in the first |
| 278 | (4-byte-aligned) byte after the FIT. |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 279 | . |
Simon Glass | afd728c | 2016-02-22 22:55:53 -0700 | [diff] [blame] | 280 | .TP |
Sean Anderson | d72a059 | 2022-06-25 13:12:11 -0400 | [diff] [blame] | 281 | .BI \-B " alignment" |
Sean Anderson | c4567c5 | 2022-06-25 13:12:19 -0400 | [diff] [blame] | 282 | .TQ |
| 283 | .BI \-\-alignment " alignment" |
Sean Anderson | 138d271 | 2022-04-08 16:08:39 -0400 | [diff] [blame] | 284 | The alignment, in hexadecimal, that external data will be aligned to. This |
| 285 | option only has an effect when \-E is specified. |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 286 | . |
Sean Anderson | 138d271 | 2022-04-08 16:08:39 -0400 | [diff] [blame] | 287 | .TP |
Sean Anderson | e4045c0 | 2022-06-25 13:12:13 -0400 | [diff] [blame] | 288 | .BI \-p " external-position" |
Sean Anderson | c4567c5 | 2022-06-25 13:12:19 -0400 | [diff] [blame] | 289 | .TQ |
| 290 | .BI \-\-position " external-position" |
Sean Anderson | 5f3aa38 | 2022-06-25 13:12:15 -0400 | [diff] [blame] | 291 | Place external data at a static external position. Instead of writing a |
| 292 | \(oqdata-offset\(cq property defining the offset from the end of the FIT, |
| 293 | .B \-p |
| 294 | will use \(oqdata-position\(cq as the absolute position from the base of the |
| 295 | FIT. See |
| 296 | .B \-E |
| 297 | for details on using external data. |
Sean Anderson | e4045c0 | 2022-06-25 13:12:13 -0400 | [diff] [blame] | 298 | . |
| 299 | .TP |
Massimo Pegorer | 13878dd | 2023-01-05 10:31:09 +0100 | [diff] [blame] | 300 | \fB\-f \fIimage-tree-source-file\fR | \fBauto\fR | \fBauto-conf |
Sean Anderson | c4567c5 | 2022-06-25 13:12:19 -0400 | [diff] [blame] | 301 | .TQ |
Massimo Pegorer | 13878dd | 2023-01-05 10:31:09 +0100 | [diff] [blame] | 302 | \fB\-\-fit \fIimage-tree-source-file\fR | \fBauto\fR | \fBauto-conf |
Horst Kronstorfer | e6b37cf | 2011-12-21 04:31:23 +0000 | [diff] [blame] | 303 | Image tree source file that describes the structure and contents of the |
Nobuhiro Iwamatsu | 9711cf6 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 304 | FIT image. |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 305 | .IP |
Sean Anderson | 5f3aa38 | 2022-06-25 13:12:15 -0400 | [diff] [blame] | 306 | In some simple cases, the image tree source can be generated automatically. To |
| 307 | use this feature, pass |
| 308 | .BR "\-f auto" . |
| 309 | The |
| 310 | .BR \-d , |
| 311 | .BR \-A , |
| 312 | .BR \-O , |
| 313 | .BR \-T , |
| 314 | .BR \-C , |
| 315 | .BR \-a , |
| 316 | and |
| 317 | .B \-e |
| 318 | options may be used to specify the image to include in the FIT and its |
| 319 | attributes. No |
| 320 | .I image-tree-source-file |
Massimo Pegorer | 13878dd | 2023-01-05 10:31:09 +0100 | [diff] [blame] | 321 | is required. The |
| 322 | .BR \-g , |
| 323 | .BR \-o , |
| 324 | and |
| 325 | .B \-k |
| 326 | or |
| 327 | .B \-G |
| 328 | options may be used to get \(oqimages\(cq signed subnodes in the generated |
| 329 | auto FIT. Instead, to get \(oqconfigurations\(cq signed subnodes and |
| 330 | \(oqimages\(cq hashed subnodes, pass |
| 331 | .BR "\-f auto-conf". |
| 332 | In this case |
| 333 | .BR \-g , |
| 334 | .BR \-o , |
| 335 | and |
| 336 | .B \-k |
| 337 | or |
| 338 | .B \-G |
| 339 | are mandatory options. |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 340 | . |
Simon Glass | b148974 | 2013-06-13 15:10:03 -0700 | [diff] [blame] | 341 | .TP |
Sean Anderson | d72a059 | 2022-06-25 13:12:11 -0400 | [diff] [blame] | 342 | .B \-F |
Sean Anderson | c4567c5 | 2022-06-25 13:12:19 -0400 | [diff] [blame] | 343 | .TQ |
| 344 | .B \-\-update |
Sean Anderson | 5f3aa38 | 2022-06-25 13:12:15 -0400 | [diff] [blame] | 345 | Indicates that an existing FIT image should be modified. No dtc compilation will |
| 346 | be performed and |
| 347 | .B \-f |
| 348 | should not be passed. This can be used to sign images with additional keys |
| 349 | after initial image creation. |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 350 | . |
Simon Glass | ce8c3ca | 2013-06-13 15:10:05 -0700 | [diff] [blame] | 351 | .TP |
Sean Anderson | d72a059 | 2022-06-25 13:12:11 -0400 | [diff] [blame] | 352 | .BI \-i " ramdisk-file" |
Sean Anderson | c4567c5 | 2022-06-25 13:12:19 -0400 | [diff] [blame] | 353 | .TQ |
| 354 | .BI \-\-initramfs " ramdisk-file" |
Sean Anderson | 5f3aa38 | 2022-06-25 13:12:15 -0400 | [diff] [blame] | 355 | Append a ramdisk or initramfs file to the image. |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 356 | . |
Tomeu Vizoso | 8d83ed2 | 2016-11-04 14:22:15 +0100 | [diff] [blame] | 357 | .TP |
Sean Anderson | d72a059 | 2022-06-25 13:12:11 -0400 | [diff] [blame] | 358 | .BI \-k " key-directory" |
Sean Anderson | c4567c5 | 2022-06-25 13:12:19 -0400 | [diff] [blame] | 359 | .TQ |
| 360 | .BI \-\-key\-dir " key-directory" |
Simon Glass | b148974 | 2013-06-13 15:10:03 -0700 | [diff] [blame] | 361 | Specifies the directory containing keys to use for signing. This directory |
Sean Anderson | 5f3aa38 | 2022-06-25 13:12:15 -0400 | [diff] [blame] | 362 | should contain a private key file |
| 363 | .IR name .key |
| 364 | for use with signing, and a certificate |
| 365 | .IR name .crt |
| 366 | (containing the public key) for use with verification. The public key is only |
| 367 | necessary when embedding it into another device tree using |
| 368 | .BR \-K . |
| 369 | .I name |
Massimo Pegorer | 13878dd | 2023-01-05 10:31:09 +0100 | [diff] [blame] | 370 | is the value of the signature node's \(oqkey-name-hint\(cq property. |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 371 | . |
Simon Glass | b4d8b09 | 2013-06-13 15:10:04 -0700 | [diff] [blame] | 372 | .TP |
Sean Anderson | d72a059 | 2022-06-25 13:12:11 -0400 | [diff] [blame] | 373 | .BI \-G " key-file" |
Sean Anderson | c4567c5 | 2022-06-25 13:12:19 -0400 | [diff] [blame] | 374 | .TQ |
| 375 | .BI \-\-key\-file " key-file" |
Sean Anderson | 021e2db | 2022-05-16 16:11:07 -0400 | [diff] [blame] | 376 | Specifies the private key file to use when signing. This option may be used |
Massimo Pegorer | 13878dd | 2023-01-05 10:31:09 +0100 | [diff] [blame] | 377 | instead of \-k. Useful when the private key file basename does not match |
| 378 | \(oqkey-name-hint\(cq value. But note that it may lead to unexpected results |
| 379 | when used together with -K and/or -k options. |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 380 | . |
Sean Anderson | 021e2db | 2022-05-16 16:11:07 -0400 | [diff] [blame] | 381 | .TP |
Sean Anderson | d72a059 | 2022-06-25 13:12:11 -0400 | [diff] [blame] | 382 | .BI \-K " key-destination" |
Sean Anderson | c4567c5 | 2022-06-25 13:12:19 -0400 | [diff] [blame] | 383 | .TQ |
| 384 | .BI \-\-key\-dest " key-destination" |
Simon Glass | b4d8b09 | 2013-06-13 15:10:04 -0700 | [diff] [blame] | 385 | Specifies a compiled device tree binary file (typically .dtb) to write |
| 386 | public key information into. When a private key is used to sign an image, |
| 387 | the corresponding public key is written into this file for for run-time |
| 388 | verification. Typically the file here is the device tree binary used by |
| 389 | CONFIG_OF_CONTROL in U-Boot. |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 390 | . |
Simon Glass | 817278a | 2013-06-13 15:10:07 -0700 | [diff] [blame] | 391 | .TP |
Sean Anderson | d72a059 | 2022-06-25 13:12:11 -0400 | [diff] [blame] | 392 | .BI \-g " key-name-hint" |
Sean Anderson | c4567c5 | 2022-06-25 13:12:19 -0400 | [diff] [blame] | 393 | .TQ |
| 394 | .BI \-\-key\-name\-hint " key-name-hint" |
Massimo Pegorer | 13878dd | 2023-01-05 10:31:09 +0100 | [diff] [blame] | 395 | Specifies the value of signature node \(oqkey-name-hint\(cq property for |
| 396 | an automatically generated FIT image. It makes sense only when used with |
| 397 | .B "\-f auto" |
| 398 | or |
| 399 | .BR "\-f auto-conf". |
| 400 | This option also indicates that the images or configurations included in |
| 401 | the FIT should be signed. If this option is specified, then |
Sean Anderson | 5f3aa38 | 2022-06-25 13:12:15 -0400 | [diff] [blame] | 402 | .B \-o |
| 403 | must be specified as well. |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 404 | . |
Sean Anderson | 5f15029 | 2022-05-16 16:11:08 -0400 | [diff] [blame] | 405 | .TP |
Massimo Pegorer | 13878dd | 2023-01-05 10:31:09 +0100 | [diff] [blame] | 406 | .BI \-o " checksum" , crypto |
Sean Anderson | c4567c5 | 2022-06-25 13:12:19 -0400 | [diff] [blame] | 407 | .TQ |
Massimo Pegorer | 13878dd | 2023-01-05 10:31:09 +0100 | [diff] [blame] | 408 | .BI \-\-algo " checksum" , crypto |
| 409 | Specifies the algorithm to be used for signing a FIT image, overriding value |
| 410 | taken from the signature node \(oqalgo\(cq property in the |
| 411 | .IR image-tree-source-file . |
| 412 | It is mandatory for automatically generated FIT. |
| 413 | .IP |
Sean Anderson | 5f3aa38 | 2022-06-25 13:12:15 -0400 | [diff] [blame] | 414 | The valid values for |
Massimo Pegorer | 13878dd | 2023-01-05 10:31:09 +0100 | [diff] [blame] | 415 | .I checksum |
Sean Anderson | 5f3aa38 | 2022-06-25 13:12:15 -0400 | [diff] [blame] | 416 | are: |
| 417 | .RS |
| 418 | .IP |
| 419 | .TS |
| 420 | lb. |
Massimo Pegorer | 13878dd | 2023-01-05 10:31:09 +0100 | [diff] [blame] | 421 | sha1 |
| 422 | sha256 |
| 423 | sha384 |
| 424 | sha512 |
Sean Anderson | 5f3aa38 | 2022-06-25 13:12:15 -0400 | [diff] [blame] | 425 | .TE |
| 426 | .RE |
| 427 | .IP |
| 428 | The valid values for |
Massimo Pegorer | 13878dd | 2023-01-05 10:31:09 +0100 | [diff] [blame] | 429 | .I crypto |
| 430 | are: |
Sean Anderson | 5f3aa38 | 2022-06-25 13:12:15 -0400 | [diff] [blame] | 431 | .RS |
| 432 | .IP |
| 433 | .TS |
| 434 | lb. |
Massimo Pegorer | 13878dd | 2023-01-05 10:31:09 +0100 | [diff] [blame] | 435 | rsa2048 |
| 436 | rsa3072 |
| 437 | rsa4096 |
| 438 | ecdsa256 |
Sean Anderson | 5f3aa38 | 2022-06-25 13:12:15 -0400 | [diff] [blame] | 439 | .TE |
| 440 | .RE |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 441 | . |
Jan Kiszka | 4043f32 | 2022-01-14 10:21:19 +0100 | [diff] [blame] | 442 | .TP |
Sean Anderson | d72a059 | 2022-06-25 13:12:11 -0400 | [diff] [blame] | 443 | .B \-r |
Sean Anderson | c4567c5 | 2022-06-25 13:12:19 -0400 | [diff] [blame] | 444 | .TQ |
| 445 | .B \-\-key\-required |
Massimo Pegorer | 13878dd | 2023-01-05 10:31:09 +0100 | [diff] [blame] | 446 | Specifies that keys used to sign the FIT are required. This means that images |
| 447 | or configurations signatures must be verified before using them (i.e. to |
| 448 | boot). Without this option, the verification will be optional (useful for |
| 449 | testing but not for release). It makes sense only when used with |
| 450 | .BR \-K. |
| 451 | When both, images and configurations, are signed, \(oqrequired\(cq property |
| 452 | value will be "conf". |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 453 | . |
Simon Glass | 472ee0c | 2020-07-09 18:39:43 -0600 | [diff] [blame] | 454 | .TP |
Sean Anderson | d72a059 | 2022-06-25 13:12:11 -0400 | [diff] [blame] | 455 | .BI \-N " engine" |
Sean Anderson | c4567c5 | 2022-06-25 13:12:19 -0400 | [diff] [blame] | 456 | .TQ |
| 457 | .BI \-\-engine " engine" |
Sean Anderson | 5f3aa38 | 2022-06-25 13:12:15 -0400 | [diff] [blame] | 458 | The openssl engine to use when signing and verifying the image. For a complete |
| 459 | list of available engines, refer to |
Sean Anderson | 138d271 | 2022-04-08 16:08:39 -0400 | [diff] [blame] | 460 | .BR engine (1). |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 461 | . |
Sean Anderson | 138d271 | 2022-04-08 16:08:39 -0400 | [diff] [blame] | 462 | .TP |
Sean Anderson | d72a059 | 2022-06-25 13:12:11 -0400 | [diff] [blame] | 463 | .B \-t |
Sean Anderson | c4567c5 | 2022-06-25 13:12:19 -0400 | [diff] [blame] | 464 | .TQ |
| 465 | .B \-\-touch |
Simon Glass | 472ee0c | 2020-07-09 18:39:43 -0600 | [diff] [blame] | 466 | Update the timestamp in the FIT. |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 467 | .IP |
Sean Anderson | 5f3aa38 | 2022-06-25 13:12:15 -0400 | [diff] [blame] | 468 | Normally the FIT timestamp is created the first time mkimage runs, |
Simon Glass | 472ee0c | 2020-07-09 18:39:43 -0600 | [diff] [blame] | 469 | when converting the source .its to the binary .fit file. This corresponds to |
Sean Anderson | 5f3aa38 | 2022-06-25 13:12:15 -0400 | [diff] [blame] | 470 | using |
| 471 | .BR -f . |
| 472 | But if the original input to mkimage is a binary file (already compiled), then |
| 473 | the timestamp is assumed to have been set previously. |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 474 | . |
Sean Anderson | 4db3285 | 2022-06-25 13:12:20 -0400 | [diff] [blame] | 475 | .SH CONFIGURATION |
| 476 | This section documents the formats of the primary and secondary configuration |
| 477 | options for each image type which supports them. |
| 478 | . |
| 479 | .SS aisimage |
| 480 | The primary configuration is a file containing a series of |
| 481 | .I AIS |
| 482 | (Application Image Script) commands, one per line. Each command has the form |
| 483 | .RS |
| 484 | .P |
| 485 | .IR "command argument " .\|.\|. |
| 486 | .RE |
| 487 | .P |
| 488 | See |
| 489 | .UR https://\:www\:.ti\:.com/\:lit/\:pdf/\:spraag0 |
| 490 | TI application report SPRAAG0E |
| 491 | .UE |
| 492 | for details. |
| 493 | . |
| 494 | .SS atmelimage |
| 495 | The primary configuration is a comma-separated list of NAND Flash parameters of |
| 496 | the form |
| 497 | .RS |
| 498 | .P |
| 499 | \fIparameter\fB=\fIvalue\fR[\fB,\fIparameter\fB=\fIvalue\fR.\|.\|.\&] |
| 500 | .RE |
| 501 | .P |
| 502 | Valid |
| 503 | .IR parameter s |
| 504 | are |
| 505 | .RS |
| 506 | .P |
| 507 | .TS |
| 508 | lb. |
| 509 | usePmecc |
| 510 | nbSectorPerPage |
| 511 | spareSize |
| 512 | eccBitReq |
| 513 | sectorSize |
| 514 | eccOffset |
| 515 | .TE |
| 516 | .RE |
| 517 | .P |
| 518 | and valid |
| 519 | .IR value s |
| 520 | are decimal numbers. See section 11.4.4.1 of the SAMA5D3 Series Data Sheet for |
| 521 | valid values for each parameter. |
| 522 | . |
| 523 | .SS imximage |
| 524 | The primary configuration is a file containing configuration commands, as |
| 525 | documented in doc/\:imx/\:mkimage/\:imximage.txt of the U-Boot source. |
| 526 | . |
| 527 | .SS imx8image and imx8mimage |
| 528 | The primary configuration is a file containing configuration commands, as |
| 529 | documented in doc/\:imx/\:mkimage/\:imx8image.txt of the U-Boot source. |
| 530 | . |
| 531 | .SS kwbimage |
| 532 | The primary configuration is a file containing configuration commands, as |
| 533 | documented in doc/\:imx/\:mkimage/\:kwbimage.txt of the U-Boot source. |
| 534 | . |
| 535 | .SS mtk_image |
| 536 | The primary configuration is a semicolon-separated list of header options of the |
| 537 | form |
| 538 | .RS |
| 539 | .P |
| 540 | \fIkey\fB=\fIvalue\fR[\fB;\fIkey\fB=\fIvalue\fR.\|.\|.\&] |
| 541 | .RE |
| 542 | .P |
| 543 | where the valid keys are: |
| 544 | .RS |
| 545 | .P |
| 546 | .TS |
| 547 | lb lbx |
| 548 | lb l. |
| 549 | Key Description |
| 550 | _ |
| 551 | lk T{ |
| 552 | If \fB1\fP, then an \fILK\fP (legacy) image header is used. Otherwise, a |
| 553 | \fIBootROM\fP image header is used. |
| 554 | T} |
| 555 | lkname T{ |
| 556 | The name of the LK image header. The maximum length is 32 ASCII characters. If |
| 557 | not specified, the default value is \fBU-Boot\fP. |
| 558 | T} |
| 559 | media The boot device. See below for valid values. |
| 560 | nandinfo The desired NAND device type. See below for valid values. |
| 561 | arm64 If \fB1\fP, then this denotes an AArch64 image. |
| 562 | hdroffset Increase the reported size of the BRLYT header by this amount. |
| 563 | .TE |
| 564 | .RE |
| 565 | .P |
| 566 | Valid values for |
| 567 | .B media |
| 568 | are: |
| 569 | .RS |
| 570 | .P |
| 571 | .TS |
| 572 | lb lb |
| 573 | lb l. |
| 574 | Value Description |
| 575 | _ |
| 576 | nand Parallel NAND flash |
| 577 | snand Serial NAND flash |
| 578 | nor Serial NOR flash |
| 579 | emmc \fIeMMC\fP (Embedded Multi-Media Card) |
| 580 | sdmmc \fISD\fP (Secure Digital) card |
| 581 | .TE |
| 582 | .RE |
| 583 | .P |
| 584 | Valid values for |
| 585 | .B nandinfo |
| 586 | are: |
| 587 | .RS |
| 588 | .P |
| 589 | .TS |
| 590 | lb lb lb lb lb |
| 591 | lb l l l l. |
| 592 | Value NAND type Page size OOB size Total size |
| 593 | _ |
| 594 | 2k+64 Serial 2KiB 64B |
| 595 | 2k+120 Serial 2KiB 120B |
| 596 | 2k+128 Serial 2KiB 128B |
| 597 | 4k+256 Serial 4KiB 256B |
| 598 | 1g:2k+64 Parallel 2KiB 64B 1Gbit |
| 599 | 2g:2k+64 Parallel 2KiB 64B 2Gbit |
| 600 | 4g:2k+64 Parallel 2KiB 64B 4Gbit |
| 601 | 2g:2k+128 Parallel 2KiB 128B 2Gbit |
| 602 | 4g:2k+128 Parallel 2KiB 128B 4Gbit |
| 603 | .TE |
| 604 | .RE |
| 605 | . |
| 606 | .SS mxsimage |
| 607 | The primary configuration is a file containing configuration commands, as |
| 608 | documented in doc/\:imx/\:mkimage/\:mxsimage.txt of the U-Boot source. |
| 609 | . |
| 610 | .SS omapimage |
| 611 | The primary configuration is the optional value |
| 612 | .BR byteswap . |
| 613 | If present, each 32-bit word of the image will have its bytes swapped |
| 614 | (converting from little-endian to big-endian, or vice versa). |
| 615 | . |
| 616 | .SS pblimage |
| 617 | The primary configuration is a file containing the |
| 618 | .I PBI |
| 619 | (Pre-Boot Image) header. Each line of the configuration has the format |
| 620 | .RS |
| 621 | .P |
| 622 | .IR value "[ " value .\|.\|.\&] |
| 623 | .RE |
| 624 | .P |
| 625 | Where |
| 626 | .I value |
| 627 | is a 32-bit hexadecimal integer. Each |
| 628 | .I value |
| 629 | will, after being converted to raw bytes, be literally prepended to the PBI. |
| 630 | .P |
| 631 | The secondary configuration is a file with the same format as the primary |
| 632 | configuration file. It will be inserted into the image after the primary |
| 633 | configuration data and before the image data. |
| 634 | .P |
| 635 | It is traditional to use the primary configuration file for the |
| 636 | .I RCW |
| 637 | (Reset Configuration Word), and the secondary configuration file for any |
| 638 | additional PBI commands. However, it is also possible to convert an existing PBI |
| 639 | to the above format and \(lqchain\(rq additional data onto the end of the |
| 640 | image. This may be especially useful for creating secure boot images. |
| 641 | . |
| 642 | .SS rkimage |
| 643 | The primary configuration is the name of the processor to generate the image |
| 644 | for. Valid values are: |
| 645 | .RS |
| 646 | .P |
| 647 | .TS |
| 648 | lb. |
| 649 | px30 |
| 650 | rk3036 |
| 651 | rk3066 |
| 652 | rk3128 |
| 653 | rk3188 |
| 654 | rk322x |
| 655 | rk3288 |
| 656 | rk3308 |
| 657 | rk3328 |
| 658 | rk3368 |
| 659 | rk3399 |
| 660 | rv1108 |
| 661 | rk3568 |
| 662 | .TE |
| 663 | .RE |
| 664 | . |
| 665 | .SS sunxi_egon |
| 666 | The primary configuration is the name to use for the device tree. |
| 667 | . |
| 668 | .SS ublimage |
| 669 | The primary configuration is a file containing configuration commands, as |
| 670 | documented in doc/\:README.ublimage of the U-Boot source. |
| 671 | . |
| 672 | .SS zynqimage and zynqmpimage |
| 673 | For |
| 674 | .BR zynqmpimage , |
| 675 | the primary configuration is a file containing the |
| 676 | .I PMUFW |
| 677 | (Power Management Unit Firmware). |
| 678 | .B zynqimage |
| 679 | does not use the primary configuration. |
| 680 | .P |
| 681 | For both image types, the secondary configuration is a file containinig |
| 682 | initialization parameters, one per line. Each parameter has the form |
| 683 | .RS |
| 684 | .P |
| 685 | .I address data |
| 686 | .RE |
| 687 | .P |
| 688 | where |
| 689 | .I address |
| 690 | and |
| 691 | .I data |
| 692 | are hexadecimal integers. The boot ROM will write each |
| 693 | .I data |
| 694 | to |
| 695 | .I address |
| 696 | when loading the image. At most 256 parameters may be specified in this |
| 697 | manner. |
| 698 | . |
Sean Anderson | 5e5d9b5 | 2022-06-25 13:12:16 -0400 | [diff] [blame] | 699 | .SH BUGS |
| 700 | Please report bugs to the |
| 701 | .UR https://\:source\:.denx\:.de/\:u-boot/\:u-boot/\:issues |
| 702 | U-Boot bug tracker |
| 703 | .UE . |
Horst Kronstorfer | e6b37cf | 2011-12-21 04:31:23 +0000 | [diff] [blame] | 704 | .SH EXAMPLES |
Sean Anderson | 0575794 | 2022-06-25 13:12:10 -0400 | [diff] [blame] | 705 | .\" Reduce the width of the tab stops to something reasonable |
| 706 | .ta T 1i |
Nobuhiro Iwamatsu | 9711cf6 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 707 | List image information: |
Sean Anderson | 0575794 | 2022-06-25 13:12:10 -0400 | [diff] [blame] | 708 | .RS |
| 709 | .P |
| 710 | .EX |
| 711 | \fBmkimage \-l uImage |
| 712 | .EE |
| 713 | .RE |
Nobuhiro Iwamatsu | 9711cf6 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 714 | .P |
| 715 | Create legacy image with compressed PowerPC Linux kernel: |
Sean Anderson | 0575794 | 2022-06-25 13:12:10 -0400 | [diff] [blame] | 716 | .RS |
| 717 | .P |
| 718 | .EX |
| 719 | \fBmkimage \-A powerpc \-O linux \-T kernel \-C gzip \\ |
| 720 | \-a 0 \-e 0 \-n Linux \-d vmlinux.gz uImage |
| 721 | .EE |
| 722 | .RE |
Nobuhiro Iwamatsu | 9711cf6 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 723 | .P |
| 724 | Create FIT image with compressed PowerPC Linux kernel: |
Sean Anderson | 0575794 | 2022-06-25 13:12:10 -0400 | [diff] [blame] | 725 | .RS |
| 726 | .P |
| 727 | .EX |
| 728 | \fBmkimage \-f kernel.its kernel.itb |
| 729 | .EE |
| 730 | .RE |
Simon Glass | b4d8b09 | 2013-06-13 15:10:04 -0700 | [diff] [blame] | 731 | .P |
| 732 | Create FIT image with compressed kernel and sign it with keys in the |
Sean Anderson | 0575794 | 2022-06-25 13:12:10 -0400 | [diff] [blame] | 733 | /public/signing\-keys directory. Add corresponding public keys into u\-boot.dtb, |
Simon Glass | b4d8b09 | 2013-06-13 15:10:04 -0700 | [diff] [blame] | 734 | skipping those for which keys cannot be found. Also add a comment. |
Sean Anderson | 0575794 | 2022-06-25 13:12:10 -0400 | [diff] [blame] | 735 | .RS |
Simon Glass | ce8c3ca | 2013-06-13 15:10:05 -0700 | [diff] [blame] | 736 | .P |
Sean Anderson | 0575794 | 2022-06-25 13:12:10 -0400 | [diff] [blame] | 737 | .EX |
| 738 | \fBmkimage \-f kernel.its \-k /public/signing\-keys \-K u\-boot.dtb \\ |
| 739 | \-c \(dqKernel 3.8 image for production devices\(dq kernel.itb |
| 740 | .EE |
| 741 | .RE |
| 742 | .P |
Massimo Pegorer | 13878dd | 2023-01-05 10:31:09 +0100 | [diff] [blame] | 743 | Add public key to u\-boot.dtb without needing a FIT to sign. This will also |
Sean Anderson | 5f15029 | 2022-05-16 16:11:08 -0400 | [diff] [blame] | 744 | create a FIT containing an images node with no data named unused.itb. |
Sean Anderson | 0575794 | 2022-06-25 13:12:10 -0400 | [diff] [blame] | 745 | .RS |
| 746 | .P |
| 747 | .EX |
| 748 | \fBmkimage \-f auto \-d /dev/null \-k /public/signing\-keys \-g dev \\ |
| 749 | \-o sha256,rsa2048 \-K u\-boot.dtb unused.itb |
| 750 | .EE |
| 751 | .RE |
Sean Anderson | 5f15029 | 2022-05-16 16:11:08 -0400 | [diff] [blame] | 752 | .P |
Massimo Pegorer | 13878dd | 2023-01-05 10:31:09 +0100 | [diff] [blame] | 753 | Add public key with required = "conf" property to u\-boot.dtb without needing |
| 754 | a FIT to sign. This will also create a useless FIT named unused.itb. |
| 755 | .RS |
| 756 | .P |
| 757 | .EX |
| 758 | \fBmkimage \-f auto-conf \-d /dev/null \-k /public/signing\-keys \-g dev \\ |
| 759 | \-o sha256,rsa2048 \-K u\-boot.dtb -r unused.itb |
| 760 | .EE |
| 761 | .RE |
| 762 | .P |
Simon Glass | ce8c3ca | 2013-06-13 15:10:05 -0700 | [diff] [blame] | 763 | Update an existing FIT image, signing it with additional keys. |
Sean Anderson | 0575794 | 2022-06-25 13:12:10 -0400 | [diff] [blame] | 764 | Add corresponding public keys into u\-boot.dtb. This will resign all images |
Simon Glass | ce8c3ca | 2013-06-13 15:10:05 -0700 | [diff] [blame] | 765 | with keys that are available in the new directory. Images that request signing |
| 766 | with unavailable keys are skipped. |
Sean Anderson | 0575794 | 2022-06-25 13:12:10 -0400 | [diff] [blame] | 767 | .RS |
| 768 | .P |
| 769 | .EX |
| 770 | \fBmkimage \-F \-k /secret/signing\-keys \-K u\-boot.dtb \\ |
| 771 | \-c \(dqKernel 3.8 image for production devices\(dq kernel.itb |
| 772 | .EE |
| 773 | .RE |
Simon Glass | 88e31cb | 2016-02-22 22:55:51 -0700 | [diff] [blame] | 774 | .P |
| 775 | Create a FIT image containing a kernel, using automatic mode. No .its file |
| 776 | is required. |
Sean Anderson | 0575794 | 2022-06-25 13:12:10 -0400 | [diff] [blame] | 777 | .RS |
| 778 | .P |
| 779 | .EX |
| 780 | \fBmkimage \-f auto \-A arm \-O linux \-T kernel \-C none \-a 43e00000 \-e 0 \\ |
| 781 | \-c \(dqKernel 4.4 image for production devices\(dq \-d vmlinuz kernel.itb |
| 782 | .EE |
| 783 | .RE |
Simon Glass | bd8bc5d | 2016-02-22 22:55:52 -0700 | [diff] [blame] | 784 | .P |
| 785 | Create a FIT image containing a kernel and some device tree files, using |
| 786 | automatic mode. No .its file is required. |
Sean Anderson | 0575794 | 2022-06-25 13:12:10 -0400 | [diff] [blame] | 787 | .RS |
| 788 | .P |
| 789 | .EX |
| 790 | \fBmkimage \-f auto \-A arm \-O linux \-T kernel \-C none \-a 43e00000 \-e 0 \\ |
| 791 | \-c \(dqKernel 4.4 image for production devices\(dq \-d vmlinuz \\ |
| 792 | \-b /path/to/rk3288\-firefly.dtb \-b /path/to/rk3288\-jerry.dtb kernel.itb |
| 793 | .EE |
| 794 | .RE |
Sean Anderson | 5f15029 | 2022-05-16 16:11:08 -0400 | [diff] [blame] | 795 | .P |
| 796 | Create a FIT image containing a signed kernel, using automatic mode. No .its |
| 797 | file is required. |
Sean Anderson | 0575794 | 2022-06-25 13:12:10 -0400 | [diff] [blame] | 798 | .RS |
| 799 | .P |
| 800 | .EX |
| 801 | \fBmkimage \-f auto \-A arm \-O linux \-T kernel \-C none \-a 43e00000 \-e 0 \\ |
| 802 | \-d vmlinuz \-k /secret/signing\-keys \-g dev \-o sha256,rsa2048 kernel.itb |
| 803 | .EE |
| 804 | .RE |
Massimo Pegorer | 13878dd | 2023-01-05 10:31:09 +0100 | [diff] [blame] | 805 | .P |
| 806 | Create a FIT image containing a kernel and some device tree files, signing |
| 807 | each configuration, using automatic mode. Moreover, the public key needed to |
| 808 | verify signatures is added to u\-boot.dtb with required = "conf" property. |
| 809 | .RS |
| 810 | .P |
| 811 | .EX |
| 812 | \fBmkimage \-f auto-conf \-A arm \-O linux \-T kernel \-C none \-a 43e00000 \\ |
| 813 | \-e 0 \-d vmlinuz \-b /path/to/file\-1.dtb \-b /path/to/file\-2.dtb \\ |
| 814 | \-k /folder/with/signing\-keys \-g dev \-o sha256,rsa2048 \\ |
| 815 | \-K u\-boot.dtb -r kernel.itb |
| 816 | .EE |
| 817 | .RE |
Sean Anderson | 0d86273 | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 818 | . |
Sean Anderson | 0707c98 | 2022-06-25 13:12:17 -0400 | [diff] [blame] | 819 | .SH SEE ALSO |
| 820 | .BR dtc (1), |
| 821 | .BR dumpimage (1), |
| 822 | .BR openssl (1), |
| 823 | the\~ |
| 824 | .UR https://\:u-boot\:.readthedocs\:.io/\:en/\:latest/\:index.html |
| 825 | U-Boot documentation |
| 826 | .UE |