summaryrefslogtreecommitdiff
path: root/dts
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2011-06-16 16:22:08 -0700
committerSimon Glass <sjg@chromium.org>2011-08-29 10:39:31 -0700
commit4b5121741d2b51f138886fdd62253f21f74f31f8 (patch)
tree2f9659c1268853baf438f93b78b6f0d456fc93d3 /dts
parent3f05069acca2c6e6879ed0de57d105b1291f1241 (diff)
fdt: Print an error when a device tree file is not supplied
Previously the build error was cryptic if CONFIG_OF_EMBED is defined but CONFIG_DEFAULT_DEVICE_TREE is not. This corrects that, and also makes sure that no device tree is compiled unless CONFIG_OF_EMBED is defined. BUG=chromium-os:11623 TEST=build with and without each of CONFIG_DEFAULT_DEVICE_TREE, CONFIG_OF_EMBED Change-Id: I7c2ec307cc9c3c0326ae6b5733daf7b2eb6ccde2 Reviewed-on: http://gerrit.chromium.org/gerrit/2808 Tested-by: Simon Glass <sjg@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Diffstat (limited to 'dts')
-rw-r--r--dts/Makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/dts/Makefile b/dts/Makefile
index 47b707ec7d..b885077f6a 100644
--- a/dts/Makefile
+++ b/dts/Makefile
@@ -25,6 +25,9 @@ include $(TOPDIR)/config.mk
LIB = $(obj)libdts.o
ifeq ($(DEV_TREE_SRC),)
+$(if $(CONFIG_DEFAULT_DEVICE_TREE),,\
+$(error Please define CONFIG_DEFAULT_DEVICE_TREE in your board header \
+ file or define DEV_TREE_SRC in your environment))
DEVICE_TREE = $(subst ",,$(CONFIG_DEFAULT_DEVICE_TREE))
else
DEVICE_TREE = $(DEV_TREE_SRC)
@@ -43,7 +46,9 @@ $(obj)dt.o: $(TOPDIR)/board/$(BOARDDIR)/$(DEVICE_TREE).dts
$(notdir ${DT_BIN}) $@
rm $(DT_BIN)
-OBJS := dt.o
+OBJS-$(CONFIG_OF_EMBED) := dt.o
+
+OBJS := $(OBJS-y)
OBJS := $(addprefix $(obj),$(OBJS))