[0d1a1f9] | 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 '/use_scm_version/i "fallback_version": "1.7.0",' \
|
---|
| 136 | -i ../setup.py &&
|
---|
| 137 |
|
---|
| 138 | &build-wheel-cmd; ..</userinput></screen>
|
---|
| 139 |
|
---|
| 140 | <para>
|
---|
| 141 | As the &root; user, install the Python 3 module:
|
---|
| 142 | </para>
|
---|
| 143 |
|
---|
| 144 | <screen role="nodump"><userinput>&install-wheel;</userinput></screen>
|
---|
| 145 | </sect2>
|
---|
| 146 |
|
---|
| 147 | <sect2 role="commands">
|
---|
| 148 | <title>Command Explanations</title>
|
---|
| 149 |
|
---|
| 150 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 151 | href="../../xincludes/meson-buildtype-release.xml"/>
|
---|
| 152 |
|
---|
| 153 | <para>
|
---|
| 154 | <parameter>-Dpython=disabled</parameter>: This switch prevents
|
---|
| 155 | building the Python 3 binding with the deprecated method
|
---|
| 156 | (running <command>setup.py</command> directly). We will build the
|
---|
| 157 | Python 3 binding with the <command>pip3 wheel</command> command
|
---|
| 158 | separately if wanted.
|
---|
| 159 | </para>
|
---|
| 160 |
|
---|
| 161 | <para>
|
---|
| 162 | <command>sed ... ../setup.py</command>: This command allows building
|
---|
| 163 | the Python 3 binding from a release tarball (instead of a Git
|
---|
| 164 | checkout).
|
---|
| 165 | </para>
|
---|
| 166 |
|
---|
| 167 | </sect2>
|
---|
| 168 |
|
---|
| 169 | <sect2 role="content">
|
---|
| 170 | <title>Contents</title>
|
---|
| 171 |
|
---|
| 172 | <segmentedlist>
|
---|
| 173 | <segtitle>Installed Programs</segtitle>
|
---|
| 174 | <segtitle>Installed Library</segtitle>
|
---|
| 175 | <segtitle>Installed Directory</segtitle>
|
---|
| 176 |
|
---|
| 177 | <seglistitem>
|
---|
| 178 | <seg>
|
---|
| 179 | convert-dtsv0, dtc, dtdiff, fdtdump, fdtget, fdtoverlay,
|
---|
| 180 | and fdtput
|
---|
| 181 | </seg>
|
---|
| 182 | <seg>
|
---|
| 183 | libfdt.so
|
---|
| 184 | </seg>
|
---|
| 185 | <seg>
|
---|
| 186 | /usr/lib/python&python3-majorver;/site-packages/libfdt-&dtc-version;.dist-info
|
---|
| 187 | </seg>
|
---|
| 188 | </seglistitem>
|
---|
| 189 | </segmentedlist>
|
---|
| 190 |
|
---|
| 191 | <variablelist>
|
---|
| 192 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 193 | <?dbfo list-presentation="list"?>
|
---|
| 194 | <?dbhtml list-presentation="table"?>
|
---|
| 195 |
|
---|
| 196 | <varlistentry id="convert-dtsv0">
|
---|
| 197 | <term><command>convert-dtsv0</command></term>
|
---|
| 198 | <listitem>
|
---|
| 199 | <para>
|
---|
| 200 | converts device tree v0 source to device tree v1
|
---|
| 201 | </para>
|
---|
| 202 | <indexterm zone="dtc convert-dtsv0">
|
---|
| 203 | <primary sortas="b-convert-dtsv0">convert-dtsv0</primary>
|
---|
| 204 | </indexterm>
|
---|
| 205 | </listitem>
|
---|
| 206 | </varlistentry>
|
---|
| 207 |
|
---|
| 208 | <varlistentry id="dtc-prog">
|
---|
| 209 | <term><command>dtc</command></term>
|
---|
| 210 | <listitem>
|
---|
| 211 | <para>
|
---|
| 212 | compiles device tree source (dts) to device tree binary blob
|
---|
| 213 | (dtb), or de-compiles dtb to dts
|
---|
| 214 | </para>
|
---|
| 215 | <indexterm zone="dtc dtc-prog">
|
---|
| 216 | <primary sortas="b-dtc">dtc</primary>
|
---|
| 217 | </indexterm>
|
---|
| 218 | </listitem>
|
---|
| 219 | </varlistentry>
|
---|
| 220 |
|
---|
| 221 | <varlistentry id="dtdiff">
|
---|
| 222 | <term><command>dtdiff</command></term>
|
---|
| 223 | <listitem>
|
---|
| 224 | <para>
|
---|
| 225 | compares two different device tree
|
---|
| 226 | </para>
|
---|
| 227 | <indexterm zone="dtc dtdiff">
|
---|
| 228 | <primary sortas="b-dtdiff">dtdiff</primary>
|
---|
| 229 | </indexterm>
|
---|
| 230 | </listitem>
|
---|
| 231 | </varlistentry>
|
---|
| 232 |
|
---|
| 233 | <varlistentry id="fdtdump">
|
---|
| 234 | <term><command>fdtdump</command></term>
|
---|
| 235 | <listitem>
|
---|
| 236 | <para>
|
---|
| 237 | prints a readable version of a flat device-tree file
|
---|
| 238 | </para>
|
---|
| 239 | <indexterm zone="dtc fdtdump">
|
---|
| 240 | <primary sortas="b-fdtdump">fdtdump</primary>
|
---|
| 241 | </indexterm>
|
---|
| 242 | </listitem>
|
---|
| 243 | </varlistentry>
|
---|
| 244 |
|
---|
| 245 | <varlistentry id="fdtget">
|
---|
| 246 | <term><command>fdtget</command></term>
|
---|
| 247 | <listitem>
|
---|
| 248 | <para>
|
---|
| 249 | reads values from device-tree
|
---|
| 250 | </para>
|
---|
| 251 | <indexterm zone="dtc fdtget">
|
---|
| 252 | <primary sortas="b-fdtget">fdtget</primary>
|
---|
| 253 | </indexterm>
|
---|
| 254 | </listitem>
|
---|
| 255 | </varlistentry>
|
---|
| 256 |
|
---|
| 257 | <varlistentry id="fdtoverlay">
|
---|
| 258 | <term><command>fdtoverlay</command></term>
|
---|
| 259 | <listitem>
|
---|
| 260 | <para>
|
---|
| 261 | applies a number of overlays to a base device tree blob
|
---|
| 262 | </para>
|
---|
| 263 | <indexterm zone="dtc fdtoverlay">
|
---|
| 264 | <primary sortas="b-fdtoverlay">fdtoverlay</primary>
|
---|
| 265 | </indexterm>
|
---|
| 266 | </listitem>
|
---|
| 267 | </varlistentry>
|
---|
| 268 |
|
---|
| 269 | <varlistentry id="fdtput">
|
---|
| 270 | <term><command>fdtput</command></term>
|
---|
| 271 | <listitem>
|
---|
| 272 | <para>
|
---|
| 273 | writes a property value to a device tree
|
---|
| 274 | </para>
|
---|
| 275 | <indexterm zone="dtc fdtput">
|
---|
| 276 | <primary sortas="b-fdtput">fdtput</primary>
|
---|
| 277 | </indexterm>
|
---|
| 278 | </listitem>
|
---|
| 279 | </varlistentry>
|
---|
| 280 |
|
---|
| 281 | <varlistentry id="libfdt">
|
---|
| 282 | <term><filename class="libraryfile">libfdt.so</filename></term>
|
---|
| 283 | <listitem>
|
---|
| 284 | <para>
|
---|
| 285 | is a utility library for reading and manipulating device trees
|
---|
| 286 | in the binary format
|
---|
| 287 | </para>
|
---|
| 288 | <indexterm zone="dtc libfdt">
|
---|
| 289 | <primary sortas="c-libfdt">libfdt.so</primary>
|
---|
| 290 | </indexterm>
|
---|
| 291 | </listitem>
|
---|
| 292 | </varlistentry>
|
---|
| 293 | </variablelist>
|
---|
| 294 | </sect2>
|
---|
| 295 | </sect1>
|
---|