devicetree-compiler.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tom Rini <trini-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
To: Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Pantelis Antoniou
	<pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>,
	Frank Rowand
	<frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Grant Likely
	<grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>,
	David Gibson
	<david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>,
	Franklin S Cooper Jr <fcooper-l0cyMroinI0@public.gmane.org>,
	Matt Porter <mporter-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>,
	Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
	Phil Elwell
	<philip.j.elwell-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Geert Uytterhoeven
	<geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>,
	Marek Vasut <marex-ynQEQJNshbs@public.gmane.org>,
	Devicetree Compiler
	<devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [RFC] Introducing yamldt, a yaml to dtb compiler
Date: Fri, 28 Jul 2017 07:23:14 -0400	[thread overview]
Message-ID: <20170728112314.GJ26163@bill-the-cat> (raw)
In-Reply-To: <CAL_Jsq+eJNG66D22bNButg6=jj9WQ7Nw4PpxLsPBmGxN9KBnaw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 5852 bytes --]

On Thu, Jul 27, 2017 at 09:12:40PM -0500, Rob Herring wrote:
> On Thu, Jul 27, 2017 at 7:51 PM, Tom Rini <trini-OWPKS81ov/FWk0Htik3J/w@public.gmane.org> wrote:
> > On Thu, Jul 27, 2017 at 06:00:00PM -0500, Rob Herring wrote:
> >> On Thu, Jul 27, 2017 at 4:46 PM, Pantelis Antoniou
> >> <pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org> wrote:
> >> > Hi Frank,
> >> >
> >> > On Thu, 2017-07-27 at 13:22 -0700, Frank Rowand wrote:
> >> >> Hi Pantelis,
> >> >>
> >> >> Keep in mind one of the reasons Linus says he is very direct is to
> >> >> avoid leading a developer on, so that they don't waste a lot of time
> >> >> trying to resolve the maintainer's issues instead of realizing that
> >> >> the maintainer is saying "no". Please read my current answer as being
> >> >> "no, not likely to ever be accepted", not "no, not in the current form".
> >> >>
> >> >> My first reaction is: no, this is not a good idea for the Linux kernel.
> >> >>
> >> >
> >> > This has nothing to do with the kernel. It spits out valid DTBs that the
> >> > kernel (or anything else) may use.
> >>
> >> Let me rephrase Frank's statement: this is not a good idea for the
> >> main repository of dts files.
> >>
> >> But sure, DTS is already not the only source of DTBs. It comes from
> >> firmware on Power systems.
> >
> > Yes, but unless they're generated from something other than a (at the
> > time) normal DTS, that's not a good example, IMHO.
> 
> They aren't. I'm talking about IBM systems. The firmware has its own
> representation and flattens that to a DTB is how I understand it.

Oh, cool!

> >> If you want to create and maintain your own
> >> source format, then that is perfectly fine. But based on the current
> >> understanding, I'm not seeing a reason we'd convert DTS files to YAML.
> >
> > Can I propose one?  To borrow a phrase, Validation, Validation,
> > Validation.  Let me point to fe496e23b748 in the kernel for a moment.  I
> > found that as part of helping a new engineer come up to speed on doing
> > device tree work.  What I found was a case where:
> > - The binding doc gives one value for compatible as the required value.
> > - The code accepts only a single, different value.
> > - A few in-kernel dts files have different still values.
> >
> > If the common dts source file was in yaml, binding docs would be written
> > so that we could use them as validation and hey, the above wouldn't ever
> > have happened.  And I'm sure this is not the only example that's in-tree
> > right now.  These kind of problems create an artificially high barrier
> > to entry in a rather important area of the kernel (you can't trust the
> > docs, you have to check around the code too, and of course the code
> > might have moved since the docs were written).
> 
> I'm all for validation, but the binding doc or schema and files that
> describe platforms (aka DTS files) are not the same thing. The schema
> is what are the constraints for a binding. Maybe some bindings are
> fixed where there's only one valid binding implementation, but that's
> the easy case (we could use DTS for that). I'll take YAML for binding
> docs yesterday. Believe me, I'm tired of reviewing free form binding
> docs. If that's where you want to go, reply to my reply that went
> unanswered on Matt Porter's YAML proposal from 2 years ago (or maybe 3
> now). I had the whole binding doc tree converted over to an initial
> YAML schema. We just need to agree on the schema. Or we can keep
> waiting for Grant to publish what he started on...

My point here is that if the main tooling was expecting a YAML input
anything else that we could do on top of that source base becomes a lot
easier to add in and get people to try since they'll have the tools and
it's just apply a patch.

> >> Maybe you're not proposing that now, but if that is not the end goal I
> >> don't see the point of a new format. If YAML solves a bunch of
> >> problems, then of course we'd want to convert DTS files at some point.
> >
> > To borrow that same phrase again, Tooling, Tooling, Tooling.  The
> > current dts format is a niche format.  That's great, our community
> > is basically responsible for all tooling, we can do what we want.
> > That's also awful, we're the only people that care about tooling and we
> > all have lots of other itches to scratch.  There are so so so many
> > editors that just know YAML and will work it into the rest of the
> > development environment someone is using.  None of that exists for our
> > dts format.  Who cares about that?  Engineers that aren't primarily
> > writing dts files.  I'm pretty sure every engineer that's written /
> > extended a dts file has made an "invisible" mistake that would have been
> > caught with a different source format that had validation already.
> 
> The same can be said about DTB format as well.

I don't follow, sorry.  You don't expect most engineers to be poking the
object files, you expect the to be able to edit the sources.

