summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2011-11-11 13:21:12 -0800
committerStefan Reinauer <reinauer@chromium.org>2012-01-05 15:48:22 -0800
commit485c6f7f2307b3b48338f7127f1b67e76fbce0f3 (patch)
treece2f4e59d15887c6da8fb2dfdf6982b2af5a8ad6
parentc560393525ebeb52c617e43cdc67d3298ea1d541 (diff)
downloadvboot-485c6f7f2307b3b48338f7127f1b67e76fbce0f3.tar.gz
Add a few comments and warnings when building incorrectly
The Makefile requires a few defines and isn't very friendly if they are missing. This adds some warnings which should alert as to what is wrong. BUG=chromium-os:16808 TEST=emerge vboot_reference-firmware for tegra2-seaboard, x86-mario Reviewed-on: https://gerrit.chromium.org/gerrit/11548 Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> (cherry picked from commit c25904536f2d8e3fe37860dff0ecc437323b760e) Change-Id: I887badec4fca9780a3eff8c2b46690f5f66251c5 Reviewed-on: https://gerrit.chromium.org/gerrit/13721 Reviewed-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stefan Reinauer <reinauer@chromium.org>
-rw-r--r--firmware/Makefile3
-rw-r--r--firmware/stub/include/biosincludes.h4
2 files changed, 7 insertions, 0 deletions
diff --git a/firmware/Makefile b/firmware/Makefile
index f23f1b9e..f56addbd 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+# This Makefile is designed to be called from the top-level vboot_reference one
+
FWTOP := $(shell pwd)
LIBDIR = $(FWTOP)/lib
STUBDIR = $(FWTOP)/stub
@@ -12,6 +14,7 @@ LIBS = $(FWLIB) # Firmware library must be self-contained
# Disable rollback TPM when compiling locally, since otherwise
# load_kernel_test attempts to talk to the TPM.
ifeq ($(FIRMWARE_ARCH),)
+$(warning FIRMWARE_ARCH not defined, assuming local compile)
CFLAGS += -DDISABLE_ROLLBACK_TPM
endif
diff --git a/firmware/stub/include/biosincludes.h b/firmware/stub/include/biosincludes.h
index 1e610f8c..817edfd0 100644
--- a/firmware/stub/include/biosincludes.h
+++ b/firmware/stub/include/biosincludes.h
@@ -33,6 +33,10 @@ extern void debug(const char *format, ...);
#define POSSIBLY_UNUSED
#define INLINE
+#else
+
+#warning "No FIRMARE_ARCH defined and not TARGET_TEST_MODE"
+
#endif
#endif /*CHROMEOS_SRC_PLATFORM_VBOOT_REFERENCE_FIRMWARE_STUB_BIOSINCLUDES_H_*/