PROJECTS

Driver development and application porting to KasperskyOS for Raspberry Pi 4

Customer

Kaspersky is a leading cybersecurity company and the developer of its own microkernel operating system, KasperskyOS.

Challenge

Install KasperskyOS on the Raspberry Pi 4 single-board computer, develop drivers, and port applications.

KasperskyOS is a microkernel operating system designed for industries with high requirements for information security, reliability, and predictable system behaviour. It enables the development of cyber-immune IT products with built-in resilience against the vast majority of cyberattacks. To achieve this, developers follow a dedicated methodology.

Solution

The project started with a team of three engineers and grew to six specialists. In a short timeframe, we had to process a large amount of new information, define roles and a delivery plan, establish day-to-day collaboration with the customer’s engineering team, and provide Kaspersky with ready-to-use instructions and engineering notes. We completed these tasks successfully.

Below, we describe the project from an engineering perspective and summarise the business outcome at the end.

What we delivered

During the project, our engineering team developed and ported 10 software components to KasperskyOS:

  • RRDtool database
  • AMQP/RabbitMQ client library
  • GPIO wrapper (libgpiod), I2C wrapper, SPI wrapper libraries
  • I2C/SPI/GPIO test platform to support continuous integration for the libraries
  • JWT library
  • Telegram bot management library
  • Bluetooth protocol stack to support sensors
  • A pilot “primer” project for porting the MONO framework (.NET) to KasperskyOS

How we ported each application

Each porting task followed these steps:

  1. The customer selected the target application.
  2. We analysed external dependencies to assess portability, as KasperskyOS does not support all POSIX (Portable Operating System Interface) calls.
  3. We defined functional requirements.
  4. We analysed the implementation approach, prepared documentation, and agreed on the design with the customer.
  5. Implementation.
  6. Review and demo of the working application.

To deliver the work, we used GCC cross-compilers (GNU C, C++, make, CMake) and the KasperskyOS SDK.

RRDtool port: challenges and how we solved them

RRDtool turned out to be the most complex part of the project — and we resolved the issues.
RRDtool (Round-robin Database tool) is a set of libraries and utilities for round-robin time-series databases. It helps store, process, and visualise dynamic data sequences such as network traffic, temperature, CPU load, and more.

For a successful port, the client library must support sending requests to the server over TCP, and the caching server must accept and process requests for:

  • creating a new database
  • changing database schema and settings
  • updating/retrieving data
  • writing cached data to the database file
  • retrieving the list of databases stored on the server
What was missing in the SDK, and what we changed

While porting RRDtool, we faced several limitations and addressed them:
  • The KasperskyOS SDK lacked libintl and glib-2.0, so we added the required header and binary files.
  • We reduced the functionality of the ported version because some libraries and packages were not available in the SDK. We excluded:
  • Ceph distributed file system support (dependency on librados)
  • CGI interpreter, graphing, and reporting (dependencies on libpango and libcairo)
  • Perl, Lua, Python, and Ruby APIs
Examples for the community

Based on the ported RRDtool for KasperskyOS, we delivered community examples covering:
  • GAUGE and COUNTER data types
  • consolidation functions (CF): AVERAGE, MIN, MAX
  • parallel update and fetch operations by writing and reading clients

Result

In a short timeframe, we expanded the KasperskyOS ecosystem on Raspberry Pi 4 by porting drivers, applications, and additional software components.

Our experience with similar solutions — and deep knowledge of Linux bring-up on different hardware platforms (Raspberry, Orange, STM) — helped us test multiple porting hypotheses and choose the most practical implementation path for KasperskyOS.
Raspberry Pi 4, Model B.
Photo: wikipedia.org
In practice, our team showed that KasperskyOS can be enriched with additional open-source applications, making the OS more attractive and accessible to a wider audience — from professionals to enthusiasts. These additions expand the OS use cases and can help grow the user base of other products in the customer’s ecosystem.

We delivered all work on time and handed over the source code to the customer. In the future, these solutions can simplify adoption for potential users and developers.

KasperskyOS is used in commercial products. For learning the OS architecture and development principles, Kaspersky provides KasperskyOS Community Edition.

Contact us to discuss your engineering challenges
We will offer you the best solution!
All information provided will remain confidential!
By clicking on the button, you agree to our personal data processing policy.
Our offices
Moscow
Troparyovskaya St., 4, bld. 1, room 6A
Moscow 119602, Russian Federation
Innopolis
Universitetskaya St., 7, room 7
420500, Innopolis, Republic of Tatarstan