diff options
author | Robert Zieba <robertzieba@google.com> | 2022-03-14 15:59:12 -0600 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2022-05-13 15:51:37 +0000 |
commit | 29bc79fddb62c30caa33474ac773ae6a6ec1c4f0 (patch) | |
tree | f7ef50087db6559514398abda5c309be5bda4e06 /util/amdfwtool/Makefile | |
parent | 305086c0f227c61b039c9b5a5d6515a8895683b6 (diff) |
util/amdfwtool: Add amdfwread utility
Amdfwtool creates AMD firmware images however there is currently no way
to get information from an existing image. This commit adds amdfwread to
support that functionality. At the moment only reading PSP soft fuse
flags is supported. Example usage: `amdfwread --soft-fuse bios.bin`,
example output: `Soft-fuse:0x400000030000041`.
BUG=b:202397678
TEST=Ran amdfwread and verified that it correctly reads the soft fuse
bits, verified that built AMD FW still boots on DUT
Signed-off-by: Robert Zieba <robertzieba@google.com>
Change-Id: I15fa07c9cad8e4640e9c40e5539b0dab44424850
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62795
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Rob Barnes <robbarnes@google.com>
Diffstat (limited to 'util/amdfwtool/Makefile')
-rw-r--r-- | util/amdfwtool/Makefile | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/util/amdfwtool/Makefile b/util/amdfwtool/Makefile index 7b7793535a..bdc3dc3432 100644 --- a/util/amdfwtool/Makefile +++ b/util/amdfwtool/Makefile @@ -2,27 +2,33 @@ HOSTCC ?= cc -SRC = amdfwtool.c data_parse.c -OBJ = $(SRC:%.c=%.o) -TARGET = amdfwtool +READ_SRC = amdfwread.c +READ_OBJ = $(READ_SRC:%.c=%.o) +TOOL_SRC = amdfwtool.c data_parse.c +TOOL_OBJ = $(TOOL_SRC:%.c=%.o) +HEADER=amdfwtool.h +TARGETS = amdfwread amdfwtool WERROR=-Werror CFLAGS=-O2 -Wall -Wextra -Wshadow ${WERROR} -all: $(TARGET) +all: $(TARGETS) -$(TARGET): $(OBJ) - $(CC) $(OBJ) $(LDFLAGS) -o $@ +amdfwread: $(READ_OBJ) + $(CC) $(READ_OBJ) $(LDFLAGS) -o $@ + +amdfwtool: $(TOOL_OBJ) + $(CC) $(TOOL_OBJ) $(LDFLAGS) -o $@ %.o: %.c $(HEADER) $(CC) $(CFLAGS) -c -o $@ $< clean: - @rm -f $(TARGET) $(OBJ) + @rm -f $(TARGETS) $(READ_OBJ) $(TOOL_OBJ) distclean: clean help: - @echo "${TARGET}: Create AMD Firmware combination" + @echo "${TARGETS}: Tools to create and read from AMD firmware combinations" @echo "Targets: all, clean, distclean, help" @echo "To disable warnings as errors, run make as:" @echo " make all WERROR=\"\"" |