Pali Rohár | 11f29d4 | 2022-02-13 01:09:46 +0100 | [diff] [blame] | 1 | .TH MKIMAGE 1 "2022-02-07" |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 2 | . |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 3 | .SH NAME |
| 4 | mkimage \- Generate image for U-Boot |
| 5 | .SH SYNOPSIS |
Sean Anderson | a568554 | 2022-06-25 13:12:08 -0400 | [diff] [blame] | 6 | .SY mkimage |
| 7 | .OP \-T type |
| 8 | .BI \-l\~ image-file-name |
| 9 | .YS |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 10 | . |
Sean Anderson | a568554 | 2022-06-25 13:12:08 -0400 | [diff] [blame] | 11 | .SY mkimage |
| 12 | .RI [ option\~ .\|.\|.\&] |
| 13 | .OP \-T type |
| 14 | .I image-file-name |
| 15 | .YS |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 16 | . |
Sean Anderson | a568554 | 2022-06-25 13:12:08 -0400 | [diff] [blame] | 17 | .SY mkimage |
| 18 | .RI [ option\~ .\|.\|.\&] |
| 19 | .BI \-f\~ image-tree-source-file\c |
| 20 | .RB | auto |
| 21 | .I image-file-name |
| 22 | .YS |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 23 | . |
Sean Anderson | a568554 | 2022-06-25 13:12:08 -0400 | [diff] [blame] | 24 | .SY mkimage |
| 25 | .RI [ option\~ .\|.\|.\&] |
| 26 | .BI \-F\~ image-file-name |
| 27 | .YS |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 28 | . |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 29 | .SH "DESCRIPTION" |
| 30 | The |
| 31 | .B mkimage |
| 32 | command is used to create images for use with the U-Boot boot loader. |
Horst Kronstorfer | 7aecfdd | 2011-12-21 04:31:23 +0000 | [diff] [blame] | 33 | These images can contain the linux kernel, device tree blob, root file |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 34 | system image, firmware images etc., either separate or combined. |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 35 | .P |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 36 | .B mkimage |
| 37 | supports two different formats: |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 38 | .P |
Horst Kronstorfer | 7aecfdd | 2011-12-21 04:31:23 +0000 | [diff] [blame] | 39 | The old |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 40 | .I legacy image |
| 41 | format concatenates the individual parts (for example, kernel image, |
| 42 | device tree blob and ramdisk image) and adds a 64 bytes header |
| 43 | containing information about target architecture, operating system, |
| 44 | image type, compression method, entry points, time stamp, checksums, |
| 45 | etc. |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 46 | .P |
Horst Kronstorfer | 7aecfdd | 2011-12-21 04:31:23 +0000 | [diff] [blame] | 47 | The new |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 48 | .I FIT (Flattened Image Tree) format |
Horst Kronstorfer | 7aecfdd | 2011-12-21 04:31:23 +0000 | [diff] [blame] | 49 | allows for more flexibility in handling images of various types and also |
Simon Glass | 80e4df8 | 2013-06-13 15:10:03 -0700 | [diff] [blame] | 50 | enhances integrity protection of images with stronger checksums. It also |
| 51 | supports verified boot. |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 52 | . |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 53 | .SH "OPTIONS" |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 54 | . |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 55 | .B List image information: |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 56 | . |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 57 | .TP |
| 58 | .BI "\-l [" "uimage file name" "]" |
| 59 | mkimage lists the information contained in the header of an existing U-Boot image. |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 60 | . |
Pali Rohár | 11f29d4 | 2022-02-13 01:09:46 +0100 | [diff] [blame] | 61 | .TP |
| 62 | .BI "\-T [" "image type" "]" |
| 63 | Parse image file as type. |
| 64 | Pass \-h as the image to see the list of supported image type. |
| 65 | Without this option image type is autodetected. |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 66 | . |
Sean Anderson | deb2638 | 2022-04-08 16:08:39 -0400 | [diff] [blame] | 67 | .TP |
| 68 | .BI "\-q" |
| 69 | Quiet. Don't print the image header on successful verification. |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 70 | . |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 71 | .P |
| 72 | .B Create old legacy image: |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 73 | . |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 74 | .TP |
| 75 | .BI "\-A [" "architecture" "]" |
Loïc Minier | 3f1266d | 2011-01-04 02:32:36 +0100 | [diff] [blame] | 76 | Set architecture. Pass \-h as the architecture to see the list of supported architectures. |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 77 | . |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 78 | .TP |
| 79 | .BI "\-O [" "os" "]" |
| 80 | Set operating system. bootm command of u-boot changes boot method by os type. |
Loïc Minier | 3f1266d | 2011-01-04 02:32:36 +0100 | [diff] [blame] | 81 | Pass \-h as the OS to see the list of supported OS. |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 82 | . |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 83 | .TP |
| 84 | .BI "\-T [" "image type" "]" |
| 85 | Set image type. |
Loïc Minier | 3f1266d | 2011-01-04 02:32:36 +0100 | [diff] [blame] | 86 | Pass \-h as the image to see the list of supported image type. |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 87 | . |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 88 | .TP |
| 89 | .BI "\-C [" "compression type" "]" |
| 90 | Set compression type. |
Loïc Minier | 3f1266d | 2011-01-04 02:32:36 +0100 | [diff] [blame] | 91 | Pass \-h as the compression to see the list of supported compression type. |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 92 | . |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 93 | .TP |
Jelle van der Waa | 4fd096f | 2016-09-14 21:54:53 +0200 | [diff] [blame] | 94 | .BI "\-a [" "load address" "]" |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 95 | Set load address with a hex number. |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 96 | . |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 97 | .TP |
| 98 | .BI "\-e [" "entry point" "]" |
| 99 | Set entry point with a hex number. |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 100 | . |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 101 | .TP |
Simon Glass | 80e4df8 | 2013-06-13 15:10:03 -0700 | [diff] [blame] | 102 | .BI "\-l" |
| 103 | List the contents of an image. |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 104 | . |
Simon Glass | 80e4df8 | 2013-06-13 15:10:03 -0700 | [diff] [blame] | 105 | .TP |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 106 | .BI "\-n [" "image name" "]" |
| 107 | Set image name to 'image name'. |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 108 | . |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 109 | .TP |
Sean Anderson | deb2638 | 2022-04-08 16:08:39 -0400 | [diff] [blame] | 110 | .BI "\-R [" "secondary image name" "]" |
| 111 | Some image types support a second image for additional data. For these types, |
| 112 | use \-R to specify this second image. |
Sean Anderson | 5920e5c | 2022-05-16 16:11:07 -0400 | [diff] [blame] | 113 | .TS |
| 114 | allbox; |
| 115 | lb lbx |
| 116 | l l. |
| 117 | Image Type Secondary Image Description |
| 118 | pblimage Additional RCW-style header, typically used for PBI commands. |
| 119 | zynqimage, zynqmpimage T{ |
| 120 | Initialization parameters, one per line. Each parameter has the form |
| 121 | .sp |
| 122 | .ti 4 |
| 123 | .I address data |
| 124 | .sp |
| 125 | where |
| 126 | .I address |
| 127 | and |
| 128 | .I data |
| 129 | are hexadecimal integers. The boot ROM will write each |
| 130 | .I data |
| 131 | to |
| 132 | .I address |
| 133 | when loading the image. At most 256 parameters may be specified in this |
| 134 | manner. |
| 135 | T} |
| 136 | .TE |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 137 | . |
Sean Anderson | deb2638 | 2022-04-08 16:08:39 -0400 | [diff] [blame] | 138 | .TP |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 139 | .BI "\-d [" "image data file" "]" |
| 140 | Use image data from 'image data file'. |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 141 | . |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 142 | .TP |
| 143 | .BI "\-x" |
| 144 | Set XIP (execute in place) flag. |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 145 | . |
Sean Anderson | deb2638 | 2022-04-08 16:08:39 -0400 | [diff] [blame] | 146 | .TP |
| 147 | .BI "\-s" |
Sean Anderson | 5920e5c | 2022-05-16 16:11:07 -0400 | [diff] [blame] | 148 | Don't copy in the image data. Depending on the image type, this may create |
| 149 | just the header, everything but the image data, or nothing at all. |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 150 | . |
Sean Anderson | deb2638 | 2022-04-08 16:08:39 -0400 | [diff] [blame] | 151 | .TP |
| 152 | .BI "\-v" |
| 153 | Verbose. Print file names as they are added to the image. |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 154 | . |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 155 | .P |
| 156 | .B Create FIT image: |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 157 | . |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 158 | .TP |
Andreas Bießmann | 7a439ca | 2016-05-01 03:01:27 +0200 | [diff] [blame] | 159 | .BI "\-b [" "device tree file" "] |
| 160 | Appends the device tree binary file (.dtb) to the FIT. |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 161 | . |
Simon Glass | fb4cce0 | 2016-02-22 22:55:52 -0700 | [diff] [blame] | 162 | .TP |
Simon Glass | 4f61042 | 2013-06-13 15:10:06 -0700 | [diff] [blame] | 163 | .BI "\-c [" "comment" "]" |
| 164 | Specifies a comment to be added when signing. This is typically a useful |
| 165 | message which describes how the image was signed or some other useful |
| 166 | information. |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 167 | . |
Simon Glass | 4f61042 | 2013-06-13 15:10:06 -0700 | [diff] [blame] | 168 | .TP |
Horst Kronstorfer | 49fbf43 | 2011-12-23 05:40:20 +0000 | [diff] [blame] | 169 | .BI "\-D [" "dtc options" "]" |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 170 | Provide special options to the device tree compiler that is used to |
| 171 | create the image. |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 172 | . |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 173 | .TP |
Simon Glass | 722ebc8 | 2016-02-22 22:55:53 -0700 | [diff] [blame] | 174 | .BI "\-E |
| 175 | After processing, move the image data outside the FIT and store a data offset |
| 176 | in the FIT. Images will be placed one after the other immediately after the |
| 177 | FIT, with each one aligned to a 4-byte boundary. The existing 'data' property |
| 178 | in each image will be replaced with 'data-offset' and 'data-size' properties. |
| 179 | A 'data-offset' of 0 indicates that it starts in the first (4-byte aligned) |
| 180 | byte after the FIT. |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 181 | . |
Simon Glass | 722ebc8 | 2016-02-22 22:55:53 -0700 | [diff] [blame] | 182 | .TP |
Sean Anderson | deb2638 | 2022-04-08 16:08:39 -0400 | [diff] [blame] | 183 | .BI "\-B [" "alignment" "]" |
| 184 | The alignment, in hexadecimal, that external data will be aligned to. This |
| 185 | option only has an effect when \-E is specified. |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 186 | . |
Sean Anderson | deb2638 | 2022-04-08 16:08:39 -0400 | [diff] [blame] | 187 | .TP |
Simon Glass | 8e35bb0 | 2016-02-22 22:55:51 -0700 | [diff] [blame] | 188 | .BI "\-f [" "image tree source file" " | " "auto" "]" |
Horst Kronstorfer | 7aecfdd | 2011-12-21 04:31:23 +0000 | [diff] [blame] | 189 | Image tree source file that describes the structure and contents of the |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 190 | FIT image. |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 191 | .IP |
Simon Glass | 8e35bb0 | 2016-02-22 22:55:51 -0700 | [diff] [blame] | 192 | This can be automatically generated for some simple cases. |
| 193 | Use "-f auto" for this. In that case the arguments -d, -A, -O, -T, -C, -a |
| 194 | and -e are used to specify the image to include in the FIT and its attributes. |
| 195 | No .its file is required. |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 196 | . |
Simon Glass | 80e4df8 | 2013-06-13 15:10:03 -0700 | [diff] [blame] | 197 | .TP |
Simon Glass | 95d77b4 | 2013-06-13 15:10:05 -0700 | [diff] [blame] | 198 | .BI "\-F" |
| 199 | Indicates that an existing FIT image should be modified. No dtc |
Vagrant Cascadian | 758497c | 2014-11-01 18:09:01 -0700 | [diff] [blame] | 200 | compilation is performed and the \-f flag should not be given. |
Simon Glass | 95d77b4 | 2013-06-13 15:10:05 -0700 | [diff] [blame] | 201 | This can be used to sign images with additional keys after initial image |
| 202 | creation. |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 203 | . |
Simon Glass | 95d77b4 | 2013-06-13 15:10:05 -0700 | [diff] [blame] | 204 | .TP |
Tomeu Vizoso | 0f7c6cd | 2016-11-04 14:22:15 +0100 | [diff] [blame] | 205 | .BI "\-i [" "ramdisk_file" "]" |
| 206 | Appends the ramdisk file to the FIT. |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 207 | . |
Tomeu Vizoso | 0f7c6cd | 2016-11-04 14:22:15 +0100 | [diff] [blame] | 208 | .TP |
Simon Glass | 80e4df8 | 2013-06-13 15:10:03 -0700 | [diff] [blame] | 209 | .BI "\-k [" "key_directory" "]" |
| 210 | Specifies the directory containing keys to use for signing. This directory |
| 211 | should contain a private key file <name>.key for use with signing and a |
| 212 | certificate <name>.crt (containing the public key) for use with verification. |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 213 | . |
Simon Glass | e29495d | 2013-06-13 15:10:04 -0700 | [diff] [blame] | 214 | .TP |
Sean Anderson | 5920e5c | 2022-05-16 16:11:07 -0400 | [diff] [blame] | 215 | .BI "\-G [" "key_file" "]" |
| 216 | Specifies the private key file to use when signing. This option may be used |
| 217 | instead of \-k. |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 218 | . |
Sean Anderson | 5920e5c | 2022-05-16 16:11:07 -0400 | [diff] [blame] | 219 | .TP |
Simon Glass | e29495d | 2013-06-13 15:10:04 -0700 | [diff] [blame] | 220 | .BI "\-K [" "key_destination" "]" |
| 221 | Specifies a compiled device tree binary file (typically .dtb) to write |
| 222 | public key information into. When a private key is used to sign an image, |
| 223 | the corresponding public key is written into this file for for run-time |
| 224 | verification. Typically the file here is the device tree binary used by |
| 225 | CONFIG_OF_CONTROL in U-Boot. |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 226 | . |
Simon Glass | 399c744 | 2013-06-13 15:10:07 -0700 | [diff] [blame] | 227 | .TP |
Sean Anderson | deb2638 | 2022-04-08 16:08:39 -0400 | [diff] [blame] | 228 | .BI "\-G [" "key_file" "]" |
| 229 | Specifies the private key file to use when signing. This option may be used |
| 230 | instead of \-k. |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 231 | . |
Sean Anderson | deb2638 | 2022-04-08 16:08:39 -0400 | [diff] [blame] | 232 | .TP |
Sean Anderson | 87b0af9 | 2022-05-16 16:11:08 -0400 | [diff] [blame] | 233 | .BI "\-g [" "key_name_hint" "]" |
| 234 | Sets the key-name-hint property when used with \-f auto. This is the <name> |
| 235 | part of the key. The directory part is set by \-k. This option also indicates |
| 236 | that the images included in the FIT should be signed. If this option is |
| 237 | specified, \-o must be specified as well. |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 238 | . |
Sean Anderson | 87b0af9 | 2022-05-16 16:11:08 -0400 | [diff] [blame] | 239 | .TP |
Jan Kiszka | 5902a39 | 2022-01-14 10:21:19 +0100 | [diff] [blame] | 240 | .BI "\-o [" "signing algorithm" "]" |
| 241 | Specifies the algorithm to be used for signing a FIT image. The default is |
Jan Kiszka | 32a711d | 2022-02-05 13:19:36 +0100 | [diff] [blame] | 242 | taken from the signature node's 'algo' property. |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 243 | . |
Jan Kiszka | 5902a39 | 2022-01-14 10:21:19 +0100 | [diff] [blame] | 244 | .TP |
Teddy Reed | f8f9107 | 2016-06-09 19:38:02 -0700 | [diff] [blame] | 245 | .BI "\-p [" "external position" "]" |
| 246 | Place external data at a static external position. See \-E. Instead of writing |
| 247 | a 'data-offset' property defining the offset from the end of the FIT, \-p will |
| 248 | use 'data-position' as the absolute position from the base of the FIT. |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 249 | . |
Teddy Reed | f8f9107 | 2016-06-09 19:38:02 -0700 | [diff] [blame] | 250 | .TP |
Sean Anderson | deb2638 | 2022-04-08 16:08:39 -0400 | [diff] [blame] | 251 | .BI "\-r" |
Simon Glass | 399c744 | 2013-06-13 15:10:07 -0700 | [diff] [blame] | 252 | Specifies that keys used to sign the FIT are required. This means that they |
| 253 | must be verified for the image to boot. Without this option, the verification |
| 254 | will be optional (useful for testing but not for release). |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 255 | . |
Simon Glass | 152b246 | 2020-07-09 18:39:43 -0600 | [diff] [blame] | 256 | .TP |
Sean Anderson | deb2638 | 2022-04-08 16:08:39 -0400 | [diff] [blame] | 257 | .BI "\-N [" "engine" "]" |
| 258 | The openssl engine to use when signing and verifying the image. For a complete list of |
| 259 | available engines, refer to |
| 260 | .BR engine (1). |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 261 | . |
Sean Anderson | deb2638 | 2022-04-08 16:08:39 -0400 | [diff] [blame] | 262 | .TP |
Simon Glass | 152b246 | 2020-07-09 18:39:43 -0600 | [diff] [blame] | 263 | .BI "\-t |
| 264 | Update the timestamp in the FIT. |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 265 | .IP |
Simon Glass | 152b246 | 2020-07-09 18:39:43 -0600 | [diff] [blame] | 266 | Normally the FIT timestamp is created the first time mkimage is run on a FIT, |
| 267 | when converting the source .its to the binary .fit file. This corresponds to |
| 268 | using the -f flag. But if the original input to mkimage is a binary file |
| 269 | (already compiled) then the timestamp is assumed to have been set previously. |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 270 | . |
Horst Kronstorfer | 7aecfdd | 2011-12-21 04:31:23 +0000 | [diff] [blame] | 271 | .SH EXAMPLES |
Sean Anderson | 3dc1ff0 | 2022-06-25 13:12:10 -0400 | [diff] [blame^] | 272 | .\" Reduce the width of the tab stops to something reasonable |
| 273 | .ta T 1i |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 274 | List image information: |
Sean Anderson | 3dc1ff0 | 2022-06-25 13:12:10 -0400 | [diff] [blame^] | 275 | .RS |
| 276 | .P |
| 277 | .EX |
| 278 | \fBmkimage \-l uImage |
| 279 | .EE |
| 280 | .RE |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 281 | .P |
| 282 | Create legacy image with compressed PowerPC Linux kernel: |
Sean Anderson | 3dc1ff0 | 2022-06-25 13:12:10 -0400 | [diff] [blame^] | 283 | .RS |
| 284 | .P |
| 285 | .EX |
| 286 | \fBmkimage \-A powerpc \-O linux \-T kernel \-C gzip \\ |
| 287 | \-a 0 \-e 0 \-n Linux \-d vmlinux.gz uImage |
| 288 | .EE |
| 289 | .RE |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 290 | .P |
| 291 | Create FIT image with compressed PowerPC Linux kernel: |
Sean Anderson | 3dc1ff0 | 2022-06-25 13:12:10 -0400 | [diff] [blame^] | 292 | .RS |
| 293 | .P |
| 294 | .EX |
| 295 | \fBmkimage \-f kernel.its kernel.itb |
| 296 | .EE |
| 297 | .RE |
Simon Glass | e29495d | 2013-06-13 15:10:04 -0700 | [diff] [blame] | 298 | .P |
| 299 | 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^] | 300 | /public/signing\-keys directory. Add corresponding public keys into u\-boot.dtb, |
Simon Glass | e29495d | 2013-06-13 15:10:04 -0700 | [diff] [blame] | 301 | skipping those for which keys cannot be found. Also add a comment. |
Sean Anderson | 3dc1ff0 | 2022-06-25 13:12:10 -0400 | [diff] [blame^] | 302 | .RS |
Simon Glass | 95d77b4 | 2013-06-13 15:10:05 -0700 | [diff] [blame] | 303 | .P |
Sean Anderson | 3dc1ff0 | 2022-06-25 13:12:10 -0400 | [diff] [blame^] | 304 | .EX |
| 305 | \fBmkimage \-f kernel.its \-k /public/signing\-keys \-K u\-boot.dtb \\ |
| 306 | \-c \(dqKernel 3.8 image for production devices\(dq kernel.itb |
| 307 | .EE |
| 308 | .RE |
| 309 | .P |
| 310 | 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] | 311 | 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^] | 312 | .RS |
| 313 | .P |
| 314 | .EX |
| 315 | \fBmkimage \-f auto \-d /dev/null \-k /public/signing\-keys \-g dev \\ |
| 316 | \-o sha256,rsa2048 \-K u\-boot.dtb unused.itb |
| 317 | .EE |
| 318 | .RE |
Sean Anderson | 87b0af9 | 2022-05-16 16:11:08 -0400 | [diff] [blame] | 319 | .P |
Simon Glass | 95d77b4 | 2013-06-13 15:10:05 -0700 | [diff] [blame] | 320 | Update an existing FIT image, signing it with additional keys. |
Sean Anderson | 3dc1ff0 | 2022-06-25 13:12:10 -0400 | [diff] [blame^] | 321 | 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] | 322 | with keys that are available in the new directory. Images that request signing |
| 323 | with unavailable keys are skipped. |
Sean Anderson | 3dc1ff0 | 2022-06-25 13:12:10 -0400 | [diff] [blame^] | 324 | .RS |
| 325 | .P |
| 326 | .EX |
| 327 | \fBmkimage \-F \-k /secret/signing\-keys \-K u\-boot.dtb \\ |
| 328 | \-c \(dqKernel 3.8 image for production devices\(dq kernel.itb |
| 329 | .EE |
| 330 | .RE |
Simon Glass | 8e35bb0 | 2016-02-22 22:55:51 -0700 | [diff] [blame] | 331 | .P |
| 332 | Create a FIT image containing a kernel, using automatic mode. No .its file |
| 333 | is required. |
Sean Anderson | 3dc1ff0 | 2022-06-25 13:12:10 -0400 | [diff] [blame^] | 334 | .RS |
| 335 | .P |
| 336 | .EX |
| 337 | \fBmkimage \-f auto \-A arm \-O linux \-T kernel \-C none \-a 43e00000 \-e 0 \\ |
| 338 | \-c \(dqKernel 4.4 image for production devices\(dq \-d vmlinuz kernel.itb |
| 339 | .EE |
| 340 | .RE |
Simon Glass | fb4cce0 | 2016-02-22 22:55:52 -0700 | [diff] [blame] | 341 | .P |
| 342 | Create a FIT image containing a kernel and some device tree files, using |
| 343 | automatic mode. No .its file is required. |
Sean Anderson | 3dc1ff0 | 2022-06-25 13:12:10 -0400 | [diff] [blame^] | 344 | .RS |
| 345 | .P |
| 346 | .EX |
| 347 | \fBmkimage \-f auto \-A arm \-O linux \-T kernel \-C none \-a 43e00000 \-e 0 \\ |
| 348 | \-c \(dqKernel 4.4 image for production devices\(dq \-d vmlinuz \\ |
| 349 | \-b /path/to/rk3288\-firefly.dtb \-b /path/to/rk3288\-jerry.dtb kernel.itb |
| 350 | .EE |
| 351 | .RE |
Sean Anderson | 87b0af9 | 2022-05-16 16:11:08 -0400 | [diff] [blame] | 352 | .P |
| 353 | Create a FIT image containing a signed kernel, using automatic mode. No .its |
| 354 | file is required. |
Sean Anderson | 3dc1ff0 | 2022-06-25 13:12:10 -0400 | [diff] [blame^] | 355 | .RS |
| 356 | .P |
| 357 | .EX |
| 358 | \fBmkimage \-f auto \-A arm \-O linux \-T kernel \-C none \-a 43e00000 \-e 0 \\ |
| 359 | \-d vmlinuz \-k /secret/signing\-keys \-g dev \-o sha256,rsa2048 kernel.itb |
| 360 | .EE |
| 361 | .RE |
Sean Anderson | 7ec625f | 2022-06-25 13:12:09 -0400 | [diff] [blame] | 362 | . |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 363 | .SH HOMEPAGE |
| 364 | http://www.denx.de/wiki/U-Boot/WebHome |
| 365 | .PP |
| 366 | .SH AUTHOR |
| 367 | This manual page was written by Nobuhiro Iwamatsu <iwamatsu@nigauri.org> |
Simon Glass | 80e4df8 | 2013-06-13 15:10:03 -0700 | [diff] [blame] | 368 | and Wolfgang Denk <wd@denx.de>. It was updated for image signing by |
| 369 | Simon Glass <sjg@chromium.org>. |