aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSimon Glass2017-06-18 22:08:57 -0600
committerSimon Glass2017-07-11 10:08:20 -0600
commit14f5acfc5b0c133cbe5e7f5bffc0519f994abbfa (patch)
treea05c5c80df0d7c7d650411cb896cc09d6d0d215c /tools
parent418355cbaa4dfe1a202538c1584f0b7b147f59c0 (diff)
dtoc: Add a comment at the top
Add a description of the dtoc tool at the top of the file. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/dtoc/dtoc.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/dtoc/dtoc.py b/tools/dtoc/dtoc.py
index 056f5157c95..79779477d9e 100755
--- a/tools/dtoc/dtoc.py
+++ b/tools/dtoc/dtoc.py
@@ -6,6 +6,26 @@
# SPDX-License-Identifier: GPL-2.0+
#
+"""Device tree to C tool
+
+This tool converts a device tree binary file (.dtb) into two C files. The
+indent is to allow a C program to access data from the device tree without
+having to link against libfdt. By putting the data from the device tree into
+C structures, normal C code can be used. This helps to reduce the size of the
+compiled program.
+
+Dtoc produces two output files:
+
+ dt-structs.h - contains struct definitions
+ dt-platdata.c - contains data from the device tree using the struct
+ definitions, as well as U-Boot driver definitions.
+
+This tool is used in U-Boot to provide device tree data to SPL without
+increasing the code size of SPL. This supports the CONFIG_SPL_OF_PLATDATA
+options. For more information about the use of this options and tool please
+see doc/driver-model/of-plat.txt
+"""
+
import copy
from optparse import OptionError, OptionParser
import os