summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Roth <martinroth@google.com>2016-01-20 14:54:27 -0700
committerMartin Roth <martinroth@google.com>2016-01-26 04:48:05 +0100
commitb8f8cdbd9ea5a3fd5f73e40c63edc8f33f2b53f3 (patch)
tree5fa434d38f80deebe65269098c51663d21489590
parentdecefea2729cb691d06f4c68c0c0d60c039d389f (diff)
downloadcoreboot-b8f8cdbd9ea5a3fd5f73e40c63edc8f33f2b53f3.tar.xz
Makefile.inc: error if UPDATE_IMAGE is enabled with no coreboot.rom
Instead of just failing with the statement: 'mv: cannot stat ‘coreboot.rom’: No such file or directory', fail with an error that helps the user understand the issue. Change-Id: Ie693d45710f599991514e0803a7c444636e473c9 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/13065 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber <nico.h@gmx.de>
-rw-r--r--Makefile.inc5
1 files changed, 4 insertions, 1 deletions
diff --git a/Makefile.inc b/Makefile.inc
index 8bf0ca525d..5f9886404e 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -782,7 +782,10 @@ prebuild-files = \
.PHONY: $(obj)/coreboot.pre
$(obj)/coreboot.pre: $$(prebuilt-files) $(CBFSTOOL)
- mv $(obj)/coreboot.rom $@.tmp
+ mv $(obj)/coreboot.rom $@.tmp || \
+ (echo "Error: You have UPDATE_IMAGE set in Kconfig, but have no existing image to update." && \
+ echo Exiting." && \
+ false)
$(prebuild-files) true
mv $@.tmp $@
endif # ifneq ($(CONFIG_UPDATE_IMAGE),y)