All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/12] doc: mkimage: Rework and refactor the man page
@ 2022-06-12  4:19 Sean Anderson
  2022-06-12  4:19 ` [PATCH 01/12] doc: mkimage: Use standard style for synopsis Sean Anderson
                   ` (11 more replies)
  0 siblings, 12 replies; 14+ messages in thread
From: Sean Anderson @ 2022-06-12  4:19 UTC (permalink / raw)
  To: u-boot, Heinrich Schuchardt; +Cc: Simon Glass, Sean Anderson

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.


Sean Anderson (12):
  doc: mkimage: Use standard style for synopsis
  doc: mkimage: Use empty request instead of blank lines
  doc: mkimage: Add vertical/horizontal space to examples
  doc: mkimage: Regularize option documentation
  doc: mkimage: Use subsection macro
  doc: mkimage: Remove duplicate docs for -l
  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
  doc: Add man page for dumpimage

 doc/dumpimage.1 | 103 ++++++++++
 doc/mkimage.1   | 509 ++++++++++++++++++++++++++++++------------------
 2 files changed, 425 insertions(+), 187 deletions(-)
 create mode 100644 doc/dumpimage.1

-- 
2.35.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 01/12] doc: mkimage: Use standard style for synopsis
  2022-06-12  4:19 [PATCH 00/12] doc: mkimage: Rework and refactor the man page Sean Anderson
@ 2022-06-12  4:19 ` Sean Anderson
  2022-06-12  4:41   ` Sean Anderson
  2022-06-12  4:19 ` [PATCH 02/12] doc: mkimage: Use empty request instead of blank lines Sean Anderson
                   ` (10 subsequent siblings)
  11 siblings, 1 reply; 14+ messages in thread
From: Sean Anderson @ 2022-06-12  4:19 UTC (permalink / raw)
  To: u-boot, Heinrich Schuchardt; +Cc: Simon Glass, 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 fomatting 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.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
---

 doc/mkimage.1 | 25 +++++++++++++++++--------
 1 file changed, 17 insertions(+), 8 deletions(-)

diff --git a/doc/mkimage.1 b/doc/mkimage.1
index 759dc2d12f..2765c74410 100644
--- a/doc/mkimage.1
+++ b/doc/mkimage.1
@@ -3,17 +3,26 @@
 .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\~ .\|.\|.\&]
+.BI \-f\~ image-tree-source-file
+.I image-file-name
+.YS
 
-.B mkimage
-.RB [\fIoptions\fP] " \-F [" "uimage file name" "]"
+.SY mkimage
+.RI [ option\~ .\|.\|.\&]
+.BI \-F image-file-name
+.YS
 
