blob: c310b01bb995fabdaf7b28f29149ae6af937e071 [file] [log] [blame]
Sean Anderson785a0512022-06-25 13:12:18 -04001.\" SPDX-License-Identifier: GPL-2.0
2.\" Copyright (C) 2022 Sean Anderson <seanga2@gmail.com>
3.\" Copyright (C) 2013-20 Simon Glass <sjg@chromium.org>
4.\" Copyright (C) 2010 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
5.\" Copyright (C) 2010 Wolfgang Denk <wd@denx.de>
6.TH MKIMAGE 1 2022-06-11 U-Boot
Sean Anderson7ec625f2022-06-25 13:12:09 -04007.
Nobuhiro Iwamatsucd153552010-06-16 10:38:24 +09008.SH NAME
Sean Andersone9927c22022-06-25 13:12:14 -04009mkimage \- generate images for U-Boot
Nobuhiro Iwamatsucd153552010-06-16 10:38:24 +090010.SH SYNOPSIS
Sean Andersona5685542022-06-25 13:12:08 -040011.SY mkimage
12.OP \-T type
13.BI \-l\~ image-file-name
14.YS
Sean Anderson7ec625f2022-06-25 13:12:09 -040015.
Sean Andersona5685542022-06-25 13:12:08 -040016.SY mkimage
17.RI [ option\~ .\|.\|.\&]
18.OP \-T type
19.I image-file-name
20.YS
Sean Anderson7ec625f2022-06-25 13:12:09 -040021.
Sean Andersona5685542022-06-25 13:12:08 -040022.SY mkimage
23.RI [ option\~ .\|.\|.\&]
24.BI \-f\~ image-tree-source-file\c
25.RB | auto
26.I image-file-name
27.YS
Sean Anderson7ec625f2022-06-25 13:12:09 -040028.
Sean Andersona5685542022-06-25 13:12:08 -040029.SY mkimage
30.RI [ option\~ .\|.\|.\&]
31.BI \-F\~ image-file-name
32.YS
Sean Anderson7ec625f2022-06-25 13:12:09 -040033.
Sean Anderson1bdf48622022-06-25 13:12:11 -040034.SH DESCRIPTION
Nobuhiro Iwamatsucd153552010-06-16 10:38:24 +090035The
36.B mkimage
Sean Anderson9cc40002022-06-25 13:12:15 -040037command is used to create images for use with the U-Boot boot loader. These
38images can contain the Linux kernel, device tree blob, root file system image,
39firmware images etc., either separate or combined.
Sean Anderson7ec625f2022-06-25 13:12:09 -040040.P
Nobuhiro Iwamatsucd153552010-06-16 10:38:24 +090041.B mkimage
Sean Anderson9cc40002022-06-25 13:12:15 -040042supports many image formats. Some of these formats may be used by embedded boot
43firmware to load U-Boot. Others may be used by U-Boot to load Linux (or some
44other kernel):
Sean Anderson7ec625f2022-06-25 13:12:09 -040045.P
Sean Anderson9cc40002022-06-25 13:12:15 -040046The legacy image format concatenates the individual parts (for example, kernel
47image, device tree blob and ramdisk image) and adds a 64 byte header containing
48information about the target architecture, operating system, image type,
49compression method, entry points, time stamp, checksums, etc.
Sean Anderson7ec625f2022-06-25 13:12:09 -040050.P
Horst Kronstorfer7aecfdd2011-12-21 04:31:23 +000051The new
Sean Anderson9cc40002022-06-25 13:12:15 -040052.I FIT
53(Flattened Image Tree) format allows for more flexibility in handling images of
54various types and also enhances integrity protection of images with stronger
55checksums. It also supports verified boot.
Sean Anderson7ec625f2022-06-25 13:12:09 -040056.
Sean Anderson1bdf48622022-06-25 13:12:11 -040057.SH OPTIONS
Sean Anderson7ec625f2022-06-25 13:12:09 -040058.
Sean Andersona4d0c742022-06-25 13:12:12 -040059.SS General options
Sean Anderson7ec625f2022-06-25 13:12:09 -040060.
Nobuhiro Iwamatsucd153552010-06-16 10:38:24 +090061.TP
Sean Andersona5e2b672022-06-25 13:12:13 -040062.B \-h
Sean Andersondc3a9232022-06-25 13:12:19 -040063.TQ
64.B \-\-help
Sean Andersona5e2b672022-06-25 13:12:13 -040065Print a help message and exit.
66.
67.TP
68.B \-l
Sean Andersondc3a9232022-06-25 13:12:19 -040069.TQ
70.B \-\-list
Sean Anderson9cc40002022-06-25 13:12:15 -040071.B mkimage
72lists the information contained in the header of an existing U-Boot image.
Sean Andersona5e2b672022-06-25 13:12:13 -040073.
74.TP
75.B \-s
Sean Andersondc3a9232022-06-25 13:12:19 -040076.TQ
77.B \-\-no\-copy
Sean Andersona5e2b672022-06-25 13:12:13 -040078Don't copy in the image data. Depending on the image type, this may create
79just the header, everything but the image data, or nothing at all.
Sean Anderson7ec625f2022-06-25 13:12:09 -040080.
Pali Rohár11f29d42022-02-13 01:09:46 +010081.TP
Sean Anderson1bdf48622022-06-25 13:12:11 -040082.BI \-T " image-type"
Sean Andersondc3a9232022-06-25 13:12:19 -040083.TQ
84.BI \-\-type " image-type"
Sean Anderson9cc40002022-06-25 13:12:15 -040085Parse image file as
86.IR image-type .
87Pass
88.B list
89as
90.I image-type
91to see the list of supported image types. If this option is absent, then it
92defaults to
93.B kernel
94(legacy image). If this option is absent when
95.B \-l
96is passed, then
97.B mkimage
98will attempt to automatically detect the image type. Not all image types support
99automatic detection, so it may be necessary to pass
100.B \-T
101explicitly.
102.IP
103When creating a FIT image with
104.BR \-f ,
105the image type is always set to
106.BR flat_dt .
107In this case,
108.B \-T
109specifies the image node's \(oqtype\(cq property. If
110.B \-T
111is absent, then the \(oqtype\(cq property will default to
112.BR kernel .
Sean Anderson7ec625f2022-06-25 13:12:09 -0400113.
Sean Andersondeb26382022-04-08 16:08:39 -0400114.TP
Sean Anderson1bdf48622022-06-25 13:12:11 -0400115.B \-q
Sean Andersondc3a9232022-06-25 13:12:19 -0400116.TQ
117.B \-\-quiet
Sean Andersona5e2b672022-06-25 13:12:13 -0400118Quiet. Don't print the image header.
119.
120.TP
121.B \-v
Sean Andersondc3a9232022-06-25 13:12:19 -0400122.TQ
123.B \-\-verbose
Sean Andersona5e2b672022-06-25 13:12:13 -0400124Verbose. Print file names as they are added to the image.
125.
126.TP
127.B \-V
Sean Andersondc3a9232022-06-25 13:12:19 -0400128.TQ
129.B \-\-version
Sean Andersona5e2b672022-06-25 13:12:13 -0400130Print version information and exit.
Sean Anderson7ec625f2022-06-25 13:12:09 -0400131.
Sean Andersona4d0c742022-06-25 13:12:12 -0400132.SS General image-creation options
Sean Anderson7ec625f2022-06-25 13:12:09 -0400133.
Nobuhiro Iwamatsucd153552010-06-16 10:38:24 +0900134.TP
Sean Anderson1bdf48622022-06-25 13:12:11 -0400135.BI \-A " architecture"
Sean Andersondc3a9232022-06-25 13:12:19 -0400136.TQ
137.BI \-\-architecture " architecture"
Sean Anderson9cc40002022-06-25 13:12:15 -0400138Set the architecture. Pass
139.B \-h
140as the architecture to see the list of supported architectures. If
141.B \-A
142is absent, it defaults to
143.BR ppc .
Sean Anderson7ec625f2022-06-25 13:12:09 -0400144.
Nobuhiro Iwamatsucd153552010-06-16 10:38:24 +0900145.TP
Sean Anderson1bdf48622022-06-25 13:12:11 -0400146.BI \-O " os"
Sean Andersondc3a9232022-06-25 13:12:19 -0400147.TQ
148.BI \-\-os " os"
Sean Anderson9cc40002022-06-25 13:12:15 -0400149Set the operating system. The U-Boot
150.I bootm
151command changes boot method based on the OS type.
152Pass
153.B \-h
154as the
155.I os
156to see the list of supported OSs. If
157.B \-O
158is absent, it defaults to
159.BR linux .
Sean Anderson7ec625f2022-06-25 13:12:09 -0400160.
Nobuhiro Iwamatsucd153552010-06-16 10:38:24 +0900161.TP
Sean Anderson1bdf48622022-06-25 13:12:11 -0400162.BI \-C " compression-type"
Sean Andersondc3a9232022-06-25 13:12:19 -0400163.TQ
164.BI \-\-compression " compression-type"
Sean Anderson9cc40002022-06-25 13:12:15 -0400165Set the compression type. The image data should have already been compressed
166using this compression type.
167.B mkimage
168will not automatically compress image data.
169Pass
170.B \-h
171as the
172.I compression-type
173to see the list of supported compression types. If
174.B \-C
175is absent, it defaults to
176.BR gzip .
Sean Anderson7ec625f2022-06-25 13:12:09 -0400177.
Nobuhiro Iwamatsucd153552010-06-16 10:38:24 +0900178.TP
Sean Anderson1bdf48622022-06-25 13:12:11 -0400179.BI \-a " load-address"
Sean Andersondc3a9232022-06-25 13:12:19 -0400180.TQ
181.BI \-\-load\-address " load-address"
Sean Anderson9cc40002022-06-25 13:12:15 -0400182Set the absolute address to load the image data to.
183.I load-address
184will be interpreted as a hexadecimal number.
Sean Anderson7ec625f2022-06-25 13:12:09 -0400185.
Nobuhiro Iwamatsucd153552010-06-16 10:38:24 +0900186.TP
Sean Anderson1bdf48622022-06-25 13:12:11 -0400187.BI \-e " entry-point"
Sean Andersondc3a9232022-06-25 13:12:19 -0400188.TQ
189.BI \-\-entry\-point " entry-point"
Sean Anderson9cc40002022-06-25 13:12:15 -0400190Set the absolute address of the image entry point. The U-Boot
191.I bootm
192command will jump to this address after loading the image.
193.I entry-point
194will be interpreted as a hexadecimal number.
Sean Anderson7ec625f2022-06-25 13:12:09 -0400195.
Nobuhiro Iwamatsucd153552010-06-16 10:38:24 +0900196.TP
Sean Anderson1bdf48622022-06-25 13:12:11 -0400197.BI \-n " image-name"
Sean Andersondc3a9232022-06-25 13:12:19 -0400198.TQ
199.BI \-\-primary\-image " image-name"
Sean Anderson9cc40002022-06-25 13:12:15 -0400200Set the image name to
201.IR image-name .
Sean Anderson7ec625f2022-06-25 13:12:09 -0400202.
Nobuhiro Iwamatsucd153552010-06-16 10:38:24 +0900203.TP
Sean Anderson1bdf48622022-06-25 13:12:11 -0400204.BI \-R " secondary-image-name"
Sean Andersondc3a9232022-06-25 13:12:19 -0400205.TQ
206.BI \-\-secondary\-image " image-name"
Sean Andersondeb26382022-04-08 16:08:39 -0400207Some image types support a second image for additional data. For these types,
Sean Anderson9cc40002022-06-25 13:12:15 -0400208use
209.B \-R
210to specify this second image.
Sean Anderson5920e5c2022-05-16 16:11:07 -0400211.TS
212allbox;
213lb lbx
214l l.
215Image Type Secondary Image Description
216pblimage Additional RCW-style header, typically used for PBI commands.
217zynqimage, zynqmpimage T{
218Initialization parameters, one per line. Each parameter has the form
219.sp
220.ti 4
221.I address data
222.sp
223where
224.I address
225and
226.I data
227are hexadecimal integers. The boot ROM will write each
228.I data
229to
230.I address
231when loading the image. At most 256 parameters may be specified in this
232manner.
233T}
234.TE
Sean Anderson7ec625f2022-06-25 13:12:09 -0400235.
Sean Andersondeb26382022-04-08 16:08:39 -0400236.TP
Sean Anderson1bdf48622022-06-25 13:12:11 -0400237.BI \-d " image-data-file"
Sean Andersondc3a9232022-06-25 13:12:19 -0400238.TQ
239.BI \-\-image " image-data-file"
Sean Anderson9cc40002022-06-25 13:12:15 -0400240Use image data from
241.IR image-data-file .
242If the
243.I image-type
244is
245.BR multi ,
246then multiple images may be specified, separated by colons:
247.RS
248.IP
249.IR image-data-file [\fB:\fP image-data-file .\|.\|.]
250.RE
Sean Anderson7ec625f2022-06-25 13:12:09 -0400251.
Nobuhiro Iwamatsucd153552010-06-16 10:38:24 +0900252.TP
Sean Anderson1bdf48622022-06-25 13:12:11 -0400253.B \-x
Sean Andersondc3a9232022-06-25 13:12:19 -0400254.TQ
255.B \-\-xip
Sean Anderson9cc40002022-06-25 13:12:15 -0400256Set the
257.I XIP
258(execute in place) flag. The U-Boot
259.I bootm
260command will not load the image data, and instead will assume it is already
261accessible at the load address (such as via memory-mapped flash).
Sean Anderson7ec625f2022-06-25 13:12:09 -0400262.
Sean Andersona4d0c742022-06-25 13:12:12 -0400263.SS Options for creating FIT images
Sean Anderson7ec625f2022-06-25 13:12:09 -0400264.
Nobuhiro Iwamatsucd153552010-06-16 10:38:24 +0900265.TP
Sean Anderson1bdf48622022-06-25 13:12:11 -0400266.BI \-b " device-tree-file"
Sean Andersondc3a9232022-06-25 13:12:19 -0400267.TQ
268.BI \-\-device\-tree " device-tree-file"
Andreas Bießmann7a439ca2016-05-01 03:01:27 +0200269Appends the device tree binary file (.dtb) to the FIT.
Sean Anderson7ec625f2022-06-25 13:12:09 -0400270.
Simon Glassfb4cce02016-02-22 22:55:52 -0700271.TP
Sean Anderson1bdf48622022-06-25 13:12:11 -0400272.BI \-c " comment"
Sean Andersondc3a9232022-06-25 13:12:19 -0400273.TQ
274.BI \-\-comment " comment"
Sean Anderson9cc40002022-06-25 13:12:15 -0400275Specifies a comment to be added when signing. This is typically a message which
276describes how the image was signed or some other useful information.
Sean Anderson7ec625f2022-06-25 13:12:09 -0400277.
Simon Glass4f610422013-06-13 15:10:06 -0700278.TP
Sean Anderson1bdf48622022-06-25 13:12:11 -0400279.BI \-D " dtc-options"
Sean Andersondc3a9232022-06-25 13:12:19 -0400280.TQ
281.BI \-\-dtcopts " dtc-options"
Sean Anderson9cc40002022-06-25 13:12:15 -0400282Provide additional options to the device tree compiler when creating the image.
283See
284.BR dtc (1)
285for documentation of possible options. If
286.B \-D
287is absent, it defaults to
288.BR "\-I dts \-O dtb \-p 500" .
Sean Anderson7ec625f2022-06-25 13:12:09 -0400289.
Nobuhiro Iwamatsucd153552010-06-16 10:38:24 +0900290.TP
Sean Anderson1bdf48622022-06-25 13:12:11 -0400291.BI \-E
Sean Andersondc3a9232022-06-25 13:12:19 -0400292.TQ
293.BI \-\-external
Simon Glass722ebc82016-02-22 22:55:53 -0700294After processing, move the image data outside the FIT and store a data offset
Sean Anderson9cc40002022-06-25 13:12:15 -0400295in the FIT. Images will be placed one after the other immediately after the FIT,
296with each one aligned to a 4-byte boundary. The existing \(oqdata\(cq property
297in each image will be replaced with \(oqdata-offset\(cq and \(oqdata-size\(cq
298properties. A \(oqdata-offset\(cq of 0 indicates that it starts in the first
299(4-byte-aligned) byte after the FIT.
Sean Anderson7ec625f2022-06-25 13:12:09 -0400300.
Simon Glass722ebc82016-02-22 22:55:53 -0700301.TP
Sean Anderson1bdf48622022-06-25 13:12:11 -0400302.BI \-B " alignment"
Sean Andersondc3a9232022-06-25 13:12:19 -0400303.TQ
304.BI \-\-alignment " alignment"
Sean Andersondeb26382022-04-08 16:08:39 -0400305The alignment, in hexadecimal, that external data will be aligned to. This
306option only has an effect when \-E is specified.
Sean Anderson7ec625f2022-06-25 13:12:09 -0400307.
Sean Andersondeb26382022-04-08 16:08:39 -0400308.TP
Sean Andersona5e2b672022-06-25 13:12:13 -0400309.BI \-p " external-position"
Sean Andersondc3a9232022-06-25 13:12:19 -0400310.TQ
311.BI \-\-position " external-position"
Sean Anderson9cc40002022-06-25 13:12:15 -0400312Place external data at a static external position. Instead of writing a
313\(oqdata-offset\(cq property defining the offset from the end of the FIT,
314.B \-p
315will use \(oqdata-position\(cq as the absolute position from the base of the
316FIT. See
317.B \-E
318for details on using external data.
Sean Andersona5e2b672022-06-25 13:12:13 -0400319.
320.TP
Sean Anderson9cc40002022-06-25 13:12:15 -0400321\fB\-f \fIimage-tree-source-file\fR | \fBauto
Sean Andersondc3a9232022-06-25 13:12:19 -0400322.TQ
323\fB\-\-fit \fIimage-tree-source-file\fR | \fBauto
Horst Kronstorfer7aecfdd2011-12-21 04:31:23 +0000324Image tree source file that describes the structure and contents of the
Nobuhiro Iwamatsucd153552010-06-16 10:38:24 +0900325FIT image.
Sean Anderson7ec625f2022-06-25 13:12:09 -0400326.IP
Sean Anderson9cc40002022-06-25 13:12:15 -0400327In some simple cases, the image tree source can be generated automatically. To
328use this feature, pass
329.BR "\-f auto" .
330The
331.BR \-d ,
332.BR \-A ,
333.BR \-O ,
334.BR \-T ,
335.BR \-C ,
336.BR \-a ,
337and
338.B \-e
339options may be used to specify the image to include in the FIT and its
340attributes. No
341.I image-tree-source-file
342is required.
Sean Anderson7ec625f2022-06-25 13:12:09 -0400343.
Simon Glass80e4df82013-06-13 15:10:03 -0700344.TP
Sean Anderson1bdf48622022-06-25 13:12:11 -0400345.B \-F
Sean Andersondc3a9232022-06-25 13:12:19 -0400346.TQ
347.B \-\-update
Sean Anderson9cc40002022-06-25 13:12:15 -0400348Indicates that an existing FIT image should be modified. No dtc compilation will
349be performed and
350.B \-f
351should not be passed. This can be used to sign images with additional keys
352after initial image creation.
Sean Anderson7ec625f2022-06-25 13:12:09 -0400353.
Simon Glass95d77b42013-06-13 15:10:05 -0700354.TP
Sean Anderson1bdf48622022-06-25 13:12:11 -0400355.BI \-i " ramdisk-file"
Sean Andersondc3a9232022-06-25 13:12:19 -0400356.TQ
357.BI \-\-initramfs " ramdisk-file"
Sean Anderson9cc40002022-06-25 13:12:15 -0400358Append a ramdisk or initramfs file to the image.
Sean Anderson7ec625f2022-06-25 13:12:09 -0400359.
Tomeu Vizoso0f7c6cd2016-11-04 14:22:15 +0100360.TP
Sean Anderson1bdf48622022-06-25 13:12:11 -0400361.BI \-k " key-directory"
Sean Andersondc3a9232022-06-25 13:12:19 -0400362.TQ
363.BI \-\-key\-dir " key-directory"
Simon Glass80e4df82013-06-13 15:10:03 -0700364Specifies the directory containing keys to use for signing. This directory
Sean Anderson9cc40002022-06-25 13:12:15 -0400365should contain a private key file
366.IR name .key
367for use with signing, and a certificate
368.IR name .crt
369(containing the public key) for use with verification. The public key is only
370necessary when embedding it into another device tree using
371.BR \-K .
372.I name
373defaults to the value of the signature node's \(oqkey-name-hint\(cq property,
374but may be overridden using
375.BR \-g .
Sean Anderson7ec625f2022-06-25 13:12:09 -0400376.
Simon Glasse29495d2013-06-13 15:10:04 -0700377.TP
Sean Anderson1bdf48622022-06-25 13:12:11 -0400378.BI \-G " key-file"
Sean Andersondc3a9232022-06-25 13:12:19 -0400379.TQ
380.BI \-\-key\-file " key-file"
Sean Anderson5920e5c2022-05-16 16:11:07 -0400381Specifies the private key file to use when signing. This option may be used
382instead of \-k.
Sean Anderson7ec625f2022-06-25 13:12:09 -0400383.
Sean Anderson5920e5c2022-05-16 16:11:07 -0400384.TP
Sean Anderson1bdf48622022-06-25 13:12:11 -0400385.BI \-K " key-destination"
Sean Andersondc3a9232022-06-25 13:12:19 -0400386.TQ
387.BI \-\-key\-dest " key-destination"
Simon Glasse29495d2013-06-13 15:10:04 -0700388Specifies a compiled device tree binary file (typically .dtb) to write
389public key information into. When a private key is used to sign an image,
390the corresponding public key is written into this file for for run-time
391verification. Typically the file here is the device tree binary used by
392CONFIG_OF_CONTROL in U-Boot.
Sean Anderson7ec625f2022-06-25 13:12:09 -0400393.
Simon Glass399c7442013-06-13 15:10:07 -0700394.TP
Sean Anderson1bdf48622022-06-25 13:12:11 -0400395.BI \-g " key-name-hint"
Sean Andersondc3a9232022-06-25 13:12:19 -0400396.TQ
397.BI \-\-key\-name\-hint " key-name-hint"
Sean Anderson9cc40002022-06-25 13:12:15 -0400398Overrides the signature node's \(oqkey-name-hint\(cq property. This is
399especially useful when signing an image with
400.BR "\-f auto" .
401This is the
402.I name
403part of the key. The directory part is set by
404.BR \-k .
405This option also indicates that the images included in the FIT should be signed.
406If this option is specified, then
407.B \-o
408must be specified as well.
Sean Anderson7ec625f2022-06-25 13:12:09 -0400409.
Sean Anderson87b0af92022-05-16 16:11:08 -0400410.TP
Sean Anderson9cc40002022-06-25 13:12:15 -0400411.BI \-o " crypto" , checksum
Sean Andersondc3a9232022-06-25 13:12:19 -0400412.TQ
413.BI \-\-algo " crypto" , checksum
Jan Kiszka5902a392022-01-14 10:21:19 +0100414Specifies the algorithm to be used for signing a FIT image. The default is
Sean Anderson9cc40002022-06-25 13:12:15 -0400415taken from the signature node's \(oqalgo\(cq property.
416The valid values for
417.I crypto
418are:
419.RS
420.IP
421.TS
422lb.
423rsa2048
424rsa3072
425rsa4096
426ecdsa256
427.TE
428.RE
429.IP
430The valid values for
431.I checksum
432are
433.RS
434.IP
435.TS
436lb.
437sha1
438sha256
439sha384
440sha512
441.TE
442.RE
Sean Anderson7ec625f2022-06-25 13:12:09 -0400443.
Jan Kiszka5902a392022-01-14 10:21:19 +0100444.TP
Sean Anderson1bdf48622022-06-25 13:12:11 -0400445.B \-r
Sean Andersondc3a9232022-06-25 13:12:19 -0400446.TQ
447.B \-\-key\-required
Simon Glass399c7442013-06-13 15:10:07 -0700448Specifies that keys used to sign the FIT are required. This means that they
449must be verified for the image to boot. Without this option, the verification
450will be optional (useful for testing but not for release).
Sean Anderson7ec625f2022-06-25 13:12:09 -0400451.
Simon Glass152b2462020-07-09 18:39:43 -0600452.TP
Sean Anderson1bdf48622022-06-25 13:12:11 -0400453.BI \-N " engine"
Sean Andersondc3a9232022-06-25 13:12:19 -0400454.TQ
455.BI \-\-engine " engine"
Sean Anderson9cc40002022-06-25 13:12:15 -0400456The openssl engine to use when signing and verifying the image. For a complete
457list of available engines, refer to
Sean Andersondeb26382022-04-08 16:08:39 -0400458.BR engine (1).
Sean Anderson7ec625f2022-06-25 13:12:09 -0400459.
Sean Andersondeb26382022-04-08 16:08:39 -0400460.TP
Sean Anderson1bdf48622022-06-25 13:12:11 -0400461.B \-t
Sean Andersondc3a9232022-06-25 13:12:19 -0400462.TQ
463.B \-\-touch
Simon Glass152b2462020-07-09 18:39:43 -0600464Update the timestamp in the FIT.
Sean Anderson7ec625f2022-06-25 13:12:09 -0400465.IP
Sean Anderson9cc40002022-06-25 13:12:15 -0400466Normally the FIT timestamp is created the first time mkimage runs,
Simon Glass152b2462020-07-09 18:39:43 -0600467when converting the source .its to the binary .fit file. This corresponds to
Sean Anderson9cc40002022-06-25 13:12:15 -0400468using
469.BR -f .
470But if the original input to mkimage is a binary file (already compiled), then
471the timestamp is assumed to have been set previously.
Sean Anderson7ec625f2022-06-25 13:12:09 -0400472.
Sean Andersond0487182022-06-25 13:12:16 -0400473.SH BUGS
474Please report bugs to the
475.UR https://\:source\:.denx\:.de/\:u-boot/\:u-boot/\:issues
476U-Boot bug tracker
477.UE .
Horst Kronstorfer7aecfdd2011-12-21 04:31:23 +0000478.SH EXAMPLES
Sean Anderson3dc1ff02022-06-25 13:12:10 -0400479.\" Reduce the width of the tab stops to something reasonable
480.ta T 1i
Nobuhiro Iwamatsucd153552010-06-16 10:38:24 +0900481List image information:
Sean Anderson3dc1ff02022-06-25 13:12:10 -0400482.RS
483.P
484.EX
485\fBmkimage \-l uImage
486.EE
487.RE
Nobuhiro Iwamatsucd153552010-06-16 10:38:24 +0900488.P
489Create legacy image with compressed PowerPC Linux kernel:
Sean Anderson3dc1ff02022-06-25 13:12:10 -0400490.RS
491.P
492.EX
493\fBmkimage \-A powerpc \-O linux \-T kernel \-C gzip \\
494 \-a 0 \-e 0 \-n Linux \-d vmlinux.gz uImage
495.EE
496.RE
Nobuhiro Iwamatsucd153552010-06-16 10:38:24 +0900497.P
498Create FIT image with compressed PowerPC Linux kernel:
Sean Anderson3dc1ff02022-06-25 13:12:10 -0400499.RS
500.P
501.EX
502\fBmkimage \-f kernel.its kernel.itb
503.EE
504.RE
Simon Glasse29495d2013-06-13 15:10:04 -0700505.P
506Create FIT image with compressed kernel and sign it with keys in the
Sean Anderson3dc1ff02022-06-25 13:12:10 -0400507/public/signing\-keys directory. Add corresponding public keys into u\-boot.dtb,
Simon Glasse29495d2013-06-13 15:10:04 -0700508skipping those for which keys cannot be found. Also add a comment.
Sean Anderson3dc1ff02022-06-25 13:12:10 -0400509.RS
Simon Glass95d77b42013-06-13 15:10:05 -0700510.P
Sean Anderson3dc1ff02022-06-25 13:12:10 -0400511.EX
512\fBmkimage \-f kernel.its \-k /public/signing\-keys \-K u\-boot.dtb \\
513 \-c \(dqKernel 3.8 image for production devices\(dq kernel.itb
514.EE
515.RE
516.P
517Add public keys to u\-boot.dtb without needing a FIT to sign. This will also
Sean Anderson87b0af92022-05-16 16:11:08 -0400518create a FIT containing an images node with no data named unused.itb.
Sean Anderson3dc1ff02022-06-25 13:12:10 -0400519.RS
520.P
521.EX
522\fBmkimage \-f auto \-d /dev/null \-k /public/signing\-keys \-g dev \\
523 \-o sha256,rsa2048 \-K u\-boot.dtb unused.itb
524.EE
525.RE
Sean Anderson87b0af92022-05-16 16:11:08 -0400526.P
Simon Glass95d77b42013-06-13 15:10:05 -0700527Update an existing FIT image, signing it with additional keys.
Sean Anderson3dc1ff02022-06-25 13:12:10 -0400528Add corresponding public keys into u\-boot.dtb. This will resign all images
Simon Glass95d77b42013-06-13 15:10:05 -0700529with keys that are available in the new directory. Images that request signing
530with unavailable keys are skipped.
Sean Anderson3dc1ff02022-06-25 13:12:10 -0400531.RS
532.P
533.EX
534\fBmkimage \-F \-k /secret/signing\-keys \-K u\-boot.dtb \\
535 \-c \(dqKernel 3.8 image for production devices\(dq kernel.itb
536.EE
537.RE
Simon Glass8e35bb02016-02-22 22:55:51 -0700538.P
539Create a FIT image containing a kernel, using automatic mode. No .its file
540is required.
Sean Anderson3dc1ff02022-06-25 13:12:10 -0400541.RS
542.P
543.EX
544\fBmkimage \-f auto \-A arm \-O linux \-T kernel \-C none \-a 43e00000 \-e 0 \\
545 \-c \(dqKernel 4.4 image for production devices\(dq \-d vmlinuz kernel.itb
546.EE
547.RE
Simon Glassfb4cce02016-02-22 22:55:52 -0700548.P
549Create a FIT image containing a kernel and some device tree files, using
550automatic mode. No .its file is required.
Sean Anderson3dc1ff02022-06-25 13:12:10 -0400551.RS
552.P
553.EX
554\fBmkimage \-f auto \-A arm \-O linux \-T kernel \-C none \-a 43e00000 \-e 0 \\
555 \-c \(dqKernel 4.4 image for production devices\(dq \-d vmlinuz \\
556 \-b /path/to/rk3288\-firefly.dtb \-b /path/to/rk3288\-jerry.dtb kernel.itb
557.EE
558.RE
Sean Anderson87b0af92022-05-16 16:11:08 -0400559.P
560Create a FIT image containing a signed kernel, using automatic mode. No .its
561file is required.
Sean Anderson3dc1ff02022-06-25 13:12:10 -0400562.RS
563.P
564.EX
565\fBmkimage \-f auto \-A arm \-O linux \-T kernel \-C none \-a 43e00000 \-e 0 \\
566 \-d vmlinuz \-k /secret/signing\-keys \-g dev \-o sha256,rsa2048 kernel.itb
567.EE
568.RE
Sean Anderson7ec625f2022-06-25 13:12:09 -0400569.
Sean Anderson84bd5cd2022-06-25 13:12:17 -0400570.SH SEE ALSO
571.BR dtc (1),
572.BR dumpimage (1),
573.BR openssl (1),
574the\~
575.UR https://\:u-boot\:.readthedocs\:.io/\:en/\:latest/\:index.html
576U-Boot documentation
577.UE