1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 |
|
---|
7 | <!ENTITY dtc-download-http "https://kernel.org/pub/software/utils/dtc/dtc-&dtc-version;.tar.xz">
|
---|
8 | <!ENTITY dtc-md5sum "228576aceed3aa89f54283aa0f1eb820">
|
---|
9 | <!ENTITY dtc-size "164 KB">
|
---|
10 | <!ENTITY dtc-buildsize "14 MB">
|
---|
11 | <!ENTITY dtc-time "less than 0.1 SBU">
|
---|
12 | ]>
|
---|
13 |
|
---|
14 | <!-- Try to keep the indentation used in this file-->
|
---|
15 | <sect1 id="dtc" xreflabel="dtc-&dtc-version;">
|
---|
16 | <?dbhtml filename="dtc.html"?>
|
---|
17 |
|
---|
18 | <title>Dtc-&dtc-version;</title>
|
---|
19 |
|
---|
20 | <indexterm zone="dtc">
|
---|
21 | <primary sortas="a-dtc">dtc</primary>
|
---|
22 | </indexterm>
|
---|
23 |
|
---|
24 | <!--Required section-->
|
---|
25 | <sect2 role="package">
|
---|
26 | <title>Introduction to Dtc</title>
|
---|
27 |
|
---|
28 | <para>
|
---|
29 | The <application>dtc</application> package contains the Device Tree
|
---|
30 | Compiler for working with device tree source and binary files and also
|
---|
31 | libfdt, a utility library for reading and manipulating device trees
|
---|
32 | in the binary format.
|
---|
33 | </para>
|
---|
34 |
|
---|
35 | &lfs121_checked;
|
---|
36 |
|
---|
37 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
38 | <itemizedlist spacing="compact">
|
---|
39 | <listitem>
|
---|
40 | <para>
|
---|
41 | Download (HTTP): <ulink url="&dtc-download-http;"/>
|
---|
42 | </para>
|
---|
43 | </listitem>
|
---|
44 | <listitem>
|
---|
45 | <para>
|
---|
46 | Download MD5 sum: &dtc-md5sum;
|
---|
47 | </para>
|
---|
48 | </listitem>
|
---|
49 | <listitem>
|
---|
50 | <para>
|
---|
51 | Download size: &dtc-size;
|
---|
52 | </para>
|
---|
53 | </listitem>
|
---|
54 | <listitem>
|
---|
55 | <para>
|
---|
56 | Estimated disk space required: &dtc-buildsize;
|
---|
57 | </para>
|
---|
58 | </listitem>
|
---|
59 | <listitem>
|
---|
60 | <para>
|
---|
61 | Estimated build time: &dtc-time;
|
---|
62 | </para>
|
---|
63 | </listitem>
|
---|
64 | </itemizedlist>
|
---|
65 |
|
---|
66 | <bridgehead renderas="sect3">Dtc Dependencies</bridgehead>
|
---|
67 |
|
---|
68 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
69 | <para role="optional">
|
---|
70 | <xref linkend='libyaml'/>,
|
---|
71 | <xref linkend='setuptools_scm'/>,
|
---|
72 | <xref linkend='swig'/>, and
|
---|
73 | <xref linkend='texlive'/>
|
---|
74 | </para>
|
---|
75 | </sect2>
|
---|
76 |
|
---|
77 | <sect2 role="installation">
|
---|
78 | <title>Installation of Dtc</title>
|
---|
79 |
|
---|
80 | <para>
|
---|
81 | Install <application>dtc</application> by running the following
|
---|
82 | commands:
|
---|
83 | </para>
|
---|
84 |
|
---|
85 | <screen><userinput>mkdir build &&
|
---|
86 | cd build &&
|
---|
87 |
|
---|
88 | meson setup --prefix=/usr \
|
---|
89 | --buildtype=release \
|
---|
90 | -Dpython=disabled .. &&
|
---|
91 | ninja</userinput></screen>
|
---|
92 |
|
---|
93 | <para>
|
---|
94 | To test the results, issue: <command>meson test -v</command>.
|
---|
95 | <!-- https://github.com/dgibson/dtc/commit/32174a66efa4 -->
|
---|
96 | Two tests named <filename>cell-overflow.dts</filename> and
|
---|
97 | <filename>cell-overflow-results.dts</filename> are known to fail.
|
---|
98 | </para>
|
---|
99 |
|
---|
100 | <para>
|
---|
101 | Now, as the &root; user:
|
---|
102 | </para>
|
---|
103 |
|
---|
104 | <screen role="root"><userinput>ninja install</userinput></screen>
|
---|
105 |
|
---|
106 | <para>
|
---|
107 | Still as the &root; user, remove the useless static library:
|
---|
108 | </para>
|
---|
109 |
|
---|
110 | <screen role="root"><userinput>rm /usr/lib/libfdt.a</userinput></screen>
|
---|
111 |
|
---|
112 | <para>
|
---|
113 | If you have <xref linkend='texlive'/> installed, you can build the PDF
|
---|
114 | format of the documentation by issuing the following command:
|
---|
115 | </para>
|
---|
116 |
|
---|
117 | <screen remap="doc"><userinput>pushd ../Documentation
|
---|
118 | latexmk -bibtex --pdf dtc-paper &&
|
---|
119 | latexmk -bibtex --pdf dtc-paper -c
|
---|
120 | popd</userinput></screen>
|
---|
121 |
|
---|
122 | <para>
|
---|
123 | To install the documentation, as the &root; user issue the following
|
---|
124 | command:
|
---|
125 | </para>
|
---|
126 |
|
---|
127 | <screen role="root"><userinput>cp -R ../Documentation -T /usr/share/doc/dtc-&dtc-version;</userinput></screen>
|
---|
128 |
|
---|
129 | <para>
|
---|
130 | If you have installed both <xref linkend='setuptools_scm'/> and
|
---|
131 | <xref linkend='swig'/> and you wish to install the Python 3 binding
|
---|
132 | of this package, build the Python 3 module:
|
---|
133 | </para>
|
---|
134 |
|
---|
135 | <screen role="nodump"><userinput>sed -i '/use_scm_version/a "fallback_version": "1.7.0",' ../setup.py &&
|
---|
136 | &build-wheel-cmd; ..</userinput></screen>
|
---|
137 |
|
---|
138 | <para>
|
---|
139 | As the &root; user, install the Python 3 module:
|
---|
140 | </para>
|
---|
141 |
|
---|
142 | <screen role="nodump"><userinput>&install-wheel; libfdt</userinput></screen>
|
---|
143 | </sect2>
|
---|
144 |
|
---|
145 | <sect2 role="commands">
|
---|
146 | <title>Command Explanations</title>
|
---|
147 |
|
---|
148 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
149 | href="../../xincludes/meson-buildtype-release.xml"/>
|
---|
150 |
|
---|
151 | <para>
|
---|
152 | <parameter>-Dpython=disabled</parameter>: This switch prevents
|
---|
153 | building the Python 3 binding with the deprecated method
|
---|
154 | (running <command>setup.py</command> directly). We will build the
|
---|
155 | Python 3 binding with the <command>pip3 wheel</command> command
|
---|
156 | separately if wanted.
|
---|
157 | </para>
|
---|
158 |
|
---|
159 | <para>
|
---|
160 | <command>sed ... ../setup.py</command>: This command allows building
|
---|
161 | the Python 3 binding from a release tarball (instead of a Git
|
---|
162 | checkout).
|
---|
163 | </para>
|
---|
164 |
|
---|
165 | </sect2>
|
---|
166 |
|
---|
167 | <sect2 role="content">
|
---|
168 | <title>Contents</title>
|
---|
169 |
|
---|
170 | <segmentedlist>
|
---|
171 | <segtitle>Installed Programs</segtitle>
|
---|
172 | <segtitle>Installed Library</segtitle>
|
---|
173 | <segtitle>Installed Directory</segtitle>
|
---|
174 |
|
---|
175 | <seglistitem>
|
---|
176 | <seg>
|
---|
177 | convert-dtsv0, dtc, dtdiff, fdtdump, fdtget, fdtoverlay,
|
---|
178 | and fdtput
|
---|
179 | </seg>
|
---|
180 | <seg>
|
---|
181 | libfdt.so
|
---|
182 | </seg>
|
---|
183 | <seg>
|
---|
184 | /usr/lib/python&python3-majorver;/site-packages/libfdt-&dtc-version;.dist-info
|
---|
185 | </seg>
|
---|
186 | </seglistitem>
|
---|
187 | </segmentedlist>
|
---|
188 |
|
---|
189 | <variablelist>
|
---|
190 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
191 | <?dbfo list-presentation="list"?>
|
---|
192 | <?dbhtml list-presentation="table"?>
|
---|
193 |
|
---|
194 | <varlistentry id="convert-dtsv0">
|
---|
195 | <term><command>convert-dtsv0</command></term>
|
---|
196 | <listitem>
|
---|
197 | <para>
|
---|
198 | converts device tree v0 source to device tree v1
|
---|
199 | </para>
|
---|
200 | <indexterm zone="dtc convert-dtsv0">
|
---|
201 | <primary sortas="b-convert-dtsv0">convert-dtsv0</primary>
|
---|
202 | </indexterm>
|
---|
203 | </listitem>
|
---|
204 | </varlistentry>
|
---|
205 |
|
---|
206 | <varlistentry id="dtc-prog">
|
---|
207 | <term><command>dtc</command></term>
|
---|
208 | <listitem>
|
---|
209 | <para>
|
---|
210 | compiles device tree source (dts) to device tree binary blob
|
---|
211 | (dtb), or de-compiles dtb to dts
|
---|
212 | </para>
|
---|
213 | <indexterm zone="dtc dtc-prog">
|
---|
214 | <primary sortas="b-dtc">dtc</primary>
|
---|
215 | </indexterm>
|
---|
216 | </listitem>
|
---|
217 | </varlistentry>
|
---|
218 |
|
---|
219 | <varlistentry id="dtdiff">
|
---|
220 | <term><command>dtdiff</command></term>
|
---|
221 | <listitem>
|
---|
222 | <para>
|
---|
223 | compares two different device tree
|
---|
224 | </para>
|
---|
225 | <indexterm zone="dtc dtdiff">
|
---|
226 | <primary sortas="b-dtdiff">dtdiff</primary>
|
---|
227 | </indexterm>
|
---|
228 | </listitem>
|
---|
229 | </varlistentry>
|
---|
230 |
|
---|
231 | <varlistentry id="fdtdump">
|
---|
232 | <term><command>fdtdump</command></term>
|
---|
233 | <listitem>
|
---|
234 | <para>
|
---|
235 | prints a readable version of a flat device-tree file
|
---|
236 | </para>
|
---|
237 | <indexterm zone="dtc fdtdump">
|
---|
238 | <primary sortas="b-fdtdump">fdtdump</primary>
|
---|
239 | </indexterm>
|
---|
240 | </listitem>
|
---|
241 | </varlistentry>
|
---|
242 |
|
---|
243 | <varlistentry id="fdtget">
|
---|
244 | <term><command>fdtget</command></term>
|
---|
245 | <listitem>
|
---|
246 | <para>
|
---|
247 | reads values from device-tree
|
---|
248 | </para>
|
---|
249 | <indexterm zone="dtc fdtget">
|
---|
250 | <primary sortas="b-fdtget">fdtget</primary>
|
---|
251 | </indexterm>
|
---|
252 | </listitem>
|
---|
253 | </varlistentry>
|
---|
254 |
|
---|
255 | <varlistentry id="fdtoverlay">
|
---|
256 | <term><command>fdtoverlay</command></term>
|
---|
257 | <listitem>
|
---|
258 | <para>
|
---|
259 | applies a number of overlays to a base device tree blob
|
---|
260 | </para>
|
---|
261 | <indexterm zone="dtc fdtoverlay">
|
---|
262 | <primary sortas="b-fdtoverlay">fdtoverlay</primary>
|
---|
263 | </indexterm>
|
---|
264 | </listitem>
|
---|
265 | </varlistentry>
|
---|
266 |
|
---|
267 | <varlistentry id="fdtput">
|
---|
268 | <term><command>fdtput</command></term>
|
---|
269 | <listitem>
|
---|
270 | <para>
|
---|
271 | writes a property value to a device tree
|
---|
272 | </para>
|
---|
273 | <indexterm zone="dtc fdtput">
|
---|
274 | <primary sortas="b-fdtput">fdtput</primary>
|
---|
275 | </indexterm>
|
---|
276 | </listitem>
|
---|
277 | </varlistentry>
|
---|
278 |
|
---|
279 | <varlistentry id="libfdt">
|
---|
280 | <term><filename class="libraryfile">libfdt.so</filename></term>
|
---|
281 | <listitem>
|
---|
282 | <para>
|
---|
283 | is a utility library for reading and manipulating device trees
|
---|
284 | in the binary format
|
---|
285 | </para>
|
---|
286 | <indexterm zone="dtc libfdt">
|
---|
287 | <primary sortas="c-libfdt">libfdt.so</primary>
|
---|
288 | </indexterm>
|
---|
289 | </listitem>
|
---|
290 | </varlistentry>
|
---|
291 | </variablelist>
|
---|
292 | </sect2>
|
---|
293 | </sect1>
|
---|