-.B mkimage
-.RB [\fIoptions\fP] " (legacy mode)"
+.SY mkimage
+.RI [ option\~ .\|.\|.\&]
+.R (legacy mode)
+.YS
 
 .SH "DESCRIPTION"
 The
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 02/12] doc: mkimage: Use empty request instead of blank lines
  2022-06-12  4:19 [PATCH 00/12] doc: mkimage: Rework and refactor the man page Sean Anderson
  2022-06-12  4:19 ` [PATCH 01/12] doc: mkimage: Use standard style for synopsis Sean Anderson
@ 2022-06-12  4:19 ` Sean Anderson
  2022-06-12  4:19 ` [PATCH 03/12] doc: mkimage: Add vertical/horizontal space to examples Sean Anderson
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Sean Anderson @ 2022-06-12  4:19 UTC (permalink / raw)
  To: u-boot, Heinrich Schuchardt; +Cc: Simon Glass, 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.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
---

 doc/mkimage.1 | 110 +++++++++++++++++++++++++-------------------------
 1 file changed, 55 insertions(+), 55 deletions(-)

diff --git a/doc/mkimage.1 b/doc/mkimage.1
index 2765c74410..5ae3d92508 100644
--- a/doc/mkimage.1
+++ b/doc/mkimage.1
@@ -1,5 +1,5 @@
 .TH MKIMAGE 1 "2022-02-07"
-
+.
 .SH NAME
 mkimage \- Generate image for U-Boot
 .SH SYNOPSIS
@@ -7,33 +7,33 @@ mkimage \- Generate image for U-Boot
 .OP \-T type
 .BI \-l\~ image-file-name
 .YS
-
+.
 .SY mkimage
 .RI [ option\~ .\|.\|.\&]
 .BI \-f\~ image-tree-source-file
 .I image-file-name
 .YS
-
+.
 .SY mkimage
 .RI [ option\~ .\|.\|.\&]
 .BI \-F image-file-name
 .YS
-
+.
 .SY mkimage
 .RI [ option\~ .\|.\|.\&]
-.R (legacy mode)
+(legacy mode)
 .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,
@@ -41,69 +41,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,
@@ -132,42 +132,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
@@ -176,44 +176,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
@@ -221,53 +221,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
@@ -293,7 +293,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.
@@ -302,7 +302,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
@@ -313,7 +313,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.
@@ -339,7 +339,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
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 03/12] doc: mkimage: Add vertical/horizontal space to examples
  2022-06-12  4:19 [PATCH 00/12] doc: mkimage: Rework and refactor the man page Sean Anderson
  2022-06-12  4:19 ` [PATCH 01/12] doc: mkimage: Use standard style for synopsis Sean Anderson
  2022-06-12  4:19 ` [PATCH 02/12] doc: mkimage: Use empty request instead of blank lines Sean Anderson
@ 2022-06-12  4:19 ` Sean Anderson
  2022-06-12  4:19 ` [PATCH 04/12] doc: mkimage: Regularize option documentation Sean Anderson
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Sean Anderson @ 2022-06-12  4:19 UTC (permalink / raw)
  To: u-boot, Heinrich Schuchardt; +Cc: Simon Glass, Sean Anderson

This puts each example in a new paragraph and uses a hanging indent for
continued lines to increase clarity.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
---

 doc/mkimage.1 | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/doc/mkimage.1 b/doc/mkimage.1
index 5ae3d92508..b9ca416101 100644
--- a/doc/mkimage.1
+++ b/doc/mkimage.1
@@ -269,76 +269,111 @@ using the -f flag. But if the original input to mkimage is a binary file
 .SH EXAMPLES
 .
 List image information:
+.P
 .nf
+.in +4n
 .B mkimage -l uImage
 .fi
+.in
 .P
 Create legacy image with compressed PowerPC Linux kernel:
+.P
 .nf
+.in +4n
 .B mkimage -A powerpc -O linux -T kernel -C gzip \\\\
 .br
+.in +4n
 .B -a 0 -e 0 -n Linux -d vmlinux.gz uImage
 .fi
+.in
 .P
 Create FIT image with compressed PowerPC Linux kernel:
+.P
 .nf
+.in +4n
 .B mkimage -f kernel.its kernel.itb
 .fi
+.in
 .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,
 skipping those for which keys cannot be found. Also add a comment.
+.P
 .nf
+.in +4n
 .B mkimage -f kernel.its -k /public/signing-keys -K u-boot.dtb \\\\
 .br
+.in +4n
 .B -c """Kernel 3.8 image for production devices""" kernel.itb
 .fi
+.in
 .
 .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.
+.P
 .nf
+.in +4n
 .B mkimage -f auto -d /dev/null -k /public/signing-keys -g dev \\\\
 .br
+.in +4n
 .B -o sha256,rsa2048 -K u-boot.dtb unused.itb
 .fi
+.in
 .
 .P
 Update an existing FIT image, signing it with additional keys.
 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.
+.P
 .nf
+.in +4n
 .B mkimage -F -k /secret/signing-keys -K u-boot.dtb \\\\
 .br
+.in +4n
 .B -c """Kernel 3.8 image for production devices""" kernel.itb
 .fi
+.in
 .
 .P
 Create a FIT image containing a kernel, using automatic mode. No .its file
 is required.
+.P
 .nf
+.in +4n
 .B mkimage -f auto -A arm -O linux -T kernel -C none -a 43e00000 -e 0 \\\\
 .br
+.in +4n
 .B -c """Kernel 4.4 image for production devices""" -d vmlinuz kernel.itb
 .fi
+.in
 .P
 Create a FIT image containing a kernel and some device tree files, using
 automatic mode. No .its file is required.
+.P
 .nf
+.in +4n
 .B mkimage -f auto -A arm -O linux -T kernel -C none -a 43e00000 -e 0 \\\\
 .br
+.in +4n
 .B -c """Kernel 4.4 image for production devices""" -d vmlinuz \\\\
+.br
 .B -b /path/to/rk3288-firefly.dtb -b /path/to/rk3288-jerry.dtb kernel.itb
 .fi
+.in
 .P
 Create a FIT image containing a signed kernel, using automatic mode. No .its
 file is required.
+.P
 .nf
+.in +4n
 .B mkimage -f auto -A arm -O linux -T kernel -C none -a 43e00000 -e 0 \\\\
 .br
+.in +4n
 .B -d vmlinuz -k /secret/signing-keys -g dev -o sha256,rsa2048 kernel.itb
 .fi
+.in
 .
 .SH HOMEPAGE
 http://www.denx.de/wiki/U-Boot/WebHome
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 04/12] doc: mkimage: Regularize option documentation
  2022-06-12  4:19 [PATCH 00/12] doc: mkimage: Rework and refactor the man page Sean Anderson
                   ` (2 preceding siblings ...)
  2022-06-12  4:19 ` [PATCH 03/12] doc: mkimage: Add vertical/horizontal space to examples Sean Anderson
@ 2022-06-12  4:19 ` Sean Anderson
  2022-06-12  4:19 ` [PATCH 05/12] doc: mkimage: Use subsection macro Sean Anderson
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Sean Anderson @ 2022-06-12  4:19 UTC (permalink / raw)
  To: u-boot, Heinrich Schuchardt; +Cc: Simon Glass, 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.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
---

 doc/mkimage.1 | 70 +++++++++++++++++++++++++--------------------------
 1 file changed, 35 insertions(+), 35 deletions(-)

diff --git a/doc/mkimage.1 b/doc/mkimage.1
index b9ca416101..8f315f0fb3 100644
--- a/doc/mkimage.1
+++ b/doc/mkimage.1
@@ -24,7 +24,7 @@ mkimage \- Generate image for U-Boot
 (legacy mode)
 .YS
 .
-.SH "DESCRIPTION"
+.SH DESCRIPTION
 The
 .B mkimage
 command is used to create images for use with the U-Boot boot loader.
@@ -48,64 +48,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
@@ -134,37 +134,37 @@ 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.
 .
@@ -178,12 +178,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
@@ -193,29 +193,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
@@ -223,42 +223,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,
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 05/12] doc: mkimage: Use subsection macro
  2022-06-12  4:19 [PATCH 00/12] doc: mkimage: Rework and refactor the man page Sean Anderson
                   ` (3 preceding siblings ...)
  2022-06-12  4:19 ` [PATCH 04/12] doc: mkimage: Regularize option documentation Sean Anderson
@ 2022-06-12  4:19 ` Sean Anderson
  2022-06-12  4:19 ` [PATCH 06/12] doc: mkimage: Remove duplicate docs for -l Sean Anderson
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Sean Anderson @ 2022-06-12  4:19 UTC (permalink / raw)
  To: u-boot, Heinrich Schuchardt; +Cc: Simon Glass, 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 <seanga2@gmail.com>
---

 doc/mkimage.1 | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/doc/mkimage.1 b/doc/mkimage.1
index 8f315f0fb3..a231771991 100644
--- a/doc/mkimage.1
+++ b/doc/mkimage.1
@@ -50,7 +50,7 @@ supports verified boot.
 .
 .SH OPTIONS
 .
-.B List image information:
+.SS Options for listing image information
 .
 .TP
 .BI \-l " uimage-file-name"
@@ -66,8 +66,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 Options for creating legacy or \(dqauto\(dq images
 .
 .TP
 .BI \-A " architecture"
@@ -150,8 +149,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"
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 06/12] doc: mkimage: Remove duplicate docs for -l
  2022-06-12  4:19 [PATCH 00/12] doc: mkimage: Rework and refactor the man page Sean Anderson
                   ` (4 preceding siblings ...)
  2022-06-12  4:19 ` [PATCH 05/12] doc: mkimage: Use subsection macro Sean Anderson
@ 2022-06-12  4:19 ` Sean Anderson
  2022-06-12  4:19 ` [PATCH 07/12] doc: mkimage: Use correct capitalization for NAME Sean Anderson
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Sean Anderson @ 2022-06-12  4:19 UTC (permalink / raw)
  To: u-boot, Heinrich Schuchardt; +Cc: Simon Glass, Sean Anderson

The -l option is documented twice. Remove the second documentation. The
first documentation 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 <seanga2@gmail.com>
---

 doc/mkimage.1 | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/doc/mkimage.1 b/doc/mkimage.1
index a231771991..ae1ddbc330 100644
--- a/doc/mkimage.1
+++ b/doc/mkimage.1
@@ -53,8 +53,9 @@ supports verified boot.
 .SS Options for listing image information
 .
 .TP
-.BI \-l " uimage-file-name"
-mkimage lists the information contained in the header of an existing U-Boot image.
+.B \-l
+mkimage lists the information contained in the header of an existing U-Boot
+image.
 .
 .TP
 .BI \-T " image-type"
@@ -70,7 +71,8 @@ Quiet. Don't print the image header on successful verification.
 .
 .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"
@@ -96,10 +98,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'.
 .
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 07/12] doc: mkimage: Use correct capitalization for NAME
  2022-06-12  4:19 [PATCH 00/12] doc: mkimage: Rework and refactor the man page Sean Anderson
                   ` (5 preceding siblings ...)
  2022-06-12  4:19 ` [PATCH 06/12] doc: mkimage: Remove duplicate docs for -l Sean Anderson
@ 2022-06-12  4:19 ` Sean Anderson
  2022-06-12  4:19 ` [PATCH 08/12] doc: mkimage: Edit options for style and consistency Sean Anderson
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Sean Anderson @ 2022-06-12  4:19 UTC (permalink / raw)
  To: u-boot, Heinrich Schuchardt; +Cc: Simon Glass, Sean Anderson

The description in NAME should not be capitalized. Fix a grammatical error
as well.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
---

 doc/mkimage.1 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/mkimage.1 b/doc/mkimage.1
index ae1ddbc330..b4296fddcc 100644
--- a/doc/mkimage.1
+++ b/doc/mkimage.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
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 08/12] doc: mkimage: Edit options for style and consistency
  2022-06-12  4:19 [PATCH 00/12] doc: mkimage: Rework and refactor the man page Sean Anderson
                   ` (6 preceding siblings ...)
  2022-06-12  4:19 ` [PATCH 07/12] doc: mkimage: Use correct capitalization for NAME Sean Anderson
@ 2022-06-12  4:19 ` Sean Anderson
  2022-06-12  4:19 ` [PATCH 09/12] doc: mkimage: Add BUGS section Sean Anderson
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Sean Anderson @ 2022-06-12  4:19 UTC (permalink / raw)
  To: u-boot, Heinrich Schuchardt; +Cc: Simon Glass, 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 bug fixes (such as one option being documented twice). 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 underdocument
  options

Signed-off-by: Sean Anderson <seanga2@gmail.com>
---

 doc/mkimage.1 | 229 ++++++++++++++++++++++++++++++++++----------------
 1 file changed, 156 insertions(+), 73 deletions(-)

diff --git a/doc/mkimage.1 b/doc/mkimage.1
index b4296fddcc..4a11c4ce25 100644
--- a/doc/mkimage.1
+++ b/doc/mkimage.1
@@ -27,26 +27,23 @@ 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:
 .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 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
 .
@@ -54,14 +51,19 @@ supports verified boot.
 .
 .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
 .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 \-h
+as
+.I image-type
+to see the list of supported image types. Without this option, the image type is
+autodetected.
 .
 .TP
 .B \-q
@@ -71,35 +73,60 @@ Quiet. Don't print the image header on successful verification.
 .
 .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.
 .
 .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.
 .
 .TP
 .BI \-T " image-type"
-Set image type.
-Pass \-h as the image to see the list of supported image type.
+Set the image type.
+Pass
+.B \-h
+as the
+.I image-type
+to see the list of supported image types.
 .
 .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.
 .
 .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"
@@ -136,7 +163,12 @@ Use image data from 'image data file'.
 .
 .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).
 .
 .TP
 .B \-s
@@ -155,23 +187,24 @@ 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.
 .
 .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"
@@ -179,31 +212,47 @@ 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"
+.BI \-f " image-tree-source-file\c"
+.RB " | " 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.
+In some simple cases, the image tree source can be generated automatically. To
+use this feature, pass
+.BR "\-f auto" .
+The
+.BR \-d ", " \-A ", " \-O ", " \-T ", " \-C ", " \-a ", and " \-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"
@@ -219,28 +268,60 @@ 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.
+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
+l.
+rsa2048
+rsa3072
+rsa4096
+ecdsa256
+.TE
+.RE
+.IP
+The valid values for
+.I checksum
+are
+.RS
+.IP
+.TS
+l.
+sha1
+sha256
+sha384
+sha512
+.TE
+.RE
 .
 .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
 .B \-r
 Specifies that keys used to sign the FIT are required. This means that they
@@ -249,18 +330,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
 .
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 09/12] doc: mkimage: Add BUGS section
  2022-06-12  4:19 [PATCH 00/12] doc: mkimage: Rework and refactor the man page Sean Anderson
                   ` (7 preceding siblings ...)
  2022-06-12  4:19 ` [PATCH 08/12] doc: mkimage: Edit options for style and consistency Sean Anderson
@ 2022-06-12  4:19 ` Sean Anderson
  2022-06-12  4:19 ` [PATCH 10/12] doc: mkimage: Add SEE ALSO section Sean Anderson
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Sean Anderson @ 2022-06-12  4:19 UTC (permalink / raw)
  To: u-boot, Heinrich Schuchardt; +Cc: Simon Glass, Sean Anderson

In leiu of a non-standard HOMEPAGE section, add a BUGS section with a link
to the issue tracker.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
---

 doc/mkimage.1 | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/doc/mkimage.1 b/doc/mkimage.1
index 4a11c4ce25..80ecb3c3fe 100644
--- a/doc/mkimage.1
+++ b/doc/mkimage.1
@@ -345,6 +345,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
 .
 List image information:
@@ -454,8 +459,6 @@ file is required.
 .fi
 .in
 .
-.SH HOMEPAGE
-http://www.denx.de/wiki/U-Boot/WebHome
 .PP
 .SH AUTHOR
 This manual page was written by Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 10/12] doc: mkimage: Add SEE ALSO section
  2022-06-12  4:19 [PATCH 00/12] doc: mkimage: Rework and refactor the man page Sean Anderson
                   ` (8 preceding siblings ...)
  2022-06-12  4:19 ` [PATCH 09/12] doc: mkimage: Add BUGS section Sean Anderson
@ 2022-06-12  4:19 ` Sean Anderson
  2022-06-12  4:19 ` [PATCH 11/12] doc: mkimage: Remove AUTHORS section Sean Anderson
  2022-06-12  4:19 ` [PATCH 12/12] doc: Add man page for dumpimage Sean Anderson
  11 siblings, 0 replies; 14+ messages in thread
