embedded_vfs example

This example demonstrates how to include the virtual file system (VFS) provided in KasperskyOS Community Edition into KasperskyOS-based solution being developed.

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/embedded_vfs

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 the solution security policy description and is generated based on the following template during the solution build process:

./einit/src/security.psl.in

During the solution build, the @INIT_EXTERNAL_ENTITIES@ macro in the security.psl.in template is replaced with a list of system programs that are included in the KasperskyOS SDK.

For more details, refer to security.psl.in template.

The solution security policy description in this example allows any interaction between different processes and between processes and the kernel. This policy can be used only as a stub during the early stages of a solution development so that the security module does not interfere with interactions.

Resources

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

Operating scenario

The Client program tests the following operations:

The hard disk image hdd.img for QEMU is created via the script /opt/KasperskyOS-Community-Edition-<platform>-<version>/common/prepare_hdd_img.sh and contains two partitions with the FAT32 and ext4 file systems.

Building and running the example

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

See Building and running examples section.

Page top