All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
To: Sughosh Ganu <sughosh.ganu@linaro.org>, y@hera
Cc: u-boot@lists.denx.de, Heinrich Schuchardt <xypron.glpk@gmx.de>,
	Tom Rini <trini@konsulko.com>,
	Masahisa Kojima <masahisa.kojima@linaro.org>
Subject: Re: [PATCH 2/4] doc: Document capsule generation through a config file
Date: Tue, 23 Jan 2024 18:23:16 +0200	[thread overview]
Message-ID: <Za_n9JVSFxnj7Mo_@hera> (raw)
In-Reply-To: <20231121070028.2614095-3-sughosh.ganu@linaro.org>

Hi Sughosh,

On Tue, Nov 21, 2023 at 12:30:26PM +0530, Sughosh Ganu wrote:
> The UEFI capsule can now be generate by specifying the capsule
> parameters through a config file. Additionally, the capsules can be
> generated as part of u-boot build, through binman. Highlight these
> changes in the documentation.
>
> Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
> ---
>  doc/develop/uefi/uefi.rst | 70 +++++++++++++++++++++++++++++++++++++++
>  1 file changed, 70 insertions(+)
>
> diff --git a/doc/develop/uefi/uefi.rst b/doc/develop/uefi/uefi.rst
> index fb16ac743a..b9a9ed5491 100644
> --- a/doc/develop/uefi/uefi.rst
> +++ b/doc/develop/uefi/uefi.rst
> @@ -318,6 +318,76 @@ Run the following command
>        --guid <image GUID> \
>        <capsule_file_name>
>
> +Alternatively, the capsules can be generated through a config
> +file. When generating the capsules through a config file, the Kconfig
> +symbol CONFIG_EFI_CAPSULE_CFG_FILE is to be used for specifying the
> +path to the config file.

This sounds a bit weird. The tool is compiled and used by distros. How are
they supposed to use the config file?

Briefly looking at the patches, we use those config options on testing.
Can't we add a flag in the tool itself that can be used for normal use
cases and limit those Kconfig flags in our testing only?  Or alternatively
the paths for the config files can be hardcoded for sandbox and we get rid
of the config options entirely?

Thanks
/Ilias
> +
> +The config file describes the parameters that are used for generating
> +one or more capsules. The parameters for a given capsule file are
> +specified within curly braces, in the form of "key:value" pairs. All
> +the parameters that are currently supported by the mkeficapsule tool
> +can be specified through the config file.
> +
> +The following are some example payload parameters specified through
> +the config file.
> +
> +.. code-block:: none
> +
> +	{
> +	    image-guid: 02f4d760-cfd5-43bd-8e2d-a42acb33c660
> +	    hardware-instance: 0
> +	    monotonic-count: 1
> +	    payload: u-boot.bin
> +	    image-index: 1
> +	    fw-version: 2
> +	    private-key: /path/to/priv/key
> +	    pub-key-cert: /path/to/pub/key
> +	    capsule: u-boot.capsule
> +	}
> +	{
> +	    image-guid: 4ce292da-1dd8-428d-a1c2-77743ef8b96e
> +	    hardware-instance: 0
> +	    payload: u-boot.itb
> +	    image-index: 2
> +	    fw-version: 7
> +	    oemflags: 0x8000
> +	    capsule: fit.capsule
> +	}
> +	{
> +	    capsule-type: accept
> +	    image-guid: 4ce292da-1dd8-428d-a1c2-77743ef8b96e
> +	    capsule: accept.capsule
> +	}
> +	{
> +	    capsule-type: revert
> +	    capsule: revert.capsule
> +	}
> +
> +The following are the keys that specify the capsule parameters
> +
> +..code-block:: none
> +
> +    image-guid: Image GUID
> +    image-index: Image index value
> +    fw-version: Image version
> +    private-key: Path to the private key file used for capsule signing
> +    pub-key-cert: Path to the public key crt file used for capsule signing
> +    payload: Path to the capsule payload file
> +    capsule: Path to the output capsule file that is generated
> +    hardware-instance: Hardware Instance value
> +    monotonic-count: Monotonic count value
> +    capsule-type: Specifies capsule type. normal(default), accept or revert
> +    oemflags: 16bit Oemflags value to be used(populated in capsule header)
> +
> +When generating capsules through a config file, the command would look
> +like
> +
> +.. code-block:: console
> +
> +    $ mkeficapsule --cfg-file </path/to/the/config/file>
> +
> +
>  Capsule with firmware version
>  *****************************
>
> --
> 2.34.1
>

  reply	other threads:[~2024-01-23 16:23 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-21  7:00 [PATCH 0/4] Generate capsules from config files Sughosh Ganu
2023-11-21  7:00 ` [PATCH 1/4] tools: mkeficapsule: Add support for parsing capsule params from config file Sughosh Ganu
2023-11-21 22:11   ` Simon Glass
2023-11-21 22:24     ` Tom Rini
2023-11-22  5:24       ` Sughosh Ganu
2023-11-22  5:23     ` Sughosh Ganu
2023-11-22  7:35       ` Ilias Apalodimas
2023-11-22  7:40         ` Sughosh Ganu
2023-11-30  2:45           ` Simon Glass
2023-12-01  6:39             ` Sughosh Ganu
2023-12-01 18:32               ` Simon Glass
2023-12-04  7:15                 ` Sughosh Ganu
2023-12-27 17:48                   ` Simon Glass
2023-12-29  6:53                     ` Sughosh Ganu
2023-12-29  7:51                       ` Simon Glass
2023-11-30  2:45       ` Simon Glass
2023-11-21  7:00 ` [PATCH 2/4] doc: Document capsule generation through a " Sughosh Ganu
2024-01-23 16:23   ` Ilias Apalodimas [this message]
2024-01-24  6:53     ` Sughosh Ganu
2023-11-21  7:00 ` [PATCH 3/4] sandbox: capsule: Add a config file for generating capsules Sughosh Ganu
2023-11-21  7:00 ` [PATCH 4/4] test: capsule: Generate capsules through config file Sughosh Ganu
2024-03-12 14:58 ` [PATCH 0/4] Generate capsules from config files Bence Balogh
2024-03-13  5:38   ` Sughosh Ganu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Za_n9JVSFxnj7Mo_@hera \
    --to=ilias.apalodimas@linaro.org \
    --cc=masahisa.kojima@linaro.org \
    --cc=sughosh.ganu@linaro.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.de \
    --cc=y@hera \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.