summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorEdward O'Callaghan <quasisec@google.com>2021-10-28 10:53:18 +1100
committerCommit Bot <commit-bot@chromium.org>2021-11-18 23:04:40 +0000
commit483dff64346fd30224df5b66bf76124aeea7bb12 (patch)
tree75bbc6a98a66fcb0a5e7a688237496675a89c2e1 /Makefile
parent4200cb21c7f6c79dacee511400c88994bca5cf7f (diff)
downloadvboot-483dff64346fd30224df5b66bf76124aeea7bb12.tar.gz
vboot_reference/futility: Port W path to using libflashrom
Use libflashrom API over sub-processing the flashrom CLI. Squash in, vboot_reference/futility: Use image layout as fallback Use the layout encoding within the image as the fallback if we cannot read it from ROM. Also cleanup error paths while here. BUG=b:203715651 BRANCH=none TEST=cros deploy to nocturne and ran: `/usr/sbin/chromeos-firmwareupdate --mode=recovery --wp=1`. && `$ cros_run_unit_tests --board nocturne --packages vboot_reference`. Cq-Depend: chromium:3249690, chromium:3281062, chromium:3288610 Signed-off-by: Edward O'Callaghan <quasisec@google.com> Change-Id: I892aec510d8023abd42a07cbb036be79bc8b4498 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3247852 Tested-by: Edward O'Callaghan <quasisec@chromium.org> Auto-Submit: Edward O'Callaghan <quasisec@chromium.org> Commit-Queue: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Sam McNally <sammc@chromium.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 7d074b42..0435936c 100644
--- a/Makefile
+++ b/Makefile
@@ -305,6 +305,8 @@ ifneq (${HAVE_LIBZIP},)
LIBZIP_LIBS := $(shell ${PKG_CONFIG} --libs libzip)
endif
+FLASHROM_LIBS := $(shell ${PKG_CONFIG} --libs flashrom)
+
# Determine QEMU architecture needed, if any
ifeq (${ARCH},${HOST_ARCH})
# Same architecture; no need for QEMU
@@ -1044,7 +1046,7 @@ signing_install: $(if ${SDK_BUILD},\
futil: ${FUTIL_BIN}
# FUTIL_LIBS is shared by FUTIL_BIN and TEST_FUTIL_BINS.
-FUTIL_LIBS = ${CRYPTO_LIBS} ${LIBZIP_LIBS}
+FUTIL_LIBS = ${CRYPTO_LIBS} ${LIBZIP_LIBS} ${FLASHROM_LIBS}
${FUTIL_BIN}: LDLIBS += ${FUTIL_LIBS}
${FUTIL_BIN}: ${FUTIL_OBJS} ${UTILLIB} ${FWLIB}