From patchwork Tue Feb 4 09:38:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 316510 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 5415E2C007C for ; Tue, 4 Feb 2014 20:39:58 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2C3604B93B; Tue, 4 Feb 2014 10:39:42 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0fpZwDfJWxZG; Tue, 4 Feb 2014 10:39:41 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 79E124B9AD; Tue, 4 Feb 2014 10:39:13 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3A9154B77C for ; Tue, 4 Feb 2014 10:39:05 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8sBmU+meiv7u for ; Tue, 4 Feb 2014 10:39:00 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from smtp.mei.co.jp (smtp.mei.co.jp [133.183.100.20]) by theia.denx.de (Postfix) with ESMTP id CEB364B77A for ; Tue, 4 Feb 2014 10:38:59 +0100 (CET) Received: from mail-gw.jp.panasonic.com ([157.8.1.157]) by smtp.mei.co.jp (8.12.11.20060614/3.7W/kc-maile12) with ESMTP id s149civn009916; Tue, 4 Feb 2014 18:38:44 +0900 (JST) Received: from epochmail.jp.panasonic.com ([157.8.1.130]) by mail.jp.panasonic.com (8.11.6p2/3.7W/kc-maili15) with ESMTP id s149cjB22402; Tue, 4 Feb 2014 18:38:45 +0900 Received: by epochmail.jp.panasonic.com (8.12.11.20060308/3.7W/lomi16) id s149cj5E021424; Tue, 4 Feb 2014 18:38:45 +0900 Received: from poodle by lomi16.jp.panasonic.com (8.12.11.20060308/3.7W) with ESMTP id s149ciR5021393; Tue, 4 Feb 2014 18:38:44 +0900 Received: from beagle.diag.org (beagle.diag.org [10.184.179.16]) by poodle (Postfix) with ESMTP id AE47B2743A5D; Tue, 4 Feb 2014 18:38:44 +0900 (JST) From: Masahiro Yamada To: u-boot@lists.denx.de Date: Tue, 4 Feb 2014 18:38:41 +0900 Message-Id: <1391506721-32462-4-git-send-email-yamada.m@jp.panasonic.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1391506721-32462-1-git-send-email-yamada.m@jp.panasonic.com> References: <1391506721-32462-1-git-send-email-yamada.m@jp.panasonic.com> Cc: Tom Rini Subject: [U-Boot] [PATCH v2 3/3] dts: generate multiple device tree blobs X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de It is convenient to have all device trees on the same SoC compiled. It allows for later easy repackaging without the need to re-run the make file. - Build device trees with the same SoC under arch/$(ARCH)/dts - Copy the one specified by CONFIG_DEFAULT_DEVICE_TREE or DEVICE_TREE=... to dts/dt.dtb Signed-off-by: Masahiro Yamada --- Changes in v2: - Newly added arch/arm/dts/.gitignore | 1 + arch/arm/dts/Makefile | 37 +++++++++++++++++++++++++++++++++++++ arch/microblaze/dts/.gitignore | 1 + arch/microblaze/dts/Makefile | 11 +++++++++++ arch/x86/dts/.gitignore | 1 + arch/x86/dts/Makefile | 12 ++++++++++++ dts/Makefile | 31 ++++++++++++++++++++----------- 7 files changed, 83 insertions(+), 11 deletions(-) create mode 100644 arch/arm/dts/.gitignore create mode 100644 arch/arm/dts/Makefile create mode 100644 arch/microblaze/dts/.gitignore create mode 100644 arch/microblaze/dts/Makefile create mode 100644 arch/x86/dts/.gitignore create mode 100644 arch/x86/dts/Makefile diff --git a/arch/arm/dts/.gitignore b/arch/arm/dts/.gitignore new file mode 100644 index 0000000..b60ed20 --- /dev/null +++ b/arch/arm/dts/.gitignore @@ -0,0 +1 @@ +*.dtb diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile new file mode 100644 index 0000000..2658911 --- /dev/null +++ b/arch/arm/dts/Makefile @@ -0,0 +1,37 @@ +dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \ + exynos5250-snow.dtb \ + exynos5250-smdk5250.dtb \ + exynos5420-smdk5420.dtb + +dtb-$(CONFIG_TEGRA) += tegra20-harmony.dtb \ + tegra20-medcom-wide.dtb \ + tegra20-paz00.dtb \ + tegra20-plutux.dtb \ + tegra20-seaboard.dtb \ + tegra20-tec.dtb \ + tegra20-trimslice.dtb \ + tegra20-ventana.dtb \ + tegra20-whistler.dtb \ + tegra20-colibri_t20_iris.dtb \ + tegra30-beaver.dtb \ + tegra30-cardhu.dtb \ + tegra30-tec-ng.dtb \ + tegra114-dalmore.dtb + +dtb-$(CONFIG_ZYNQ) += zynq-zc702.dtb \ + zynq-zc706.dtb \ + zynq-zed.dtb \ + zynq-microzed.dtb \ + zynq-zc770-xm010.dtb \ + zynq-zc770-xm012.dtb \ + zynq-zc770-xm013.dtb + +targets += $(dtb-y) + +DTC_FLAGS += -R 4 -p 0x1000 + +PHONY += dtbs +dtbs: $(addprefix $(obj)/, $(dtb-y)) + @: + +clean-files := *.dtb diff --git a/arch/microblaze/dts/.gitignore b/arch/microblaze/dts/.gitignore new file mode 100644 index 0000000..b60ed20 --- /dev/null +++ b/arch/microblaze/dts/.gitignore @@ -0,0 +1 @@ +*.dtb diff --git a/arch/microblaze/dts/Makefile b/arch/microblaze/dts/Makefile new file mode 100644 index 0000000..6d4a11f --- /dev/null +++ b/arch/microblaze/dts/Makefile @@ -0,0 +1,11 @@ +dtb-y += microblaze-generic.dtb + +targets += $(dtb-y) + +DTC_FLAGS += -R 4 -p 0x1000 + +PHONY += dtbs +dtbs: $(addprefix $(obj)/, $(dtb-y)) + @: + +clean-files := *.dtb diff --git a/arch/x86/dts/.gitignore b/arch/x86/dts/.gitignore new file mode 100644 index 0000000..b60ed20 --- /dev/null +++ b/arch/x86/dts/.gitignore @@ -0,0 +1 @@ +*.dtb diff --git a/arch/x86/dts/Makefile b/arch/x86/dts/Makefile new file mode 100644 index 0000000..27374a4 --- /dev/null +++ b/arch/x86/dts/Makefile @@ -0,0 +1,12 @@ +dtb-y += link.dts \ + alex.dts + +targets += $(dtb-y) + +DTC_FLAGS += -R 4 -p 0x1000 + +PHONY += dtbs +dtbs: $(addprefix $(obj)/, $(dtb-y)) + @: + +clean-files := *.dtb diff --git a/dts/Makefile b/dts/Makefile index 5d2abd9..5a432c7 100644 --- a/dts/Makefile +++ b/dts/Makefile @@ -9,24 +9,30 @@ DEVICE_TREE ?= $(CONFIG_DEFAULT_DEVICE_TREE:"%"=%) ifeq ($(DEVICE_TREE),) -DEVICE_TREE := notfound +DEVICE_TREE := unset endif -DTS := $(srctree)/arch/$(ARCH)/dts/$(DEVICE_TREE).dts +DTB := arch/$(ARCH)/dts/$(DEVICE_TREE).dtb -DTC_FLAGS += -R 4 -p 0x1000 +quiet_cmd_cp = CP $@ +cmd_cp = cp $< $@ -$(obj)/dt.dtb: $(DTS) FORCE - $(call if_changed_dep,dtc) +$(obj)/dt.dtb: $(DTB) FORCE + $(call if_changed,cp) targets += dt.dtb -$(DTS): - @echo >&2 - @echo >&2 "Device Tree Source is not specified." - @echo >&2 "Please define 'CONFIG_DEFAULT_DEVICE_TREE'" - @echo >&2 "or build with 'DEVICE_TREE=' argument" - @/bin/false +$(DTB): arch-dtbs + $(Q)test -e $@ || ( \ + echo >&2; \ + echo >&2 "Device Tree Source is not correctly specified."; \ + echo >&2 "Please define 'CONFIG_DEFAULT_DEVICE_TREE'"; \ + echo >&2 "or build with 'DEVICE_TREE=' argument"; \ + echo >&2; \ + /bin/false) + +arch-dtbs: + $(Q)$(MAKE) $(build)=arch/$(ARCH)/dts dtbs .SECONDARY: $(obj)/dt.dtb.S @@ -36,3 +42,6 @@ dtbs: $(obj)/dt.dtb @: clean-files := dt.dtb.S + +# Let clean descend into dts directories +subdir- += ../arch/*/dts