summaryrefslogtreecommitdiff
path: root/util/mec1322/Makefile
diff options
context:
space:
mode:
authorIru Cai <mytbk920423@gmail.com>2020-05-13 10:00:28 +0800
committerIru Cai <mytbk920423@gmail.com>2020-05-14 13:29:21 +0800
commita7683e92c5bf3ed62f473b903d8fdb4a4c22037d (patch)
treef0966318990dc2fe1ff3e0249dfdf2a59a5da928 /util/mec1322/Makefile
parent6b95507ec5b087658178a325bdc68570bc48bb20 (diff)
downloadcoreboot-a7683e92c5bf3ed62f473b903d8fdb4a4c22037d.tar.xz
util: add a tool to dump and insert MEC1322 firmwaremec1322
Refer to chip/mec1322/util/pack_ec.py in chromeec project for MEC1322 firmware format. Tested on the backup files of the system and private flashes of HP EliteBook 820 G1. This tool can dump the EC firmware from both flashes and insert the EC firmware to the original ROM file and make the ROM unchanged. It needs to be tested on real hardware to see if a modified ROM with a re-inserted EC firmware works. Change-Id: I999bf0289216bf72c4f8f19182c7670d7008b5f9 Signed-off-by: Iru Cai <mytbk920423@gmail.com>
Diffstat (limited to 'util/mec1322/Makefile')
-rw-r--r--util/mec1322/Makefile21
1 files changed, 21 insertions, 0 deletions
diff --git a/util/mec1322/Makefile b/util/mec1322/Makefile
new file mode 100644
index 0000000000..4ccbe92b9e
--- /dev/null
+++ b/util/mec1322/Makefile
@@ -0,0 +1,21 @@
+## This file is part of the coreboot project.
+##
+## SPDX-License-Identifier: GPL-2.0-or-later
+
+obj = mec1322
+HOSTCC := $(if $(shell type gcc 2>/dev/null),gcc,cc)
+
+ifeq ($(VERIFY_SIG),1)
+ CFLAGS += -DVERIFY_SIG
+ LIBS := -lcrypto
+endif
+
+all: $(obj)
+
+%: %.c
+ $(HOSTCC) $(CFLAGS) -Wall -o $@ $< $(LIBS)
+
+clean:
+ rm -f $(obj)
+
+.PHONY: all clean