summaryrefslogtreecommitdiffstats
path: root/rules/dtc.make
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2007-03-01 14:34:03 +0000
committerSascha Hauer <s.hauer@pengutronix.de>2007-03-01 14:34:03 +0000
commit8444eeea45b86374106d4619db89cd3cbb64ec90 (patch)
tree162b559c3a040ba38d207552d2cb7185960d84ff /rules/dtc.make
parent31042efaf0ac16f8b19e255f88c843665127f61b (diff)
downloadptxdist-8444eeea45b86374106d4619db89cd3cbb64ec90.tar.gz
ptxdist-8444eeea45b86374106d4619db89cd3cbb64ec90.tar.xz
* powerpc: add device tree compiler and oftree support
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@7025 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'rules/dtc.make')
-rw-r--r--rules/dtc.make93
1 files changed, 93 insertions, 0 deletions
diff --git a/rules/dtc.make b/rules/dtc.make
new file mode 100644
index 000000000..27333169b
--- /dev/null
+++ b/rules/dtc.make
@@ -0,0 +1,93 @@
+# -*-makefile-*-
+# $Id: template 6655 2007-01-02 12:55:21Z rsc $
+#
+# Copyright (C) 2007 by Sascha Hauer
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_DTC) += dtc
+
+# ----------------------------------------------------------------------------
+# Get
+# ----------------------------------------------------------------------------
+
+dtc_get: $(STATEDIR)/dtc.get
+
+$(STATEDIR)/dtc.get: $(dtc_get_deps_default)
+ @$(call targetinfo, $@)
+ @$(call touch, $@)
+
+$(DTC_SOURCE):
+ @$(call targetinfo, $@)
+ @$(call get, DTC)
+
+# ----------------------------------------------------------------------------
+# Extract
+# ----------------------------------------------------------------------------
+
+dtc_extract: $(STATEDIR)/dtc.extract
+
+$(STATEDIR)/dtc.extract: $(dtc_extract_deps_default)
+ @$(call targetinfo, $@)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+dtc_prepare: $(STATEDIR)/dtc.prepare
+
+$(STATEDIR)/dtc.prepare: $(dtc_prepare_deps_default)
+ @$(call targetinfo, $@)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+dtc_compile: $(STATEDIR)/dtc.compile
+
+$(STATEDIR)/dtc.compile: $(dtc_compile_deps_default)
+ @$(call targetinfo, $@)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+dtc_install: $(STATEDIR)/dtc.install
+
+$(STATEDIR)/dtc.install: $(dtc_install_deps_default)
+ @$(call targetinfo, $@)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+dtc_targetinstall: $(STATEDIR)/dtc.targetinstall
+
+$(STATEDIR)/dtc.targetinstall: $(dtc_targetinstall_deps_default)
+ @$(call targetinfo, $@)
+ PATH=$(HOST_PATH) dtc $(PTXCONF_DTC_EXTRA_ARGS) -I dts -O dtb \
+ $(PTXCONF_DTC_OFTREE_DTS) > $(IMAGEDIR)/oftree
+
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+dtc_clean:
+ rm -rf $(STATEDIR)/dtc.*
+ rm -rf $(IMAGEDIR)/dtc_*
+ rm -rf $(DTC_DIR)
+
+# vim: syntax=make