同步操作将从 OpenHarmony/docs 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
The OpenHarmony lightweight kernel is a next-generation kernel that evolved from the kernel of Huawei LiteOS, a lightweight IoT operating system. The kernel comes with two patterns: LiteOS-M and LiteOS-A. The LiteOS-M kernel is designed for the mini system, which supports a Microcontroller Unit (MCU), memory of kilobytes, and Memory Protection Unit (MPU) isolation. Typical counterparts in the industry include FreeRTOS and ThreadX. The LiteOS-A kernel is ideal for the small system, which supports memory of megabytes and Memory Management Unit (MMU) isolation. Equivalent kernels include Zircon and Darwin.
NOTE: OpenHarmony provides different kernels for different systems. The small system supports LiteOS and Linux. This document applies to the LiteOS-A kernel. For details about operations related to the Linux kernel, see Linux Kernel Overview.
To keep pace with the rapid development of the IoT industry, the OpenHarmony lightweight kernel is continuously optimized and expanded to provide application developers with friendly development experience and unified and open ecosystem capabilities. The LiteOS-A has the following new features:
Diversified kernel mechanisms
Mechanisms such as virtual memory, system calling, multi-core, lightweight Inter-Process Communication (IPC), and Discretionary Access Control (DAC) are added to enrich kernel capabilities. To improve compatibility with software and developer experience, multiple processes are supported to isolate memory between applications and improve system robustness.
Unified hardware driver foundation (HDF)
The HDF provides unified driver standards and access mode for device vendors. This simplifies porting of drivers and allows one-time development for multi-device deployment.
1200+ standard POSIX APIs
The kernel supports more Portable Operating System Interface (POSIX) APIs, which facilitate software development and porting and improve developers' experience.
Decoupling between the kernel and hardware
The lightweight kernel is highly decoupled from the hardware. New board can be added without modifying the kernel code.
The lightweight kernel consists of the basic kernel, extended components, HDF, and POSIX APIs. Different from the microkernel which is running in the user mode, the extended functions, such as the file system and network protocols, of the lightweight kernel are running in the kernel address space. The direct function calling between components is much faster than inter-process communication (IPC) or remote procedure calls (RPCs).
Figure 1 Architecture of the OpenHarmony LiteOS-A kernel
Basic Kernel
The basic kernel implements the following mechanisms:
File systems
The LiteOS-A supports multiple file systems, such as FAT, JFFS2, NFS, ramfs, and procfs, and provides complete standard POSIX APIs. The VFS layer is used as the unified adaptation layer framework, which facilitates the porting of new file systems. Each file system can automatically use the rich functions provided by the VFS layer.
The following features are supported:
Network Protocols
The LiteOS-A network protocols are constructed based on the open-source lightweight IP (lwIP), optimizing the RAM usage while improving the transmission performance over lwIP.
HDF
The LiteOS-A integrates the HDF framework. The HDF framework provides a more precise and efficient development environment, aiming to realize one-time development for multi-device deployment. The HDF supports:
Extended Components
Extended components provide optional but important mechanism for extending kernel functions.
/kernel/liteos_a
├── apps # User-space init and shell application programs
├── arch # System architecture, such as ARM
│ └── arm # Code for ARM architecture
├── bsd # Code of the driver and adaptation layer module related to the FreeBSD, such as the USB module
├── compat # Kernel API compatibility
│ └── posix # POSIX APIs
├── drivers # Kernel drivers
│ └── char # Character device
│ ├── mem # Driver for accessing physical input/output (I/O) devices
│ ├── quickstart # APIs for quick start of the system
│ ├── random # Driver for random number generators
│ └── video # Framework of the framebuffer driver
├── fs # File system module, which mainly derives from the NuttX open-source project
│ ├── fat # FAT file system
│ ├── jffs2 # JFFS2 file system
│ ├── include # Header files exposed externally
│ ├── nfs # NFS file system
│ ├── proc # proc file system
│ ├── ramfs # RAMFS file system
│ └── vfs # VFS layer
├── kernel # Kernel modules including the process, memory, and IPC modules
│ ├── base # Basic kernel modules including the scheduling and memory modules
│ ├── common # Common components used by the kernel
│ ├── extended # Extended kernel modules including the dynamic loading, vDSO, and LiteIPC modules
│ ├── include # Header files exposed externally
│ └── user # Init process loading
├── 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 Hi3516D V300
│ ├── hw # Logic code related to clocks and interrupts
│ ├── include # Header files exposed externally
│ └── uart # Logic code related to the serial port
├── platform # Code for supporting different systems on a chip (SOCs), such as Hi3516D V300
├── security # Code related to security features, including process permission management and virtual ID mapping management
├── syscall # System calling
└── tools # Building tools as well as related configuration and code
OpenHarmony LiteOS Cortex-A supports the Hi3516D V300. You can develop and run your applications based on this development board.
You need to set up the compilation environment on Linux.
Download and decompress a set of source code on a Linux server to acquire the source code.
For details about how to develop the first application, see:
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。