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 A552CC433EF for ; Sun, 12 Jun 2022 04:22:24 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8389C8445E; Sun, 12 Jun 2022 06:20:39 +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="qaUGEeKq"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A334D8442B; Sun, 12 Jun 2022 06:20:19 +0200 (CEST) Received: from mail-qv1-xf2e.google.com (mail-qv1-xf2e.google.com [IPv6:2607:f8b0:4864:20::f2e]) (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 A23468440D for ; Sun, 12 Jun 2022 06:20:10 +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-xf2e.google.com with SMTP id 43so2310765qvb.3 for ; Sat, 11 Jun 2022 21:20:10 -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=acoDyp45X2m1nUq1dfIVm0p3NHtEc+qAZq8KaF6P+XY=; b=qaUGEeKquThkVd4ulQCq8P3VCTfUm1IzvDH9OaUNOX7pX3quNHi6hrr4NOfY4fpTPK JkmIiYBmx3fd0ftWF21+hEYOMSsxv9cbiYbr+XpsKqcMUHt6rNJEMAwd3f/H6ZARYJbH 1mMUC3dTMLZklOBO1jMat/ySYFGLydX3e6Zpql5EMjh7z4thXQ2qE4QvcLsI7ZEWghGj tRamMG1VQzObEvBkj63JO1Ecq+fIvcDRBoVOaFXQf0quw3cvnssIeRtRZT3dtSXbe/Ft kyHRC4rgoqe2Rmzn8IMHBII5sQpaEnC4H6J07NNoqQtcsia5BwzwQQxehwN8421Qu/Ey ScNg== 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=acoDyp45X2m1nUq1dfIVm0p3NHtEc+qAZq8KaF6P+XY=; b=FxrNtf5HIYer68hQcDfI8A1hGOryrsky88CP1LOab83fgucghdr5HBYoz9TQ6sT0sZ 1AL3+J7KFaENcw9pJ2pyeH+BdCdF2c89YTMMnHJ3oMa/Iqba83mVx+XuOz5u7zIJw9Zu r/6ke8SDI3zkXeUmKh3MPg48oCj0qmzpOOAbMtSbZvp+XgcjqjDklh/hGecZR+R7lo52 lV+xHnnSdBNpW2LHukO17rT3BnZc52CC7OpLA0SpGz9aAr2A9dS0rTjWJxVtvjgFlcnl 6JT6zYW65zN2hJAhPrFgQ0mztf1bA/TZMsD6TRvaccQp59LHOuDN2XfRZk12LR1CiUlT 9p1A== X-Gm-Message-State: AOAM532xIBAydRkeq47s+Ygm+FyTHlHPWenM4fO0HsNO2THWZtYytdKu 95h6e8PsrWveYHchzj4ZB8Rn7k7n6aet9uvd X-Google-Smtp-Source: ABdhPJzr/jhbNlGJYI2A1k22Hy1DyAKQXD5AEP8SEUZUBnrSssT9I59U2MxiAIeOSfz9hZ6BfZo5Rw== X-Received: by 2002:a05:6214:20e4:b0:46b:c08b:c683 with SMTP id 4-20020a05621420e400b0046bc08bc683mr19615787qvk.24.1655007608862; Sat, 11 Jun 2022 21:20:08 -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 j9-20020a05620a288900b006a67d257499sm3294924qkp.56.2022.06.11.21.20.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 11 Jun 2022 21:20:08 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de, Heinrich Schuchardt Cc: Simon Glass , Sean Anderson Subject: [PATCH 08/12] doc: mkimage: Edit options for style and consistency Date: Sun, 12 Jun 2022 00:19:55 -0400 Message-Id: <20220612041959.1538628-9-seanga2@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220612041959.1538628-1-seanga2@gmail.com> References: <20220612041959.1538628-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 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 --- 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 .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" @@ -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 -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