README.md

EOOS Safe KasperskyOS


EOOS copyrights reserved in Rospatent Federal Service for Intellectual Property, Russian Federation

EOOS Safe for KasperskyOS operating system is a C++ library for cross-platform development of applications in automotive sphere. The library is developed in C++98 programming language and supports features of C++11 programming language depending on compiler options that allows to consider wide criteria when selecting a suitable programming language on initiation step of product development.

EOOS Safe KasperskyOS is developed within ISO C++ standards, complied with MISRA C++:2008 and AUTOSAR C++14 Coding Guidelines, and relies on ISO 26262 that means applications based on EOOS can be used in critical and safety-related systems.

Quality of EOOS Safe KasperskyOS:

  • MISRA C++: 0 violations
  • Unit Tests coverage: 99.9%

1. How-to Build Project

EOOS is a static library for linkage with other KasperskyOS based applications. This EOOS project based on CMake that builds the static library and installs it on an UNIX OS for being found by CMake projects of the applications.

Currently EOOS library can be built and linked to EOOS Unit Tests under this repository CMake project. For target user applications this repository can be used as reference to build such applications.

1.1. Prerequisites for host Ubuntu 22.04 LTS

The process described below is passed on

  • KasperskyOS Community Edition 1.2 (v1.2.0.89)

and requires the next tool to be installed on the host system:

1.1.1. Install Git for Linux and Unix

Get Git for Ubuntu following the commands below. For other UNIX OSs following the instruction from the web-site.

$ sudo apt-get update
$ sudo apt-get install git
 
$ git --version
git version 2.17.1
1.1.2. Install CMake 3.10 or higher

CMake minimum required version 3.10 for EOOS project.

Download and install CMake from the web-site. Check CMake version in Terminal.

$ sudo apt-get install cmake

$ cmake --version
cmake version 3.22.1
1.1.3. Instal IDE and compiler for purposes that you need

EOOS is developed within ISO C++ standards and can be compiled with any compilers, which support ISO/IEC 14882:1998 standard and ISO/IEC 14882:2011 standard for new features of C++ programming language.

To debug applications we are used to using Eclipse IDE for C/C++ Developers. Compiler on Ubuntu 18.04 LTS is installed by default, and you can check it in Terminal.

$ gcc --version
gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0

$ g++ --version
g++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0

Compiler on Ubuntu 22.04 LTS can be checked as well in Terminal

$ gcc --version
gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0

$ g++ --version
g++ (Ubuntu 11.2.0-19ubuntu1) 11.2.0
1.1.4. Install Python 3.7 or higher for automation

Check your version is not 3.7

$ python3 --version
Python 3.6.9

Install version 3.7

$ sudo apt-get install python3.7

Update Python alternatives

$ sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1
$ sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 2

Configure vession 3.7 as default

$ sudo update-alternatives --config python3

Check your version is 3.7

$ python3 --version
Python 3.7.6
1.1.5. Install Pip for Python 3.7 for automation
$ sudo apt-get update
$ sudo apt-get -y install python3-pip
$ pip3 --version
pip 22.0.2 from /usr/lib/python3/dist-packages/pip (python 3.7)
1.1.6. Install GCOVR for unit tests reports generation

Install GCOVR

$ pip install gcovr
$ gcovr --version
gcovr 5.2

Add path to GCOVR to the $PATH environment variable

$ echo '' >> $HOME/.bashrc
$ echo '# GCOVR variable' >> $HOME/.bashrc
$ echo 'export PATH=$HOME/.local/bin:$PATH' >> $HOME/.bashrc

1.2. Obtain Git Repository

1.2.1. Create an empty directory somewhere on your disk

For instance we will create ~/REPOSITORY.

~$ mkdir REPOSITORY
~$ cd REPOSITORY
~/REPOSITORY$
1.2.2. Clone this repository

For instance we will clone it to EOOS directory by SSH.

~/REPOSITORY$ git clone --branch master git@gitflic.ru:eoos-systems/eoos-project-if-kasperskyos.git EOOS
1.2.3. Go the EOOS directory
~/REPOSITORY$ cd EOOS
1.2.4. Initialize and update all submodules of the repository
~/REPOSITORY/EOOS$ git submodule update --init

1.3. Instalation of KasperskyOS CE 1.2.0 on host Ubuntu 22.04 LTS

The chapter describes brief way how to install KasperskyOS SDK on the host operating system. For more details see official documentation on Kaspersky support

1.3.1. Download KasperskyOS CE 1.2.0

Download KasperskyOS CE 1.2.0 SDK for instance to ~/KOSSDK and go to the directory.

~$ mkdir KOSSDK
~$ cd KOSSDK
~/KOSSDK$
1.3.2. Install KasperskyOS CE SDK
~/KOSSDK$ sudo apt update
~/KOSSDK$ sudo apt install ./KasperskyOS-Community-Edition-1.2.0.89_en.deb
1.3.2. Add KasperskyOS CE SDK binaries to PATH
~/KOSSDK$ sudo /opt/KasperskyOS-Community-Edition-1.2.0.89/set_env.sh

1.4. Source Code Build and Run

1.3.2. Build for Testing EOOS

This chapter must be useful for EOOS developers and CI/CD engineers, but not prohibited to be used by any other.

To build the project with Unit Tests and run them, you have to execute the command below.

~REPOSITORY/EOOS$ ./cross-build.sh

Having run the script, it builds the EOOS project for KasperskyOS and runs it on the QEMU emulator.

Описание

EOOS System for KasperskyOS

Конвейеры
0 успешных
0 с ошибкой