# Kernel Subsystem ## Overview The OpenHarmony kernel is a real-time OS kernel developed by Huawei for IoT devices. It is as lightweight as RTOS and as easy-to-use as Linux. The kernel repository is used to store the source code of the OpenHarmony kernel components, including process and thread scheduling, memory management, IPC mechanism, and timer management, as well as the version package compilation information. ## Directory Structure **Table 1** Directory structure of the OpenHarmony lightweight kernel source code

Directory

Description

apps

User-space init and shell application program

arch

System architecture, such as ARM

bsd

Code of the driver and adaptation layer module related to the FreeBSD, such as the USB module

compat

Compatibility with the kernel POSIX interfaces

fs

File system module, which mainly derives from the NuttX open-source project

kernel

Kernel modules including the process, memory, and IPC modules

lib

Kernel library

net

Network module, which mainly derives from the lwip open-source project

platform

Code for supporting different systems on a chip (SOCs), such as Hi3516DV300

security

Code related to security features, including process permission management and virtual ID mapping management

syscall

System calls

test

Kernel and user-space test cases

tools

Code related to compilation configuration and menuconfig

## Constraints By default, the JFFS2 file system is used during system startup. This file system is read-write. If other file systems need to be used, the configurations of the file systems must be added accordingly. ## Usage For details, see [en-us\_bookmap\_0000001050030794.md\#en-us\_topic\_0000001050032743](en-us_bookmap_0000001050030794.md#en-us_topic_0000001050032743). ## Repositories Involved drivers\_liteos kernel\_liteos\_a kernel\_liteos\_a\_huawei\_proprietary\_fs\_proc kernel\_liteos\_m