Project

General

Profile

Deployment within OpenStack cloud » History » Version 2

Evgeny Novikov, 08/24/2020 02:38 PM

1 1 Evgeny Novikov
h1. How to generate build bases for testing Klever
2 2 Evgeny Novikov
3
To generate build bases for testing Klever you need to perform following preliminary steps:
4
5
# Install Klever locally for development purposes according to the user documentation. 
6
# Create a dedicated directory for sources and build bases and move to it. Note that there should be quite much free space. We recommend at least 100 GB. In addition, it would be best of all if you will name this directory "build bases" and create it within the root of the Klever Git repository (this directory is not tracked by the repository).
7
# Clone a Linux kernel stable Git repository to _linux-stable_ (scripts prepare build bases for different versions of the Linux kernel for which the Git repository serves best of all), e.g.:
8
<pre>
9
$ git clone https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-stable
10
</pre>
11
You can use alternative sources of the Git repository, if the above one is not working well and fast enough:
12
## https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable
13
## https://github.com/gregkh/linux
14
# Make CIF executables to be available through the PATH environment variable, e.g.
15
<pre>
16
$ export PATH=/abs/path/to/klever/deploy/dir/klever-addons/CIF/usr/local/bin/:$PATH
17
</pre>
18
# Read notes regarding the compiler after the end of this list.
19
# Run the following command to find out available descriptions of build bases for testing Klever:
20
<pre>
21
$ klever-build -l
22
</pre>
23
# Select appropriate build bases descriptions and run the command like below:
24
<pre>
25
$ klever-build "linux/testing/requirement specifications" "linux/testing/common models"
26
</pre>
27
# Wait for a while. Prepared build bases will be available within directory "build bases". Note that there will be additional identifiers, e.g. "build bases/linux/testing/6e6e1c". These identifiers are already specified within corresponding preset verification jobs.
28
# You can install prepared build bases using deployment scripts, but it is boring. If you did not follow an advice regarding the name and the place of the dedicated directory from item 2, you can create a symbolic link with name "build bases" that points to the dedicated directory within the root of the Klever Git repository.
29
30
h2. Providing an appropriate compiler.
31
32
Most of build bases for testing Klever could be built using GCC 4.8 on Debian or Ubuntu. Otherwise there is an explicit division of build bases descriptions, e.g.:
33
<pre>
34
linux/testing/environment model specifications/gcc48
35
linux/testing/environment model specifications/gcc63
36
</pre>
37
(the former requires GCC 4.8 while the latter needs GCC 6.3 at least).
38
39
That's why you may need to get GCC 4.8 and make it available through PATH. Users of some other Linux distributions, e.g. openSUSE 15.1, can leverage the default compiler for building all build bases for testing Klever.
40
41
The simplest way to get GCC 4.8 on Ubuntu is to execute the following commands:
42
<pre>
43
$ sudo apt update
44
$ sudo apt install gcc-4.8
45
$ sudo update-alternatives --config gcc
46
</pre>
47
(after executing the last command you need to select GCC 4.8; do not forget to make v.v. after preparing build bases!)