Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/gpl2/dtc/dist Import dtc 1.5.1
details: https://anonhg.NetBSD.org/src/rev/d4974660b93a
branches: trunk
changeset: 967777:d4974660b93a
user: skrll <skrll%NetBSD.org@localhost>
date: Sun Dec 22 12:34:02 2019 +0000
description:
Import dtc 1.5.1
diffstat:
external/gpl2/dtc/dist/BSD-2-Clause | 32 +
external/gpl2/dtc/dist/Documentation/manual.txt | 99 +-
external/gpl2/dtc/dist/GPL | 41 +-
external/gpl2/dtc/dist/Makefile | 141 +-
external/gpl2/dtc/dist/Makefile.convert-dtsv0 | 1 +
external/gpl2/dtc/dist/Makefile.dtc | 5 +
external/gpl2/dtc/dist/Makefile.utils | 7 +
external/gpl2/dtc/dist/README | 75 +
external/gpl2/dtc/dist/README.license | 14 +-
external/gpl2/dtc/dist/checks.c | 1288 +++++++++-
external/gpl2/dtc/dist/convert-dtsv0-lexer.l | 18 +-
external/gpl2/dtc/dist/dtc.c | 50 +-
external/gpl2/dtc/dist/dtdiff | 1 +
external/gpl2/dtc/dist/fdtget.c | 73 +-
external/gpl2/dtc/dist/fdtoverlay.c | 211 +
external/gpl2/dtc/dist/fstree.c | 24 +-
external/gpl2/dtc/dist/livetree.c | 128 +-
external/gpl2/dtc/dist/pylibfdt/.gitignore | 3 +
external/gpl2/dtc/dist/pylibfdt/Makefile.pylibfdt | 30 +
external/gpl2/dtc/dist/pylibfdt/libfdt.i | 1118 ++++++++
external/gpl2/dtc/dist/pylibfdt/setup.py | 45 +
external/gpl2/dtc/dist/scripts/kup-dtc | 1 +
external/gpl2/dtc/dist/scripts/setlocalversion | 1 +
external/gpl2/dtc/dist/srcpos.h | 38 +-
external/gpl2/dtc/dist/tests/.gitignore | 12 +
external/gpl2/dtc/dist/tests/Makefile.tests | 51 +-
external/gpl2/dtc/dist/tests/add_subnode_with_nops.c | 17 +-
external/gpl2/dtc/dist/tests/addr_size_cells.c | 24 +-
external/gpl2/dtc/dist/tests/addr_size_cells2.c | 51 +
external/gpl2/dtc/dist/tests/addresses.dts | 25 +
external/gpl2/dtc/dist/tests/appendprop1.c | 17 +-
external/gpl2/dtc/dist/tests/appendprop2.c | 17 +-
external/gpl2/dtc/dist/tests/appendprop_addrrange.c | 97 +
external/gpl2/dtc/dist/tests/asm_tree_dump.c | 17 +-
external/gpl2/dtc/dist/tests/bad-chosen.dts | 10 +
external/gpl2/dtc/dist/tests/bad-gpio.dts | 13 +
external/gpl2/dtc/dist/tests/bad-graph.dts | 24 +
external/gpl2/dtc/dist/tests/bad-interrupt-cells.dts | 12 +
external/gpl2/dtc/dist/tests/bad-phandle-cells.dts | 11 +
external/gpl2/dtc/dist/tests/bad-string-props.dts | 7 +
external/gpl2/dtc/dist/tests/boot-cpuid.c | 17 +-
external/gpl2/dtc/dist/tests/char_literal.c | 17 +-
external/gpl2/dtc/dist/tests/check_full.c | 52 +
external/gpl2/dtc/dist/tests/check_header.c | 117 +
external/gpl2/dtc/dist/tests/check_path.c | 17 +-
external/gpl2/dtc/dist/tests/del_node.c | 17 +-
external/gpl2/dtc/dist/tests/del_property.c | 17 +-
external/gpl2/dtc/dist/tests/dtb_reverse.c | 17 +-
external/gpl2/dtc/dist/tests/dtbs_equal_ordered.c | 17 +-
external/gpl2/dtc/dist/tests/dtbs_equal_unordered.c | 53 +-
external/gpl2/dtc/dist/tests/dtc-checkfails.sh | 6 +-
external/gpl2/dtc/dist/tests/dtc-fails.sh | 2 +-
external/gpl2/dtc/dist/tests/dtc-fatal.sh | 2 +-
external/gpl2/dtc/dist/tests/dumptrees.c | 23 +-
external/gpl2/dtc/dist/tests/extra-terminating-null.c | 17 +-
external/gpl2/dtc/dist/tests/fdtdump-runtest.sh | 2 +-
external/gpl2/dtc/dist/tests/fdtget-runtest.sh | 2 +-
external/gpl2/dtc/dist/tests/fdtoverlay-runtest.sh | 40 +
external/gpl2/dtc/dist/tests/fdtput-runtest.sh | 4 +-
external/gpl2/dtc/dist/tests/find_property.c | 17 +-
external/gpl2/dtc/dist/tests/fs_tree1.c | 157 +
external/gpl2/dtc/dist/tests/get_alias.c | 17 +-
external/gpl2/dtc/dist/tests/get_mem_rsv.c | 17 +-
external/gpl2/dtc/dist/tests/get_name.c | 17 +-
external/gpl2/dtc/dist/tests/get_path.c | 20 +-
external/gpl2/dtc/dist/tests/get_phandle.c | 56 +-
external/gpl2/dtc/dist/tests/get_prop_offset.c | 45 +
external/gpl2/dtc/dist/tests/getprop.c | 17 +-
external/gpl2/dtc/dist/tests/incbin.c | 17 +-
external/gpl2/dtc/dist/tests/include7.dts | 1 +
external/gpl2/dtc/dist/tests/integer-expressions.c | 19 +-
external/gpl2/dtc/dist/tests/multilabel.dts | 5 +
external/gpl2/dtc/dist/tests/multilabel_merge.dts | 5 +
external/gpl2/dtc/dist/tests/node_check_compatible.c | 36 +-
external/gpl2/dtc/dist/tests/node_offset_by_compatible.c | 17 +-
external/gpl2/dtc/dist/tests/node_offset_by_phandle.c | 17 +-
external/gpl2/dtc/dist/tests/node_offset_by_prop_value.c | 17 +-
external/gpl2/dtc/dist/tests/nop_node.c | 17 +-
external/gpl2/dtc/dist/tests/nop_property.c | 17 +-
external/gpl2/dtc/dist/tests/nopulate.c | 17 +-
external/gpl2/dtc/dist/tests/notfound.c | 17 +-
external/gpl2/dtc/dist/tests/omit-no-ref.dts | 26 +
external/gpl2/dtc/dist/tests/open_pack.c | 17 +-
external/gpl2/dtc/dist/tests/overlay.c | 17 +-
external/gpl2/dtc/dist/tests/overlay_bad_fixup.c | 17 +-
external/gpl2/dtc/dist/tests/overlay_base.dts | 4 +
external/gpl2/dtc/dist/tests/overlay_overlay.dts | 106 +-
external/gpl2/dtc/dist/tests/overlay_overlay_bypath.dts | 48 +
external/gpl2/dtc/dist/tests/overlay_overlay_local_merge.dts | 29 +
external/gpl2/dtc/dist/tests/overlay_overlay_long_path.dts | 32 +
external/gpl2/dtc/dist/tests/overlay_overlay_manual_fixups.dts | 34 +-
external/gpl2/dtc/dist/tests/overlay_overlay_nosugar.dts | 86 +
external/gpl2/dtc/dist/tests/parent_offset.c | 17 +-
external/gpl2/dtc/dist/tests/path-references.c | 29 +-
external/gpl2/dtc/dist/tests/path-references.dts | 13 +
external/gpl2/dtc/dist/tests/path_offset.c | 17 +-
external/gpl2/dtc/dist/tests/path_offset_aliases.c | 17 +-
external/gpl2/dtc/dist/tests/pci-bridge-bad1.dts | 16 +
external/gpl2/dtc/dist/tests/pci-bridge-bad2.dts | 16 +
external/gpl2/dtc/dist/tests/pci-bridge-ok.dts | 25 +
external/gpl2/dtc/dist/tests/phandle_format.c | 17 +-
external/gpl2/dtc/dist/tests/property_iterate.c | 17 +-
external/gpl2/dtc/dist/tests/propname_escapes.c | 17 +-
external/gpl2/dtc/dist/tests/pylibfdt_tests.py | 589 ++++
external/gpl2/dtc/dist/tests/references.c | 36 +-
external/gpl2/dtc/dist/tests/references.dts | 5 +
external/gpl2/dtc/dist/tests/root_node.c | 17 +-
external/gpl2/dtc/dist/tests/run_tests.sh | 277 +-
external/gpl2/dtc/dist/tests/rw_oom.c | 85 +
external/gpl2/dtc/dist/tests/rw_tree1.c | 17 +-
external/gpl2/dtc/dist/tests/set_name.c | 17 +-
external/gpl2/dtc/dist/tests/setprop.c | 17 +-
external/gpl2/dtc/dist/tests/setprop_inplace.c | 17 +-
external/gpl2/dtc/dist/tests/sized_cells.c | 17 +-
external/gpl2/dtc/dist/tests/sourceoutput.dts | 2 +-
external/gpl2/dtc/dist/tests/stacked_overlay_addlabel.dts | 15 +
external/gpl2/dtc/dist/tests/stacked_overlay_bar.dts | 13 +
external/gpl2/dtc/dist/tests/stacked_overlay_base.dts | 6 +
external/gpl2/dtc/dist/tests/stacked_overlay_base_nolabel.dts | 6 +
external/gpl2/dtc/dist/tests/stacked_overlay_baz.dts | 13 +
external/gpl2/dtc/dist/tests/string_escapes.c | 17 +-
external/gpl2/dtc/dist/tests/stringlist.c | 26 +-
external/gpl2/dtc/dist/tests/subnode_iterate.c | 17 +-
external/gpl2/dtc/dist/tests/subnode_offset.c | 17 +-
external/gpl2/dtc/dist/tests/supernode_atdepth_offset.c | 17 +-
external/gpl2/dtc/dist/tests/sw_states.c | 129 +
external/gpl2/dtc/dist/tests/sw_tree1.c | 100 +-
external/gpl2/dtc/dist/tests/test_props.dts | 11 +
external/gpl2/dtc/dist/tests/test_tree1.dts | 1 +
external/gpl2/dtc/dist/tests/test_tree1_label_noderef.dts | 1 +
external/gpl2/dtc/dist/tests/testdata.h | 42 +-
external/gpl2/dtc/dist/tests/testutils.c | 197 +-
external/gpl2/dtc/dist/tests/testutils.sh | 63 +
external/gpl2/dtc/dist/tests/trees.S | 87 +-
external/gpl2/dtc/dist/tests/truncated_memrsv.c | 52 +
external/gpl2/dtc/dist/tests/truncated_property.c | 21 +-
external/gpl2/dtc/dist/tests/truncated_string.c | 70 +
external/gpl2/dtc/dist/tests/type-preservation.dt.yaml | 20 +
external/gpl2/dtc/dist/tests/type-preservation.dts | 28 +
external/gpl2/dtc/dist/tests/unit-addr-leading-0s.dts | 12 +
external/gpl2/dtc/dist/tests/unit-addr-leading-0x.dts | 12 +
external/gpl2/dtc/dist/tests/unit-addr-simple-bus-compatible.dts | 18 +
external/gpl2/dtc/dist/tests/unit-addr-simple-bus-reg-mismatch.dts | 18 +
external/gpl2/dtc/dist/tests/unit-addr-unique.dts | 14 +
external/gpl2/dtc/dist/tests/utilfdt_test.c | 17 +-
external/gpl2/dtc/dist/tests/value-labels.c | 17 +-
external/gpl2/dtc/dist/treesource.c | 287 +-
external/gpl2/dtc/dist/util.c | 103 +-
external/gpl2/dtc/dist/yamltree.c | 235 +
149 files changed, 6664 insertions(+), 1604 deletions(-)
diffs (truncated from 11295 to 300 lines):
diff -r e785241c3c32 -r d4974660b93a external/gpl2/dtc/dist/BSD-2-Clause
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl2/dtc/dist/BSD-2-Clause Sun Dec 22 12:34:02 2019 +0000
@@ -0,0 +1,32 @@
+Valid-License-Identifier: BSD-2-Clause
+SPDX-URL: https://spdx.org/licenses/BSD-2-Clause.html
+Usage-Guide:
+ To use the BSD 2-clause "Simplified" License put the following SPDX
+ tag/value pair into a comment according to the placement guidelines in
+ the licensing rules documentation:
+ SPDX-License-Identifier: BSD-2-Clause
+License-Text:
+
+Copyright (c) <year> <owner> . All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
diff -r e785241c3c32 -r d4974660b93a external/gpl2/dtc/dist/Documentation/manual.txt
--- a/external/gpl2/dtc/dist/Documentation/manual.txt Sun Dec 22 12:33:17 2019 +0000
+++ b/external/gpl2/dtc/dist/Documentation/manual.txt Sun Dec 22 12:34:02 2019 +0000
@@ -37,7 +37,7 @@
git://git.kernel.org/pub/scm/utils/dtc/dtc.git
https://git.kernel.org/pub/scm/utils/dtc/dtc.git
-The gitweb interface for the upstream respository is:
+The gitweb interface for the upstream repository is:
https://git.kernel.org/cgit/utils/dtc/dtc.git/
@@ -78,6 +78,9 @@
then simply be added to your Makefile. Additionally, the
assembly file exports some symbols that can be used.
+ - "yaml": DT encoded in YAML format. This representation is an
+ intermediate format used for validation tools.
+
3) Command Line
@@ -231,7 +234,7 @@
"childnode at address". It in turn has a string property
called "childprop".
- childnode@addresss {
+ childnode@address {
childprop = "hello\n";
};
@@ -250,7 +253,7 @@
before a node name, and are referenced using an ampersand: &label.
Absolute node path names are also allowed in node references.
-In this exmaple, a node is labled "mpic" and then referenced:
+In this example, a node is labeled "mpic" and then referenced:
mpic: interrupt-controller@40000 {
...
@@ -261,7 +264,7 @@
...
};
-And used in properties, lables may appear before or after any value:
+And used in properties, labels may appear before or after any value:
randomnode {
prop: string = data: "mystring\n" data_end: ;
@@ -415,7 +418,7 @@
among others, by kexec. If you are on an SMP system, this value
should match the content of the "reg" property of the CPU node in
the device-tree corresponding to the CPU calling the kernel entry
- point (see further chapters for more informations on the required
+ point (see further chapters for more information on the required
device-tree contents)
- size_dt_strings
@@ -581,7 +584,7 @@
This tree is almost a minimal tree. It pretty much contains the
minimal set of required nodes and properties to boot a linux kernel;
-that is, some basic model informations at the root, the CPUs, and the
+that is, some basic model information at the root, the CPUs, and the
physical memory layout. It also includes misc information passed
through /chosen, like in this example, the platform type (mandatory)
and the kernel command line arguments (optional).
@@ -674,4 +677,86 @@
The syntax of the fdtdump command line is:
- fdtdump <DTB-file-name>
+ fdtdump [options] <DTB-file-name>
+
+Where options are:
+ -d,--debug Dump debug information while decoding the file
+ -s,--scan Scan for an embedded fdt in given file
+
+3) fdtoverlay -- Flat Device Tree overlay applicator
+
+The fdtoverlay applies an arbitrary number of FDT overlays to a base FDT blob
+to a given output file.
+
+The syntax of the fdtoverlay command line is:
+
+ fdtoverlay -i <base-blob> -o <output-blob> <overlay-blob0> [<overlay-blob1> ...]
+
+Where options are:
+ -i, --input Input base DT blob
+ -o, --output Output DT blob
+ -v, --verbose Verbose message output
+
+4 ) fdtget -- Read properties from device tree
+
+This command can be used to obtain individual values from the device tree in a
+nicely formatted way. You can specify multiple nodes to display (when using -p)
+or multiple node/property pairs (when not using -p). For the latter, each
+property is displayed on its own line, with a space between each cell within
+the property.
+
+The syntax of the fdtget command is:
+
+ fdtget <options> <dt file> [<node> <property>]...
+ fdtget -p <options> <dt file> [<node> ]...
+
+where options are:
+
+ <type> s=string, i=int, u=unsigned, x=hex
+ Optional modifier prefix:
+ hh or b=byte, h=2 byte, l=4 byte (default)
+
+ Options: -[t:pld:hV]
+ -t, --type <arg> Type of data
+ -p, --properties List properties for each node
+ -l, --list List subnodes for each node
+ -d, --default <arg> Default value to display when the property is missing
+ -h, --help Print this help and exit
+ -V, --version Print version and exit
+
+If -t is not provided, fdtget will try to figure out the type, trying to detect
+strings, string lists and the size of each value in the property. This is
+similar to how fdtdump works, and uses the same heuristics.
+
+
+5 ) fdtput - Write properties to a device tree
+
+The syntax of the fdtput command is:
+
+ fdtput <options> <dt file> <node> <property> [<value>...]
+ fdtput -c <options> <dt file> [<node>...]
+ fdtput -r <options> <dt file> [<node>...]
+ fdtput -d <options> <dt file> <node> [<property>...]
+
+Options are:
+
+ <type> s=string, i=int, u=unsigned, x=hex
+ Optional modifier prefix:
+ hh or b=byte, h=2 byte, l=4 byte (default)
+
+ -c, --create Create nodes if they don't already exist
+ -r, --remove Delete nodes (and any subnodes) if they already exist
+ -d, --delete Delete properties if they already exist
+ -p, --auto-path Automatically create nodes as needed for the node path
+ -t, --type <arg> Type of data
+ -v, --verbose Display each value decoded from command line
+ -h, --help Print this help and exit
+ -V, --version Print version and exit
+
+The option determines which usage is selected and therefore the operation that
+is performed. The first usage adds or updates properties; the rest are used to
+create/delete nodes and delete properties.
+
+For the first usage, the command line arguments are joined together into a
+single value which is written to the property. The -t option is required so
+that fdtput knows how to decode its arguments.
diff -r e785241c3c32 -r d4974660b93a external/gpl2/dtc/dist/GPL
--- a/external/gpl2/dtc/dist/GPL Sun Dec 22 12:33:17 2019 +0000
+++ b/external/gpl2/dtc/dist/GPL Sun Dec 22 12:34:02 2019 +0000
@@ -1,12 +1,12 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
- Preamble
+ Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
@@ -15,7 +15,7 @@
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
+the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
@@ -55,8 +55,8 @@
The precise terms and conditions for copying, distribution and
modification follow.
-
- GNU GENERAL PUBLIC LICENSE
+
+ GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
@@ -110,7 +110,7 @@
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
-
+
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
@@ -168,7 +168,7 @@
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
-
+
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
@@ -225,7 +225,7 @@
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
-
+
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
@@ -255,7 +255,7 @@
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
- NO WARRANTY
+ NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
@@ -277,9 +277,9 @@
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
@@ -303,17 +303,16 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
- Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision version 69, Copyright (C) year name of author
Home |
Main Index |
Thread Index |
Old Index