Contents
Build process overview
To build a solution image, the following is required:
- Prepare EDL, CDL and IDL descriptions of applications, an init description file (
init.yaml
by default), and files containing a description of the solution security policy (security.psl
by default).When building with
CMake
, an EDL description can be generated by using thegenerate_edl_file()
command. - Generate *.edl.h files for all programs except the system programs provided in KasperskyOS Community Edition.
- When building with
CMake
, thenk_build_edl_files()
command is used for this purpose. - When building without
CMake
, the NK compiler must be used for this.
- When building with
- For programs that implement their own IPC interface, generate code of the transport methods and types that are used for generating, sending, receiving and processing IPC messages.
- When building with
CMake
, thenk_build_idl_files()
andnk_build_cdl_files()
commands are used for these purposes. - When building without
CMake
, the NK compiler must be used for this.
- When building with
- Build all programs that are part of the solution, and link them to the transport libraries of system programs or applications if necessary. To build applications that implement their own IPC interface, you will need the code containing transport methods and types that was generated at step 3.
- When building with
CMake
, standard build commands are used for this purpose. The necessary cross-compilation configuration is done automatically. - When building without
CMake
, the cross compilers included in KasperskyOS Community Edition must be manually used for this purpose.
- When building with
- Build the Einit initializing program.
- When building with
CMake
, theEinit
program is built during the solution image build process using thebuild_kos_qemu_image()
andbuild_kos_hw_image()
commands. - When building without
CMake
, the einit tool must be used to generate the code of theEinit
program. Then theEinit
application must be built using the cross compiler that is provided in KasperskyOS Community Edition.
- When building with
- Build the Kaspersky Security Module.
- When building with
CMake
, the security module is built during the solution image build process using thebuild_kos_qemu_image()
andbuild_kos_hw_image()
commands. - When building without
CMake
, themakekss
script must be used for this purpose.
- When building with
- Create the solution image.
- When building with
CMake
, thebuild_kos_qemu_image()
andbuild_kos_hw_image()
commands are used for this purpose. - When building without
CMake
, themakeimg
script must be used for this.
- When building with
Example 1
For the basic hello
example included in KasperskyOS Community Edition that contains one application that does not provide any services, the build scenario looks as follows:
Example 2
The echo
example included in KasperskyOS Community Edition describes a basic case of interaction between two programs via an IPC mechanism. To set up this interaction, you will need to implement an interface with the Ping
method on a server and put the Ping
service into a new component (for example, Responder
), and an instance of this component needs to be put into the EDL description of the Server
program.
If a solution contains programs that utilize an IPC mechanism, the build scenario looks as follows: