summaryrefslogtreecommitdiff
path: root/INSTALL
blob: de97b2443fd885056a64820e7e87db1e2b9f566a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
Diagnostic Log and Trace  - Installation
========================================
Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>

Instructions for installing this software
-----------------------------------------
The following packages need to be installed in order to be able to build and install DLT daemon:
- cmake
- zlib
- dbus

On Ubuntu those dependencies can be installed with the following command:
- sudo apt-get install cmake zlib1g-dev libdbus-glib-1-dev

To build and install the DLT daemon, follow these steps:

- mkdir build
- cd build
- cmake ..
- make
- optional: sudo make install
- optional: sudo ldconfig

Compile options with default values
-----------------------------------
[options="header"]
|==============================================================================================
| Option                        | Value          | Comment
| BUILD_SHARED_LIBS             | ON             | Set to OFF to build static libraries
| WITH_SYSTEMD                  | OFF            | Set to ON to run CMakeLists.txt in systemd
| WITH_SYSTEMD_WATCHDOG         | OFF            | Set to ON to use the systemd watchdog in dlt-daemon
| WITH_SYSTEMD_JOURNAL          | OFF            | Set to ON to use the systemd journal in dlt-system
| WITH_DOC                      | OFF            | Set to ON to build documentation target
| WITH_MAN                      | ON             | Set to OFF to skip building of man pages
| WITH_CHECK_CONFIG_FILE        | OFF            | Set to ON to create a configure file of CheckIncludeFiles and CheckFunctionExists
| WITH_TESTSCRIPTS              | OFF            | Set to ON to run CMakeLists.txt in test scripts
| WITH_GPROF                    | OFF            | Set \-pg to compile flags
| WITH_DLTTEST                  | OFF            | Set to ON to build with modifications to test User-Daemon communication with corrupt messages
| WITH_DLT_SHM_ENABLE           | OFF            | Set to OFF to use FIFO as IPC from user to daemon
| WITH_DLT_ADAPTOR              | ON             | Set to ON to build src/adaptor binaries
| WITH_DLT_CONSOLE              | ON             | Set to ON to build src/console binaries
| WITH_DLT_EXAMPLES             | ON             | Set to ON to build src/examples binaries
| WITH_DLT_SYSTEM               | ON             | Set to ON to build src/system binaries
| WITH_DLT_DBUS                 | ON             | Set to ON to build src/dbus binaries
| WITH_DLT_TESTS                | ON             | Set to ON to build src/test binaries
| WITH_DLT_CXX11_EXT            | OFF            | Set to ON to build C++11 extensions
| WITH_DLT_COREDUMPHANDLER      | OFF            | EXPERIMENTAL! Set to ON to build src/core_dump_handler binaries. EXPERIMENTAL
| WITH_DLT_LOGSTORAGE_CTRL_UDEV | OFF            | PROTOTYPE! Set to ON to build logstorage control application with udev support
| WITH_DLT_LOGSTORAGE_CTRL_PROP | OFF            | PROTOTYPE! Set to ON to build logstorage control application with proprietary support
| WITH_DLT_USE_IPv6             | ON             | Set to ON for IPv6 support
| WITH_DLT_KPI                  | ON             | Set to ON to build src/kpi binaries
| CMAKE_INSTALL_PREFIX          | /usr/local     |
| CMAKE_BUILD_TYPE              | RelWithDebInfo |
|==============================================================================================

In order to change these options, you can modify these values
with ccmake, do the appropriate changes in CmakeList.txt or via
the commandline for cmake

- Change a value with: cmake -D<Variable>=<Value>
- Example: cmake -DWITH_SYSTEMD=ON -DWITH_SYSTEMD_JOURNAL=ON -DCMAKE_INSTALL_PREFIX=/usr ..

Create Man pages
----------------
The man pages are generated and installed during the standard build and install.

After installation they are located in <CMAKE_INSTALL_PREFIX>/share/man.

The man pages are generated with asciidoc.
If the man pages are changed the following command must be executed.

----
mkdir build
cd build
cmake -DWITH_DOC=ON ..
make doc-man
----

The generated man pages overwrite the existing ones.

Create manuals documentation
----------------------------
The manuals are generated with asciidoc.

----
mkdir build
cd build
cmake -DWITH_DOC=ON ..
make doc-manuals
----

You will find the generated documents in build/doc/manuals.

Create api documentation
------------------------
The API documentation is generated with doxygen.

----
mkdir build
cd build
cmake -DWITH_DOC=ON ..
make doc
----

You will find the generated documents in build/doc/DOC_DLT.

Generation of systemd unit files
--------------------------------
DLT provides cmake files to create unit files for systemd. These can be found in the systemd directory.
In systemd/CMakeLists.txt you can modify some values, e.g. the port for dlt-adaptor-udp.
By default the generation of unit files with cmake is disabled. Please follow these steps to enable the generation:

* Change into the root directory of DLT-daemon
* mkdir build
* cd build
* cmake -DWITH_SYSTEMD=ON ..

You find the generated unit files in build/systemd. They are installed in ${CMAKE_INSTALL_PREFIX}/lib/systemd/system when make install is run.

Git configuration
-----------------
It is important to set the name of the user and the email of the user for all git instances on the system:

----
git config --global user.name "Firstname Lastname"
git config --global user.email "your_email@youremail.com"
----

If you are behind a proxy you have to set up the Git proxy configuration, e.g.

----
git config --global http.proxy $http_proxy
----

Checkout the code from the OSS Git repository.

----
git clone http://git.projects.genivi.org/dlt-daemon.git
----

Working on the code & contribution
----------------------------------
Get an overview of all branches:

----
git branch -a
----

Switch to the branch you want to work on (see versioning scheme, the master is the feature branch) and verify that it has switched.

----
git checkout <remote branch>
git branch -a
----

Best practice is to create a local branch based on the remote branch:

----
git checkout -b <local branch> <remote branch>
----

Start working, best practice is to commit smaller, compilable pieces during the work that makes it easier to handle later on.

If you want to commit your changes, send them to the auto-dlt list, you can create a patch like this:

----
git format-patch -s <remote branch>
----

This creates a set of patches (one patch per commit) that shall be published via the mailing list. The patches will be discussed, merged & uploaded on the git.

Please do not forget to document your changes:
- write a manual for new components or adapt manuals to the changes you have made
- in case you have added a new program please write a man page for it
- if you have added something to the DLT API please remember to provide Doxygen comments


Please add a header to the top of each new source file you provide:

----
/*
 * @licence app begin@
 * SPDX license identifier: MPL-2.0
 *
 * Copyright (C) 2011-2016, {COPYRIGHT_HOLDER}
 *
 * This file is part of GENIVI Project DLT - Diagnostic Log and Trace.
 *
 * This Source Code Form is subject to the terms of the
 * Mozilla Public License (MPL), v. 2.0.
 * If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * For further information see http://www.genivi.org/.
 * @licence end@
 */

/*!
 * \author {YOUR NAME <YOUR_EMAIL_ADDRESS>}
 *
 * \copyright Copyright © 2011-2016 {COPYRIGHT_HOLDER}. \n
 * License MPL-2.0: Mozilla Public License version 2.0 http://mozilla.org/MPL/2.0/.
 *
 * \file {FILENAME}
*/`
----