[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">
|
---|
[2ad2fae6] | 8 | <!ENTITY dtc-md5sum "8dc1c58c84ca19f825f6939801b44c52">
|
---|
| 9 | <!ENTITY dtc-size "168 KB">
|
---|
| 10 | <!ENTITY dtc-buildsize "15 MB">
|
---|
| 11 | <!ENTITY dtc-time "0.3 SBU">
|
---|
[0d1a1f9] | 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 |
|
---|
[4c0efc3c] | 18 | <title>dtc-&dtc-version;</title>
|
---|
[0d1a1f9] | 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 |
|
---|
[4c0efc3c] | 35 | &lfs122_checked;
|
---|
[0d1a1f9] | 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='swig'/>, and
|
---|
| 72 | <xref linkend='texlive'/>
|
---|
| 73 | </para>
|
---|
| 74 | </sect2>
|
---|
| 75 |
|
---|
| 76 | <sect2 role="installation">
|
---|
| 77 | <title>Installation of Dtc</title>
|
---|
| 78 |
|
---|
| 79 | <para>
|
---|
| 80 | Install <application>dtc</application> by running the following
|
---|
| 81 | commands:
|
---|
| 82 | </para>
|
---|
| 83 |
|
---|
| 84 | <screen><userinput>mkdir build &&
|
---|
| 85 | cd build &&
|
---|
| 86 |
|
---|
[7c83169b] | 87 | meson setup --prefix=/usr \
|
---|
| 88 | --buildtype=release \
|
---|
| 89 | -D python=disabled .. &&
|
---|
[0d1a1f9] | 90 | ninja</userinput></screen>
|
---|
| 91 |
|
---|
| 92 | <para>
|
---|
| 93 | To test the results, issue: <command>meson test -v</command>.
|
---|
| 94 | <!-- https://github.com/dgibson/dtc/commit/32174a66efa4 -->
|
---|
[2ad2fae6] | 95 | <!--
|
---|
[0d1a1f9] | 96 | Two tests named <filename>cell-overflow.dts</filename> and
|
---|
| 97 | <filename>cell-overflow-results.dts</filename> are known to fail.
|
---|
[2ad2fae6] | 98 | -->
|
---|
[0d1a1f9] | 99 | </para>
|
---|
| 100 |
|
---|
| 101 | <para>
|
---|
| 102 | Now, as the &root; user:
|
---|
| 103 | </para>
|
---|
| 104 |
|
---|
| 105 | <screen role="root"><userinput>ninja install</userinput></screen>
|
---|
| 106 |
|
---|
| 107 | <para>
|
---|
| 108 | Still as the &root; user, remove the useless static library:
|
---|
| 109 | </para>
|
---|
| 110 |
|
---|
| 111 | <screen role="root"><userinput>rm /usr/lib/libfdt.a</userinput></screen>
|
---|
| 112 |
|
---|
| 113 | <para>
|
---|
| 114 | If you have <xref linkend='texlive'/> installed, you can build the PDF
|
---|
| 115 | format of the documentation by issuing the following command:
|
---|
| 116 | </para>
|
---|
| 117 |
|
---|
| 118 | <screen remap="doc"><userinput>pushd ../Documentation
|
---|
| 119 | latexmk -bibtex --pdf dtc-paper &&
|
---|
| 120 | latexmk -bibtex --pdf dtc-paper -c
|
---|
| 121 | popd</userinput></screen>
|
---|
| 122 |
|
---|
| 123 | <para>
|
---|
| 124 | To install the documentation, as the &root; user issue the following
|
---|
| 125 | command:
|
---|
| 126 | </para>
|
---|
| 127 |
|
---|
| 128 | <screen role="root"><userinput>cp -R ../Documentation -T /usr/share/doc/dtc-&dtc-version;</userinput></screen>
|
---|
| 129 |
|
---|
| 130 | <para>
|
---|
[e5db464] | 131 | If you have installed
|
---|
[51d2a43] | 132 | <xref linkend='swig'/> and you wish to install the Python 3 bindings
|
---|
[0d1a1f9] | 133 | of this package, build the Python 3 module:
|
---|
| 134 | </para>
|
---|
[10847bb9] | 135 |
|
---|
[2ad2fae6] | 136 | <screen role="nodump"><userinput>&build-wheel-cmd; ..</userinput></screen>
|
---|
[0d1a1f9] | 137 |
|
---|
| 138 | <para>
|
---|
| 139 | As the &root; user, install the Python 3 module:
|
---|
| 140 | </para>
|
---|
| 141 |
|
---|
[57c6f42] | 142 | <screen role="nodump"><userinput>&install-wheel; libfdt</userinput></screen>
|
---|
[0d1a1f9] | 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>
|
---|
[7c83169b] | 152 | <parameter>-D python=disabled</parameter>: This switch prevents
|
---|
[0d1a1f9] | 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 | </sect2>
|
---|
| 160 |
|
---|
| 161 | <sect2 role="content">
|
---|
| 162 | <title>Contents</title>
|
---|
| 163 |
|
---|
| 164 | <segmentedlist>
|
---|
| 165 | <segtitle>Installed Programs</segtitle>
|
---|
| 166 | <segtitle>Installed Library</segtitle>
|
---|
| 167 | <segtitle>Installed Directory</segtitle>
|
---|
| 168 |
|
---|
| 169 | <seglistitem>
|
---|
| 170 | <seg>
|
---|
| 171 | convert-dtsv0, dtc, dtdiff, fdtdump, fdtget, fdtoverlay,
|
---|
| 172 | and fdtput
|
---|
| 173 | </seg>
|
---|
| 174 | <seg>
|
---|
| 175 | libfdt.so
|
---|
| 176 | </seg>
|
---|
| 177 | <seg>
|
---|
[2ad2fae6] | 178 | /usr/lib/python&python3-majorver;/site-packages/libfdt-&dtc-version;.dist-info and
|
---|
| 179 | /usr/share/doc/dtc-&dtc-version; (optionally)
|
---|
[0d1a1f9] | 180 | </seg>
|
---|
| 181 | </seglistitem>
|
---|
| 182 | </segmentedlist>
|
---|
| 183 |
|
---|
| 184 | <variablelist>
|
---|
| 185 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 186 | <?dbfo list-presentation="list"?>
|
---|
| 187 | <?dbhtml list-presentation="table"?>
|
---|
| 188 |
|
---|
| 189 | <varlistentry id="convert-dtsv0">
|
---|
| 190 | <term><command>convert-dtsv0</command></term>
|
---|
| 191 | <listitem>
|
---|
| 192 | <para>
|
---|
| 193 | converts device tree v0 source to device tree v1
|
---|
| 194 | </para>
|
---|
| 195 | <indexterm zone="dtc convert-dtsv0">
|
---|
| 196 | <primary sortas="b-convert-dtsv0">convert-dtsv0</primary>
|
---|
| 197 | </indexterm>
|
---|
| 198 | </listitem>
|
---|
| 199 | </varlistentry>
|
---|
| 200 |
|
---|
| 201 | <varlistentry id="dtc-prog">
|
---|
| 202 | <term><command>dtc</command></term>
|
---|
| 203 | <listitem>
|
---|
| 204 | <para>
|
---|
| 205 | compiles device tree source (dts) to device tree binary blob
|
---|
| 206 | (dtb), or de-compiles dtb to dts
|
---|
| 207 | </para>
|
---|
| 208 | <indexterm zone="dtc dtc-prog">
|
---|
| 209 | <primary sortas="b-dtc">dtc</primary>
|
---|
| 210 | </indexterm>
|
---|
| 211 | </listitem>
|
---|
| 212 | </varlistentry>
|
---|
| 213 |
|
---|
| 214 | <varlistentry id="dtdiff">
|
---|
| 215 | <term><command>dtdiff</command></term>
|
---|
| 216 | <listitem>
|
---|
| 217 | <para>
|
---|
[51d2a43] | 218 | compares two different device trees
|
---|
[0d1a1f9] | 219 | </para>
|
---|
| 220 | <indexterm zone="dtc dtdiff">
|
---|
| 221 | <primary sortas="b-dtdiff">dtdiff</primary>
|
---|
| 222 | </indexterm>
|
---|
| 223 | </listitem>
|
---|
| 224 | </varlistentry>
|
---|
| 225 |
|
---|
| 226 | <varlistentry id="fdtdump">
|
---|
| 227 | <term><command>fdtdump</command></term>
|
---|
| 228 | <listitem>
|
---|
| 229 | <para>
|
---|
| 230 | prints a readable version of a flat device-tree file
|
---|
| 231 | </para>
|
---|
| 232 | <indexterm zone="dtc fdtdump">
|
---|
| 233 | <primary sortas="b-fdtdump">fdtdump</primary>
|
---|
| 234 | </indexterm>
|
---|
| 235 | </listitem>
|
---|
| 236 | </varlistentry>
|
---|
| 237 |
|
---|
| 238 | <varlistentry id="fdtget">
|
---|
| 239 | <term><command>fdtget</command></term>
|
---|
| 240 | <listitem>
|
---|
| 241 | <para>
|
---|
| 242 | reads values from device-tree
|
---|
| 243 | </para>
|
---|
| 244 | <indexterm zone="dtc fdtget">
|
---|
| 245 | <primary sortas="b-fdtget">fdtget</primary>
|
---|
| 246 | </indexterm>
|
---|
| 247 | </listitem>
|
---|
| 248 | </varlistentry>
|
---|
| 249 |
|
---|
| 250 | <varlistentry id="fdtoverlay">
|
---|
| 251 | <term><command>fdtoverlay</command></term>
|
---|
| 252 | <listitem>
|
---|
| 253 | <para>
|
---|
| 254 | applies a number of overlays to a base device tree blob
|
---|
| 255 | </para>
|
---|
| 256 | <indexterm zone="dtc fdtoverlay">
|
---|
| 257 | <primary sortas="b-fdtoverlay">fdtoverlay</primary>
|
---|
| 258 | </indexterm>
|
---|
| 259 | </listitem>
|
---|
| 260 | </varlistentry>
|
---|
| 261 |
|
---|
| 262 | <varlistentry id="fdtput">
|
---|
| 263 | <term><command>fdtput</command></term>
|
---|
| 264 | <listitem>
|
---|
| 265 | <para>
|
---|
| 266 | writes a property value to a device tree
|
---|
| 267 | </para>
|
---|
| 268 | <indexterm zone="dtc fdtput">
|
---|
| 269 | <primary sortas="b-fdtput">fdtput</primary>
|
---|
| 270 | </indexterm>
|
---|
| 271 | </listitem>
|
---|
| 272 | </varlistentry>
|
---|
| 273 |
|
---|
| 274 | <varlistentry id="libfdt">
|
---|
| 275 | <term><filename class="libraryfile">libfdt.so</filename></term>
|
---|
| 276 | <listitem>
|
---|
| 277 | <para>
|
---|
| 278 | is a utility library for reading and manipulating device trees
|
---|
| 279 | in the binary format
|
---|
| 280 | </para>
|
---|
| 281 | <indexterm zone="dtc libfdt">
|
---|
| 282 | <primary sortas="c-libfdt">libfdt.so</primary>
|
---|
| 283 | </indexterm>
|
---|
| 284 | </listitem>
|
---|
| 285 | </varlistentry>
|
---|
| 286 | </variablelist>
|
---|
| 287 | </sect2>
|
---|
| 288 | </sect1>
|
---|