summaryrefslogtreecommitdiff
path: root/src/cpu
diff options
context:
space:
mode:
authorMartin Roth <martinroth@google.com>2016-12-22 10:29:20 -0700
committerNico Huber <nico.h@gmx.de>2016-12-28 03:36:10 +0100
commit85653748a4a503fc8fae82a12e5b7d162f50348c (patch)
treedcee84b6aecc99df8591e5f10cc6eed6a45b1fc1 /src/cpu
parent8bbd596de631adc8b677e69603e978b848eb1708 (diff)
Microcode: Show a useful warning when microcode bins are missing
Because the binary repo is disabled by default, we get frequent questions about why the build failed, relating to microcode in the binary repository. - Show an error saying that the file is missing instead of the typical make error of no rule to build the file. - Show a note encouraging users to try enabling the binary repo if it's not enabled. Change-Id: If4148c18cfb781ed2932bd2ae4a289b621afdebf Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/17940 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'src/cpu')
-rw-r--r--src/cpu/Makefile.inc14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/cpu/Makefile.inc b/src/cpu/Makefile.inc
index 4ac68120cf..f74e354f0a 100644
--- a/src/cpu/Makefile.inc
+++ b/src/cpu/Makefile.inc
@@ -37,7 +37,19 @@ endif
# updates are wrapped in a container, like AMD's microcode update container. If
# there is only one microcode binary (i.e. one container), then we don't have
# this issue, and this rule will continue to work.
-$(obj)/cpu_microcode_blob.bin: $$(cpu_microcode_bins)
+$(obj)/cpu_microcode_blob.bin: $$(wildcard $$(cpu_microcode_bins))
+ for bin in $(cpu_microcode_bins); do \
+ if [ ! -f "$$bin" ]; then \
+ echo "Microcode error: $$bin does not exist"; \
+ NO_MICROCODE_FILE=1; \
+ fi; \
+ done; \
+ if [ -n "$$NO_MICROCODE_FILE" ]; then \
+ if [ -z "$(CONFIG_USE_BLOBS)" ] && [ -n "$(CONFIG_CPU_MICROCODE_CBFS_GENERATE)" ]; then \
+ echo "Try enabling binary-only repository in Kconfig 'General setup' menu."; \
+ fi; \
+ false; \
+ fi
@printf " MICROCODE $(subst $(obj)/,,$(@))\n"
@echo $(cpu_microcode_bins)
cat /dev/null $+ > $@