Gerald Van Baren c71b64f361 libfdt: Add helper function to create a trivial, empty tree
The libfdt read/write functions are now usable enough that it's become a
moderately common pattern to use them to build and manipulate a device
tree from scratch.  For example, we do so ourself in our rw_tree1 testcase,
and qemu is starting to use this model when building device trees for some
targets such as e500.

However, the read/write functions require some sort of valid tree to begin
with, so this necessitates either having a trivial canned dtb to begin with
or, more commonly, creating an empty tree using the serial-write functions
first.

This patch adds a helper function which uses the serial-write functions to
create a trivial, empty but complete and valid tree in a supplied buffer,
ready for manipulation with the read/write functions.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>

From git://git.jdl.com/software/dtc.git patch hash be6026838 with
adaptations to include/libfdt.h and lib/libfdt/Makefile for the U-Boot
environment.

Signed-off-by: Gerald Van Baren <vanbaren@cideas.com>
2012-10-15 22:24:36 -04:00
..
2012-09-01 16:21:53 +02:00
2012-08-09 23:42:20 +02:00
2011-08-01 15:19:40 +02:00
2012-05-15 08:31:37 +02:00
2012-05-15 08:31:30 +02:00
2011-08-04 23:34:02 +02:00
2011-08-01 15:19:40 +02:00
2012-03-18 20:10:02 +01:00
2012-10-01 10:02:14 -07:00
2012-03-27 22:05:28 +02:00
2012-09-29 07:26:08 -07:00
2012-09-01 16:21:50 +02:00
2011-10-22 01:22:21 +02:00
2010-09-19 19:29:47 +02:00
2011-08-04 23:34:02 +02:00
2011-08-01 15:19:40 +02:00
2011-05-19 22:22:44 +02:00
2012-05-15 08:31:34 +02:00
2012-10-08 11:12:08 -07:00
2012-05-25 09:15:10 +02:00
2012-09-26 12:36:32 -05:00
2012-03-12 11:06:48 -04:00
2012-03-30 22:46:00 +02:00
2012-03-26 23:09:23 +02:00
2012-05-15 08:31:34 +02:00
2011-10-05 22:03:11 +02:00
2011-03-27 19:19:54 +02:00
2012-05-20 08:32:32 +02:00
2011-08-04 23:34:02 +02:00
2012-10-04 16:46:18 +02:00
2011-08-04 23:34:02 +02:00
2011-08-01 15:19:40 +02:00
2012-10-01 10:02:14 -07:00
2011-06-22 20:00:51 +02:00
2012-05-15 08:31:40 +02:00
2011-12-07 08:45:51 +01:00
2012-05-15 08:31:37 +02:00
2011-04-29 07:32:48 -05:00
2011-09-30 22:00:55 +02:00
2012-05-15 08:31:25 +02:00
2011-08-01 15:19:40 +02:00
2011-08-01 15:19:40 +02:00