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