From: Sean Anderson @ 2022-06-12  4:19 UTC (permalink / raw)
  To: u-boot, Heinrich Schuchardt; +Cc: Simon Glass, Sean Anderson

This adds a SEE ALSO section to link to similar man pages, as well as to
the U-Boot documentation.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
---

 doc/mkimage.1 | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/doc/mkimage.1 b/doc/mkimage.1
index 80ecb3c3fe..6f4b66f046 100644
--- a/doc/mkimage.1
+++ b/doc/mkimage.1
@@ -464,3 +464,11 @@ file is required.
 This manual page was written by Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
 and Wolfgang Denk <wd@denx.de>. It was updated for image signing by
 Simon Glass <sjg@chromium.org>.
+.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
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 11/12] doc: mkimage: Remove AUTHORS section
  2022-06-12  4:19 [PATCH 00/12] doc: mkimage: Rework and refactor the man page Sean Anderson
                   ` (9 preceding siblings ...)
  2022-06-12  4:19 ` [PATCH 10/12] doc: mkimage: Add SEE ALSO section Sean Anderson
@ 2022-06-12  4:19 ` Sean Anderson
  2022-06-12  4:19 ` [PATCH 12/12] doc: Add man page for dumpimage Sean Anderson
  11 siblings, 0 replies; 14+ messages in thread
