devicetree-compiler.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tom Rini <trini-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
To: Frank Rowand <frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Pantelis Antoniou
	<pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>,
	Rob Herring <robherring2-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: Thu, 27 Jul 2017 21:00:42 -0400	[thread overview]
Message-ID: <20170728010042.GG26163@bill-the-cat> (raw)
In-Reply-To: <597A4B80.7000106-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

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

On Thu, Jul 27, 2017 at 01:22:24PM -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.
[snip]
> >>> For more take a look here.
> >>>
> >>> https://github.com/pantoniou/yamldt
> >>
> >> Looking at the example, I find the syntax harder to follow. Parsing
> >> what are node names vs labels is one. Relying on indentation for tree
> >> hierarchy is another.
> 
> I agree with Rob.
> 
> And I don't like the YAML feature that the same information can be
> expressed in very different syntax (as shown in the example immediately
> below in the email I am replying to), which can result in two functionally
> equivalent YAML source files looking very different - that is a big usability
> issue to me.  But now I'm getting to a much lower level of detail than I
> want to - I want to stay mostly at the architectural level for my issues.

I'd like to argue this from the opposing view point for a moment.
/*
 * This is a valid comment.
 */
// And so is this.

But you're only going to find one in the kernel, and that's fine.  We
can easily say that 'foo: { bar: true }' is what an upstream repository
of dtb source files will accept.  And without googling, I'm going to say
I'm pretty sure since they're equivalent, $FANCYEDITORS already have a
way to spit out a file in whatever format is preferred.

And just like your engineer that picks up the kernel and
// comments something like this, because that's what they know
they can write
it:
  like: this

for their product that they never intend to submit upstream, just like
they don't intend to submit the kernel changes they made upstream
either.  But the problem that needed solving was solved.
> 
> 
> > This is really debatable. You can use curly braces if you don't like the
> > indentation.
> > 
> > I.e.
> > 
> > foo:
> >   bar: true
> > 
> > Can be written as
> > foo: { bar: true }
> > 
> > YAML is a JSON superset which uses the curly braces as a map separator.
> > 
> > And frankly there are about x1000 more people aware of YAML syntax than
> > DTS syntax.
> > 
> >> Does C preprocessing of the YAML files work? I'm surprised if it does.
> >>
> > 
> > I think you should check the code out and see for yourself.
> > 
> > The complete set of C preprocessing of DTS is available, and works
> > perfectly AFAIKT.
> > 
> >>>
> >>> I am eagerly awaiting for your comments.
> >>
> >> I could see some uses here to extract data from dts files more easily.
> >> For example, to extract all compatible strings for some set of dts
> >> files. I did this by hacking dtc to dump them. Or as a starting point
> >> to create YAML based DT binding schema. I wonder how Grant is coming
> >> along with that.
> 
> But the proposal is not to process DTS format files with this new tool.
> The proposal is to convert device tree source files to a YAML format
> and have the new tool compile only YAML format source files.
> 
> Having a tool to convert DTS format to a YAML format within a validation
> toll is something that has been proposed several times.  If I recall
> correctly, Grant had a prototype that did that step in a handful of
> lines.  (I'm not sure how complete that conversion process was in
> his prototype form.)

To emphasize what I said in another email, but wouldn't it be nice if
instead of "convert DTS to YAML, run validation" it was always just
"validate your DTS as part of creating your DTB, every time" ?

-- 
Tom

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

  parent reply	other threads:[~2017-07-28  1:00 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
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 [this message]
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=20170728010042.GG26163@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).