removed closure of daemonized file descriptor pointing to /dev/null
[profile/ivi/dlt-daemon.git] / INSTALL.txt
1 Diagnostic Log and Trace  - Installation
2 ========================================
3 Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
4
5 Instructions for installing this software
6 -----------------------------------------
7 This software uses cmake as its build tool. To build and install the
8 DLT daemon, follow these steps:
9
10 - mkdir build
11 - cd build
12 - cmake ..
13 - make
14 - optional: sudo make install
15 - optional: sudo ldconfig
16
17 Compile options with default values
18 -----------------------------------
19 [options="header"]
20 |==============================================================================================
21 | Option                 | Value | Comment
22 | WITH_SYSTEMD           | OFF   | Set to on to run CMakeLists.txt in systemd
23 | WITH_SYSTEMD_WATCHDOG  | OFF   | Set to ON to use the systemd watchdog in dlt-daemon
24 | WITH_DLT_ADAPTOR       | ON    | Set ton ON to build src/adaptor binaries
25 | WITH_DLT_CONSOLE       | ON    | Set ton ON to build src/console binaries
26 | WITH_DLT_SYSTEM        | ON    | Set ton ON to build src/systembinaries
27 | WITH_DLT_EXAMPLES      | ON    | Set ton ON to build src/examplesbinaries
28 | WITH_DLT_TESTS         | ON    | Set ton ON to build src/testbinaries
29 | WITH_DLT_SHM_ENABLE    | OFF   | Set to OFF to use FIFO as IPC from user to daemon
30 | WITH_CHECK_CONFIG_FILE | OFF   | Set to ON to create a configure file of CheckIncludeFiles and CheckFunctionExists
31 | WITH_DOC               | OFF   | Set to ON to build documentation target
32 | WITH_TESTSCRIPTS       | OFF   | Set to on to run CMakeLists.txt in test scripts
33 | WITH_GPROF             | OFF   | Set \-pg to compile flags
34 | WITH_MAN               | ON    | Set to OFF to skip building of man pages
35 | BUILD_SHARED_LIBS      | ON    | Set to OFF to build static libraries
36 | CMAKE_INSTALL_PREFIX   | /usr/local | 
37 | CMAKE_BUILD_TYPE       | RelWithDebInfo | 
38 |==============================================================================================
39
40 In order to change these options, you can modify this values
41 with ccmake, do the appropriate changes in CmakeList.txt or via 
42 the commandline for cmake
43
44 - Change a value with: cmake -D<Variable>=<Value>
45 - Example: cmake -DCMAKE_INSTALL_PREFIX=/usr
46
47 Create Man pages
48 ----------------
49 The man pages are generated with following commands.
50 They are generated by default (WITH_MAN=ON).
51
52 ----
53 mkdir build
54 cd build
55 cmake ..
56 make
57 sudo make install
58 ----
59
60 You will find the man pages after installation in <CMAKE_INSTALL_PREFIX>/share/man.
61
62 The man pages are generated with asciidoc.
63 If the man pages are changed the following command must be executed.
64
65 ----
66 mkdir build
67 cd build
68 cmake -DWITH_DOC=ON ..
69 make doc-man
70 ----
71
72 The generated man pages overwrites the existing ones.
73
74 Create manuals documentation
75 ----------------------------
76 The manuals are generated with asciidoc.
77
78 ----
79 mkdir build
80 cd build
81 cmake -DWITH_DOC=ON ..
82 make doc-manuals
83 ----
84
85 You will find the generated documents in build/doc/manuals.
86
87 Create api documentation
88 ------------------------
89 The API documentation is generated with doxygen.
90
91 ----
92 mkdir build
93 cd build
94 cmake -DWITH_DOC=ON ..
95 make doc
96 ----
97
98 You will find the generated documents in build/doc/DOC_DLT.
99
100 Generation of systemd unit files
101 --------------------------------
102 DLT provides some example unit files for systemd, stored in <DLT-root>/systemd.
103 In <DLT-root>/systemd/CMakeLists.txt you have to specify some values, e.g. the port for dlt-adaptor-udp.
104 By default the generation of unit files with cmake is off. Please follow these steps to enable the generation:
105
106 * Change into the root directory of DLT-daemon
107 * mkdir build
108 * cd build
109 * cmake -DWITH_SYSTEMD=ON ..
110
111 You find the parsed unit files in the PROJECT_BINARY_DIR/systemd directory.
112
113 Git configuration
114 -----------------
115 It is important to set the name of the user and the email of the user for all git instances on the system:
116
117 ----
118 git config --global user.name "Firstname Lastname"
119 git config --global user.email "your_email@youremail.com"
120 ----
121
122 If you are behind a proxy you have to set up the Git proxy configuration, e.g.
123
124 ----
125 git config --global http.proxy $http_proxy
126 ----
127
128 Checkout the code from the OSS Git repository.
129
130 ----
131 git clone http://git.projects.genivi.org/dlt-daemon.git
132 ----
133
134 Working on the code & contribution
135 ----------------------------------
136 Get an overview of all branches:
137
138 ----
139 git branch -a
140 ----
141
142 Switch to the branch you want to work on (see versioning scheme, the master is the feature branch) and verify that it has switched.
143
144 ----
145 git checkout <remote branch>
146 git branch -a
147 ----
148
149 Best practice is to create a local branch based on the remote branch:
150
151 ----
152 git checkout -b <local branch> <remote branch>
153 ----
154
155 Start working, best practice is to commit smaller, compilable pieces during the work that makes it easier to handle later on.
156
157 If you want to commit your changes, send them to the auto-dlt list, you can create a patch like this:
158
159 ----
160 git format-patch -s <remote branch>
161 ----
162
163 This creates a set of patches that are published via the mailing list. The patches will be discussed, merged & uploaded on the git.
164
165