From b8f8cdbd9ea5a3fd5f73e40c63edc8f33f2b53f3 Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Wed, 20 Jan 2016 14:54:27 -0700 Subject: Makefile.inc: error if UPDATE_IMAGE is enabled with no coreboot.rom MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-on: https://review.coreboot.org/13065 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber --- Makefile.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Makefile.inc') 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) -- cgit v1.2.3