[PATCH 0/5] Extend mkeficapsule tool to pack multiple payloads

Schmidt, Malte malte.schmidt-oss at weidmueller.com
Mon Jun 19 13:15:33 CEST 2023


Hello Takahiro,

Am 17.06.2023 um 02:45 schrieb AKASHI Takahiro:
> On Fri, Jun 16, 2023 at 01:34:21PM +0200, Stefan Herbrechtsmeier wrote:
>> From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier at weidmueller.com>
>>
>>
>> Currently, the mkeficapsule tool supports at most one payload inside the
>> capsule. However, the UEFI specification and the u-boot code
>> support multiple payloads inside one capsule. Extend the tool by
>> this feature. The tool is kept backwards-compatible, so it can still
>> be used and called exactly as before if desired.
> One of reasons why only a single image be included is that I didn't
> see any strong reason to do so because U-Boot already has an archive
> format of multiple images, named FIT. I wanted to utilize the existing
> framework which is widely used on U-Boot and the current implementation
> of FMP supports this format.
> It seems to be just enough.
>
> Do you have any useful use case of multiple images?
>
> -Takahiro Akashi
>
thank you for the feedback. I did not of think of this as the solution
to our use case as I had my EFI view point glasses on. I will check if
we can use the existing solution for our use case.
However, I think the extension is either still valuable or some u-boot
code could be removed.

Currently, the u-boot EFI code allows for multiple payloads as does the
EFI specification. Are there any tests which test this part of the u-boot
code? AFAIK my extension of the mkeficapsule tool is the first that
allows for testing this u-boot code and does so with the accompanying
tests.

Another question is: Why does the support for multiple payloads inside a
capsule exists in the u-boot code basis in the first place?
Right now there seem to be two ways to update multiple
binaries with a capsule update (a FIT image and a capsule containing
multiple payloads). Either it should be a valid assumption that both 
features
can be used and the accompanying tools can be extended to help
make use of them or documentation should exist which points out
that only one of the solutions is acceptable.

Best Regards
Malte
>> Malte Schmidt (5):
>>    mkeficapsule: constify function parameters
>>    mkeficapsule: add support for multiple payloads inside capsule
>>    test: efi_capsule: test a capsule update containing multiple images
>>    doc: uefi: update mkeficapsule documentation
>>    doc: uefi: clarify capsule concept
>>
>>   doc/develop/uefi/uefi.rst                     |  73 +-
>>   test/py/tests/test_efi_capsule/conftest.py    |  18 +-
>>   .../test_capsule_firmware_raw.py              |  46 +-
>>   .../test_capsule_firmware_signed_raw.py       |  24 +-
>>   tools/eficapsule.h                            |   5 -
>>   tools/mkeficapsule.c                          | 651 +++++++++++++-----
>>   6 files changed, 622 insertions(+), 195 deletions(-)
>>
>> -- 
>> 2.30.2
>>



More information about the U-Boot mailing list