All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/5] dtc: Switch to building and using our own dtc unless provided
Date: Sun, 24 Sep 2017 10:27:01 -0400	[thread overview]
Message-ID: <1506263222-7080-5-git-send-email-trini@konsulko.com> (raw)
In-Reply-To: <1506263222-7080-1-git-send-email-trini@konsulko.com>

This makes us act like the Linux Kernel does and allow for dtc to be
provided externally but otherwise we use the version of dtc that is
included in the sources.  This in turn means that we can drop the
checkdtc logic.  We select DTC in the cases where we will need the dtc
tool provided.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
 .travis.yml      |  6 ++----
 Makefile         | 10 ++--------
 dts/Kconfig      |  4 ++++
 scripts/Makefile |  1 +
 4 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 9dfd016da000..00b2a73a5eff 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -26,11 +26,9 @@ addons:
     - grub-efi-ia32-bin
     - rpm2cpio
     - wget
+    - device-tree-compiler
 
 install:
- # install latest device tree compiler
- - git clone --depth=1 -b v1.4.3 git://git.kernel.org/pub/scm/utils/dtc/dtc.git /tmp/dtc
- - make -j4 -C /tmp/dtc
  # Clone uboot-test-hooks
  - git clone --depth=1 git://github.com/swarren/uboot-test-hooks.git /tmp/uboot-test-hooks
  - ln -s travis-ci /tmp/uboot-test-hooks/bin/`hostname`
@@ -51,7 +49,7 @@ install:
 
 env:
   global:
-    - PATH=/tmp/dtc:/tmp/qemu-install/bin:/tmp/uboot-test-hooks/bin:/usr/bin:/bin
+    - PATH=/tmp/qemu-install/bin:/tmp/uboot-test-hooks/bin:/usr/bin:/bin
     - PYTHONPATH=/tmp/uboot-test-hooks/py/travis-ci
     - BUILD_DIR=build
     - HOSTCC="cc"
diff --git a/Makefile b/Makefile
index e058e9854b7b..b7d5cbb3f9ad 100644
--- a/Makefile
+++ b/Makefile
@@ -349,7 +349,7 @@ OBJDUMP		= $(CROSS_COMPILE)objdump
 AWK		= awk
 PERL		= perl
 PYTHON		?= python
-DTC		?= dtc
+DTC		?= $(objtree)/scripts/dtc/dtc
 CHECK		= sparse
 
 CHECKFLAGS     := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
@@ -872,7 +872,7 @@ endif
 PHONY += dtbs
 dtbs: dts/dt.dtb
 	@:
-dts/dt.dtb: checkdtc u-boot
+dts/dt.dtb: u-boot
 	$(Q)$(MAKE) $(build)=dts dtbs
 
 quiet_cmd_copy = COPY    $@
@@ -1447,12 +1447,6 @@ SYSTEM_MAP = \
 System.map:	u-boot
 		@$(call SYSTEM_MAP,$<) > $@
 
-checkdtc:
-	@if test $(call dtc-version) -lt 010403; then \
-		echo '*** Your dtc is too old, please upgrade to dtc 1.4.3 or newer'; \
-		false; \
-	fi
-
 #########################################################################
 
 # ARM relocations should all be R_ARM_RELATIVE (32-bit) or
diff --git a/dts/Kconfig b/dts/Kconfig
index b4b7ddc1444a..44fc9fe36dd7 100644
--- a/dts/Kconfig
+++ b/dts/Kconfig
@@ -5,11 +5,15 @@
 config SUPPORT_OF_CONTROL
 	bool
 
+config DTC
+	bool
+
 menu "Device Tree Control"
 	depends on SUPPORT_OF_CONTROL
 
 config OF_CONTROL
 	bool "Run-time configuration via Device Tree"
+	select DTC
 	help
 	  This feature provides for run-time configuration of U-Boot
 	  via a flattened device tree.
diff --git a/scripts/Makefile b/scripts/Makefile
index 3e10c16d59fd..9d55241463d4 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -21,3 +21,4 @@ build_docproc: $(obj)/docproc
 
 # Let clean descend into subdirs
 subdir-	+= basic kconfig
+subdir-$(CONFIG_DTC)	+= dtc
-- 
1.9.1

  parent reply	other threads:[~2017-09-24 14:27 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-24 14:26 [U-Boot] [PATCH 0/5] Follow the Linux Kernel in building dtc as needed Tom Rini
2017-09-24 14:26 ` [U-Boot] [PATCH 1/5] scripts/dtc: Update to upstream version v1.4.3 Tom Rini
2017-10-03 18:24   ` Rob Herring
2017-10-03 18:28     ` Tom Rini
2017-10-03 18:30       ` Rob Herring
2017-10-03 18:44         ` Tom Rini
2017-09-24 14:26 ` [U-Boot] [PATCH 2/5] scripts/dtc: Update to upstream version v1.4.4 Tom Rini
2017-09-24 14:27 ` [U-Boot] [PATCH 3/5] scripts/dtc: Update to upstream version v1.4.4-50-gfe50bd1ecc1d Tom Rini
2017-09-24 14:27 ` Tom Rini [this message]
2017-09-24 14:27 ` [U-Boot] [PATCH 5/5] tools/mkimage: Make the path to the dtc binary that mkimage calls configurable Tom Rini
2017-09-24 16:50 ` [U-Boot] [PATCH 0/5] Follow the Linux Kernel in building dtc as needed Marek Vasut
2017-09-24 17:28   ` Tom Rini
2017-09-24 20:39     ` Łukasz Majewski
2017-09-24 22:00       ` Tom Rini
2017-09-25  8:32     ` Marek Vasut
2017-09-25  8:28 ` Wolfgang Denk
2017-09-27 14:15 ` [U-Boot] [PATCH 0/5] REVERT " Wolfgang Denk
2017-09-27 14:15   ` [U-Boot] [PATCH 1/5] Revert "tools/mkimage: Make the path to the dtc binary that mkimage calls configurable" Wolfgang Denk
2017-09-27 14:15   ` [U-Boot] [PATCH 2/5] Revert "dtc: Switch to building and using our own dtc unless provided" Wolfgang Denk
2017-09-27 14:15   ` [U-Boot] [PATCH 3/5] Revert "scripts/dtc: Update to upstream version v1.4.4-50-gfe50bd1ecc1d" Wolfgang Denk
2017-09-27 14:15   ` [U-Boot] [PATCH 4/5] Revert "scripts/dtc: Update to upstream version v1.4.4" Wolfgang Denk
2017-09-27 14:15   ` [U-Boot] [PATCH 5/5] Revert "scripts/dtc: Update to upstream version v1.4.3" Wolfgang Denk
2017-09-27 14:31   ` [U-Boot] [PATCH 0/5] REVERT Follow the Linux Kernel in building dtc as needed Tom Rini
2017-09-27 14:56     ` Wolfgang Denk
2017-09-27 15:23       ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1506263222-7080-5-git-send-email-trini@konsulko.com \
    --to=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.