build_kos_qemu_image()

August 2, 2023

ID cmake_build_qemu

This command is declared in the file /opt/KasperskyOS-Community-Edition-<version>toolchain/share/cmake/Modules/platform/image.cmake.

build_kos_qemu_image(NAME ...)

This command creates a CMake target for building a solution image that can then be used to build the image for QEMU using make.

Parameters:

  • NAME is the name of the CMake target for building a solution image. Required parameter.
  • PERFCNT_KERNEL – use the kernel with performance counters if it is available in KasperskyOS Community Edition.
  • EINIT_ENTITY is the name of the executable file that will be used to start the Einit program.
  • EXTRA_XDL_DIR refers to additional directories to include when building the Einit program.
  • CONNECTIONS_CFG is the path to the init.yaml file or init.yaml.in template.
  • SECURITY_PSL is the path to the security.psl file or security.psl.in template.
  • KLOG_ENTITY is the target for building the Klog system program, which is responsible for the security audit. If the target is not specified, the audit is not performed.
  • QEMU_FLAGS are additional flags for running QEMU.
  • IMAGE_BINARY_DIR_BIN is the directory for the final image and other artifacts. It matches CMAKE_CURRENT_BINARY_DIR by default.
  • IMAGE_FILES are the executable files of applications and system programs (except the Einit program) and any other files to be added to the ROMFS image.

    To add multiple applications or files, you can use multiple IMAGE_FILES parameters.

  • <path to files> are free parameters like IMAGE_FILES.

Example call:

build_kos_qemu_image ( kos-qemu-image

EINIT_ENTITY EinitQemu

CONNECTIONS_CFG "src/init.yaml.in"

SECURITY_CFG "src/security.cfg.in"

IMAGE_FILES ${ENTITIES})

For an example of using this command, see the article titled "CMakeLists.txt files for building the Einit program".

Did you find this article helpful?
What can we do better?
Thank you for your feedback! You're helping us improve.
Thank you for your feedback! You're helping us improve.