mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: basic devicetree support
Date: Wed, 24 Aug 2011 22:46:00 +0200	[thread overview]
Message-ID: <1314218763-31058-1-git-send-email-s.hauer@pengutronix.de> (raw)

The following adds basic devicetree support to barebox. Right
now we can't do much with the devicetree, but enough to boot
an ARM board.

If devicetree support is enabled, a binary blob can be handled
as follows:

# parse a binary blob and store it internally
oftree -p /env/oftree
# dump it
oftree -d
# or
oftree -d /env/someothertree

If the a tree is stored with oftree -p, booting the kernel
will result in a devicetree boot, otherwise the traditional
ATAG mechanism is used.
So far only the command line in the devicetree is updated
with the barebox bootargs variable, no other manipulation
is supported.

I did some more experiments what else we can do with the devicetree.
If you are interested, try this branch:

git://git.pengutronix.de/git/barebox.git oftree

It is based on an earlier version of the posted patches. It can
do some interesting things, like for example probe devices from
the devicetree or connect the devices from the devicetree with
the platform devices from barebox so that the devicetree node
is printed with devinfo. It looks promising, but still needs
some work, so I decided to first add only basic support to at
least be able to boot the kernel with the devicetree.

Sascha

Sascha Hauer (3):
      initial libfdt support
      initial oftree command support
      ARM Linux: Add device tree support

 arch/arm/lib/armlinux.c   |   15 +-
 commands/Kconfig          |    6 +
 commands/Makefile         |    1 +
 commands/oftree.c         |  352 +++++++++++++
 include/fdt.h             |   60 +++
 include/libfdt.h          | 1235 +++++++++++++++++++++++++++++++++++++++++++++
 include/libfdt_env.h      |   23 +
 include/of.h              |    6 +
 lib/Kconfig               |    5 +
 lib/Makefile              |    1 +
 lib/fdt/Makefile          |    2 +
 lib/fdt/TODO              |    3 +
 lib/fdt/fdt.c             |  222 ++++++++
 lib/fdt/fdt_ro.c          |  574 +++++++++++++++++++++
 lib/fdt/fdt_rw.c          |  465 +++++++++++++++++
 lib/fdt/fdt_strerror.c    |   96 ++++
 lib/fdt/fdt_sw.c          |  256 ++++++++++
 lib/fdt/fdt_wip.c         |  118 +++++
 lib/fdt/libfdt_internal.h |   95 ++++
 19 files changed, 3532 insertions(+), 3 deletions(-)
 create mode 100644 commands/oftree.c
 create mode 100644 include/fdt.h
 create mode 100644 include/libfdt.h
 create mode 100644 include/libfdt_env.h
 create mode 100644 include/of.h
 create mode 100644 lib/fdt/Makefile
 create mode 100644 lib/fdt/TODO
 create mode 100644 lib/fdt/fdt.c
 create mode 100644 lib/fdt/fdt_ro.c
 create mode 100644 lib/fdt/fdt_rw.c
 create mode 100644 lib/fdt/fdt_strerror.c
 create mode 100644 lib/fdt/fdt_sw.c
 create mode 100644 lib/fdt/fdt_wip.c
 create mode 100644 lib/fdt/libfdt_internal.h

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

             reply	other threads:[~2011-08-24 20:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-24 20:46 Sascha Hauer [this message]
2011-08-24 20:46 ` [PATCH 1/3] initial libfdt support Sascha Hauer
2011-08-24 20:46 ` [PATCH 2/3] initial oftree command support Sascha Hauer
2011-08-24 20:46 ` [PATCH 3/3] ARM Linux: Add device tree support Sascha Hauer

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=1314218763-31058-1-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --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