mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Robert P. J. Day" <rpjday@crashcourse.ca>
To: "U-Boot Version 2 (barebox)" <barebox@lists.infradead.org>
Subject: device trees, dtc and beaglebone black
Date: Sat, 5 Jul 2014 10:45:25 -0400 (EDT)	[thread overview]
Message-ID: <alpine.LFD.2.11.1407051023580.17423@localhost> (raw)


  first in a series of questions as i try to puzzle out device trees
and the config options related to it -- first few questions will
undoubtedly be simple as i want to make absolutely sure i don't
misunderstand something basic that screws me up later. and i'll ask in
relation to a real-life example i'm interested in -- the beaglebone
black (BBB).

  first, i notice this page on device trees on the barebox wiki:

http://wiki.barebox.org/doku.php?id=user:devicetree

is it still reasonably up to date? seems like it has useful
information that isn't yet in the user manual.

  next, with the BBB, i realize there are two configs and builds that
must be done:

 $ make omap3530_beagle_xload_defconfig
 $ make omap3530_beagle_defconfig

the first is responsible for building the first-stage (MLO) loader for
the BBB, and it appears to have no device tree functionality whatever,
so it seems i can safely ignore that build, so i'll restrict myself to
the second configure and build for all future questions.

  in terms of building and linking a DTB directly into the barebox
executable, i can see the "System Type" selections:

  [*] link a DTB into the barebox image
    () DTB to build into the barebox image (NEW)

where i assume that if i want to link a DTB, i need to select the
appropriate .dts file, and i'd select "am335x-boneblack". so far, so
good, but here's the first puzzle.

  if i select to link a DTB, it seems obvious that i will need to
compile the .dts file with the "dtc" compiler, right? but that would
seem to be the *only* time i need access to the device tree compiler,
isn't it? and whether or not a device tree compiler is built is
controlled by CONFIG_DTC. you can see this in scripts/Makefile:

  subdir-$(CONFIG_DTC)            += dtc

but it seems that "dtc" is being compiled even when it's unneeded.

  if you look at drivers/of/Kconfig:

=====

config OFTREE
        select DTC
        bool

config OFTREE_MEM_GENERIC
        depends on OFTREE
        depends on PPC || ARM
        def_bool y

config DTC
        bool

config OFDEVICE
        select OFTREE
        select DTC
        bool "Enable probing of devices from the devicetree"

=====

it appears that DTC is explicitly selected by either of OFTREE or
OFDEVICE. but the simple selection of device tree support doesn't seem
to require building "dtc" unless you need to compile a device tree
yourself, does it? i tested this -- i selected not to have a builtin
DTB, but "dtc" was still compiled for me. any reason why? it doesn't
hurt, of course, but it seems unnecessary. or am i misreading
something?

  more questions shortly ...

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2014-07-05 14:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-05 14:45 Robert P. J. Day [this message]
2014-07-07  7:36 ` Sascha Hauer
2014-07-07 10:16   ` Robert P. J. Day

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=alpine.LFD.2.11.1407051023580.17423@localhost \
    --to=rpjday@crashcourse.ca \
    --cc=barebox@lists.infradead.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