devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frank Rowand <frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
Cc: Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
	Tim Bird <tbird20d-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>,
	Jason Cooper <jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org>,
	Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Ian Campbell <ijc-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
	Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	Rob Landley <rob-VoJi6FS/r0vR7s880joybQ@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	devicetree-spec-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: devicetree repository separation/migration
Date: Wed, 19 Feb 2014 20:58:17 -0800	[thread overview]
Message-ID: <53058B69.4040502@gmail.com> (raw)
In-Reply-To: <CACxGe6uhA6FMR76WJGVEt44x6bQOC=woCkDr6ZUH30hTd8f2wA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On 2/19/2014 1:15 PM, Grant Likely wrote:
> On Wed, Feb 19, 2014 at 8:16 PM, Frank Rowand <frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>> On 2/19/2014 1:08 AM, Sascha Hauer wrote:
>>> On Tue, Feb 18, 2014 at 02:44:15PM -0800, Tim Bird wrote:
>>>> I'm not in favor of separating the device tree information from the kernel.
>>>>
>>>> If we switch, then whatever synchronization issues other projects
>>>> are having now with synching with the device tree info from the kernel will
>>>> just then become the problem of the kernel developers, who will then
>>>> have to sync with the device tree info from another repository.  If the
>>>> sync issues can't be solved now for them, why or how would it be solved
>>>> post-separation for us?  (It sounds like a zero-sum game of pain transfer
>>>> to me.)
>>>>
>>>> I'm relatively unfamiliar with the arguments.  Can someone provide
>>>> a brief list of reasons this is needed, and how the inconvenience to Linux
>>>> kernel developers will be minimized, should it proceed?
>>>
>>
>>
>>> One of the reasons for doing devicetrees is to separate the hardware
>>> description from the code so that:
>>> - Other OSes (and bootloaders) can use the same description to start on
>>>   a given hardware
>>> - A generic Kernel can be started on any hardware
>>> - A hardware describes itself, makes itself more introspecitve so we can
>>>   go away from very specialized kernels
>>
>> Tim knows this ^^^^.  He was asking for the arguments for moving dts files
>> out of the linux kernel source tree.
> 
> We've made the decision that devicetree bindings need to be treated as
> ABI, but as long as the .dts files live in the kernel there will
> always be the temptation to just tweak things in lock-step and nobody
> will notice. Splitting the files out gives that extra push to think
> about whether changes to a binding will backwards compatible with a
> tree that doesn't have those changes because the chances are a lot
> higher that someone will hit that combination.
> 
> The other argument is shared source between
> BSD/U-Boot/Barebox/Linux/etc. Until we have a separate .dts repo there
> is no good way to share the database of hardware descriptions.

We could provide an easy export (see below).  What do you think?

-Frank



Proof of concept: export devicetree source and header files

Not-signed-off-by: Frank Rowand <frank.rowand-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org>


---
 Makefile                   |   27 	26 +	1 -	0 !
 scripts/Makefile.dtsexport |   19 	19 +	0 -	0 !
 scripts/dts.sh             |   11 	11 +	0 -	0 !
 3 files changed, 56 insertions(+), 1 deletion(-)

Index: b/Makefile
===================================================================
--- a/Makefile
+++ b/Makefile
@@ -234,6 +234,9 @@ endif
 # Where to locate arch specific headers
 hdr-arch  := $(SRCARCH)
 
+# Where to locate arch specific dts
+dts-arch  := $(SRCARCH)
+
 KCONFIG_CONFIG	?= .config
 export KCONFIG_CONFIG
 
@@ -463,7 +466,7 @@ version_h := include/generated/uapi/linu
 no-dot-config-targets := clean mrproper distclean \
 			 cscope gtags TAGS tags help %docs check% coccicheck \
 			 $(version_h) headers_% archheaders archscripts \
-			 kernelversion %src-pkg
+			 kernelversion %src-pkg dts_export%
 
 config-targets := 0
 mixed-targets  := 0
@@ -933,6 +936,26 @@ firmware_install: FORCE
 	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.fwinst obj=firmware __fw_install
 
 # ---------------------------------------------------------------------------
+# devicetree source and headers export
+
+#Default location for installed headers
+export EXPORT_DTS_PATH = $(KBUILD_OUTPUT)/usr/dts
+
+PHONY += dts_export_headers
+dts_export_headers: scripts_basic
+	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.dtsexport obj=include/dt-bindings
+	@echo $(KERNELRELEASE) >$(EXPORT_DTS_PATH)/linux_version
+
+PHONY += dts_export_all
+dts_export_all: dts_export_headers
+	$(Q)$(CONFIG_SHELL) $(srctree)/scripts/dts.sh
+
+PHONY += dts_export
+dts_export:
+	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.dtsexport obj=arch/$(dts-arch)/boot/dts
+
+
+# ---------------------------------------------------------------------------
 # Kernel headers
 
 #Default location for installed headers
@@ -1160,6 +1183,8 @@ help:
 	@echo  '  modules_prepare - Set up for building external modules'
 	@echo  '  tags/TAGS	  - Generate tags file for editors'
 	@echo  '  cscope	  - Generate cscope index'
