doc: mkimage: Rework and refactor the man page; add long options
v3 cover doc: mkimage: Rework and refactor the man page; add long options
This gives a facelift for the mkimage man page, bringing it in line with the style perscribed by man-pages(7) and groff_man_style(7). I have tried to remove typographical and grammatical errors and inconsistencies wherever possible. The man page now both looks and feels closer to other Linux man pages. As a bonus, I also added a man page for dumpimage in the same style.
To address the impending exhaustion of short options, this also adds long options for each short option.
Changes in v3:
- Clarify intent in commit message
- Document option defaults
- Document the various content changes in the commit message
- Fix typo in commit message
- Note that "legacy" images are only legacy for U-Boot. In particular, mkimage supports many other image formats using the same syntax which are decidedly not "legacy."
- Remove "legacy" wording from synopsis
- Remove usage of "legacy" in section headings
- Reorder "legacy" synopsis first
- Use multiple .BRs for the -f auto option list
Changes in v2:
- Add long options
- Better document multi images
- Document -h and -V
- Ensure comments are requests
- Escape minus signs in examples
- Fix -B not being bolded in the description for -R
- Fix extra quote in -E synopsis
- Fix spacing for -F
- Further document -o and -R
- Indent things more robustly
- Italicize parameter for -d
- Make lists of valid algos bold
- Rearrange more options
- Remove spaces around pipes
- Rename first subsection to "General options"
- Use escape-sequences for options width all three of B/I/R. This renders better with mandoc.
- Use paired quotation marks
Sean Anderson (14):
doc: mkimage: Use standard style for synopsis
doc: mkimage: Use empty request instead of blank lines
doc: mkimage: Reformat examples
doc: mkimage: Regularize option documentation
doc: mkimage: Use subsection macro
doc: mkimage: Rearrange/remove some options
doc: mkimage: Use correct capitalization for NAME
doc: mkimage: Edit options for style and consistency
doc: mkimage: Add BUGS section
doc: mkimage: Add SEE ALSO section
doc: mkimage: Remove AUTHORS section
mkimage: Add long options
doc: mkimage: Further document -o and -R
doc: Add man page for dumpimage
doc/dumpimage.1 | 103 +++++ doc/mkimage.1 | 977 +++++++++++++++++++++++++++++++++++------------- tools/mkimage.c | 45 ++- 3 files changed, 854 insertions(+), 271 deletions(-) create mode 100644 doc/dumpimage.1
Signature · 1 line
2.35.1
PATCH v3 1/14 doc: mkimage: Use standard style for synopsis
The synopsis section is a bit messy. As an example, "uimage file name" is printed in italics, bold, and roman (depending on the line). This cleans things up and converts the synopsis section to use standard style. The .SY/.YS macros set up appropriate formatting for command synopsis sections (such as disabling hyphenation and setting a hanging indent). All parts of the synopsis now use the following style:
- Bold for parts of the command which should be typed in by the user (such as the program name and flags)
- Italic for parts which should be replaced (such as uimage-file-name)
- Roman for parts which should not be typed at all (such as brackets)
Multi-word variables now use hyphens to connect their words instead of spaces. This makes it clearer that all the words are part of the same variable. Additionally, "option ..." is used to denote where other options may be specified, as this appears to be standard style.
In addition to the above style changes, this also makes some changes to content. The use of the term "legacy" has been removed, since this simply refers to any non-FIT image type. Additionally, wording like "uimage file name" has been replaced with "image-file-name" to better reflect that images may or may not be uImages. Lastly, the "auto" value for -f is documented in the synopsis.
---
Changes in v3:
- Document the various content changes in the commit message
- Fix typo in commit message
- Remove "legacy" wording from synopsis
- Reorder "legacy" synopsis first
Changes in v2:
- Fix spacing for -F
doc/mkimage.1 | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-)
doc/mkimage.1 +19 -8
@@ -3,17 +3,28 @@ .SH NAME mkimage \- Generate image for U-Boot .SH SYNOPSIS -.B mkimage -.RB [ \-T " \fItype\fP] " \-l " [\fIuimage file name\fP]" +.SY mkimage +.OP \-T type +.BI \-l\~ image-file-name +.YS -.B mkimage -.RB [\fIoptions\fP] " \-f [" "image tree source file" "]" " [" "uimage file name" "]" +.SY mkimage +.RI [ option\~ .\|.\|.\&] +.OP \-T type +.I image-file-name +.YS -.B mkimage -.RB [\fIoptions\fP] " \-F [" "uimage file name" "]" +.SY mkimage +.RI [ option\~ .\|.\|.\&] +.BI \-f\~ image-tree-source-file\c +.RB | auto +.I image-file-name +.YS -.B mkimage -.RB [\fIoptions\fP] " (legacy mode)" +.SY mkimage +.RI [ option\~ .\|.\|.\&] +.BI \-F\~ image-file-name +.YS .SH "DESCRIPTION" The
Signature · 1 line
2.35.1
Re: [PATCH v3 01/14] doc: mkimage: Use standard style for synopsis
Quoted 34 lines · Sean Anderson
The synopsis section is a bit messy. As an example, "uimage file name" is printed in italics, bold, and roman (depending on the line). This cleans things up and converts the synopsis section to use standard style. The .SY/.YS macros set up appropriate formatting for command synopsis sections (such as disabling hyphenation and setting a hanging indent). All parts of the synopsis now use the following style:
- Bold for parts of the command which should be typed in by the user (such as the program name and flags)
- Italic for parts which should be replaced (such as uimage-file-name)
- Roman for parts which should not be typed at all (such as brackets)Multi-word variables now use hyphens to connect their words instead of spaces. This makes it clearer that all the words are part of the same variable. Additionally, "option ..." is used to denote where other options may be specified, as this appears to be standard style.
In addition to the above style changes, this also makes some changes to content. The use of the term "legacy" has been removed, since this simply refers to any non-FIT image type. Additionally, wording like "uimage file name" has been replaced with "image-file-name" to better reflect that images may or may not be uImages. Lastly, the "auto" value for -f is documented in the synopsis.
Signed-off-by Sean Anderson <[email protected]>---
Changes in v3:
- Document the various content changes in the commit message
- Fix typo in commit message
- Remove "legacy" wording from synopsis
- Reorder "legacy" synopsis first
Quoted 5 lines
Changes in v2:
- Fix spacing for -Fdoc/mkimage.1 | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-)
PATCH v3 2/14 doc: mkimage: Use empty request instead of blank lines
In reply to Sean AndersonBlank lines do not have well-defined semantics in fill mode (the default). Instead, use empty requests (.) where vertical space is necessary for readability. There are a few places where we use a paragraph instead.
---
(no changes since v1)
doc/mkimage.1 | 108 +++++++++++++++++++++++++------------------------- 1 file changed, 54 insertions(+), 54 deletions(-)
doc/mkimage.1 +54 -54
@@ -1,5 +1,5 @@ .TH MKIMAGE 1 "2022-02-07" - +. .SH NAME mkimage \- Generate image for U-Boot .SH SYNOPSIS
@@ -7,35 +7,35 @@ mkimage \- Generate image for U-Boot .OP \-T type .BI \-l\~ image-file-name .YS - +. .SY mkimage .RI [ option\~ .\|.\|.\&] .OP \-T type .I image-file-name .YS - +. .SY mkimage .RI [ option\~ .\|.\|.\&] .BI \-f\~ image-tree-source-file\c .RB | auto .I image-file-name .YS - +. .SY mkimage .RI [ option\~ .\|.\|.\&] .BI \-F\~ image-file-name .YS - +. .SH "DESCRIPTION" The .B mkimage command is used to create images for use with the U-Boot boot loader. These images can contain the linux kernel, device tree blob, root file system image, firmware images etc., either separate or combined. - +.P .B mkimage supports two different formats: - +.P The old .I legacy image format concatenates the individual parts (for example, kernel image,
@@ -43,69 +43,69 @@ device tree blob and ramdisk image) and adds a 64 bytes header containing information about target architecture, operating system, image type, compression method, entry points, time stamp, checksums, etc. - +.P The new .I FIT (Flattened Image Tree) format allows for more flexibility in handling images of various types and also enhances integrity protection of images with stronger checksums. It also supports verified boot. - +. .SH "OPTIONS" - +. .B List image information: - +. .TP .BI "\-l [" "uimage file name" "]" mkimage lists the information contained in the header of an existing U-Boot image. - +. .TP .BI "\-T [" "image type" "]" Parse image file as type. Pass \-h as the image to see the list of supported image type. Without this option image type is autodetected. - +. .TP .BI "\-q" Quiet. Don't print the image header on successful verification. - +. .P .B Create old legacy image: - +. .TP .BI "\-A [" "architecture" "]" Set architecture. Pass \-h as the architecture to see the list of supported architectures. - +. .TP .BI "\-O [" "os" "]" Set operating system. bootm command of u-boot changes boot method by os type. Pass \-h as the OS to see the list of supported OS. - +. .TP .BI "\-T [" "image type" "]" Set image type. Pass \-h as the image to see the list of supported image type. - +. .TP .BI "\-C [" "compression type" "]" Set compression type. Pass \-h as the compression to see the list of supported compression type. - +. .TP .BI "\-a [" "load address" "]" Set load address with a hex number. - +. .TP .BI "\-e [" "entry point" "]" Set entry point with a hex number. - +. .TP .BI "\-l" List the contents of an image. - +. .TP .BI "\-n [" "image name" "]" Set image name to 'image name'. - +. .TP .BI "\-R [" "secondary image name" "]" Some image types support a second image for additional data. For these types,
@@ -134,42 +134,42 @@ when loading the image. At most 256 parameters may be specified in this manner. T} .TE - +. .TP .BI "\-d [" "image data file" "]" Use image data from 'image data file'. - +. .TP .BI "\-x" Set XIP (execute in place) flag. - +. .TP .BI "\-s" Don't copy in the image data. Depending on the image type, this may create just the header, everything but the image data, or nothing at all. - +. .TP .BI "\-v" Verbose. Print file names as they are added to the image. - +. .P .B Create FIT image: - +. .TP .BI "\-b [" "device tree file" "] Appends the device tree binary file (.dtb) to the FIT. - +. .TP .BI "\-c [" "comment" "]" Specifies a comment to be added when signing. This is typically a useful message which describes how the image was signed or some other useful information. - +. .TP .BI "\-D [" "dtc options" "]" Provide special options to the device tree compiler that is used to create the image. - +. .TP .BI "\-E After processing, move the image data outside the FIT and store a data offset
@@ -178,44 +178,44 @@ FIT, with each one aligned to a 4-byte boundary. The existing 'data' property in each image will be replaced with 'data-offset' and 'data-size' properties. A 'data-offset' of 0 indicates that it starts in the first (4-byte aligned) byte after the FIT. - +. .TP .BI "\-B [" "alignment" "]" The alignment, in hexadecimal, that external data will be aligned to. This option only has an effect when \-E is specified. - +. .TP .BI "\-f [" "image tree source file" " | " "auto" "]" Image tree source file that describes the structure and contents of the FIT image. - +.IP This can be automatically generated for some simple cases. Use "-f auto" for this. In that case the arguments -d, -A, -O, -T, -C, -a and -e are used to specify the image to include in the FIT and its attributes. No .its file is required. - +. .TP .BI "\-F" Indicates that an existing FIT image should be modified. No dtc compilation is performed and the \-f flag should not be given. This can be used to sign images with additional keys after initial image creation. - +. .TP .BI "\-i [" "ramdisk_file" "]" Appends the ramdisk file to the FIT. - +. .TP .BI "\-k [" "key_directory" "]" Specifies the directory containing keys to use for signing. This directory should contain a private key file <name>.key for use with signing and a certificate <name>.crt (containing the public key) for use with verification. - +. .TP .BI "\-G [" "key_file" "]" Specifies the private key file to use when signing. This option may be used instead of \-k. - +. .TP .BI "\-K [" "key_destination" "]" Specifies a compiled device tree binary file (typically .dtb) to write
@@ -223,53 +223,53 @@ public key information into. When a private key is used to sign an image, the corresponding public key is written into this file for for run-time verification. Typically the file here is the device tree binary used by CONFIG_OF_CONTROL in U-Boot. - +. .TP .BI "\-G [" "key_file" "]" Specifies the private key file to use when signing. This option may be used instead of \-k. - +. .TP .BI "\-g [" "key_name_hint" "]" Sets the key-name-hint property when used with \-f auto. This is the <name> part of the key. The directory part is set by \-k. This option also indicates that the images included in the FIT should be signed. If this option is specified, \-o must be specified as well. - +. .TP .BI "\-o [" "signing algorithm" "]" Specifies the algorithm to be used for signing a FIT image. The default is taken from the signature node's 'algo' property. - +. .TP .BI "\-p [" "external position" "]" Place external data at a static external position. See \-E. Instead of writing a 'data-offset' property defining the offset from the end of the FIT, \-p will use 'data-position' as the absolute position from the base of the FIT. - +. .TP .BI "\-r" Specifies that keys used to sign the FIT are required. This means that they must be verified for the image to boot. Without this option, the verification will be optional (useful for testing but not for release). - +. .TP .BI "\-N [" "engine" "]" The openssl engine to use when signing and verifying the image. For a complete list of available engines, refer to .BR engine (1). - +. .TP .BI "\-t Update the timestamp in the FIT. - +.IP Normally the FIT timestamp is created the first time mkimage is run on a FIT, when converting the source .its to the binary .fit file. This corresponds to using the -f flag. But if the original input to mkimage is a binary file (already compiled) then the timestamp is assumed to have been set previously. - +. .SH EXAMPLES - +. List image information: .nf .B mkimage -l uImage
@@ -295,7 +295,7 @@ skipping those for which keys cannot be found. Also add a comment. .br .B -c """Kernel 3.8 image for production devices""" kernel.itb .fi - +. .P Add public keys to u-boot.dtb without needing a FIT to sign. This will also create a FIT containing an images node with no data named unused.itb.
@@ -304,7 +304,7 @@ create a FIT containing an images node with no data named unused.itb. .br .B -o sha256,rsa2048 -K u-boot.dtb unused.itb .fi - +. .P Update an existing FIT image, signing it with additional keys. Add corresponding public keys into u-boot.dtb. This will resign all images
@@ -315,7 +315,7 @@ with unavailable keys are skipped. .br .B -c """Kernel 3.8 image for production devices""" kernel.itb .fi - +. .P Create a FIT image containing a kernel, using automatic mode. No .its file is required.
@@ -341,7 +341,7 @@ file is required. .br .B -d vmlinuz -k /secret/signing-keys -g dev -o sha256,rsa2048 kernel.itb .fi - +. .SH HOMEPAGE http://www.denx.de/wiki/U-Boot/WebHome .PP
Signature · 1 line
2.35.1
Re: [PATCH v3 02/14] doc: mkimage: Use empty request instead of blank lines
Quoted 5 lines · Sean Anderson
Blank lines do not have well-defined semantics in fill mode (the default). Instead, use empty requests (.) where vertical space is necessary for readability. There are a few places where we use a paragraph instead.
Quoted 7 lines
Signed-off-by Sean Anderson <[email protected]>---
(no changes since v1)
doc/mkimage.1 | 108 +++++++++++++++++++++++++------------------------- 1 file changed, 54 insertions(+), 54 deletions(-)
PATCH v3 3/14 doc: mkimage: Reformat examples
In reply to Sean AndersonThis puts each example in a new paragraph and uses a hanging indent for continued lines to increase clarity. We use tabs instead of .in or .RS for the indent because it renders properly in both man and mandoc (which is what many common HTML man pages use). The only nit is that the tab stops in man default to something like 2", so reduce that to 1". We also escape every "minus" as recommended by man-pages(7).
---
(no changes since v2)
Changes in v2:
- Escape minus signs in examples
- Indent things more robustly
doc/mkimage.1 | 116 +++++++++++++++++++++++++++++--------------------- 1 file changed, 67 insertions(+), 49 deletions(-)
doc/mkimage.1 +67 -49
@@ -269,78 +269,96 @@ using the -f flag. But if the original input to mkimage is a binary file (already compiled) then the timestamp is assumed to have been set previously. . .SH EXAMPLES -. +.\" Reduce the width of the tab stops to something reasonable +.ta T 1i List image information: -.nf -.B mkimage -l uImage -.fi +.RS +.P +.EX +\fBmkimage \-l uImage +.EE +.RE .P Create legacy image with compressed PowerPC Linux kernel: -.nf -.B mkimage -A powerpc -O linux -T kernel -C gzip \\\\ -.br -.B -a 0 -e 0 -n Linux -d vmlinux.gz uImage -.fi +.RS +.P +.EX +\fBmkimage \-A powerpc \-O linux \-T kernel \-C gzip \\ + \-a 0 \-e 0 \-n Linux \-d vmlinux.gz uImage +.EE +.RE .P Create FIT image with compressed PowerPC Linux kernel: -.nf -.B mkimage -f kernel.its kernel.itb -.fi +.RS +.P +.EX +\fBmkimage \-f kernel.its kernel.itb +.EE +.RE .P Create FIT image with compressed kernel and sign it with keys in the -/public/signing-keys directory. Add corresponding public keys into u-boot.dtb, +/public/signing\-keys directory. Add corresponding public keys into u\-boot.dtb, skipping those for which keys cannot be found. Also add a comment. -.nf -.B mkimage -f kernel.its -k /public/signing-keys -K u-boot.dtb \\\\ -.br -.B -c """Kernel 3.8 image for production devices""" kernel.itb -.fi -. +.RS .P -Add public keys to u-boot.dtb without needing a FIT to sign. This will also +.EX +\fBmkimage \-f kernel.its \-k /public/signing\-keys \-K u\-boot.dtb \\ + \-c \(dqKernel 3.8 image for production devices\(dq kernel.itb +.EE +.RE +.P +Add public keys to u\-boot.dtb without needing a FIT to sign. This will also create a FIT containing an images node with no data named unused.itb. -.nf -.B mkimage -f auto -d /dev/null -k /public/signing-keys -g dev \\\\ -.br -.B -o sha256,rsa2048 -K u-boot.dtb unused.itb -.fi -. +.RS +.P +.EX +\fBmkimage \-f auto \-d /dev/null \-k /public/signing\-keys \-g dev \\ + \-o sha256,rsa2048 \-K u\-boot.dtb unused.itb +.EE +.RE .P Update an existing FIT image, signing it with additional keys. -Add corresponding public keys into u-boot.dtb. This will resign all images +Add corresponding public keys into u\-boot.dtb. This will resign all images with keys that are available in the new directory. Images that request signing with unavailable keys are skipped. -.nf -.B mkimage -F -k /secret/signing-keys -K u-boot.dtb \\\\ -.br -.B -c """Kernel 3.8 image for production devices""" kernel.itb -.fi -. +.RS +.P +.EX +\fBmkimage \-F \-k /secret/signing\-keys \-K u\-boot.dtb \\ + \-c \(dqKernel 3.8 image for production devices\(dq kernel.itb +.EE +.RE .P Create a FIT image containing a kernel, using automatic mode. No .its file is required. -.nf -.B mkimage -f auto -A arm -O linux -T kernel -C none -a 43e00000 -e 0 \\\\ -.br -.B -c """Kernel 4.4 image for production devices""" -d vmlinuz kernel.itb -.fi +.RS +.P +.EX +\fBmkimage \-f auto \-A arm \-O linux \-T kernel \-C none \-a 43e00000 \-e 0 \\ + \-c \(dqKernel 4.4 image for production devices\(dq \-d vmlinuz kernel.itb +.EE +.RE .P Create a FIT image containing a kernel and some device tree files, using automatic mode. No .its file is required. -.nf -.B mkimage -f auto -A arm -O linux -T kernel -C none -a 43e00000 -e 0 \\\\ -.br -.B -c """Kernel 4.4 image for production devices""" -d vmlinuz \\\\ -.B -b /path/to/rk3288-firefly.dtb -b /path/to/rk3288-jerry.dtb kernel.itb -.fi +.RS +.P +.EX +\fBmkimage \-f auto \-A arm \-O linux \-T kernel \-C none \-a 43e00000 \-e 0 \\ + \-c \(dqKernel 4.4 image for production devices\(dq \-d vmlinuz \\ + \-b /path/to/rk3288\-firefly.dtb \-b /path/to/rk3288\-jerry.dtb kernel.itb +.EE +.RE .P Create a FIT image containing a signed kernel, using automatic mode. No .its file is required. -.nf -.B mkimage -f auto -A arm -O linux -T kernel -C none -a 43e00000 -e 0 \\\\ -.br -.B -d vmlinuz -k /secret/signing-keys -g dev -o sha256,rsa2048 kernel.itb -.fi +.RS +.P +.EX +\fBmkimage \-f auto \-A arm \-O linux \-T kernel \-C none \-a 43e00000 \-e 0 \\ + \-d vmlinuz \-k /secret/signing\-keys \-g dev \-o sha256,rsa2048 kernel.itb +.EE +.RE . .SH HOMEPAGE http://www.denx.de/wiki/U-Boot/WebHome
Signature · 1 line
2.35.1
Re: [PATCH v3 03/14] doc: mkimage: Reformat examples
Quoted 11 lines · Sean Anderson
This puts each example in a new paragraph and uses a hanging indent for continued lines to increase clarity. We use tabs instead of .in or .RS for the indent because it renders properly in both man and mandoc (which is what many common HTML man pages use). The only nit is that the tab stops in man default to something like 2", so reduce that to 1". We also escape every "minus" as recommended by man-pages(7).
Signed-off-by Sean Anderson <[email protected]>---
Quoted 8 lines
(no changes since v2)
Changes in v2:
- Escape minus signs in examples
- Indent things more robustlydoc/mkimage.1 | 116 +++++++++++++++++++++++++++++--------------------- 1 file changed, 67 insertions(+), 49 deletions(-)
Gosh this format is a pain
PATCH v3 4/14 doc: mkimage: Regularize option documentation
In reply to Sean AndersonSquare brackets are commonly used to denote optional parts of a command. However, all option arguments are mandatory. Remove these brackets. This also removes some unnecessary quotation marks, and uses hyphens to connect words in option arguments. This is intended to just clean up the formatting, leaving content corrections to later patches.
---
Changes in v3:
- Clarify intent in commit message
Changes in v2:
- Fix extra quote in -E synopsis
doc/mkimage.1 | 72 +++++++++++++++++++++++++-------------------------- 1 file changed, 36 insertions(+), 36 deletions(-)
doc/mkimage.1 +36 -36
@@ -26,7 +26,7 @@ mkimage \- Generate image for U-Boot .BI \-F\~ image-file-name .YS . -.SH "DESCRIPTION" +.SH DESCRIPTION The .B mkimage command is used to create images for use with the U-Boot boot loader.
@@ -50,64 +50,64 @@ allows for more flexibility in handling images of various types and also enhances integrity protection of images with stronger checksums. It also supports verified boot. . -.SH "OPTIONS" +.SH OPTIONS . .B List image information: . .TP -.BI "\-l [" "uimage file name" "]" +.BI \-l " uimage-file-name" mkimage lists the information contained in the header of an existing U-Boot image. . .TP -.BI "\-T [" "image type" "]" +.BI \-T " image-type" Parse image file as type. Pass \-h as the image to see the list of supported image type. Without this option image type is autodetected. . .TP -.BI "\-q" +.B \-q Quiet. Don't print the image header on successful verification. . .P .B Create old legacy image: . .TP -.BI "\-A [" "architecture" "]" +.BI \-A " architecture" Set architecture. Pass \-h as the architecture to see the list of supported architectures. . .TP -.BI "\-O [" "os" "]" +.BI \-O " os" Set operating system. bootm command of u-boot changes boot method by os type. Pass \-h as the OS to see the list of supported OS. . .TP -.BI "\-T [" "image type" "]" +.BI \-T " image-type" Set image type. Pass \-h as the image to see the list of supported image type. . .TP -.BI "\-C [" "compression type" "]" +.BI \-C " compression-type" Set compression type. Pass \-h as the compression to see the list of supported compression type. . .TP -.BI "\-a [" "load address" "]" +.BI \-a " load-address" Set load address with a hex number. . .TP -.BI "\-e [" "entry point" "]" +.BI \-e " entry-point" Set entry point with a hex number. . .TP -.BI "\-l" +.B \-l List the contents of an image. . .TP -.BI "\-n [" "image name" "]" +.BI \-n " image-name" Set image name to 'image name'. . .TP -.BI "\-R [" "secondary image name" "]" +.BI \-R " secondary-image-name" Some image types support a second image for additional data. For these types, use \-R to specify this second image. .TS
@@ -136,42 +136,42 @@ T} .TE . .TP -.BI "\-d [" "image data file" "]" +.BI \-d " image-data-file" Use image data from 'image data file'. . .TP -.BI "\-x" +.B \-x Set XIP (execute in place) flag. . .TP -.BI "\-s" +.B \-s Don't copy in the image data. Depending on the image type, this may create just the header, everything but the image data, or nothing at all. . .TP -.BI "\-v" +.B \-v Verbose. Print file names as they are added to the image. . .P .B Create FIT image: . .TP -.BI "\-b [" "device tree file" "] +.BI \-b " device-tree-file" Appends the device tree binary file (.dtb) to the FIT. . .TP -.BI "\-c [" "comment" "]" +.BI \-c " comment" Specifies a comment to be added when signing. This is typically a useful message which describes how the image was signed or some other useful information. . .TP -.BI "\-D [" "dtc options" "]" +.BI \-D " dtc-options" Provide special options to the device tree compiler that is used to create the image. . .TP -.BI "\-E +.BI \-E After processing, move the image data outside the FIT and store a data offset in the FIT. Images will be placed one after the other immediately after the FIT, with each one aligned to a 4-byte boundary. The existing 'data' property
@@ -180,12 +180,12 @@ A 'data-offset' of 0 indicates that it starts in the first (4-byte aligned) byte after the FIT. . .TP -.BI "\-B [" "alignment" "]" +.BI \-B " alignment" The alignment, in hexadecimal, that external data will be aligned to. This option only has an effect when \-E is specified. . .TP -.BI "\-f [" "image tree source file" " | " "auto" "]" +.BI \-f " image-tree-source-file" Image tree source file that describes the structure and contents of the FIT image. .IP
@@ -195,29 +195,29 @@ and -e are used to specify the image to include in the FIT and its attributes. No .its file is required. . .TP -.BI "\-F" +.B \-F Indicates that an existing FIT image should be modified. No dtc compilation is performed and the \-f flag should not be given. This can be used to sign images with additional keys after initial image creation. . .TP -.BI "\-i [" "ramdisk_file" "]" +.BI \-i " ramdisk-file" Appends the ramdisk file to the FIT. . .TP -.BI "\-k [" "key_directory" "]" +.BI \-k " key-directory" Specifies the directory containing keys to use for signing. This directory should contain a private key file <name>.key for use with signing and a certificate <name>.crt (containing the public key) for use with verification. . .TP -.BI "\-G [" "key_file" "]" +.BI \-G " key-file" Specifies the private key file to use when signing. This option may be used instead of \-k. . .TP -.BI "\-K [" "key_destination" "]" +.BI \-K " key-destination" Specifies a compiled device tree binary file (typically .dtb) to write public key information into. When a private key is used to sign an image, the corresponding public key is written into this file for for run-time
@@ -225,42 +225,42 @@ verification. Typically the file here is the device tree binary used by CONFIG_OF_CONTROL in U-Boot. . .TP -.BI "\-G [" "key_file" "]" +.BI \-G " key-file" Specifies the private key file to use when signing. This option may be used instead of \-k. . .TP -.BI "\-g [" "key_name_hint" "]" +.BI \-g " key-name-hint" Sets the key-name-hint property when used with \-f auto. This is the <name> part of the key. The directory part is set by \-k. This option also indicates that the images included in the FIT should be signed. If this option is specified, \-o must be specified as well. . .TP -.BI "\-o [" "signing algorithm" "]" +.BI \-o " signing-algorithm" Specifies the algorithm to be used for signing a FIT image. The default is taken from the signature node's 'algo' property. . .TP -.BI "\-p [" "external position" "]" +.BI \-p " external-position" Place external data at a static external position. See \-E. Instead of writing a 'data-offset' property defining the offset from the end of the FIT, \-p will use 'data-position' as the absolute position from the base of the FIT. . .TP -.BI "\-r" +.B \-r Specifies that keys used to sign the FIT are required. This means that they must be verified for the image to boot. Without this option, the verification will be optional (useful for testing but not for release). . .TP -.BI "\-N [" "engine" "]" +.BI \-N " engine" The openssl engine to use when signing and verifying the image. For a complete list of available engines, refer to .BR engine (1). . .TP -.BI "\-t +.B \-t Update the timestamp in the FIT. .IP Normally the FIT timestamp is created the first time mkimage is run on a FIT,
Signature · 1 line
2.35.1
Re: [PATCH v3 04/14] doc: mkimage: Regularize option documentation
Quoted 10 lines · Sean Anderson
Square brackets are commonly used to denote optional parts of a command. However, all option arguments are mandatory. Remove these brackets. This also removes some unnecessary quotation marks, and uses hyphens to connect words in option arguments. This is intended to just clean up the formatting, leaving content corrections to later patches.
Signed-off-by Sean Anderson <[email protected]>---
Quoted 8 lines
Changes in v3:
- Clarify intent in commit messageChanges in v2:
- Fix extra quote in -E synopsisdoc/mkimage.1 | 72 +++++++++++++++++++++++++-------------------------- 1 file changed, 36 insertions(+), 36 deletions(-)
PATCH v3 5/14 doc: mkimage: Use subsection macro
In reply to Sean AndersonThe options are divided up into several subsections. Use the appropriate macro. While we're at it, rename the headings to better reflect the contents of their sections.
---
Changes in v3:
- Remove usage of "legacy" in section headings
Changes in v2:
- Rename first subsection to "General options"
- Use paired quotation marks
doc/mkimage.1 | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
doc/mkimage.1 +3 -5
@@ -52,7 +52,7 @@ supports verified boot. . .SH OPTIONS . -.B List image information: +.SS General options . .TP .BI \-l " uimage-file-name"
@@ -68,8 +68,7 @@ Without this option image type is autodetected. .B \-q Quiet. Don't print the image header on successful verification. . -.P -.B Create old legacy image: +.SS General image-creation options . .TP .BI \-A " architecture"
@@ -152,8 +151,7 @@ just the header, everything but the image data, or nothing at all. .B \-v Verbose. Print file names as they are added to the image. . -.P -.B Create FIT image: +.SS Options for creating FIT images . .TP .BI \-b " device-tree-file"
Signature · 1 line
2.35.1
Re: [PATCH v3 05/14] doc: mkimage: Use subsection macro
Quoted 11 lines · Sean Anderson
The options are divided up into several subsections. Use the appropriate macro. While we're at it, rename the headings to better reflect the contents of their sections.
Signed-off-by Sean Anderson <[email protected]>---
Changes in v3:
- Remove usage of "legacy" in section headings
Quoted 6 lines
Changes in v2:
- Rename first subsection to "General options"
- Use paired quotation marksdoc/mkimage.1 | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
PATCH v3 6/14 doc: mkimage: Rearrange/remove some options
In reply to Sean AndersonThis moves some options which work in any mode to the general options section. -p is moved to after -E/-B since those options are related. This also adds documentation for -h and -V.
The -F, -l, and -G options are documented twice. Remove the second documentation in each case. The synopsis for -l also suggests an implied second uimage-file-name parameter. E.g.
mkimage [-l uimage-file-name] uimage-file-name
This is misleading, so remove it. Wrap a few lines to 80 characters as well.
---
(no changes since v2)
Changes in v2:
- Document -h and -V
- Rearrange more options
doc/mkimage.1 | 62 ++++++++++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 33 deletions(-)
doc/mkimage.1 +29 -33
@@ -55,8 +55,18 @@ supports verified boot. .SS General options . .TP -.BI \-l " uimage-file-name" -mkimage lists the information contained in the header of an existing U-Boot image. +.B \-h +Print a help message and exit. +. +.TP +.B \-l +mkimage lists the information contained in the header of an existing U-Boot +image. +. +.TP +.B \-s +Don't copy in the image data. Depending on the image type, this may create +just the header, everything but the image data, or nothing at all. . .TP .BI \-T " image-type"
@@ -66,13 +76,22 @@ Without this option image type is autodetected. . .TP .B \-q -Quiet. Don't print the image header on successful verification. +Quiet. Don't print the image header. +. +.TP +.B \-v +Verbose. Print file names as they are added to the image. +. +.TP +.B \-V +Print version information and exit. . .SS General image-creation options . .TP .BI \-A " architecture" -Set architecture. Pass \-h as the architecture to see the list of supported architectures. +Set architecture. Pass \-h as the architecture to see the list of supported +architectures. . .TP .BI \-O " os"
@@ -80,11 +99,6 @@ Set operating system. bootm command of u-boot changes boot method by os type. Pass \-h as the OS to see the list of supported OS. . .TP -.BI \-T " image-type" -Set image type. -Pass \-h as the image to see the list of supported image type. -. -.TP .BI \-C " compression-type" Set compression type. Pass \-h as the compression to see the list of supported compression type.
@@ -98,10 +112,6 @@ Set load address with a hex number. Set entry point with a hex number. . .TP -.B \-l -List the contents of an image. -. -.TP .BI \-n " image-name" Set image name to 'image name'. .
@@ -142,15 +152,6 @@ Use image data from 'image data file'. .B \-x Set XIP (execute in place) flag. . -.TP -.B \-s -Don't copy in the image data. Depending on the image type, this may create -just the header, everything but the image data, or nothing at all. -. -.TP -.B \-v -Verbose. Print file names as they are added to the image. -. .SS Options for creating FIT images . .TP
@@ -183,6 +184,12 @@ The alignment, in hexadecimal, that external data will be aligned to. This option only has an effect when \-E is specified. . .TP +.BI \-p " external-position" +Place external data at a static external position. See \-E. Instead of writing +a 'data-offset' property defining the offset from the end of the FIT, \-p will +use 'data-position' as the absolute position from the base of the FIT. +. +.TP .BI \-f " image-tree-source-file" Image tree source file that describes the structure and contents of the FIT image.
@@ -223,11 +230,6 @@ verification. Typically the file here is the device tree binary used by CONFIG_OF_CONTROL in U-Boot. . .TP -.BI \-G " key-file" -Specifies the private key file to use when signing. This option may be used -instead of \-k. -. -.TP .BI \-g " key-name-hint" Sets the key-name-hint property when used with \-f auto. This is the <name> part of the key. The directory part is set by \-k. This option also indicates
@@ -240,12 +242,6 @@ Specifies the algorithm to be used for signing a FIT image. The default is taken from the signature node's 'algo' property. . .TP -.BI \-p " external-position" -Place external data at a static external position. See \-E. Instead of writing -a 'data-offset' property defining the offset from the end of the FIT, \-p will -use 'data-position' as the absolute position from the base of the FIT. -. -.TP .B \-r Specifies that keys used to sign the FIT are required. This means that they must be verified for the image to boot. Without this option, the verification
Signature · 1 line
2.35.1
Re: [PATCH v3 06/14] doc: mkimage: Rearrange/remove some options
Quoted 17 lines · Sean Anderson
This moves some options which work in any mode to the general options section. -p is moved to after -E/-B since those options are related. This also adds documentation for -h and -V.
The -F, -l, and -G options are documented twice. Remove the second documentation in each case. The synopsis for -l also suggests an implied second uimage-file-name parameter. E.g.
mkimage [-l uimage-file-name] uimage-file-name
This is misleading, so remove it. Wrap a few lines to 80 characters as well.
Signed-off-by Sean Anderson <[email protected]>---
Quoted 9 lines
(no changes since v2)
Changes in v2:
- Document -h and -V
- Rearrange more optionsdoc/mkimage.1 | 62 ++++++++++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 33 deletions(-)
PATCH v3 7/14 doc: mkimage: Use correct capitalization for NAME
In reply to Sean AndersonThe description in NAME should not be capitalized. Fix a grammatical error as well.
---
(no changes since v1)
doc/mkimage.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
doc/mkimage.1 +1 -1
@@ -1,7 +1,7 @@ .TH MKIMAGE 1 "2022-02-07" . .SH NAME -mkimage \- Generate image for U-Boot +mkimage \- generate images for U-Boot .SH SYNOPSIS .SY mkimage .OP \-T type
Signature · 1 line
2.35.1
Re: [PATCH v3 07/14] doc: mkimage: Use correct capitalization for NAME
Quoted 11 lines · Sean Anderson
The description in NAME should not be capitalized. Fix a grammatical error as well.
Signed-off-by Sean Anderson <[email protected]>---
(no changes since v1)
doc/mkimage.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 17 lines
doc/mkimage.1 +1
-2@@ -1,7 +1,7 @@ .TH MKIMAGE 1 "2022-02-07" . .SH NAME -mkimage \- Generate image for U-Boot +mkimage \- generate images for U-Boot .SH SYNOPSIS .SY mkimage .OP \-T type --2.35.1
PATCH v3 8/14 doc: mkimage: Edit options for style and consistency
In reply to Sean AndersonThis makes a variety of changes for the options to make them typographically consistent, clarify their meaning, and fix grammatical (or other) errors. Many of the changes here are stylistic, though there are a few fixes. The main changes I made across the board were:
- All options are bolded and parameters italicised
- All single quotes are properly matched (instead of using apostrophes)
- Minor background info has been added to clarify many underdocumented options
- Default values for options are documented
---
Changes in v3:
- Document option defaults
- Note that "legacy" images are only legacy for U-Boot. In particular, mkimage supports many other image formats using the same syntax which are decidedly not "legacy."
- Use multiple .BRs for the -f auto option list
Changes in v2:
- Better document multi images
- Fix -B not being bolded in the description for -R
- Italicize parameter for -d
- Make lists of valid algos bold
- Remove spaces around pipes
- Use escape-sequences for options width all three of B/I/R. This renders better with mandoc.
doc/mkimage.1 | 273 +++++++++++++++++++++++++++++++++++++------------- 1 file changed, 205 insertions(+), 68 deletions(-)
doc/mkimage.1 +205 -68
@@ -29,26 +29,25 @@ mkimage \- generate images for U-Boot .SH DESCRIPTION The .B mkimage -command is used to create images for use with the U-Boot boot loader. -These images can contain the linux kernel, device tree blob, root file -system image, firmware images etc., either separate or combined. +command is used to create images for use with the U-Boot boot loader. These +images can contain the Linux kernel, device tree blob, root file system image, +firmware images etc., either separate or combined. .P .B mkimage -supports two different formats: +supports many image formats. Some of these formats may be used by embedded boot +firmware to load U-Boot. Others may be used by U-Boot to load Linux (or some +other kernel): .P -The old -.I legacy image -format concatenates the individual parts (for example, kernel image, -device tree blob and ramdisk image) and adds a 64 bytes header -containing information about target architecture, operating system, -image type, compression method, entry points, time stamp, checksums, -etc. +The legacy image format concatenates the individual parts (for example, kernel +image, device tree blob and ramdisk image) and adds a 64 byte header containing +information about the target architecture, operating system, image type, +compression method, entry points, time stamp, checksums, etc. .P The new -.I FIT (Flattened Image Tree) format -allows for more flexibility in handling images of various types and also -enhances integrity protection of images with stronger checksums. It also -supports verified boot. +.I FIT +(Flattened Image Tree) format allows for more flexibility in handling images of +various types and also enhances integrity protection of images with stronger +checksums. It also supports verified boot. . .SH OPTIONS .
@@ -60,8 +59,8 @@ Print a help message and exit. . .TP .B \-l -mkimage lists the information contained in the header of an existing U-Boot -image. +.B mkimage +lists the information contained in the header of an existing U-Boot image. . .TP .B \-s
@@ -70,9 +69,34 @@ just the header, everything but the image data, or nothing at all. . .TP .BI \-T " image-type" -Parse image file as type. -Pass \-h as the image to see the list of supported image type. -Without this option image type is autodetected. +Parse image file as +.IR image-type . +Pass +.B list +as +.I image-type +to see the list of supported image types. If this option is absent, then it +defaults to +.B kernel +(legacy image). If this option is absent when +.B \-l +is passed, then +.B mkimage +will attempt to automatically detect the image type. Not all image types support +automatic detection, so it may be necessary to pass +.B \-T +explicitly. +.IP +When creating a FIT image with +.BR \-f , +the image type is always set to +.BR flat_dt . +In this case, +.B \-T +specifies the image node's \(oqtype\(cq property. If +.B \-T +is absent, then the \(oqtype\(cq property will default to +.BR kernel . . .TP .B \-q
@@ -90,35 +114,67 @@ Print version information and exit. . .TP .BI \-A " architecture" -Set architecture. Pass \-h as the architecture to see the list of supported -architectures. +Set the architecture. Pass +.B \-h +as the architecture to see the list of supported architectures. If +.B \-A +is absent, it defaults to +.BR ppc . . .TP .BI \-O " os" -Set operating system. bootm command of u-boot changes boot method by os type. -Pass \-h as the OS to see the list of supported OS. +Set the operating system. The U-Boot +.I bootm +command changes boot method based on the OS type. +Pass +.B \-h +as the +.I os +to see the list of supported OSs. If +.B \-O +is absent, it defaults to +.BR linux . . .TP .BI \-C " compression-type" -Set compression type. -Pass \-h as the compression to see the list of supported compression type. +Set the compression type. The image data should have already been compressed +using this compression type. +.B mkimage +will not automatically compress image data. +Pass +.B \-h +as the +.I compression-type +to see the list of supported compression types. If +.B \-C +is absent, it defaults to +.BR gzip . . .TP .BI \-a " load-address" -Set load address with a hex number. +Set the absolute address to load the image data to. +.I load-address +will be interpreted as a hexadecimal number. . .TP .BI \-e " entry-point" -Set entry point with a hex number. +Set the absolute address of the image entry point. The U-Boot +.I bootm +command will jump to this address after loading the image. +.I entry-point +will be interpreted as a hexadecimal number. . .TP .BI \-n " image-name" -Set image name to 'image name'. +Set the image name to +.IR image-name . . .TP .BI \-R " secondary-image-name" Some image types support a second image for additional data. For these types, -use \-R to specify this second image. +use +.B \-R +to specify this second image. .TS allbox; lb lbx
@@ -146,11 +202,26 @@ T} . .TP .BI \-d " image-data-file" -Use image data from 'image data file'. +Use image data from +.IR image-data-file . +If the +.I image-type +is +.BR multi , +then multiple images may be specified, separated by colons: +.RS +.IP +.IR image-data-file [\fB:\fP image-data-file .\|.\|.] +.RE . .TP .B \-x -Set XIP (execute in place) flag. +Set the +.I XIP +(execute in place) flag. The U-Boot +.I bootm +command will not load the image data, and instead will assume it is already +accessible at the load address (such as via memory-mapped flash). . .SS Options for creating FIT images .
@@ -160,23 +231,27 @@ Appends the device tree binary file (.dtb) to the FIT. . .TP .BI \-c " comment" -Specifies a comment to be added when signing. This is typically a useful -message which describes how the image was signed or some other useful -information. +Specifies a comment to be added when signing. This is typically a message which +describes how the image was signed or some other useful information. . .TP .BI \-D " dtc-options" -Provide special options to the device tree compiler that is used to -create the image. +Provide additional options to the device tree compiler when creating the image. +See +.BR dtc (1) +for documentation of possible options. If +.B \-D +is absent, it defaults to +.BR "\-I dts \-O dtb \-p 500" . . .TP .BI \-E After processing, move the image data outside the FIT and store a data offset -in the FIT. Images will be placed one after the other immediately after the -FIT, with each one aligned to a 4-byte boundary. The existing 'data' property -in each image will be replaced with 'data-offset' and 'data-size' properties. -A 'data-offset' of 0 indicates that it starts in the first (4-byte aligned) -byte after the FIT. +in the FIT. Images will be placed one after the other immediately after the FIT, +with each one aligned to a 4-byte boundary. The existing \(oqdata\(cq property +in each image will be replaced with \(oqdata-offset\(cq and \(oqdata-size\(cq +properties. A \(oqdata-offset\(cq of 0 indicates that it starts in the first +(4-byte-aligned) byte after the FIT. . .TP .BI \-B " alignment"
@@ -185,36 +260,62 @@ option only has an effect when \-E is specified. . .TP .BI \-p " external-position" -Place external data at a static external position. See \-E. Instead of writing -a 'data-offset' property defining the offset from the end of the FIT, \-p will -use 'data-position' as the absolute position from the base of the FIT. +Place external data at a static external position. Instead of writing a +\(oqdata-offset\(cq property defining the offset from the end of the FIT, +.B \-p +will use \(oqdata-position\(cq as the absolute position from the base of the +FIT. See +.B \-E +for details on using external data. . .TP -.BI \-f " image-tree-source-file" +\fB\-f \fIimage-tree-source-file\fR | \fBauto Image tree source file that describes the structure and contents of the FIT image. .IP -This can be automatically generated for some simple cases. -Use "-f auto" for this. In that case the arguments -d, -A, -O, -T, -C, -a -and -e are used to specify the image to include in the FIT and its attributes. -No .its file is required. +In some simple cases, the image tree source can be generated automatically. To +use this feature, pass +.BR "\-f auto" . +The +.BR \-d , +.BR \-A , +.BR \-O , +.BR \-T , +.BR \-C , +.BR \-a , +and +.B \-e +options may be used to specify the image to include in the FIT and its +attributes. No +.I image-tree-source-file +is required. . .TP .B \-F -Indicates that an existing FIT image should be modified. No dtc -compilation is performed and the \-f flag should not be given. -This can be used to sign images with additional keys after initial image -creation. +Indicates that an existing FIT image should be modified. No dtc compilation will +be performed and +.B \-f +should not be passed. This can be used to sign images with additional keys +after initial image creation. . .TP .BI \-i " ramdisk-file" -Appends the ramdisk file to the FIT. +Append a ramdisk or initramfs file to the image. . .TP .BI \-k " key-directory" Specifies the directory containing keys to use for signing. This directory -should contain a private key file <name>.key for use with signing and a -certificate <name>.crt (containing the public key) for use with verification. +should contain a private key file +.IR name .key +for use with signing, and a certificate +.IR name .crt +(containing the public key) for use with verification. The public key is only +necessary when embedding it into another device tree using +.BR \-K . +.I name +defaults to the value of the signature node's \(oqkey-name-hint\(cq property, +but may be overridden using +.BR \-g . . .TP .BI \-G " key-file"
@@ -231,15 +332,49 @@ CONFIG_OF_CONTROL in U-Boot. . .TP .BI \-g " key-name-hint" -Sets the key-name-hint property when used with \-f auto. This is the <name> -part of the key. The directory part is set by \-k. This option also indicates -that the images included in the FIT should be signed. If this option is -specified, \-o must be specified as well. +Overrides the signature node's \(oqkey-name-hint\(cq property. This is +especially useful when signing an image with +.BR "\-f auto" . +This is the +.I name +part of the key. The directory part is set by +.BR \-k . +This option also indicates that the images included in the FIT should be signed. +If this option is specified, then +.B \-o +must be specified as well. . .TP -.BI \-o " signing-algorithm" +.BI \-o " crypto" , checksum Specifies the algorithm to be used for signing a FIT image. The default is -taken from the signature node's 'algo' property. +taken from the signature node's \(oqalgo\(cq property. +The valid values for +.I crypto +are: +.RS +.IP +.TS +lb. +rsa2048 +rsa3072 +rsa4096 +ecdsa256 +.TE +.RE +.IP +The valid values for +.I checksum +are +.RS +.IP +.TS +lb. +sha1 +sha256 +sha384 +sha512 +.TE +.RE . .TP .B \-r
@@ -249,18 +384,20 @@ will be optional (useful for testing but not for release). . .TP .BI \-N " engine" -The openssl engine to use when signing and verifying the image. For a complete list of -available engines, refer to +The openssl engine to use when signing and verifying the image. For a complete +list of available engines, refer to .BR engine (1). . .TP .B \-t Update the timestamp in the FIT. .IP -Normally the FIT timestamp is created the first time mkimage is run on a FIT, +Normally the FIT timestamp is created the first time mkimage runs, when converting the source .its to the binary .fit file. This corresponds to -using the -f flag. But if the original input to mkimage is a binary file -(already compiled) then the timestamp is assumed to have been set previously. +using +.BR -f . +But if the original input to mkimage is a binary file (already compiled), then +the timestamp is assumed to have been set previously. . .SH EXAMPLES .\" Reduce the width of the tab stops to something reasonable
Signature · 1 line
2.35.1
Re: [PATCH v3 08/14] doc: mkimage: Edit options for style and consistency
Quoted 31 lines · Sean Anderson
This makes a variety of changes for the options to make them typographically consistent, clarify their meaning, and fix grammatical (or other) errors. Many of the changes here are stylistic, though there are a few fixes. The main changes I made across the board were:
- All options are bolded and parameters italicised
- All single quotes are properly matched (instead of using apostrophes)
- Minor background info has been added to clarify many underdocumented options
- Default values for options are documentedSigned-off-by Sean Anderson <[email protected]>---
Changes in v3:
- Document option defaults
- Note that "legacy" images are only legacy for U-Boot. In particular, mkimage supports many other image formats using the same syntax which are decidedly not "legacy."
- Use multiple .BRs for the -f auto option listChanges in v2:
- Better document multi images
- Fix -B not being bolded in the description for -R
- Italicize parameter for -d
- Make lists of valid algos bold
- Remove spaces around pipes
- Use escape-sequences for options width all three of B/I/R. This renders better with mandoc.
Quoted 2 lines
doc/mkimage.1 | 273 +++++++++++++++++++++++++++++++++++++------------- 1 file changed, 205 insertions(+), 68 deletions(-)
PATCH v3 9/14 doc: mkimage: Add BUGS section
In reply to Sean AndersonIn leiu of a non-standard HOMEPAGE section, add a BUGS section with a link to the issue tracker.
---
(no changes since v1)
doc/mkimage.1 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
doc/mkimage.1 +5 -2
@@ -399,6 +399,11 @@ using But if the original input to mkimage is a binary file (already compiled), then the timestamp is assumed to have been set previously. . +.SH BUGS +Please report bugs to the +.UR https://\:source\:.denx\:.de/\:u-boot/\:u-boot/\:issues +U-Boot bug tracker +.UE . .SH EXAMPLES .\" Reduce the width of the tab stops to something reasonable .ta T 1i
@@ -491,8 +496,6 @@ file is required. .EE .RE . -.SH HOMEPAGE -http://www.denx.de/wiki/U-Boot/WebHome .PP .SH AUTHOR This manual page was written by Nobuhiro Iwamatsu <[email protected]>
Signature · 1 line
2.35.1
Re: [PATCH v3 09/14] doc: mkimage: Add BUGS section
Quoted 4 lines · Sean Anderson
In leiu of a non-standard HOMEPAGE section, add a BUGS section with a link to the issue tracker.
Quoted 8 lines
Signed-off-by Sean Anderson <[email protected]>---
(no changes since v1)
doc/mkimage.1 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
PATCH v3 10/14 doc: mkimage: Add SEE ALSO section
In reply to Sean AndersonThis adds a SEE ALSO section to link to similar man pages, as well as to the U-Boot documentation.
---
(no changes since v1)
doc/mkimage.1 | 8 ++++++++ 1 file changed, 8 insertions(+)
doc/mkimage.1 +8 -0
@@ -501,3 +501,11 @@ file is required. This manual page was written by Nobuhiro Iwamatsu <[email protected]> and Wolfgang Denk <[email protected]>. It was updated for image signing by Simon Glass <[email protected]>. +.SH SEE ALSO +.BR dtc (1), +.BR dumpimage (1), +.BR openssl (1), +the\~ +.UR https://\:u-boot\:.readthedocs\:.io/\:en/\:latest/\:index.html +U-Boot documentation +.UE
Signature · 1 line
2.35.1
Re: [PATCH v3 10/14] doc: mkimage: Add SEE ALSO section
Quoted 4 lines · Sean Anderson
This adds a SEE ALSO section to link to similar man pages, as well as to the U-Boot documentation.
Quoted 8 lines
Signed-off-by Sean Anderson <[email protected]>---
(no changes since v1)
doc/mkimage.1 | 8 ++++++++ 1 file changed, 8 insertions(+)
PATCH v3 11/14 doc: mkimage: Remove AUTHORS section
In reply to Sean AndersonPer man-pages(7), "use of an AUTHORS section is strongly discouraged." Remove it, and instead add some copyright notices and an SPDX. The default license for U-Boot is GPL2, so that's what I put. The copyright dates are based on the commit dates.
---
(no changes since v2)
Changes in v2:
- Ensure comments are requests
doc/mkimage.1 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
doc/mkimage.1 +6 -6
@@ -1,4 +1,9 @@ -.TH MKIMAGE 1 "2022-02-07" +.\" SPDX-License-Identifier: GPL-2.0 +.\" Copyright (C) 2022 Sean Anderson <[email protected]> +.\" Copyright (C) 2013-20 Simon Glass <[email protected]> +.\" Copyright (C) 2010 Nobuhiro Iwamatsu <[email protected]> +.\" Copyright (C) 2010 Wolfgang Denk <[email protected]> +.TH MKIMAGE 1 2022-06-11 U-Boot . .SH NAME mkimage \- generate images for U-Boot
@@ -496,11 +501,6 @@ file is required. .EE .RE . -.PP -.SH AUTHOR -This manual page was written by Nobuhiro Iwamatsu <[email protected]> -and Wolfgang Denk <[email protected]>. It was updated for image signing by -Simon Glass <[email protected]>. .SH SEE ALSO .BR dtc (1), .BR dumpimage (1),
Signature · 1 line
2.35.1
Re: [PATCH v3 11/14] doc: mkimage: Remove AUTHORS section
Quoted 9 lines · Sean Anderson
Per man-pages(7), "use of an AUTHORS section is strongly discouraged." Remove it, and instead add some copyright notices and an SPDX. The default license for U-Boot is GPL2, so that's what I put. The copyright dates are based on the commit dates.
Signed-off-by Sean Anderson <[email protected]>---
Quoted 7 lines
(no changes since v2)
Changes in v2:
- Ensure comments are requestsdoc/mkimage.1 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
PATCH v3 12/14 mkimage: Add long options
In reply to Sean AndersonThe mkimage command has had many options added over the years. Unfortunately, we are starting to run out of short options. Recent options don't have any obvious relation to their meaning (e.g. -o/-g). Fortunately, long options exist. Add long options for each current short option.
For the curious, the remaining short options are HIkLmMPQSuUwWXyYzZ.
---
(no changes since v2)
Changes in v2:
- New
doc/mkimage.1 | 66 +++++++++++++++++++++++++++++++++++++++++++++++++ tools/mkimage.c | 45 +++++++++++++++++++++++++++++++-- 2 files changed, 109 insertions(+), 2 deletions(-)
doc/mkimage.1 +66 -0
@@ -60,20 +60,28 @@ checksums. It also supports verified boot. . .TP .B \-h +.TQ +.B \-\-help Print a help message and exit. . .TP .B \-l +.TQ +.B \-\-list .B mkimage lists the information contained in the header of an existing U-Boot image. . .TP .B \-s +.TQ +.B \-\-no\-copy Don't copy in the image data. Depending on the image type, this may create just the header, everything but the image data, or nothing at all. . .TP .BI \-T " image-type" +.TQ +.BI \-\-type " image-type" Parse image file as .IR image-type . Pass
@@ -105,20 +113,28 @@ is absent, then the \(oqtype\(cq property will default to . .TP .B \-q +.TQ +.B \-\-quiet Quiet. Don't print the image header. . .TP .B \-v +.TQ +.B \-\-verbose Verbose. Print file names as they are added to the image. . .TP .B \-V +.TQ +.B \-\-version Print version information and exit. . .SS General image-creation options . .TP .BI \-A " architecture" +.TQ +.BI \-\-architecture " architecture" Set the architecture. Pass .B \-h as the architecture to see the list of supported architectures. If
@@ -128,6 +144,8 @@ is absent, it defaults to . .TP .BI \-O " os" +.TQ +.BI \-\-os " os" Set the operating system. The U-Boot .I bootm command changes boot method based on the OS type.
@@ -142,6 +160,8 @@ is absent, it defaults to . .TP .BI \-C " compression-type" +.TQ +.BI \-\-compression " compression-type" Set the compression type. The image data should have already been compressed using this compression type. .B mkimage
@@ -157,12 +177,16 @@ is absent, it defaults to . .TP .BI \-a " load-address" +.TQ +.BI \-\-load\-address " load-address" Set the absolute address to load the image data to. .I load-address will be interpreted as a hexadecimal number. . .TP .BI \-e " entry-point" +.TQ +.BI \-\-entry\-point " entry-point" Set the absolute address of the image entry point. The U-Boot .I bootm command will jump to this address after loading the image.
@@ -171,11 +195,15 @@ will be interpreted as a hexadecimal number. . .TP .BI \-n " image-name" +.TQ +.BI \-\-primary\-image " image-name" Set the image name to .IR image-name . . .TP .BI \-R " secondary-image-name" +.TQ +.BI \-\-secondary\-image " image-name" Some image types support a second image for additional data. For these types, use .B \-R
@@ -207,6 +235,8 @@ T} . .TP .BI \-d " image-data-file" +.TQ +.BI \-\-image " image-data-file" Use image data from .IR image-data-file . If the
@@ -221,6 +251,8 @@ then multiple images may be specified, separated by colons: . .TP .B \-x +.TQ +.B \-\-xip Set the .I XIP (execute in place) flag. The U-Boot
@@ -232,15 +264,21 @@ accessible at the load address (such as via memory-mapped flash). . .TP .BI \-b " device-tree-file" +.TQ +.BI \-\-device\-tree " device-tree-file" Appends the device tree binary file (.dtb) to the FIT. . .TP .BI \-c " comment" +.TQ +.BI \-\-comment " comment" Specifies a comment to be added when signing. This is typically a message which describes how the image was signed or some other useful information. . .TP .BI \-D " dtc-options" +.TQ +.BI \-\-dtcopts " dtc-options" Provide additional options to the device tree compiler when creating the image. See .BR dtc (1)
@@ -251,6 +289,8 @@ is absent, it defaults to . .TP .BI \-E +.TQ +.BI \-\-external After processing, move the image data outside the FIT and store a data offset in the FIT. Images will be placed one after the other immediately after the FIT, with each one aligned to a 4-byte boundary. The existing \(oqdata\(cq property
@@ -260,11 +300,15 @@ properties. A \(oqdata-offset\(cq of 0 indicates that it starts in the first . .TP .BI \-B " alignment" +.TQ +.BI \-\-alignment " alignment" The alignment, in hexadecimal, that external data will be aligned to. This option only has an effect when \-E is specified. . .TP .BI \-p " external-position" +.TQ +.BI \-\-position " external-position" Place external data at a static external position. Instead of writing a \(oqdata-offset\(cq property defining the offset from the end of the FIT, .B \-p
@@ -275,6 +319,8 @@ for details on using external data. . .TP \fB\-f \fIimage-tree-source-file\fR | \fBauto +.TQ +\fB\-\-fit \fIimage-tree-source-file\fR | \fBauto Image tree source file that describes the structure and contents of the FIT image. .IP
@@ -297,6 +343,8 @@ is required. . .TP .B \-F +.TQ +.B \-\-update Indicates that an existing FIT image should be modified. No dtc compilation will be performed and .B \-f
@@ -305,10 +353,14 @@ after initial image creation. . .TP .BI \-i " ramdisk-file" +.TQ +.BI \-\-initramfs " ramdisk-file" Append a ramdisk or initramfs file to the image. . .TP .BI \-k " key-directory" +.TQ +.BI \-\-key\-dir " key-directory" Specifies the directory containing keys to use for signing. This directory should contain a private key file .IR name .key
@@ -324,11 +376,15 @@ but may be overridden using . .TP .BI \-G " key-file" +.TQ +.BI \-\-key\-file " key-file" Specifies the private key file to use when signing. This option may be used instead of \-k. . .TP .BI \-K " key-destination" +.TQ +.BI \-\-key\-dest " key-destination" Specifies a compiled device tree binary file (typically .dtb) to write public key information into. When a private key is used to sign an image, the corresponding public key is written into this file for for run-time
@@ -337,6 +393,8 @@ CONFIG_OF_CONTROL in U-Boot. . .TP .BI \-g " key-name-hint" +.TQ +.BI \-\-key\-name\-hint " key-name-hint" Overrides the signature node's \(oqkey-name-hint\(cq property. This is especially useful when signing an image with .BR "\-f auto" .
@@ -351,6 +409,8 @@ must be specified as well. . .TP .BI \-o " crypto" , checksum +.TQ +.BI \-\-algo " crypto" , checksum Specifies the algorithm to be used for signing a FIT image. The default is taken from the signature node's \(oqalgo\(cq property. The valid values for
@@ -383,18 +443,24 @@ sha512 . .TP .B \-r +.TQ +.B \-\-key\-required Specifies that keys used to sign the FIT are required. This means that they must be verified for the image to boot. Without this option, the verification will be optional (useful for testing but not for release). . .TP .BI \-N " engine" +.TQ +.BI \-\-engine " engine" The openssl engine to use when signing and verifying the image. For a complete list of available engines, refer to .BR engine (1). . .TP .B \-t +.TQ +.B \-\-touch Update the timestamp in the FIT. .IP Normally the FIT timestamp is created the first time mkimage runs,
tools/mkimage.c +43 -2
69 lines not on this page · raw message
Signature · 1 line
2.35.1
Re: [PATCH v3 12/14] mkimage: Add long options
Quoted 11 lines · Sean Anderson
The mkimage command has had many options added over the years. Unfortunately, we are starting to run out of short options. Recent options don't have any obvious relation to their meaning (e.g. -o/-g). Fortunately, long options exist. Add long options for each current short option.
For the curious, the remaining short options are HIkLmMPQSuUwWXyYzZ.
Signed-off-by Sean Anderson <[email protected]>---
Quoted 8 lines
(no changes since v2)
Changes in v2:
- Newdoc/mkimage.1 | 66 +++++++++++++++++++++++++++++++++++++++++++++++++ tools/mkimage.c | 45 +++++++++++++++++++++++++++++++-- 2 files changed, 109 insertions(+), 2 deletions(-)
PATCH v3 13/14 doc: mkimage: Further document -o and -R
In reply to Sean AndersonDespite the original description of these options, they are not always image names, or even files. Some image types use these options to convey configuration directly. Re-document these options as configuration options.
Additionally, add a new section documenting the format of the configuration for each image type which uses it. In general, if configuration is used directly (without a separate file) I have added documentation for it. If the configuration points to a separate file, I have referenced that file's documentation. Where there is no such documentation, I have added it.
---
(no changes since v2)
Changes in v2:
- New
doc/mkimage.1 | 270 +++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 236 insertions(+), 34 deletions(-)
doc/mkimage.1 +236 -34
@@ -194,44 +194,22 @@ command will jump to this address after loading the image. will be interpreted as a hexadecimal number. . .TP -.BI \-n " image-name" +.BI \-n " primary-configuration" .TQ -.BI \-\-primary\-image " image-name" -Set the image name to -.IR image-name . +.BI \-\-config " primary-configuration" +Images may require additional configuration not specified with other options, +often in a image-type-specific format. The image types which support this +option and the format of their configuration are listed in +.BR CONFIGURATION . . .TP -.BI \-R " secondary-image-name" +.BI \-R " secondary-configuration" .TQ -.BI \-\-secondary\-image " image-name" -Some image types support a second image for additional data. For these types, -use -.B \-R -to specify this second image. -.TS -allbox; -lb lbx -l l. -Image Type Secondary Image Description -pblimage Additional RCW-style header, typically used for PBI commands. -zynqimage, zynqmpimage T{ -Initialization parameters, one per line. Each parameter has the form -.sp -.ti 4 -.I address data -.sp -where -.I address -and -.I data -are hexadecimal integers. The boot ROM will write each -.I data -to -.I address -when loading the image. At most 256 parameters may be specified in this -manner. -T} -.TE +.BI \-\-secondary\-config " secondary-configuration" +Some image types support a second set of configuration data. The image types +which support secondary configuration and the formap of their configuration are +listed in +.BR CONFIGURATION . . .TP .BI \-d " image-data-file"
@@ -470,6 +448,230 @@ using But if the original input to mkimage is a binary file (already compiled), then the timestamp is assumed to have been set previously. . +.SH CONFIGURATION +This section documents the formats of the primary and secondary configuration +options for each image type which supports them. +. +.SS aisimage +The primary configuration is a file containing a series of +.I AIS +(Application Image Script) commands, one per line. Each command has the form +.RS +.P +.IR "command argument " .\|.\|. +.RE +.P +See +.UR https://\:www\:.ti\:.com/\:lit/\:pdf/\:spraag0 +TI application report SPRAAG0E +.UE +for details. +. +.SS atmelimage +The primary configuration is a comma-separated list of NAND Flash parameters of +the form +.RS +.P +\fIparameter\fB=\fIvalue\fR[\fB,\fIparameter\fB=\fIvalue\fR.\|.\|.\&] +.RE +.P +Valid +.IR parameter s +are +.RS +.P +.TS +lb. +usePmecc +nbSectorPerPage +spareSize +eccBitReq +sectorSize +eccOffset +.TE +.RE +.P +and valid +.IR value s +are decimal numbers. See section 11.4.4.1 of the SAMA5D3 Series Data Sheet for +valid values for each parameter. +. +.SS imximage +The primary configuration is a file containing configuration commands, as +documented in doc/\:imx/\:mkimage/\:imximage.txt of the U-Boot source. +. +.SS imx8image and imx8mimage +The primary configuration is a file containing configuration commands, as +documented in doc/\:imx/\:mkimage/\:imx8image.txt of the U-Boot source. +. +.SS kwbimage +The primary configuration is a file containing configuration commands, as +documented in doc/\:imx/\:mkimage/\:kwbimage.txt of the U-Boot source. +. +.SS mtk_image +The primary configuration is a semicolon-separated list of header options of the +form +.RS +.P +\fIkey\fB=\fIvalue\fR[\fB;\fIkey\fB=\fIvalue\fR.\|.\|.\&] +.RE +.P +where the valid keys are: +.RS +.P +.TS +lb lbx +lb l. +Key Description +_ +lk T{ +If \fB1\fP, then an \fILK\fP (legacy) image header is used. Otherwise, a +\fIBootROM\fP image header is used. +T} +lkname T{ +The name of the LK image header. The maximum length is 32 ASCII characters. If +not specified, the default value is \fBU-Boot\fP. +T} +media The boot device. See below for valid values. +nandinfo The desired NAND device type. See below for valid values. +arm64 If \fB1\fP, then this denotes an AArch64 image. +hdroffset Increase the reported size of the BRLYT header by this amount. +.TE +.RE +.P +Valid values for +.B media +are: +.RS +.P +.TS +lb lb +lb l. +Value Description +_ +nand Parallel NAND flash +snand Serial NAND flash +nor Serial NOR flash +emmc \fIeMMC\fP (Embedded Multi-Media Card) +sdmmc \fISD\fP (Secure Digital) card +.TE +.RE +.P +Valid values for +.B nandinfo +are: +.RS +.P +.TS +lb lb lb lb lb +lb l l l l. +Value NAND type Page size OOB size Total size +_ +2k+64 Serial 2KiB 64B +2k+120 Serial 2KiB 120B +2k+128 Serial 2KiB 128B +4k+256 Serial 4KiB 256B +1g:2k+64 Parallel 2KiB 64B 1Gbit +2g:2k+64 Parallel 2KiB 64B 2Gbit +4g:2k+64 Parallel 2KiB 64B 4Gbit +2g:2k+128 Parallel 2KiB 128B 2Gbit +4g:2k+128 Parallel 2KiB 128B 4Gbit +.TE +.RE +. +.SS mxsimage +The primary configuration is a file containing configuration commands, as +documented in doc/\:imx/\:mkimage/\:mxsimage.txt of the U-Boot source. +. +.SS omapimage +The primary configuration is the optional value +.BR byteswap . +If present, each 32-bit word of the image will have its bytes swapped +(converting from little-endian to big-endian, or vice versa). +. +.SS pblimage +The primary configuration is a file containing the +.I PBI +(Pre-Boot Image) header. Each line of the configuration has the format +.RS +.P +.IR value "[ " value .\|.\|.\&] +.RE +.P +Where +.I value +is a 32-bit hexadecimal integer. Each +.I value +will, after being converted to raw bytes, be literally prepended to the PBI. +.P +The secondary configuration is a file with the same format as the primary +configuration file. It will be inserted into the image after the primary +configuration data and before the image data. +.P +It is traditional to use the primary configuration file for the +.I RCW +(Reset Configuration Word), and the secondary configuration file for any +additional PBI commands. However, it is also possible to convert an existing PBI +to the above format and \(lqchain\(rq additional data onto the end of the +image. This may be especially useful for creating secure boot images. +. +.SS rkimage +The primary configuration is the name of the processor to generate the image +for. Valid values are: +.RS +.P +.TS +lb. +px30 +rk3036 +rk3066 +rk3128 +rk3188 +rk322x +rk3288 +rk3308 +rk3328 +rk3368 +rk3399 +rv1108 +rk3568 +.TE +.RE +. +.SS sunxi_egon +The primary configuration is the name to use for the device tree. +. +.SS ublimage +The primary configuration is a file containing configuration commands, as +documented in doc/\:README.ublimage of the U-Boot source. +. +.SS zynqimage and zynqmpimage +For +.BR zynqmpimage , +the primary configuration is a file containing the +.I PMUFW +(Power Management Unit Firmware). +.B zynqimage +does not use the primary configuration. +.P +For both image types, the secondary configuration is a file containinig +initialization parameters, one per line. Each parameter has the form +.RS +.P +.I address data +.RE +.P +where +.I address +and +.I data +are hexadecimal integers. The boot ROM will write each +.I data +to +.I address +when loading the image. At most 256 parameters may be specified in this +manner. +. .SH BUGS Please report bugs to the .UR https://\:source\:.denx\:.de/\:u-boot/\:u-boot/\:issues
Signature · 1 line
2.35.1
Re: [PATCH v3 13/14] doc: mkimage: Further document -o and -R
Quoted 14 lines · Sean Anderson
Despite the original description of these options, they are not always image names, or even files. Some image types use these options to convey configuration directly. Re-document these options as configuration options.
Additionally, add a new section documenting the format of the configuration for each image type which uses it. In general, if configuration is used directly (without a separate file) I have added documentation for it. If the configuration points to a separate file, I have referenced that file's documentation. Where there is no such documentation, I have added it.
Signed-off-by Sean Anderson <[email protected]>---
Quoted 8 lines
(no changes since v2)
Changes in v2:
- Newdoc/mkimage.1 | 270 +++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 236 insertions(+), 34 deletions(-)
PATCH v3 14/14 doc: Add man page for dumpimage
In reply to Sean AndersonThis tool seems a bit underloved. Unfortunately, it seems to be missing support for FIT images. Alas...
Add a man page documenting it. The example is taken from commit a804b5ce2d ("Add dumpimage, a tool to extract data from U-Boot images").
---
(no changes since v2)
Changes in v2:
- Ensure comments are requests
doc/dumpimage.1 | 103 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 doc/dumpimage.1
doc/dumpimage.1 new file +103 -0
@@ -0,0 +1,103 @@ +.\" SPDX-License-Identifier: GPL-2.0 +.\" Copyright (C) 2022 Sean Anderson <[email protected]> +.TH DUMPIMAGE 1 2022-06-11 U-Boot +.SH NAME +dumpimage \- extract data from U-Boot images +. +.SH SYNOPSIS +.SY dumpimage +.OP \-T type +.BI \-l\~ image +.YS +.SY dumpimage +.OP \-T type +.OP \-p position +.BI \-o\~ outfile +.I image +.YS +.SY dumpimage +.B \-h +.YS +.SY dumpimage +.B \-V +.YS +. +.SH DESCRIPTION +.B dumpimage +lists and extracts data from U-Boot images. If +.B \-l +is specified, +.B dumpimage +lists the components in +.IR image . +Otherwise, +.B dumpimage +extracts the component at +.IR position " to " outfile . +. +.SH OPTIONS +.TP +.B \-h +Print usage information and exit. +. +.TP +.B \-l +Print the header information for +.IR image , +including a list of components. +. +.TP +.BI \-o " outfile" +The file to write the dumped component to. +.TP +.BI \-p " position" +Specify the +.I position +of the component to dump. This should be a numeric index, starting at 0. If not +specified, the default +.I position +is 0. +. +.TP +.BI \-T " type" +Specify the +.I type +of the image. If not specified, the image type will be automatically detected. A +list of supported image types may be printed by running +.BR "mkimage\~\-T\~list" . +. +.TP +.B \-V +Print version information and exit. +. +.SH BUGS +Please report bugs to the +.UR https://\:source\:.denx\:.de/\:u-boot/\:u-boot/\:issues +U-Boot bug tracker +.UE . +.SH EXAMPLES +Create a multi-file image and then extract part of that image +.PP +.EX +.in +4 +$ \c +.B mkimage \-A x86 \-O linux \-T multi \-n x86 \\\\\& +.in +4 +.B \-d vmlinuz:initrd.img:System.map multi.img +.in +Image Name: x86 +Created: Thu Jul 25 10:29:13 2013 +Image Type: Intel x86 Linux Multi-File Image (gzip compressed) +Data Size: 13722956 Bytes = 13401.32 kB = 13.09 MB +Load Address: 00000000 +Entry Point: 00000000 +Contents: + Image 0: 4040128 Bytes = 3945.44 kB = 3.85 MB + Image 1: 7991719 Bytes = 7804.41 kB = 7.62 MB + Image 2: 1691092 Bytes = 1651.46 kB = 1.61 MB +$ \c +.B dumpimage -p 2 -o System.map multi.img +.EE +.in +.SH SEE ALSO +.BR mkimage (1)
Signature · 1 line
2.35.1
Re: [PATCH v3 14/14] doc: Add man page for dumpimage
Quoted 3 lines · Sean Anderson
This tool seems a bit underloved. Unfortunately, it seems to be missing support for FIT images. Alas...
Flat Image Tree Images - I think just FIT is enough
Quoted 7 lines
Add a man page documenting it. The example is taken from commit
a804b5ce2d("Add dumpimage, a tool to extract data from U-Boot images").Signed-off-by Sean Anderson <[email protected]>---
Quoted 9 lines
(no changes since v2)
Changes in v2:
- Ensure comments are requestsdoc/dumpimage.1 | 103 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 doc/dumpimage.1