KasperskyOS Community Edition 1.3

multi_vfs_ntpd example

This example demonstrates support of the Network Time Protocol (NTP) for synchronizing the system time 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-<version>/examples/multi_vfs_ntpd

List of programs

  • Client – application that changes the current system time.
  • Ntpd – system program that implements the NTP client that synchronizes the system time with NTP servers.
  • Dhcpcd – system program that implements the DHCP client.
  • VfsSdCardFs – system program that supports the file system of SD cards.
  • VfsNet – system program that supports network protocols.
  • EntropyEntity – system program that implements random number generation.
  • DNetSrv – network card driver.
  • SDCard – SD card driver.
  • BSP – driver for configuring pin multiplexing settings (pinmux).
  • Bcm2711MboxArmToVc – driver for working with the VideoCore (VC6) coprocessor via mailbox technology for Raspberry Pi 4 B.

Initialization description

The solution initialization description file named init.yaml is generated during the solution build process based on the following template:

./einit/src/init.yaml.in

When building the example, the @INIT_Client_ENTITY_CONNECTIONS+@ macro in the init.yaml.in template in the init.yaml file is replaced by a list of IPC channels with all the system programs that are linked to the Client program. This list serves as a supplement to the manually defined IPC channels in the init.yaml.in template.

When building the example, the @INIT_FileVfs_ENTITY_CONNECTIONS@ macro in the init.yaml file is replaced by a list of IPC channels with all the system programs that are linked to the FileVfs program.

During the build, the @INIT_EXTERNAL_ENTITIES@ macro in the init.yaml.in template in the init.yaml file is replaced by a list of system programs that are linked to applications. This list contains the IPC channels of system programs, the run parameters of the main() function, and the values of environment variables.

For more details, see 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

Resources

  • The ./resources/edl directory contains the Client.edl file, which provides the formal specification of the KasperskyOS-based solution component.
  • The directory ./resources/hdd/etc contains the configuration files for the VfsNet, Dhcpcd and Ntpd programs: hosts, dhcpcd.conf and ntp.conf, respectively.

Operating scenario

The Client program changes the current system time to the time specified in the macro. After the time is synchronized by the Ntpd program, the year in the received system time is expected to differ from the year that was previously set by the macro.

Building and running the example

See Building and running examples section.