Introduction to Dtc
        
        
          The dtc package contains the
          Device Tree Compiler for working with device tree source and binary
          files and also libfdt, a utility library for reading and
          manipulating device trees in the binary format.
        
        
          This package is known to build and work properly using an LFS 12.2
          platform.
        
        
          Package Information
        
        
        
          Dtc Dependencies
        
        
          Optional
        
        
          libyaml-0.2.5, SWIG-4.2.1, and texlive-20240312
        
       
      
        
          Installation of Dtc
        
        
          Install dtc by running the
          following commands:
        
        mkdir build &&
cd    build &&
meson setup --prefix=/usr         \
            --buildtype=release   \
            -D python=disabled .. &&
ninja
        
          To test the results, issue: meson
          test -v.
        
        
          Now, as the root user:
        
        ninja install
        
          Still as the root user, remove the
          useless static library:
        
        rm /usr/lib/libfdt.a
        
          If you have texlive-20240312 installed, you can
          build the PDF format of the documentation by issuing the following
          command:
        
        pushd ../Documentation
  latexmk -bibtex --pdf dtc-paper &&
  latexmk -bibtex --pdf dtc-paper -c
popd
        
          To install the documentation, as the root user issue the following command:
        
        cp -R ../Documentation -T /usr/share/doc/dtc-1.7.1
        
          If you have installed SWIG-4.2.1 and you wish to install the Python 3
          binding of this package, build the Python 3 module:
        
        pip3 wheel -w dist --no-build-isolation --no-deps --no-cache-dir ..
        
          As the root user, install the
          Python 3 module:
        
        pip3 install --no-index --find-links=dist --no-cache-dir --no-user libfdt
       
      
        
          Command Explanations
        
        
          --buildtype=release:
          Specify a buildtype suitable for stable releases of the package, as
          the default may produce unoptimized binaries.
        
        
          -D python=disabled: This
          switch prevents building the Python 3 binding with the deprecated
          method (running setup.py directly). We will build
          the Python 3 binding with the pip3
          wheel command separately if wanted.