mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] remove libfdt
@ 2013-02-26 20:18 Sascha Hauer
  2013-02-26 20:18 ` [PATCH 01/29] of: unflatten: allocate root node explicitly Sascha Hauer
                   ` (28 more replies)
  0 siblings, 29 replies; 33+ messages in thread
From: Sascha Hauer @ 2013-02-26 20:18 UTC (permalink / raw)
  To: barebox

In the beginning we only had libfdt to handle devicetrees. With
devicetree probing support we gained two parallel universes for
handling devicetrees. This series cleans this up by switching to
the internal devicetree completely and removing libfdt.

The dtb format is now only used while flattening/unflattening
the tree. All tree manipulation is done on the internal tree
format only. This introduces some time overhead (~2ms on a i.MX51)
needed for (un)flattening the tree, but actually manipulating
the tree is a factor of about 50 faster compared to libfdt.
This means the overhead can become more than compensated once
we start manipulating the tree in more places.

The overall code and binary size becomes a bit smaller with
this due to less duplicated code.

Sascha

The following changes since commit 8c82b1b2021591a8c3537958c7fa60816c584d8a:

  OMAP4 USB BOOT: remove double line endings (2013-02-25 09:18:03 +0100)

are available in the git repository at:

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

for you to fetch changes up to 417227b61e2331fa4285aaac42ee22f5db84cbc1:

  of_property command: Fix crash with empty property value (2013-02-26 20:42:46 +0100)

----------------------------------------------------------------
Sascha Hauer (29):
      of: unflatten: allocate root node explicitly
      of: export of_find_child
      of: removed unused variables
      of: Let of_find_node_by_path iterate over tree
      of: remove allnodes list
      ARM bootm: Use of_get_fixed_tree
      of: Add of_set_property and of_create_node
      of_node command: use of_create_node
      of: Add root node argument to of_find_node_by_path
      of: Add missing prototype for of_device_is_compatible
      of: let of_unflatten_dtb return the unflattened tree
      of: make unflatten independent of libfdt
      of: make flatten independent of libfdt
      of/fdt: use optimized endianess conversion
      oftree command: Use of_print_nodes
      of: move OFTREE Kconfig option to drivers/of/
      of: make OFDEVICE a user selectable option
      oftree command: retire CMD_OFTREE_PROBE Kconfig option
      of: move oftree Kconfig to the top of the drivers menu
      of: Pass barebox internal format devicetree to of_get_fixed_tree
      bootm: Use of_print_nodes instead of fdt_print
      of: move flat devicetree functions to separate file
      of: Add of property write functions for u32
      of: make value of property in of_new_property optional
      of: Add missing prototype for size/address counting functions
      of: fixup unflattened devicetree
      of: remove unused libfdt
      of_* commands: print usage when insufficient arguments are given
      of_property command: Fix crash with empty property value

 arch/arm/boards/at91sam9m10ihd/hw_version.c |    1 -
 arch/arm/boards/at91sam9x5ek/hw_version.c   |   32 +-
 arch/arm/boards/sama5d3xek/hw_version.c     |    1 -
 arch/arm/lib/bootm.c                        |   13 +-
 arch/ppc/mach-mpc5xxx/cpu.c                 |   26 +-
 commands/Kconfig                            |   10 -
 commands/bootm.c                            |   16 +-
 commands/of_node.c                          |   33 +-
 commands/of_property.c                      |   24 +-
 commands/oftree.c                           |   42 +-
 common/memory.c                             |   49 +-
 common/oftree.c                             |  223 +----
 drivers/Kconfig                             |    2 +-
 drivers/Makefile                            |    2 +-
 drivers/of/Kconfig                          |    6 +-
 drivers/of/Makefile                         |    2 +-
 drivers/of/base.c                           |  319 ++++---
 drivers/of/dtb.c                            |  400 +++++++++
 include/fdt.h                               |   13 +
 include/libfdt.h                            | 1235 ---------------------------
 include/libfdt_env.h                        |   22 -
 include/of.h                                |   68 +-
 lib/Kconfig                                 |    7 -
 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 ---
 33 files changed, 770 insertions(+), 3608 deletions(-)
 create mode 100644 drivers/of/dtb.c
 delete mode 100644 include/libfdt.h
 delete mode 100644 include/libfdt_env.h
 delete mode 100644 lib/fdt/Makefile
 delete mode 100644 lib/fdt/TODO
 delete mode 100644 lib/fdt/fdt.c
 delete mode 100644 lib/fdt/fdt_ro.c
 delete mode 100644 lib/fdt/fdt_rw.c
 delete mode 100644 lib/fdt/fdt_strerror.c
 delete mode 100644 lib/fdt/fdt_sw.c
 delete mode 100644 lib/fdt/fdt_wip.c
 delete 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] 33+ messages in thread

