summaryrefslogtreecommitdiff
path: root/tools/mkeficapsule.c
AgeCommit message (Collapse)AuthorFilesLines
2021-07-18mkeficapsule: Remove dtb related optionsIlias Apalodimas1-222/+7
commit 322c813f4bec ("mkeficapsule: Add support for embedding public key in a dtb") added a bunch of options enabling the addition of the capsule public key in a dtb. Since now we embedded the key in U-Boot's .rodata we don't this this functionality anymore Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-04-10tools/mkeficapsule: improve online helpHeinrich Schuchardt1-8/+8
Show short arguments along with long arguments in online help: $ tools/mkeficapsule -h Usage: mkeficapsule [options] <output file> Options: -f, --fit <fit image> new FIT image file -r, --raw <raw image> new raw image file -i, --index <index> update image index -I, --instance <instance> update hardware instance -K, --public-key <key file> public key esl file -D, --dtb <dtb file> dtb file -O, --overlay the dtb file is an overlay -h, --help print a help message Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-03-16mkeficapsule: Correct printf() stringsSimon Glass1-7/+7
Use %z when printing size_t values. This avoids errors on 32-bit machines. Signed-off-by: Simon Glass <sjg@chromium.org> Use a conversion to size_t for printing stat.st_size. Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-02-26tools/mkeficapsule.c: fix DEBUG buildKlaus Heinrich Kiwi1-1/+1
Fix a missing comma sign (,) from a printf(), that is only reachable if DEBUG is defined, in which case the build fails with: tools/mkeficapsule.c:266:36: error: expected β€˜)’ before β€˜bin’ 266 | printf("\tbin: %s\n\ttype: %pUl\n" bin, guid); | ^~~~ | ) Signed-off-by: Klaus Heinrich Kiwi <klaus@linux.vnet.ibm.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-01-23mkeficapsule: Miscellaneous fixes in the utilitySughosh Ganu1-15/+23
Miscellaneous fixes in the mkeficapsule utility -- these include a few resource leak issues flagged by Coverity along with some additional code improvements suggested by Heinrich during code review. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
2021-01-23tools: mkeficapsule: fill reserved members of structureAKASHI Takahiro1-0/+3
Fill reserved members of efi_firmware_management_capsule_image_header structure with zero's for safety. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Fixes: CID 316354 Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-12-31mkeficapsule: Add support for embedding public key in a dtbSughosh Ganu1-12/+221
Add options for embedding the public key esl(efi signature list) file to the platform's dtb. The esl file is then retrieved and used for authenticating the capsule to be used for updating firmare components on the platform. The esl file can now be embedded in the dtb by invoking the following command mkeficapsule -K <pub_key.esl> -D <dtb> In the scenario where the esl file is to be embedded in an overlay, this can be done through the following command mkeficapsule -O -K <pub_key.esl> -D <dtb> This will create a node named 'signature' in the dtb, and the esl file will be stored as 'capsule-key' Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
2020-12-03test/py: efi_capsule: test for FIT image capsuleAKASHI Takahiro1-1/+2
The test can run on sandbox build and it attempts to execute a firmware update via a capsule-on-disk, using a FIT image capsule, CONFIG_EFI_CAPSULE_FIT. To run this test successfully, you need configure U-Boot specifically; See test_capsule_firmware.py for requirements, and hence it won't run on Travis CI, at least, for now. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
2020-12-03tools: add mkeficapsule command for UEFI capsule updateAKASHI Takahiro1-0/+236
This is a utility mainly for test purpose. mkeficapsule -f: create a test capsule file for FIT image firmware Having said that, you will be able to customize the code to fit your specific requirements for your platform. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>