From: Sean Anderson @ 2022-06-12  4:19 UTC (permalink / raw)
  To: u-boot, Heinrich Schuchardt; +Cc: Simon Glass, 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 very first line is a
hint that this man page uses tables. man(1) determines the format of a man
page based on the first non-whitespace character, and \ won't work for
that.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
---

 doc/mkimage.1 | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/doc/mkimage.1 b/doc/mkimage.1
index 6f4b66f046..529e5a8530 100644
--- a/doc/mkimage.1
+++ b/doc/mkimage.1
@@ -1,4 +1,10 @@
-.TH MKIMAGE 1 "2022-02-07"
+'\" t
+\" SPDX-License-Identifier: GPL-2.0
+\" Copyright (C) 2022 Sean Anderson <seanga2@gmail.com>
+\" Copyright (C) 2013-20 Simon Glass <sjg@chromium.org>
+\" Copyright (C) 2010 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
+\" Copyright (C) 2010 Wolfgang Denk <wd@denx.de>
+.TH MKIMAGE 1 2022-06-11 U-Boot
 .
 .SH NAME
 mkimage \- generate images for U-Boot
@@ -459,11 +465,6 @@ file is required.
 .fi
 .in
 .
-.PP
-.SH AUTHOR
-This manual page was written by Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
-and Wolfgang Denk <wd@denx.de>. It was updated for image signing by
-Simon Glass <sjg@chromium.org>.
 .SH SEE ALSO
 .BR dtc (1),
 .BR dumpimage (1),
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 12/12] doc: Add man page for dumpimage
  2022-06-12  4:19 [PATCH 00/12] doc: mkimage: Rework and refactor the man page Sean Anderson
                   ` (10 preceding siblings ...)
  2022-06-12  4:19 ` [PATCH 11/12] doc: mkimage: Remove AUTHORS section Sean Anderson
