]> Git Repo - J-u-boot.git/blame - doc/mkimage.1
mkimage: Add -K to write public keys to an FDT blob
[J-u-boot.git] / doc / mkimage.1
CommitLineData
cd153556
NI
1.TH MKIMAGE 1 "2010-05-16"
2
3.SH NAME
4mkimage \- Generate image for U-Boot
5.SH SYNOPSIS
6.B mkimage
80e4df8a
SG
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
cd153556
NI
15.SH "DESCRIPTION"
16The
17.B mkimage
18command is used to create images for use with the U-Boot boot loader.
7aecfdd0 19These images can contain the linux kernel, device tree blob, root file
cd153556
NI
20system image, firmware images etc., either separate or combined.
21
22.B mkimage
23supports two different formats:
24
7aecfdd0 25The old
cd153556
NI
26.I legacy image
27format concatenates the individual parts (for example, kernel image,
28device tree blob and ramdisk image) and adds a 64 bytes header
29containing information about target architecture, operating system,
30image type, compression method, entry points, time stamp, checksums,
31etc.
32
7aecfdd0 33The new
cd153556 34.I FIT (Flattened Image Tree) format
7aecfdd0 35allows for more flexibility in handling images of various types and also
80e4df8a
SG
36enhances integrity protection of images with stronger checksums. It also
37supports verified boot.
cd153556
NI
38
39.SH "OPTIONS"
40
41.B List image information:
42
43.TP
44.BI "\-l [" "uimage file name" "]"
45mkimage 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" "]"
3f1266d6 52Set architecture. Pass \-h as the architecture to see the list of supported architectures.
cd153556
NI
53
54.TP
55.BI "\-O [" "os" "]"
56Set operating system. bootm command of u-boot changes boot method by os type.
3f1266d6 57Pass \-h as the OS to see the list of supported OS.
cd153556
NI
58
59.TP
60.BI "\-T [" "image type" "]"
61Set image type.
3f1266d6 62Pass \-h as the image to see the list of supported image type.
cd153556
NI
63
64.TP
65.BI "\-C [" "compression type" "]"
66Set compression type.
3f1266d6 67Pass \-h as the compression to see the list of supported compression type.
cd153556
NI
68
69.TP
70.BI "\-a [" "load addess" "]"
71Set load address with a hex number.
72
73.TP
74.BI "\-e [" "entry point" "]"
75Set entry point with a hex number.
76
80e4df8a
SG
77.TP
78.BI "\-l"
79List the contents of an image.
80
cd153556
NI
81.TP
82.BI "\-n [" "image name" "]"
83Set image name to 'image name'.
84
85.TP
86.BI "\-d [" "image data file" "]"
87Use image data from 'image data file'.
88
89.TP
90.BI "\-x"
91Set XIP (execute in place) flag.
92
93.P
94.B Create FIT image:
95
96.TP
49fbf437 97.BI "\-D [" "dtc options" "]"
cd153556
NI
98Provide special options to the device tree compiler that is used to
99create the image.
100
101.TP
49fbf437 102.BI "\-f [" "image tree source file" "]"
7aecfdd0 103Image tree source file that describes the structure and contents of the
cd153556
NI
104FIT image.
105
80e4df8a
SG
106.TP
107.BI "\-k [" "key_directory" "]"
108Specifies the directory containing keys to use for signing. This directory
109should contain a private key file <name>.key for use with signing and a
110certificate <name>.crt (containing the public key) for use with verification.
111
e29495d3
SG
112.TP
113.BI "\-K [" "key_destination" "]"
114Specifies a compiled device tree binary file (typically .dtb) to write
115public key information into. When a private key is used to sign an image,
116the corresponding public key is written into this file for for run-time
117verification. Typically the file here is the device tree binary used by
118CONFIG_OF_CONTROL in U-Boot.
119
7aecfdd0 120.SH EXAMPLES
cd153556
NI
121
122List image information:
123.nf
124.B mkimage -l uImage
125.fi
126.P
127Create legacy image with compressed PowerPC Linux kernel:
128.nf
129.B mkimage -A powerpc -O linux -T kernel -C gzip \\\\
130.br
131.B -a 0 -e 0 -n Linux -d vmlinux.gz uImage
132.fi
133.P
134Create FIT image with compressed PowerPC Linux kernel:
135.nf
136.B mkimage -f kernel.its kernel.itb
137.fi
e29495d3
SG
138.P
139Create FIT image with compressed kernel and sign it with keys in the
140/public/signing-keys directory. Add corresponding public keys into u-boot.dtb,
141skipping those for which keys cannot be found. Also add a comment.
142.nf
143.B mkimage -f kernel.its -k /public/signing-keys -K u-boot.dtb \\\\
144-c "Kernel 3.8 image for production devices" kernel.itb
145.fi
cd153556
NI
146
147.SH HOMEPAGE
148http://www.denx.de/wiki/U-Boot/WebHome
149.PP
150.SH AUTHOR
151This manual page was written by Nobuhiro Iwamatsu <[email protected]>
80e4df8a
SG
152and Wolfgang Denk <[email protected]>. It was updated for image signing by
153Simon Glass <[email protected]>.
This page took 0.126995 seconds and 4 git commands to generate.