mbox series

[v2,0/4] Generate capsules from config files

Message ID 20240419065542.1160527-1-sughosh.ganu@linaro.org
Headers show
Series Generate capsules from config files | expand

Message

Sughosh Ganu April 19, 2024, 6:55 a.m. UTC
Add support for generating capsules through a config file. Multiple
capsules can be generated through a single invocation of the
mkeficapsule tool, where the capsule parameters are fetched from the
config file.

The format of the config file pretty similar to the one used by the
capsule generation tool in EDKII.

The functionality is enabled on the sandbox variant and the EFI
capsule update test is now configured to generate the capsules through
a config file. The sandbox_flattree variant generates capsules through
binman, thus covering both the paths.

This is a rebased version of the earlier patch series that was sent to
the mailing list [1]. That series was not getting merged as Simon had
asked for generation of capsules as part of the sandbox platform
build. Those patches have since been merged. Moreover, there has been
adoption of the capsule generation logic by TI platforms as well, so
that should address the concern which Tom had about it's usage.

These patches are more of a step in the direction of adding support
for generation of a multi-payload capsule. There has been a request
for it's support for a platform [2].


[1] - https://lists.denx.de/pipermail/u-boot/2023-November/538223.html
[2] - https://lists.denx.de/pipermail/u-boot/2024-March/548126.html


Sughosh Ganu (4):
  tools: mkeficapsule: Add support for parsing capsule params from
    config file
  doc: Document capsule generation through a config file
  sandbox: capsule: Add a config file for generating capsules
  test: capsule: Generate capsules through config file

 configs/sandbox_defconfig                     |   2 +
 doc/develop/uefi/uefi.rst                     |  70 ++++
 .../test_efi_capsule/capsule_gen_binman.dts   |   2 +
 test/py/tests/test_efi_capsule/conftest.py    |   7 +
 .../test_efi_capsule/sandbox_capsule_cfg.txt  |  73 ++++
 tools/Kconfig                                 |  15 +
 tools/Makefile                                |   1 +
 tools/eficapsule.h                            | 114 ++++++
 tools/mkeficapsule.c                          |  87 +++--
 tools/mkeficapsule_parse.c                    | 352 ++++++++++++++++++
 10 files changed, 692 insertions(+), 31 deletions(-)
 create mode 100644 test/py/tests/test_efi_capsule/sandbox_capsule_cfg.txt
 create mode 100644 tools/mkeficapsule_parse.c

Comments

Simon Glass June 11, 2024, 6:52 p.m. UTC | #1
Hi Sughosh,

On Fri, 19 Apr 2024 at 00:56, Sughosh Ganu <sughosh.ganu@linaro.org> wrote:
>
>
> Add support for generating capsules through a config file. Multiple
> capsules can be generated through a single invocation of the
> mkeficapsule tool, where the capsule parameters are fetched from the
> config file.
>
> The format of the config file pretty similar to the one used by the
> capsule generation tool in EDKII.
>
> The functionality is enabled on the sandbox variant and the EFI
> capsule update test is now configured to generate the capsules through
> a config file. The sandbox_flattree variant generates capsules through
> binman, thus covering both the paths.
>
> This is a rebased version of the earlier patch series that was sent to
> the mailing list [1]. That series was not getting merged as Simon had
> asked for generation of capsules as part of the sandbox platform
> build. Those patches have since been merged. Moreover, there has been
> adoption of the capsule generation logic by TI platforms as well, so
> that should address the concern which Tom had about it's usage.
>
> These patches are more of a step in the direction of adding support
> for generation of a multi-payload capsule. There has been a request
> for it's support for a platform [2].
>
>
> [1] - https://lists.denx.de/pipermail/u-boot/2023-November/538223.html
> [2] - https://lists.denx.de/pipermail/u-boot/2024-March/548126.html
>
>
> Sughosh Ganu (4):
>   tools: mkeficapsule: Add support for parsing capsule params from
>     config file
>   doc: Document capsule generation through a config file
>   sandbox: capsule: Add a config file for generating capsules
>   test: capsule: Generate capsules through config file
>
>  configs/sandbox_defconfig                     |   2 +
>  doc/develop/uefi/uefi.rst                     |  70 ++++
>  .../test_efi_capsule/capsule_gen_binman.dts   |   2 +
>  test/py/tests/test_efi_capsule/conftest.py    |   7 +
>  .../test_efi_capsule/sandbox_capsule_cfg.txt  |  73 ++++
>  tools/Kconfig                                 |  15 +
>  tools/Makefile                                |   1 +
>  tools/eficapsule.h                            | 114 ++++++
>  tools/mkeficapsule.c                          |  87 +++--
>  tools/mkeficapsule_parse.c                    | 352 ++++++++++++++++++
>  10 files changed, 692 insertions(+), 31 deletions(-)
>  create mode 100644 test/py/tests/test_efi_capsule/sandbox_capsule_cfg.txt
>  create mode 100644 tools/mkeficapsule_parse.c

Can you implement this in binman? I would like to avoid having a
separate config file from the image description.

Regards,
Simon