summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.mk11
-rw-r--r--src/soc/ibm/power9/Makefile.mk5
2 files changed, 14 insertions, 2 deletions
diff --git a/Makefile.mk b/Makefile.mk
index e7a9ab1bb8..2b67947a43 100644
--- a/Makefile.mk
+++ b/Makefile.mk
@@ -636,7 +636,7 @@ endif
additional-dirs += $(objutil)/cbfstool $(objutil)/ifdtool \
$(objutil)/options $(objutil)/amdfwtool \
- $(objutil)/cbootimage
+ $(objutil)/cbootimage $(objutil)/ffs
export $(COREBOOT_EXPORTS)
@@ -678,6 +678,7 @@ IFITTOOL:=$(objutil)/cbfstool/ifittool
AMDCOMPRESS:=$(objutil)/cbfstool/amdcompress
CSE_FPT:=$(objutil)/cbfstool/cse_fpt
CSE_SERGER:=$(objutil)/cbfstool/cse_serger
+ECCTOOL:=$(objutil)/ffs/ecc/ecc
$(obj)/cbfstool: $(CBFSTOOL)
cp $< $@
@@ -719,6 +720,12 @@ IFDTOOL:=$(objutil)/ifdtool/ifdtool
AMDFWTOOL:=$(objutil)/amdfwtool/amdfwtool
AMDFWREAD:=$(objutil)/amdfwtool/amdfwread
+$(ECCTOOL):
+ @printf " Compile ECCTOOL\n"
+ cp -r $(top)/3rdparty/ffs $(objutil)
+ cd $(objutil)/ffs && autoreconf -i && ./configure
+ $(MAKE) -C $(objutil)/ffs
+
APCB_EDIT_TOOL:=$(top)/util/apcb/apcb_edit.py
APCB_V3_EDIT_TOOL:=$(top)/util/apcb/apcb_v3_edit.py
@@ -829,7 +836,7 @@ install-git-commit-clangfmt:
include util/crossgcc/Makefile.mk
.PHONY: tools
-tools: $(objutil)/kconfig/conf $(objutil)/kconfig/toada $(CBFSTOOL) $(objutil)/cbfstool/cbfs-compression-tool $(FMAPTOOL) $(RMODTOOL) $(IFWITOOL) $(objutil)/nvramtool/nvramtool $(objutil)/sconfig/sconfig $(IFDTOOL) $(CBOOTIMAGE) $(AMDFWTOOL) $(AMDCOMPRESS) $(FUTILITY) $(BINCFG) $(IFITTOOL) $(objutil)/supermicro/smcbiosinfo $(CSE_FPT) $(CSE_SERGER) $(AMDFWREAD)
+tools: $(objutil)/kconfig/conf $(objutil)/kconfig/toada $(CBFSTOOL) $(objutil)/cbfstool/cbfs-compression-tool $(FMAPTOOL) $(RMODTOOL) $(IFWITOOL) $(objutil)/nvramtool/nvramtool $(objutil)/sconfig/sconfig $(IFDTOOL) $(CBOOTIMAGE) $(AMDFWTOOL) $(AMDCOMPRESS) $(FUTILITY) $(BINCFG) $(IFITTOOL) $(objutil)/supermicro/smcbiosinfo $(CSE_FPT) $(CSE_SERGER) $(AMDFWREAD) $(ECCTOOL)
###########################################################################
# Common recipes for all stages
diff --git a/src/soc/ibm/power9/Makefile.mk b/src/soc/ibm/power9/Makefile.mk
index 84a40f9a34..f0ce2ead0e 100644
--- a/src/soc/ibm/power9/Makefile.mk
+++ b/src/soc/ibm/power9/Makefile.mk
@@ -14,4 +14,9 @@ ramstage-y += chip.c
ramstage-y += rom_media.c
ramstage-y += timer.c
+files_added:: $(obj)/coreboot.rom.ecc
+
+$(obj)/coreboot.rom.ecc: $(obj)/coreboot.rom | $(ECCTOOL)
+ $(ECCTOOL) --inject $< --output $@ --p8
+
endif