end of thread, other threads:[~2013-02-27 19:51 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-26 20:18 [PATCH] remove libfdt Sascha Hauer
2013-02-26 20:18 ` [PATCH 01/29] of: unflatten: allocate root node explicitly Sascha Hauer
2013-02-26 20:18 ` [PATCH 02/29] of: export of_find_child Sascha Hauer
2013-02-26 20:18 ` [PATCH 03/29] of: removed unused variables Sascha Hauer
2013-02-26 20:18 ` [PATCH 04/29] of: Let of_find_node_by_path iterate over tree Sascha Hauer
2013-02-26 20:18 ` [PATCH 05/29] of: remove allnodes list Sascha Hauer
2013-02-26 20:18 ` [PATCH 06/29] ARM bootm: Use of_get_fixed_tree Sascha Hauer
2013-02-26 20:18 ` [PATCH 07/29] of: Add of_set_property and of_create_node Sascha Hauer
2013-02-26 20:18 ` [PATCH 08/29] of_node command: use of_create_node Sascha Hauer
2013-02-26 20:18 ` [PATCH 09/29] of: Add root node argument to of_find_node_by_path Sascha Hauer
2013-02-26 20:18 ` [PATCH 10/29] of: Add missing prototype for of_device_is_compatible Sascha Hauer
2013-02-26 20:18 ` [PATCH 11/29] of: let of_unflatten_dtb return the unflattened tree Sascha Hauer
2013-02-26 20:18 ` [PATCH 12/29] of: make unflatten independent of libfdt Sascha Hauer
2013-02-26 20:18 ` [PATCH 13/29] of: make flatten " Sascha Hauer
2013-02-26 21:05   ` Alexander Aring
2013-02-27  8:40     ` Sascha Hauer
2013-02-27 19:52       ` Alexander Aring
2013-02-26 20:18 ` [PATCH 14/29] of/fdt: use optimized endianess conversion Sascha Hauer
2013-02-26 20:18 ` [PATCH 15/29] oftree command: Use of_print_nodes Sascha Hauer
2013-02-26 20:18 ` [PATCH 16/29] of: move OFTREE Kconfig option to drivers/of/ Sascha Hauer
2013-02-26 20:18 ` [PATCH 17/29] of: make OFDEVICE a user selectable option Sascha Hauer
2013-02-26 20:18 ` [PATCH 18/29] oftree command: retire CMD_OFTREE_PROBE Kconfig option Sascha Hauer
2013-02-26 20:18 ` [PATCH 19/29] of: move oftree Kconfig to the top of the drivers menu Sascha Hauer
2013-02-26 20:18 ` [PATCH 20/29] of: Pass barebox internal format devicetree to of_get_fixed_tree Sascha Hauer
2013-02-26 20:18 ` [PATCH 21/29] bootm: Use of_print_nodes instead of fdt_print Sascha Hauer
2013-02-26 20:18 ` [PATCH 22/29] of: move flat devicetree functions to separate file Sascha Hauer
2013-02-26 20:18 ` [PATCH 23/29] of: Add of property write functions for u32 Sascha Hauer
2013-02-26 20:18 ` [PATCH 24/29] of: make value of property in of_new_property optional Sascha Hauer
2013-02-26 20:18 ` [PATCH 25/29] of: Add missing prototype for size/address counting functions Sascha Hauer
2013-02-26 20:18 ` [PATCH 26/29] of: fixup unflattened devicetree Sascha Hauer
2013-02-26 20:18 ` [PATCH 27/29] of: remove unused libfdt Sascha Hauer
2013-02-26 20:18 ` [PATCH 28/29] of_* commands: print usage when insufficient arguments are given Sascha Hauer
2013-02-26 20:18 ` [PATCH 29/29] of_property command: Fix crash with empty property value Sascha Hauer

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