Building the examples
The examples are built using the CMake build system that is included in KasperskyOS Community Edition.
The code of the examples and build scripts are available at the following path:
/opt/KasperskyOS-Community-Edition-<version>/examples
Examples must be built in the home directory. For this reason, the directory containing the example that you need to build must be copied from /opt/KasperskyOS-Community-Edition-<version>/examples to the home directory.
Building the examples to run on QEMU
To build an example, go to the directory with the example and run this command:
$ ./cross-build.sh
Running cross-build.sh creates a KasperskyOS-based solution image that includes the example. The kos-qemu-image solution image is located in the <name of example>/build/einit directory.
Building the examples to run on Raspberry Pi 4 B
To build an example:
- Go to the directory with the example.
- Open the
cross-build.shscript file in a text editor. - In the last line of the script file, replace the
make simcommand withmake kos-image. - Save the script file and then run the command:
$ ./cross-build.sh
Running cross-build.sh creates a KasperskyOS-based solution image that includes the example. The kos-image solution image is located in the <name of example>/build/einit directory.