Validate dtc is new enough
Subsequent patches assume that dtc supports various recent features.
These are available in dtc 1.4.0. Validate that dtc is at least that
version.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
diff --git a/Makefile b/Makefile
index 7206aba..d545d30 100644
--- a/Makefile
+++ b/Makefile
@@ -413,7 +413,7 @@
all: $(ALL-y) $(SUBDIR_EXAMPLES)
-$(obj)u-boot.dtb: $(obj)u-boot
+$(obj)u-boot.dtb: checkdtc $(obj)u-boot
$(MAKE) -C dts binary
mv $(obj)dts/dt.dtb $@
@@ -667,6 +667,12 @@
false; \
fi
+checkdtc:
+ @if test $(call dtc-version) -lt 0104; then \
+ echo '*** Your dtc is too old, please upgrade to dtc 1.4 or newer'; \
+ false; \
+ fi
+
#
# Auto-generate the autoconf.mk file (which is included by all makefiles)
#