mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* basic devicetree support
@ 2011-08-24 20:46 Sascha Hauer
  2011-08-24 20:46 ` [PATCH 1/3] initial libfdt support Sascha Hauer
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Sascha Hauer @ 2011-08-24 20:46 UTC (permalink / raw)
  To: barebox

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-08-24 20:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-24 20:46 basic devicetree support Sascha Hauer
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox