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