+	@echo  '  dts_export_all  - Export devicetree source and headers to EXPORT_DTS_PATH'
+	@echo  '                    (default: $(EXPORT_DTS_PATH))'
 	@echo  '  gtags           - Generate GNU GLOBAL index'
 	@echo  '  kernelrelease	  - Output the release version string'
 	@echo  '  kernelversion	  - Output the version stored in Makefile'
Index: b/scripts/Makefile.dtsexport
===================================================================
--- /dev/null
+++ b/scripts/Makefile.dtsexport
@@ -0,0 +1,19 @@
+# ==========================================================================
+# Exporting dts source and header files
+#
+# ==========================================================================
+
+srcpath := $(srctree)/$(obj)/*
+dstpath := $(EXPORT_DTS_PATH)/$(obj)
+
+include scripts/Kbuild.include
+
+
+quiet_cmd_install = EXPORT $(subst $(srctree)/,,$(srcpath))
+      cmd_install = mkdir -p $(dstpath); cp -a $(srcpath) $(dstpath)
+
+
+.PHONY: export
+export:
+	$(call cmd,install)
+
Index: b/scripts/dts.sh
===================================================================
--- /dev/null
+++ b/scripts/dts.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+# Run dts_export command for all architectures
+
+# Stop on error
+set -e
+
+for arch in $(ls ${srctree}/arch); do
+	if [ -d ${srctree}/arch/${arch}/boot/dts ]; then
+		make ARCH=${arch} dts_export
+	fi
+done
--
To unsubscribe from this list: send the line "unsubscribe devicetree-compiler" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2014-02-20  4:58 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-17 18:05 devicetree repository separation/migration Jason Cooper
     [not found] ` <20140217180544.GU7862-u4khhh1J0LxI1Ri9qeTfzeTW4wlIGRCZ@public.gmane.org>
2014-02-18 14:34   ` Jason Cooper
2014-02-18 15:57   ` Sascha Hauer
     [not found]     ` <20140218155750.GS17250-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-02-18 18:18       ` Jason Cooper
     [not found]         ` < CACxGe6vU3j4-UtUtxBkT=Mf+AeLVxBcWicGqQhcGVZXnEBUkig@mail.gmail.com>
     [not found]         ` <20140218181854.GB7862-u4khhh1J0LxI1Ri9qeTfzeTW4wlIGRCZ@public.gmane.org>
2014-02-18 19:09           ` Stephen Warren
     [not found]             ` <5303AFDC.9010908-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2014-02-18 19:22               ` Jason Cooper
2014-02-18 19:47           ` Olof Johansson
     [not found]             ` <CAOesGMhvoB7vRf3H1kMaL5+MgZ2gJy=ZVNU0gsXVye9S4YGBOg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-02-18 22:21               ` Olof Johansson
     [not found]                 ` <CAOesGMi8zJXhfj46CLB-_Kk2s4MY9da46DhMoCtRj=zSUiuOGA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-02-18 22:44                   ` Tim Bird
     [not found]                     ` <CA+bK7J5+n2Se4cLv5WjR5B31ej7FdrGjPcjUULNrhb1UQ7=vmA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-02-19  9:08                       ` Sascha Hauer
     [not found]                         ` <20140219090854.GW17250-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-02-19 20:16                           ` Frank Rowand
     [not found]                             ` <53051102.8060801-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-02-19 21:15                               ` Grant Likely
     [not found]                                 ` <CACxGe6uhA6FMR76WJGVEt44x6bQOC=woCkDr6ZUH30hTd8f2wA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-02-19 21:37                                   ` Frank Rowand
2014-02-20  4:58                                   ` Frank Rowand [this message]
     [not found]                                     ` <53058B69.4040502-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-02-20  8:14                                       ` Grant Likely
     [not found]                                         ` <CACxGe6ugF2_kzDPLdv-Z1LUnkX4DHq9R45o64kJHVBSQjWFiNg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-02-20  9:38                                           ` Ian Campbell
2014-02-20 21:15                                           ` Frank Rowand
2014-02-21 18:22                                       ` Warner Losh
     [not found]                                         ` <7F6C2FEA-D330-4CFA-8DC2-554DB8908EC6-uzTCJ5RojNnQT0dZR+AlfA@public.gmane.org>
2014-02-21 21:04                                           ` Frank Rowand
2014-02-19 21:12                       ` Rob Herring
     [not found]                         ` <CAL_JsqJG+OXbT7sMiHV2dCx+nf--RidL8MmMd=dy6_gAa0yYcg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-02-19 21:20                           ` Olof Johansson
     [not found]                             ` <CAOesGMiHOwSYTCUaptacN=_pbXnObU5gqpxQHQ+kRTaW-ow3rA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-02-20  9:40                               ` Ian Campbell
2014-02-20 11:38                               ` Grant Likely
     [not found]                                 ` <20140220113832.D9E13C4050F-WNowdnHR2B42iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2014-02-21 18:27                                   ` Warner Losh
     [not found]                                     ` <0F360BC4-77AC-44E4-85FA-A8AAA336BA4D-uzTCJ5RojNnQT0dZR+AlfA@public.gmane.org>
2014-02-22 18:16                                       ` Sascha Hauer
2014-02-21 18:57                                   ` Olof Johansson
2014-02-20 14:34                               ` Rob Herring
2014-02-19 21:32                           ` Frank Rowand
     [not found]                             ` <530522F8.8050102-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-02-20 15:01                               ` Rob Herring
2014-02-19  9:22               ` Sascha Hauer
2014-02-19 18:32               ` Jason Cooper
     [not found]                 ` <20140219183221.GO7862-u4khhh1J0LxI1Ri9qeTfzeTW4wlIGRCZ@public.gmane.org>
2014-02-19 20:23                   ` Warner Losh
     [not found]                     ` <FC8FF4FE-E9F5-4C17-BF3A-01ADAA1584D7-uzTCJ5RojNnQT0dZR+AlfA@public.gmane.org>
2014-02-20  9:50                       ` Ian Campbell
2014-02-18 22:14           ` Frank Rowand
     [not found]             ` <5303DB5B.2090505-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-02-19 18:46               ` Jason Cooper
     [not found]                 ` <20140219184626.GP7862-u4khhh1J0LxI1Ri9qeTfzeTW4wlIGRCZ@public.gmane.org>
2014-02-19 20:18                   ` Frank Rowand
     [not found]                     ` <5305119F.2070405-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-02-20  9:49                       ` Ian Campbell
2014-02-19 20:28                   ` Warner Losh
2014-02-19  8:32           ` Sascha Hauer
     [not found]             ` <20140219083232.GV17250-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-02-19 18:50               ` Jason Cooper
2014-02-19 21:09           ` Grant Likely
     [not found]             ` <CACxGe6vU3j4-UtUtxBkT=Mf+AeLVxBcWicGqQhcGVZXnEBUkig-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-02-19 21:43               ` Warner Losh
2014-02-20 11:39                 ` Grant Likely
     [not found]                   ` <20140220113951.612DDC4050F-WNowdnHR2B42iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2014-02-21 18:28                     ` Warner Losh
     [not found]         ` < CAOesGMhvoB7vRf3H1kMaL5+MgZ2gJy=ZVNU0gsXVye9S4YGBOg@mail.gmail.com>
     [not found]           ` < CAOesGMi8zJXhfj46CLB-_Kk2s4MY9da46DhMoCtRj=zSUiuOGA@mail.gmail.com>
     [not found]             ` < CA+bK7J5+n2Se4cLv5WjR5B31ej7FdrGjPcjUULNrhb1UQ7=vmA@mail.gmail.com>
     [not found]               ` < CAL_JsqJG+OXbT7sMiHV2dCx+nf--RidL8MmMd=dy6_gAa0yYcg@mail.gmail.com>
     [not found]           ` < 20140219183221.GO7862@titan.lakedaemon.net>
     [not found]             ` < FC8FF4FE-E9F5-4C17-BF3A-01ADAA1584D7@bsdimp.com>
     [not found]               ` <1392889831.23342.11.camel @kazak.uk.xensource.com>
     [not found]                 ` <1392889831.23342.11.camel-ommiHX4a84BXesXXhkcM7miJhflN2719@public.gmane.org>
2014-02-20 11:39                   ` Grant Likely
2014-02-21  1:07   ` Frank Rowand
     [not found]     ` <5306A6C0.9000206-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-02-21 14:11       ` Sascha Hauer
     [not found]         ` <20140221141136.GI17250-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-02-21 18:47           ` Olof Johansson
     [not found]             ` <CAOesGMjY2aDLPYLncxHs9gqmWCFy+e4sZK_ET-17qzEU-JwvdQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-02-28  8:00               ` Sascha Hauer
2014-02-24 15:59           ` Ian Campbell
     [not found]             ` <1393257557.16570.94.camel-ommiHX4a84BXesXXhkcM7miJhflN2719@public.gmane.org>
2014-02-25  7:26               ` Sascha Hauer
     [not found]                 ` <20140225072609.GW17250-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-02-25  7:36                   ` Ian Campbell
     [not found]                     ` <1393313764.9640.15.camel-ztPmHsLffjjnO4AKDKe2m+kiAK3p4hvP@public.gmane.org>
2014-02-26  9:00                       ` Ian Campbell
     [not found]                         ` <1393405232.16570.106.camel-ommiHX4a84BXesXXhkcM7miJhflN2719@public.gmane.org>
2014-02-26  9:18                           ` Sascha Hauer
     [not found]         ` < CAOesGMjY2aDLPYLncxHs9gqmWCFy+e4sZK_ET-17qzEU-JwvdQ@mail.gmail.com>
     [not found]           ` < 20140228080025.GK24917@pengutronix.de>
     [not found]             ` <20140228080025.GK24917-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-03-01 21:04               ` Grant Likely

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=53058B69.4040502@gmail.com \
    --to=frowand.list-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=devicetree-spec-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
    --cc=ijc-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
    --cc=jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org \
    --cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
    --cc=rob-VoJi6FS/r0vR7s880joybQ@public.gmane.org \
    --cc=robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
    --cc=tbird20d-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).