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-09-16 01:06:28 +0800
commitee49ff520218b6560dea85b671fb7d1e02f307a7 (patch)
tree0469e236e7d565be40fe4d1455bbaaa4e53537e0 /util/mec1322/Makefile
parenta0336e3e9ca914c08c98bf5ec4b11a4c0429fa75 (diff)
downloadcoreboot-ee49ff520218b6560dea85b671fb7d1e02f307a7.tar.xz
util: add a tool to dump and insert MEC1322 firmware
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