> > And we've been talking about validation for ages now.  We'll probably
> > still be talking about it for ages more (as it's hard
> > thanked-at-conferences-and-such work!), until it reaches the point where
> > anyone can pick up a current binding and re-format it into yaml for
> > validation.
> 
> I did state earlier that I think this tool has uses, but on it's own
> and only to change from dts to yaml source files, I don't see it.
> Let's start with validation and define the schema for that and tools
> for that. If that involves dts to yaml in the flow, I don't really
> care.
> 
> Or if it is type checking that Pantelis keeps mentioning, then let's
> discuss that. Those are different problems.

I'll let Pantelis chime in more if he cares to.

-- 
Tom

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2017-07-28 11:23 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-27 16:49 [RFC] Introducing yamldt, a yaml to dtb compiler Pantelis Antoniou
2017-07-27 18:09 ` Rob Herring
2017-07-27 18:58   ` Pantelis Antoniou
2017-07-27 20:22     ` Frank Rowand
     [not found]       ` <597A4B80.7000106-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-07-27 21:46         ` Pantelis Antoniou
2017-07-27 23:00           ` Rob Herring
     [not found]             ` <CAL_Jsq+NBEXyOmRx3Ar0OTpyaLeT0hEKw45R0PrVEdmOcd9czw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-07-28  0:51               ` Tom Rini
2017-07-28  2:12                 ` Rob Herring
     [not found]                   ` <CAL_Jsq+eJNG66D22bNButg6=jj9WQ7Nw4PpxLsPBmGxN9KBnaw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-07-28 11:23                     ` Tom Rini [this message]
2017-07-28 12:23                     ` Pantelis Antoniou
2017-07-28 15:07                       ` Rob Herring
     [not found]                         ` <CAL_JsqLRDy_uG1eeNsjbhs29L5DF-4z2Oa_npGrYVgoMiR=YpQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-07-28 16:11                           ` Pantelis Antoniou
2017-07-28 21:16                             ` Rob Herring
2017-07-31 13:11                           ` David Gibson
     [not found]                             ` <20170731131118.GJ2652-K0bRW+63XPQe6aEkudXLsA@public.gmane.org>
2017-07-31 17:15                               ` Rob Herring
     [not found]                                 ` <CAL_Jsq+HjOpaLcVJzS-mskzHLTS+J=WHdqCVmpc_qJ7da2faHw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-08-02 14:30                                   ` David Gibson
     [not found]                                     ` <20170802143025.GD394-K0bRW+63XPQe6aEkudXLsA@public.gmane.org>
2017-08-03 22:53                                       ` Rob Herring
2017-07-31  5:53                     ` David Gibson
     [not found]                       ` <20170731055316.GG2652-K0bRW+63XPQe6aEkudXLsA@public.gmane.org>
2017-07-31  8:38                         ` Oliver
2017-08-02 15:09                 ` David Gibson
     [not found]                   ` <20170802150933.GG394-K0bRW+63XPQe6aEkudXLsA@public.gmane.org>
2017-08-02 22:04                     ` Grant Likely
     [not found]                       ` <CACxGe6um3TC3URKa8NWbbQT-gc=AV5jgTxbQ3pYnSp4Xmu_Mfg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-08-03  5:49                         ` David Gibson
     [not found]                           ` <20170803054914.GL394-K0bRW+63XPQe6aEkudXLsA@public.gmane.org>
2017-08-10 14:21                             ` Grant Likely
     [not found]                               ` <CACxGe6s3-1rK1NMm0B8fKP+XfxphcHj+pBU7=FxpSexXMWyeFQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-08-10 22:05                                 ` Pantelis Antoniou
2017-08-11 14:45                                 ` Pantelis Antoniou
2017-08-14 13:41                                 ` David Gibson
     [not found]                                   ` <20170814134150.GL3452-K0bRW+63XPQe6aEkudXLsA@public.gmane.org>
2017-10-22 18:48                                     ` Grant Likely
2017-07-28 11:26               ` Pantelis Antoniou
2017-07-31  6:52                 ` David Gibson
2017-07-27 23:13           ` Frank Rowand
2017-08-03  6:13           ` David Gibson
2017-07-28  1:00         ` Tom Rini
2017-07-31  5:40 ` David Gibson
     [not found]   ` <20170731054010.GF2652-K0bRW+63XPQe6aEkudXLsA@public.gmane.org>
2017-07-31 20:36     ` Pantelis Antoniou
2017-08-02 14:53       ` David Gibson
     [not found]         ` <20170802145312.GF394-K0bRW+63XPQe6aEkudXLsA@public.gmane.org>
2017-08-02 15:17           ` Pantelis Antoniou
2017-08-02 16:11             ` David Gibson
     [not found]               ` <20170802161113.GH394-K0bRW+63XPQe6aEkudXLsA@public.gmane.org>
2017-08-02 17:05                 ` Pantelis Antoniou

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=20170728112314.GJ26163@bill-the-cat \
    --to=trini-owpks81ov/fwk0htik3j/w@public.gmane.org \
    --cc=david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org \
    --cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=fcooper-l0cyMroinI0@public.gmane.org \
    --cc=frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org \
    --cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
    --cc=marex-ynQEQJNshbs@public.gmane.org \
    --cc=mporter-OWPKS81ov/FWk0Htik3J/w@public.gmane.org \
    --cc=pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org \
    --cc=philip.j.elwell-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=sjg-F7+t8E8rja9g9hUCZPvPmw@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).