<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/lib/libfdt/fdt_empty_tree.c, branch v2013.04</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>libfdt: Add helper function to create a trivial, empty tree</title>
<updated>2012-10-16T02:24:36+00:00</updated>
<author>
<name>Gerald Van Baren</name>
<email>gvb@unssw.com</email>
</author>
<published>2012-10-16T02:24:36+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c71b64f3617b5a4362c6e4e0aefdd66d6ac6affd'/>
<id>c71b64f3617b5a4362c6e4e0aefdd66d6ac6affd</id>
<content type='text'>
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 &lt;david@gibson.dropbear.id.au&gt;

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 &lt;vanbaren@cideas.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;david@gibson.dropbear.id.au&gt;

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 &lt;vanbaren@cideas.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
