diff options
author | Jakub Czapiga <jacz@semihalf.com> | 2022-04-07 14:44:44 +0200 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-06-30 14:55:17 +0000 |
commit | 9ae9d2c03f42b25238f803a26ebae4902541317e (patch) | |
tree | 4fb994c865757570ca5a40a5b376e7779dc9a584 /firmware | |
parent | 57eb6ea8e8ebf6ecb859815ef15b962a38803bd2 (diff) | |
download | vboot-9ae9d2c03f42b25238f803a26ebae4902541317e.tar.gz |
futility/file_type_bios: Rework image signing
This patch reworks whole BIOS image signing to support images with CBFS,
and with ponly RW/A slot. CBFS images will now be truncated to eliminate
unnecessary empty space, and will sign only the part of firmware area
which contains the data, and not empty space.
This patch also adds more checks for potential errors, and does not
allow for signing incorrect nor uses data from structures, which might
not be valid.
futility sign command tests are also greatly extended to cover a wide
variety of possible errors, which have to be handled correctly.
BUG=b:197114807
TEST=sudo emerge vboot_reference
TEST=build whole chromeos-bootimage after making it and coreboot use
`futility sign --type bios ...`
TEST=make runtests
BRANCH=none
Signed-off-by: Jakub Czapiga <jacz@semihalf.com>
Cq-Depend: chromium:3707104
Change-Id: I7c84aa38776e8890a87f0e9b7ec7f32d86f82c13
Disallow-Recycled-Builds: test-failures
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3575325
Tested-by: Jakub Czapiga <czapiga@google.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Auto-Submit: Jakub Czapiga <czapiga@google.com>
Commit-Queue: Jakub Czapiga <czapiga@google.com>
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/2lib/include/2return_codes.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/firmware/2lib/include/2return_codes.h b/firmware/2lib/include/2return_codes.h index ca30ffa7..ccb50aa4 100644 --- a/firmware/2lib/include/2return_codes.h +++ b/firmware/2lib/include/2return_codes.h @@ -846,6 +846,9 @@ enum vb2_return_code { /* Flashrom exited with failure status */ VB2_ERROR_FLASHROM, + /* cbfstool exited with failure status */ + VB2_ERROR_CBFSTOOL, + /********************************************************************** * Errors generated by host library key functions */ |