summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ec/google/chromeec/Makefile.inc15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/ec/google/chromeec/Makefile.inc b/src/ec/google/chromeec/Makefile.inc
index 7ae1835ffc..4a03948e65 100644
--- a/src/ec/google/chromeec/Makefile.inc
+++ b/src/ec/google/chromeec/Makefile.inc
@@ -37,13 +37,21 @@ cbfs-files-$(if $(CONFIG_EC_GOOGLE_CHROMEEC_BOARDNAME),y) += ecrw
ecrw-file := $(obj)/mainboard/$(MAINBOARDDIR)/ecrw
ecrw-name := ecrw
ecrw-type := raw
-ecrw-options := -A sha256
+ecrw-compression := $(CBFS_COMPRESS_FLAG)
+cbfs-files-$(if $(CONFIG_EC_GOOGLE_CHROMEEC_BOARDNAME),y) += ecrw.hash
+ecrw.hash-file := $(obj)/mainboard/$(MAINBOARDDIR)/ecrw.hash
+ecrw.hash-name := ecrw.hash
+ecrw.hash-type := raw
cbfs-files-$(if $(CONFIG_EC_GOOGLE_CHROMEEC_PD_BOARDNAME),y) += pdrw
pdrw-file := $(obj)/mainboard/$(MAINBOARDDIR)/pdrw
pdrw-name := pdrw
pdrw-type := raw
-pdrw-options := -A sha256
+pdrw-compression := $(CBFS_COMPRESS_FLAG)
+cbfs-files-$(if $(CONFIG_EC_GOOGLE_CHROMEEC_PD_BOARDNAME),y) += pdrw.hash
+pdrw.hash-file := $(obj)/mainboard/$(MAINBOARDDIR)/pdrw.hash
+pdrw.hash-name := pdrw.hash
+pdrw.hash-type := raw
$(obj)/mainboard/$(MAINBOARDDIR)/ecrw:
$(MAKE) -C $(top)/3rdparty/chromeec \
@@ -63,6 +71,9 @@ $(obj)/mainboard/$(MAINBOARDDIR)/pdrw:
rw
cp $(obj)/external/chromeec/$(CONFIG_EC_GOOGLE_CHROMEEC_PD_BOARDNAME)/RW/ec.RW.flat $@
+$(obj)/mainboard/$(MAINBOARDDIR)/%.hash: $(obj)/mainboard/$(MAINBOARDDIR)/%
+ openssl dgst -sha256 -binary $< > $@
+
.PHONY: $(obj)/mainboard/$(MAINBOARDDIR)/ecrw $(obj)/mainboard/$(MAINBOARDDIR)/pdrw
endif