@ 2022-06-12  4:19 ` Sean Anderson
  11 siblings, 0 replies; 14+ messages in thread
From: Sean Anderson @ 2022-06-12  4:19 UTC (permalink / raw)
  To: u-boot, Heinrich Schuchardt; +Cc: Simon Glass, Sean Anderson

This 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").

Signed-off-by: Sean Anderson <seanga2@gmail.com>
---

 doc/dumpimage.1 | 103 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 103 insertions(+)
 create mode 100644 doc/dumpimage.1

diff --git a/doc/dumpimage.1 b/doc/dumpimage.1
new file mode 100644
index 0000000000..021ab210b8
--- /dev/null
+++ b/doc/dumpimage.1
@@ -0,0 +1,103 @@
+.TH DUMPIMAGE 1 2022-06-11 U-Boot
+\" SPDX-License-Identifier: GPL-2.0
+\" Copyright (C) 2022 Sean Anderson <seanga2@gmail.com>
+.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)
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH 01/12] doc: mkimage: Use standard style for synopsis
  2022-06-12  4:19 ` [PATCH 01/12] doc: mkimage: Use standard style for synopsis Sean Anderson
@ 2022-06-12  4:41   ` Sean Anderson
  0 siblings, 0 replies; 14+ messages in thread
From: Sean Anderson @ 2022-06-12  4:41 UTC (permalink / raw)
  To: u-boot, Heinrich Schuchardt; +Cc: Simon Glass

On 6/12/22 12:19 AM, Sean Anderson wrote:
> 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 fomatting 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.
> 
> Signed-off-by: Sean Anderson <seanga2@gmail.com>
> ---
> 
>   doc/mkimage.1 | 25 +++++++++++++++++--------
>   1 file changed, 17 insertions(+), 8 deletions(-)
> 
> diff --git a/doc/mkimage.1 b/doc/mkimage.1
> index 759dc2d12f..2765c74410 100644
> --- a/doc/mkimage.1
> +++ b/doc/mkimage.1
> @@ -3,17 +3,26 @@
>   .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\~ .\|.\|.\&]
> +.BI \-f\~ image-tree-source-file
> +.I image-file-name
> +.YS
>   
> -.B mkimage
> -.RB [\fIoptions\fP] " \-F [" "uimage file name" "]"
> +.SY mkimage
> +.RI [ option\~ .\|.\|.\&]
> +.BI \-F image-file-name

This is missing a \~

Will be fixed in v2

> +.YS
>   
> -.B mkimage
> -.RB [\fIoptions\fP] " (legacy mode)"
> +.SY mkimage
> +.RI [ option\~ .\|.\|.\&]
> +.R (legacy mode)
> +.YS
>   
>   .SH "DESCRIPTION"
>   The
> 


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2022-06-12  4:41 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-12  4:19 [PATCH 00/12] doc: mkimage: Rework and refactor the man page Sean Anderson
2022-06-12  4:19 ` [PATCH 01/12] doc: mkimage: Use standard style for synopsis Sean Anderson
2022-06-12  4:41   ` Sean Anderson
2022-06-12  4:19 ` [PATCH 02/12] doc: mkimage: Use empty request instead of blank lines Sean Anderson
2022-06-12  4:19 ` [PATCH 03/12] doc: mkimage: Add vertical/horizontal space to examples Sean Anderson
2022-06-12  4:19 ` [PATCH 04/12] doc: mkimage: Regularize option documentation Sean Anderson
2022-06-12  4:19 ` [PATCH 05/12] doc: mkimage: Use subsection macro Sean Anderson
2022-06-12  4:19 ` [PATCH 06/12] doc: mkimage: Remove duplicate docs for -l Sean Anderson
2022-06-12  4:19 ` [PATCH 07/12] doc: mkimage: Use correct capitalization for NAME Sean Anderson
2022-06-12  4:19 ` [PATCH 08/12] doc: mkimage: Edit options for style and consistency Sean Anderson
2022-06-12  4:19 ` [PATCH 09/12] doc: mkimage: Add BUGS section Sean Anderson
2022-06-12  4:19 ` [PATCH 10/12] doc: mkimage: Add SEE ALSO section Sean Anderson
2022-06-12  4:19 ` [PATCH 11/12] doc: mkimage: Remove AUTHORS section Sean Anderson
2022-06-12  4:19 ` [PATCH 12/12] doc: Add man page for dumpimage Sean Anderson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.