[PATCH v5 07/12] binman: capsule: Add support for generating capsules

Simon Glass sjg at chromium.org
Wed Jul 26 00:52:39 CEST 2023


Hi Sughosh,

On Tue, 25 Jul 2023 at 02:58, Sughosh Ganu <sughosh.ganu at linaro.org> wrote:
>
> Add support in binman for generating capsules. The capsule parameters
> can be specified either through a config file or through the capsule
> binman entry. Also add test cases in binman for capsule generation,
> and enable this testing on the sandbox_spl variant.
>
> Signed-off-by: Sughosh Ganu <sughosh.ganu at linaro.org>
> ---
> Changes since V4:
> * Rebase on top of current HEAD.
> * Remove blank lines after function comments.
> * Fix a couple of typos.
> * Use single quotes for strings.
> * Put the GUIDs in variables with relevant names.
> * Declare certain values in local variables instead of member values.
> * Add comments for explaning the payload offsets in the capsule file.
> * Drop the test case for generating the capsule from the config
>   file.
> * Define payload data for the capsule tests.
> * Add logic to find input and output files in capsule generation in
>   the indir and outdir directories when absolute path is not passed.
>
>  configs/sandbox_spl_defconfig                 |   1 +
>  tools/binman/btool/mkeficapsule.py            | 153 ++++++++++++++++++
>  tools/binman/entries.rst                      |  42 +++++
>  tools/binman/etype/capsule.py                 | 132 +++++++++++++++
>  tools/binman/ftest.py                         | 115 +++++++++++++
>  tools/binman/test/307_capsule.dts             |  19 +++
>  tools/binman/test/308_capsule_signed.dts      |  21 +++
>  tools/binman/test/309_capsule_version.dts     |  20 +++
>  tools/binman/test/310_capsule_missing_key.dts |  20 +++
>  .../binman/test/311_capsule_missing_index.dts |  18 +++
>  .../binman/test/312_capsule_missing_guid.dts  |  17 ++
>  .../test/313_capsule_missing_payload.dts      |  18 +++
>  tools/binman/test/314_capsule_missing.dts     |  18 +++
>  tools/binman/test/files/capsule_cfg.txt       |   6 +
>  14 files changed, 600 insertions(+)
>  create mode 100644 tools/binman/btool/mkeficapsule.py
>  create mode 100644 tools/binman/etype/capsule.py
>  create mode 100644 tools/binman/test/307_capsule.dts
>  create mode 100644 tools/binman/test/308_capsule_signed.dts
>  create mode 100644 tools/binman/test/309_capsule_version.dts
>  create mode 100644 tools/binman/test/310_capsule_missing_key.dts
>  create mode 100644 tools/binman/test/311_capsule_missing_index.dts
>  create mode 100644 tools/binman/test/312_capsule_missing_guid.dts
>  create mode 100644 tools/binman/test/313_capsule_missing_payload.dts
>  create mode 100644 tools/binman/test/314_capsule_missing.dts
>  create mode 100644 tools/binman/test/files/capsule_cfg.txt

I made all my comments on the previous rev of this patch. Sorry for the delay.

Regards,
Simon


More information about the U-Boot mailing list