From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 24B57C433EF for ; Sun, 12 Jun 2022 22:16:14 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 773D38445E; Mon, 13 Jun 2022 00:14:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="XdbI9uUV"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 64BFD8444D; Mon, 13 Jun 2022 00:14:32 +0200 (CEST) Received: from mail-qv1-xf32.google.com (mail-qv1-xf32.google.com [IPv6:2607:f8b0:4864:20::f32]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 138F48443B for ; Mon, 13 Jun 2022 00:14:24 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qv1-xf32.google.com with SMTP id i19so3261385qvu.13 for ; Sun, 12 Jun 2022 15:14:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tTq3QbSNZzJNcWUsXr7IyhGeGdlRDVbrqwPXICJfT9c=; b=XdbI9uUVSi5eyZW36SquNB1BMWUHlNQ7+qpRCJqxw8FkPLKZ4VKUwewscXIjyvNric CPBl6prL7FqItvNIFsGoiON4Lo+fLQlK5eJCWhJYmMC0XHYHad/Pndptkda/vkZyAPqL jAgRXCJij72PlAkeEw2nvr8oZAkXyuC+bDTVDXQ91V/Ovu6oB81YgdfJ9D5fDvsPfxTH eMfE7/a0rICPZIAdV3yybI9ulSk4hg41XlIYFCNkG+O3YYjoF88XNBdppeXqey6bHrSo y9RCAUoFy0CjUG6ZEN78oB1t4OiW9AdQydQG4Xq0wVyXdzUjyqVNkYL3Ma8GRuRFLPy0 24DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tTq3QbSNZzJNcWUsXr7IyhGeGdlRDVbrqwPXICJfT9c=; b=YPdn9hTTtyQ4S3LXTPKVPZ45JMW5JWRV7Gij/w9chl0Ka0j7M20WYeV3SelPH/gcrS 6kBugtR6uReQVI/l6FaRq+Bu5+xTpf8TOW8+tW5BNZ6iAyZDu3D6WvUqhO+4pOT5GDew GEiicUnH2oNByPo/E2a3E0iE9ci7m5gl78hLYbCrLHUg05SwlC79iJVVodHSc0JxIl75 IcdJ4dWmcYSeudJby9viIKIFT2fLEQARMTWfwOeoe7BJX69Vt4GfCQNgR4t6skjiDFVO SxID7DTVWCxoEODrvyMuZqWh/HNAkwwj5U/pdPTQ2YkMnpva9wjcjhFjfyLD7Zi8xYDB taqA== X-Gm-Message-State: AOAM531803JUNuCh1ysrm0sugFUskWyq1gsx/eC40eB8VySwUNy196tY ZYBq2YoNafA4avmrCJattQcwtrSVd4NbPGFt X-Google-Smtp-Source: ABdhPJxOy8DerzPVVWsb4/sB1hfVYgfrA4vrHYr/Im0AElpJuxTbTUOn8zAd5kAym2qHU1H5cz5zzQ== X-Received: by 2002:a05:6214:29cd:b0:46b:b59a:a749 with SMTP id gh13-20020a05621429cd00b0046bb59aa749mr23818471qvb.89.1655072062415; Sun, 12 Jun 2022 15:14:22 -0700 (PDT) Received: from localhost (pool-173-73-95-180.washdc.fios.verizon.net. [173.73.95.180]) by smtp.gmail.com with UTF8SMTPSA id s15-20020ac85ecf000000b002f3e2435ee2sm3705133qtx.63.2022.06.12.15.14.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 12 Jun 2022 15:14:22 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de, Heinrich Schuchardt Cc: Simon Glass , Sean Anderson Subject: [PATCH v2 08/14] doc: mkimage: Edit options for style and consistency Date: Sun, 12 Jun 2022 18:14:05 -0400 Message-Id: <20220612221411.1608406-9-seanga2@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220612221411.1608406-1-seanga2@gmail.com> References: <20220612221411.1608406-1-seanga2@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean 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 underdocument options Signed-off-by: Sean Anderson --- 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 | 230 +++++++++++++++++++++++++++++++++++--------------- 1 file changed, 163 insertions(+), 67 deletions(-) diff --git a/doc/mkimage.1 b/doc/mkimage.1 index 5267e7d22e..f74790c701 100644 --- a/doc/mkimage.1 +++ b/doc/mkimage.1 @@ -28,26 +28,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 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 . @@ -59,8 +56,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 @@ -69,9 +66,14 @@ 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 \-h +as +.I image-type +to see the list of supported image types. Without this option, the image type is +autodetected. . .TP .B \-q @@ -89,35 +91,58 @@ 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. . .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 \-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" 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 @@ -145,11 +170,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 . @@ -159,23 +199,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" @@ -184,36 +225,55 @@ 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 ", " \-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 .key for use with signing and a -certificate .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" @@ -230,15 +290,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 -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 @@ -248,18 +342,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 -- 2.35.1