From ee49ff520218b6560dea85b671fb7d1e02f307a7 Mon Sep 17 00:00:00 2001 From: Iru Cai Date: Wed, 13 May 2020 10:00:28 +0800 Subject: 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 --- util/mec1322/Makefile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 util/mec1322/Makefile (limited to 'util/mec1322/Makefile') 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 -- cgit v1.2.3