This example demonstrates use of the pcre library 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-<platform>-<version>/examples/pcre
List of programs
Client – application that uses the pcre library and prints the results to the console.DCM – system program that lets you dynamically create IPC channels.BlobContainer – system program required for working with dynamic libraries in shared memory.VfsSdCardFs – system program that supports the file system of SD cards.SDCard – SD card driver.EntropyEntity – system program that implements random number generation.When you build an example for the target hardware platform, platform-specific drivers are automatically included in the solution:
BSP is a hardware platform support package (Board Support Package). Provides cross-platform configuration of peripherals for the Radxa ROCK 3A and Raspberry Pi 4 B.GPIO – GPIO support driver for the Radxa ROCK 3A and Raspberry Pi 4 B.PinCtrl – low-level pin multiplexing (pinmux) configuration driver for the Radxa ROCK 3A.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 ./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 a description of a security policy for a KasperskyOS-based solution and is located in the ./einit/src directory. The declarations in the PSL file are provided with comments that explain the purpose of these declarations.
Resources
The ./resources/xdl/pcre directory contains the Client.edl file, which is the EDL description of the Client program.
Operating scenario
The Client program performs the following actions:
Kaspersky template.Kaspersky in the prepared text using the FindAndConsume() method.EXIT_SUCCESS code.Building and running the example
The CMake system, which is included with KasperskyOS Community Edition, is used to build and run the example.
To ensure that the pcre example will correctly run on the target hardware platform, you must do the following after building the example and preparing your bootable SD card:
/lib directory on the bootable SD card if this directory doesn't already exist.build/hdd/lib directory that was generated when building the example and copy the directory contents to the /lib directory on the bootable SD card.If you use the build_sd_image() function to create a bootable SD card image, no additional action is required.
See Building and running examples section.
Page top