shared_libs example

This example demonstrates use of static and dynamic libraries in KasperskyOS.

Example directory in the SDK

The code of the example and build scripts are available at the following path:

/opt/KasperskyOS-Community-Edition-<platform>-<version>/examples/shared_libs

List of programs

When you build an example for the target hardware platform, platform-specific drivers are automatically included in the solution:

Initialization description

The solution initialization description file named init.yaml is generated during the solution build process based on the ./einit/src/init.yaml.in template. Macros in @INIT_*@‌ ‌format contained in the template are automatically expanded in the resulting init.yaml file. For more details, refer to init.yaml.in template.

Security policy description

The security.psl file contains a description of a security policy for a KasperskyOS-based solution and is located in the ./einit/src directory. The declarations in the PSL file are provided with comments that explain the purpose of these declarations.

Resources

The ./resources/xdl/shared_libs directory contains the Client.edl file, which is the EDL description of the Client program.

Operating scenario

In the example, the Client program performs the following actions:

To ensure that dynamic libraries can be shared among different processes, the system program named BlobContainer is included in the example.

Building and running the example

The CMake system, which is included with KasperskyOS Community Edition, is used to build and run the example.

To ensure that the shared_libs example will correctly run on a target hardware platform, you must do the following after building the example and preparing your bootable SD card:

If you use the build_sd_image() function to create a bootable SD card image, no additional action is required.

See Building and running examples section.

Page top