Makefile: Make loop unrolling fully controllable by the caller

We recently reactivated the -DUNROLL_LOOPS code for x86 devices.
Unfortunatley, this seems to lead to code size problems for early
firmware stages on certain x86 boards (CB:37475). The biggest speedup
with unrolled loops was observed during kernel verification anyway
(which hashes orders of magnitude more data than firmware verification),
so let's make this fully configurable by the calling firmware and only
enable it from depthcharge. Pre-RAM coreboot changes are probably better
served with the smaller implementation anyway (and this will only become
more important as we move to CBFS per-file hashing and need hash
algorithms in every stage).


Cq-Depend: chromium:1951413
Change-Id: I87eaa14299cae0ee0d0b4a098d638b6bccdaf75b
Signed-off-by: Julius Werner <>
Reviewed-by: Aaron Durbin <>
Reviewed-by: Subrata Banik <>
1 file changed