All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frank Rowand <frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Franck Jullien <franck.jullien-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Franck Jullien
	<franck.jullien-EduPiq9onwdphFt5fpzH3laPQRlvutdw@public.gmane.org>,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	jose.abreu-HKixBCOQz3hWk0Htik3J/w@public.gmane.org,
	Pantelis Antoniou
	<panto-wVdstyuyKrO8r51toPun2/C9HSW9iNxf@public.gmane.org>,
	Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
Subject: Re: [PATCH] drivers/of: add option to load a default Device Tree
Date: Thu, 30 Jun 2016 17:57:36 -0700	[thread overview]
Message-ID: <5775C000.8040100@gmail.com> (raw)
In-Reply-To: <CAJfOKByav-r9=4YEJrzuCfeAyTEtr4+=a_0d08gSLBSRrPPiEA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On 06/30/16 13:44, Franck Jullien wrote:
> 2016-06-30 19:45 GMT+02:00 Frank Rowand <frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:
>> Hi Franck,
>>
>> (This could be confusing, with Franck and Frank -- feel free to
>> address me as rowand in this thread if it is less confusing.)
>>
>> On 06/22/16 08:05, Franck Jullien wrote:
>>> Even if a platform doesn't use a device tree during its
>>> boot process it can be useful to enable CONFIG_OF and get
>>> an empty device tree.
>>>
>>> Then, devices can use device tree overlays to populate this
>>> default tree.
>>>
>>> Signed-off-by: Franck Jullien <franck.jullien-EduPiq9onwdphFt5fpzH3laPQRlvutdw@public.gmane.org>
>>> ---
>>>  drivers/of/Kconfig     |  9 +++++++++
>>>  drivers/of/Makefile    |  3 +++
>>>  drivers/of/base.c      | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
>>>  drivers/of/default.dts |  4 ++++
>>>  drivers/of/unittest.c  | 33 +++++----------------------------
>>>  include/linux/of.h     |  2 ++
>>>  6 files changed, 73 insertions(+), 28 deletions(-)
>>>  create mode 100644 drivers/of/default.dts
>>
>> < snip >
>>
>> For context, in a later reply, you mention that this is for x86_64.
>>
>> My current inclination is to prefer not to solve the problem this way.
>> I was going to ask why you didn't just add the compiled default.dts
>> to the kernel as an appended device tree blob, until I found out
>> this was for x86_64.
>>
>> Can you add unflatten_devicetree() to x86_64, then just use the
>> appended device tree blob method?
>>
> 
> You're saying I should implement the ability for x86_64 to detect and
> load a devicetree that is appended to the binary image like ARM does [1] ?

Yes, that is what I was referring to.


> Would you keep CONFIG_DEFAULT_DTB at all ? Or appending an
> empty (or not) devicetree would be after the binary image is built ?
> 
> I like the idea. I think I could remove CONFIG_DEFAULT_DTB and
> let the user append a blob to the image.

There should be a config option to add the Makefile entry for the
default.dts so that default.dtb is created.

And yes, the .dtb would be appended to the kernel image after the
kernel image was built.

One description of this is at:

http://community.cadence.com/cadence_blogs_8/b/sd/archive/2013/10/09/combining-the-linux-device-tree-and-kernel-image-for-arm


> 
> By the way, why having an empty devicetree built-in is not your
> preferred choice ?

The issue is not whether the .dtb is build into the kernel image or
appended to the kernel image.  The issue is whether the normal
unflatten_devicetree()  path is used to load the .dtb or whether
an additional method of creating the root device tree was added.


> Franck.
> 
> [1] http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e2a6a3aafa9862c4a4b59f2a59b8f923d64a680e
> .
> 

--
To unsubscribe from this list: send the line "unsubscribe devicetree" 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:[~2016-07-01  0:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-22 15:05 [PATCH] drivers/of: add option to load a default Device Tree Franck Jullien
     [not found] ` <1466607954-2821-1-git-send-email-franck.jullien-EduPiq9onwdphFt5fpzH3laPQRlvutdw@public.gmane.org>
2016-06-23 18:27   ` Frank Rowand
     [not found]     ` <576C2A22.2020103-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-06-24  8:15       ` Franck Jullien
     [not found]         ` <86d0de95-9b74-81ca-bcf4-e6e41b95ea9a-EduPiq9onwdphFt5fpzH3laPQRlvutdw@public.gmane.org>
2016-06-30 10:53           ` Jose Abreu
     [not found]             ` <5774FA17.7020501-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
2016-06-30 20:57               ` Franck Jullien
2016-06-30 17:45   ` Frank Rowand
     [not found]     ` <57755ACF.1090204-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-06-30 20:44       ` Franck Jullien
     [not found]         ` <CAJfOKByav-r9=4YEJrzuCfeAyTEtr4+=a_0d08gSLBSRrPPiEA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-30 20:46           ` Pantelis Antoniou
2016-07-01  0:57           ` Frank Rowand [this message]

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=5775C000.8040100@gmail.com \
    --to=frowand.list-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=franck.jullien-EduPiq9onwdphFt5fpzH3laPQRlvutdw@public.gmane.org \
    --cc=franck.jullien-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=jose.abreu-HKixBCOQz3hWk0Htik3J/w@public.gmane.org \
    --cc=lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org \
    --cc=panto-wVdstyuyKrO8r51toPun2/C9HSW9iNxf@public.gmane.org \
    --cc=robh-DgEjT+Ai2ygdnm+yROfE0A@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.