diff options
author | Mathew King <mathewk@chromium.org> | 2019-08-08 14:59:25 -0600 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-10-03 15:28:15 +0000 |
commit | c7ddc999fc076bf6871e3b5e641c07f17b0b1746 (patch) | |
tree | a7dfb7aec7bade6ddf74f23d1f1f6bdb26f62ccd /util/ifdtool/Makefile | |
parent | 006eb9d8c8550ce0e8d01d37cceb88e7c1e12a5e (diff) |
ifdtool: Add validate option to ifdtool
Add an option to ifdtool which validates that the flash regions defined
in the descriptor match the coresponding areas in the FMAP.
BUG=chromium:992215
TEST=Ran 'ifdtool -t' with a good bios image and verify no issues
run 'ifdtool -t' with a bad bios image and verify expected issues
Signed-off-by: Mathew King <mathewk@chromium.org>
Change-Id: Idebf105dee1b8f829d54bd65c82867af7aa4aded
Reviewed-on: https://review.coreboot.org/c/coreboot/+/34802
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'util/ifdtool/Makefile')
-rw-r--r-- | util/ifdtool/Makefile | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/util/ifdtool/Makefile b/util/ifdtool/Makefile index cc52b1ed4a..a4f0af6217 100644 --- a/util/ifdtool/Makefile +++ b/util/ifdtool/Makefile @@ -18,10 +18,16 @@ PROGRAM = ifdtool CC = gcc INSTALL = /usr/bin/env install PREFIX = /usr/local -CFLAGS = -O2 -g -Wall -Wextra -Wmissing-prototypes -Werror -I../../src/commonlib/include +CFLAGS = -O2 -g -Wall -Wextra -Wmissing-prototypes -Werror +CFLAGS += -I../../src/commonlib/include +CFLAGS += -I../cbfstool/flashmap +CFLAGS += -include ../../src/commonlib/include/commonlib/compiler.h LDFLAGS = OBJS = ifdtool.o +OBJS += fmap.o +OBJS += kv_pair.o +OBJS += valstr.o all: dep $(PROGRAM) @@ -38,6 +44,9 @@ dep: %.o: %.c $(CC) $(CFLAGS) -c -o $@ $< +%.o: ../cbfstool/flashmap/%.c + $(CC) $(CFLAGS) -c -o $@ $< + install: $(PROGRAM) mkdir -p $(DESTDIR)$(PREFIX)/bin $(INSTALL) $(PROGRAM) $(DESTDIR)$(PREFIX)/bin |