Nobuhiro Iwamatsu | cd15355 | 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 | 80e4df8 | 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 |
| 13 | .RB [\fIoptions\fP] " (legacy mode)" |
| 14 | |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 15 | .SH "DESCRIPTION" |
| 16 | The |
| 17 | .B mkimage |
| 18 | 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] | 19 | These images can contain the linux kernel, device tree blob, root file |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 20 | system image, firmware images etc., either separate or combined. |
| 21 | |
| 22 | .B mkimage |
| 23 | supports two different formats: |
| 24 | |
Horst Kronstorfer | 7aecfdd | 2011-12-21 04:31:23 +0000 | [diff] [blame] | 25 | The old |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 26 | .I legacy image |
| 27 | format concatenates the individual parts (for example, kernel image, |
| 28 | device tree blob and ramdisk image) and adds a 64 bytes header |
| 29 | containing information about target architecture, operating system, |
| 30 | image type, compression method, entry points, time stamp, checksums, |
| 31 | etc. |
| 32 | |
Horst Kronstorfer | 7aecfdd | 2011-12-21 04:31:23 +0000 | [diff] [blame] | 33 | The new |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 34 | .I FIT (Flattened Image Tree) format |
Horst Kronstorfer | 7aecfdd | 2011-12-21 04:31:23 +0000 | [diff] [blame] | 35 | allows for more flexibility in handling images of various types and also |
Simon Glass | 80e4df8 | 2013-06-13 15:10:03 -0700 | [diff] [blame^] | 36 | enhances integrity protection of images with stronger checksums. It also |
| 37 | supports verified boot. |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 38 | |
| 39 | .SH "OPTIONS" |
| 40 | |
| 41 | .B List image information: |
| 42 | |
| 43 | .TP |
| 44 | .BI "\-l [" "uimage file name" "]" |
| 45 | mkimage lists the information contained in the header of an existing U-Boot image. |
| 46 | |
| 47 | .P |
| 48 | .B Create old legacy image: |
| 49 | |
| 50 | .TP |
| 51 | .BI "\-A [" "architecture" "]" |
Loïc Minier | 3f1266d | 2011-01-04 02:32:36 +0100 | [diff] [blame] | 52 | Set architecture. Pass \-h as the architecture to see the list of supported architectures. |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 53 | |
| 54 | .TP |
| 55 | .BI "\-O [" "os" "]" |
| 56 | 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] | 57 | Pass \-h as the OS to see the list of supported OS. |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 58 | |
| 59 | .TP |
| 60 | .BI "\-T [" "image type" "]" |
| 61 | Set image type. |
Loïc Minier | 3f1266d | 2011-01-04 02:32:36 +0100 | [diff] [blame] | 62 | Pass \-h as the image to see the list of supported image type. |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 63 | |
| 64 | .TP |
| 65 | .BI "\-C [" "compression type" "]" |
| 66 | Set compression type. |
Loïc Minier | 3f1266d | 2011-01-04 02:32:36 +0100 | [diff] [blame] | 67 | Pass \-h as the compression to see the list of supported compression type. |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 68 | |
| 69 | .TP |
| 70 | .BI "\-a [" "load addess" "]" |
| 71 | Set load address with a hex number. |
| 72 | |
| 73 | .TP |
| 74 | .BI "\-e [" "entry point" "]" |
| 75 | Set entry point with a hex number. |
| 76 | |
| 77 | .TP |
Simon Glass | 80e4df8 | 2013-06-13 15:10:03 -0700 | [diff] [blame^] | 78 | .BI "\-l" |
| 79 | List the contents of an image. |
| 80 | |
| 81 | .TP |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 82 | .BI "\-n [" "image name" "]" |
| 83 | Set image name to 'image name'. |
| 84 | |
| 85 | .TP |
| 86 | .BI "\-d [" "image data file" "]" |
| 87 | Use image data from 'image data file'. |
| 88 | |
| 89 | .TP |
| 90 | .BI "\-x" |
| 91 | Set XIP (execute in place) flag. |
| 92 | |
| 93 | .P |
| 94 | .B Create FIT image: |
| 95 | |
| 96 | .TP |
Horst Kronstorfer | 49fbf43 | 2011-12-23 05:40:20 +0000 | [diff] [blame] | 97 | .BI "\-D [" "dtc options" "]" |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 98 | Provide special options to the device tree compiler that is used to |
| 99 | create the image. |
| 100 | |
| 101 | .TP |
Horst Kronstorfer | 49fbf43 | 2011-12-23 05:40:20 +0000 | [diff] [blame] | 102 | .BI "\-f [" "image tree source file" "]" |
Horst Kronstorfer | 7aecfdd | 2011-12-21 04:31:23 +0000 | [diff] [blame] | 103 | Image tree source file that describes the structure and contents of the |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 104 | FIT image. |
| 105 | |
Simon Glass | 80e4df8 | 2013-06-13 15:10:03 -0700 | [diff] [blame^] | 106 | .TP |
| 107 | .BI "\-k [" "key_directory" "]" |
| 108 | Specifies the directory containing keys to use for signing. This directory |
| 109 | should contain a private key file <name>.key for use with signing and a |
| 110 | certificate <name>.crt (containing the public key) for use with verification. |
| 111 | |
Horst Kronstorfer | 7aecfdd | 2011-12-21 04:31:23 +0000 | [diff] [blame] | 112 | .SH EXAMPLES |
Nobuhiro Iwamatsu | cd15355 | 2010-06-16 10:38:24 +0900 | [diff] [blame] | 113 | |
| 114 | List image information: |
| 115 | .nf |
| 116 | .B mkimage -l uImage |
| 117 | .fi |
| 118 | .P |
| 119 | Create legacy image with compressed PowerPC Linux kernel: |
| 120 | .nf |
| 121 | .B mkimage -A powerpc -O linux -T kernel -C gzip \\\\ |
| 122 | .br |
| 123 | .B -a 0 -e 0 -n Linux -d vmlinux.gz uImage |
| 124 | .fi |
| 125 | .P |
| 126 | Create FIT image with compressed PowerPC Linux kernel: |
| 127 | .nf |
| 128 | .B mkimage -f kernel.its kernel.itb |
| 129 | .fi |
| 130 | |
| 131 | .SH HOMEPAGE |
| 132 | http://www.denx.de/wiki/U-Boot/WebHome |
| 133 | .PP |
| 134 | .SH AUTHOR |
| 135 | This manual page was written by Nobuhiro Iwamatsu <iwamatsu@nigauri.org> |
Simon Glass | 80e4df8 | 2013-06-13 15:10:03 -0700 | [diff] [blame^] | 136 | and Wolfgang Denk <wd@denx.de>. It was updated for image signing by |
| 137 | Simon Glass <sjg@chromium.org>. |