basic devicetree support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox


[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux