Merge pull request #218 from saper/build-fixes
[envytools.git] / README.rst
blob0aa78cbb14dcbea13e883890afbbe4b97041ad6c
1 =========
2 envytools
3 =========
4 *Tools for people envious of nvidia's blob driver.*
6 .. image:: https://travis-ci.org/envytools/envytools.svg?branch=master
7        :target: https://travis-ci.org/envytools/envytools
9 .. image:: https://readthedocs.org/projects/envytools/badge/?version=latest
10        :target: https://envytools.readthedocs.io
12 The canonical repo is at: https://github.com/envytools/envytools/. Pushing
13 anywhere else will result in a de-facto fork!
15 Contents
16 ========
18 Subdirectories:
20 - ``docs``: plain-text documentation of the GPUs, nVidia binary driver, and
21   the tools (in-sync HTML version at https://envytools.readthedocs.io)
22 - ``envydis``: Disassembler and assembler for various ISAs found on nvidia GPUs
23 - ``rnn``: Tools and libraries for the rules-ng-ng XML register database format
24 - ``rnndb``: rnn database of nvidia MMIO registers, FIFO methods, and memory
25   structures.
26 - ``nvbios``: Tools to decode the card description structures found in nvidia
27   VBIOS
28 - ``nva``: Tools to directly access the GPU registers
29 - ``vstream``: Tools to decode and encode raw video bitstreams
30 - ``vdpow``: A tool aiding in VP3 reverse engineering
31 - ``easm``: Utility code dealing with assembly language parsing & printing.
32 - ``util``: Misc utility code shared between envytools modules
35 Building, installing
36 ====================
38 Dependencies:
40 - ``cmake``
41 - ``libxml2``
42 - ``flex``
43 - ``bison``
44 - ``pkg-config``
46 Optional dependencies needed by hwtest:
48 - ``libpciaccess``
50 Optional dependencies needed by demmt:
52 - ``libdrm``
53 - ``libseccomp``
55 Optional dependencies needed by nva:
57 - ``libpciaccess``
58 - ``libx11``
59 - ``libxext``
60 - ``python3``
61 - ``cython3``
63 Optional dependencies needed by vdpow:
65 - ``libpciaccess``
66 - ``libx11``
67 - ``vdpau``
69 Optional dependencies needed for ninja build (faster recompile times):
71 - ``ninja``
73 If your distribution has -dev or -devel packages, you'll also need ones
74 corresponding to the dependencies above.
76 On ubuntu it can be done like this::
78     apt-get install cmake flex libpciaccess-dev bison libx11-dev libxext-dev libxml2-dev libvdpau-dev python3-dev cython3
80 To build using ninja (recommended if you work on envytools)::
82     $ cmake . -G Ninja
83     $ ninja
85 If you prefer to stay with make, use ::
87     $ cmake .
88     $ make
90 To install [which is optional], use ::
92     $ ninja install
94 or ::
96     $ make install
98 If you want to install to a non-default directory, you'll also need to pass
99 it as an option to cmake before building, eg.::
101     $ cmake -D CMAKE_INSTALL_PREFIX:PATH=/usr/local .
103 Cmake options
104 -------------
106 If you don't want to compile some parts of envytools, you can pass the
107 following options to cmake:
109 - Hwtest:       ``-DDISABLE_HWTEST=ON``
110 - Nva:          ``-DDISABLE_NVA=ON``
111 - VDPOW:        ``-DDISABLE_VDPOW=ON``