summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJakub Czapiga <jacz@semihalf.com>2022-04-07 14:44:44 +0200
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-06-30 14:55:17 +0000
commit9ae9d2c03f42b25238f803a26ebae4902541317e (patch)
tree4fb994c865757570ca5a40a5b376e7779dc9a584 /Makefile
parent57eb6ea8e8ebf6ecb859815ef15b962a38803bd2 (diff)
downloadvboot-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 'Makefile')
-rw-r--r--Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index abbb343b..2c6f70c2 100644
--- a/Makefile
+++ b/Makefile
@@ -445,12 +445,14 @@ USE_FLASHROM ?= 1
ifneq ($(filter-out 0,${USE_FLASHROM}),)
$(info building with libflashrom support)
FLASHROM_LIBS := $(shell ${PKG_CONFIG} --libs flashrom)
-COMMONLIB_SRCS = \
+COMMONLIB_SRCS += \
host/lib/flashrom.c \
host/lib/flashrom_drv.c
CFLAGS += -DUSE_FLASHROM
endif
-COMMONLIB_SRCS += host/lib/subprocess.c
+COMMONLIB_SRCS += \
+ host/lib/subprocess.c \
+ host/lib/cbfstool.c
# Intermediate library for the vboot_reference utilities to link against.
UTILLIB = ${BUILD}/libvboot_util.a