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