This example demonstrates the use of a PCI Express solid-state storage device that supports the NVMe (Non-Volatile Memory Express) protocol. The block device driver is used to access the storage device.
The solid state drive is connected to the Radxa ROCK 3A hardware platform via the M.2 M-key connector.
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/nvme_blockdevice
List of programs
NvmeBlockdevice – application that performs read-and-write operations with a solid-state storage device.DCM – system program that lets you dynamically create IPC channels.NVME – block device driver that supports the NVMe interface used to communicate with high-speed SSDs over the PCIe bus.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 peripheral configuration.PCIE – PCIe bus driver for the Radxa ROCK 3A.GPIO – GPIO support driver for the Radxa ROCK 3A.PinCtrl – low-level pin multiplexing (pinmux) configuration driver for the Radxa ROCK 3A.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.
Operating scenario
The NvmeBlockdevice program performs the following actions:
Flush operation on an open device.Building and running the example
Before running the example on the hardware platform, you must build the drivers according to the instructions in the section Building drivers for the Radxa ROCK 3A hardware platform.
The CMake system, which is included with KasperskyOS Community Edition, is used to build and run the example.
This example is intended to run only on Radxa ROCK 3A.
See Building and running examples section.
Page top