diff options
author | Jack Rosenthal <jrosenth@chromium.org> | 2020-05-27 07:30:24 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-06-09 16:30:56 +0000 |
commit | 1978c84e51cc8eb99f55167c6b5b6cc85439f832 (patch) | |
tree | 6d16f00d1022c19559031285ca53786817b18c66 /Makefile | |
parent | 5ae4df3bbf2efd4471c98d5a185544f589155f87 (diff) | |
download | vboot-1978c84e51cc8eb99f55167c6b5b6cc85439f832.tar.gz |
host/lib: add lightweight flashrom wrapper library
Lightweight wrapper around flashrom, exposing two APIs:
flashrom_read(programmer, region, data_out, size_out)
flashrom_write(programmer, region, data, size)
|region| can be NULL, in which case operate on the whole flash chip.
The intended usage of this wrapper library is to read/write VBNV from
SPI flash directly, avoiding the call thru mosys (which has deprecated
the command). Bringing this logic into crossystem directly will also
help with expanding VBNV to 64-bytes.
BUG=chromium:1032351,chromium:1030473,chromium:789276
BRANCH=none
TEST=provided unit tests
Change-Id: I3997bd03a2db7e58e4e76fc200c637dd3b5b20a4
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2218888
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -450,6 +450,7 @@ UTILLIB_SRCS = \ host/lib/crossystem.c \ host/lib/crypto.c \ host/lib/file_keys.c \ + host/lib/flashrom.c \ host/lib/fmap.c \ host/lib/host_common.c \ host/lib/host_key2.c \ @@ -509,9 +510,11 @@ HOSTLIB_SRCS = \ host/lib/crossystem.c \ host/lib/crypto.c \ host/lib/extract_vmlinuz.c \ + host/lib/flashrom.c \ host/lib/fmap.c \ host/lib/host_misc.c \ host/lib/subprocess.c \ + host/lib21/host_misc.c \ ${TLCL_SRCS} HOSTLIB_OBJS = ${HOSTLIB_SRCS:%.c=${BUILD}/%.o} @@ -706,6 +709,7 @@ TEST2X_NAMES = \ tests/vb2_crypto_tests \ tests/vb2_ec_sync_tests \ tests/vb2_gbb_tests \ + tests/vb2_host_flashrom_tests \ tests/vb2_host_key_tests \ tests/vb2_kernel_tests \ tests/vb2_misc_tests \ |