• Home
Name Date Size #Lines LOC

..--

apps/07-Sep-2024-8,0605,014

arch/07-Sep-2024-13,0427,948

bsd/07-Sep-2024-640471

compat/07-Sep-2024-5,9133,859

drivers/07-Sep-2024-5,8353,544

figures/07-Sep-2024-

fs/07-Sep-2024-32,28325,187

kernel/07-Sep-2024-65,50441,737

lib/07-Sep-2024-2,7681,941

net/07-Sep-2024-10,7497,927

platform/07-Sep-2024-271148

security/07-Sep-2024-813466

shell/07-Sep-2024-4,4553,053

syscall/07-Sep-2024-7,3655,801

testsuites/07-Sep-2024-219,747120,188

tools/07-Sep-2024-1,8761,373

.gitignoreD07-Sep-2024215 2520

BUILD.gnD07-Sep-202411.2 KiB443395

CHANGELOG.mdD07-Sep-202454.3 KiB339303

KconfigD07-Sep-202410 KiB342290

LICENSED07-Sep-20241.6 KiB2923

MakefileD07-Sep-20247.3 KiB199138

OAT.xmlD07-Sep-20246.3 KiB8838

README.mdD07-Sep-20246.6 KiB10677

README_zh-HK.mdD07-Sep-20245.3 KiB10576

README_zh.mdD07-Sep-20246 KiB11080

build.shD07-Sep-20242.5 KiB7032

bundle.jsonD07-Sep-20241.4 KiB6362

config.mkD07-Sep-20243.2 KiB6932

liteos.gniD07-Sep-20245.2 KiB157146

README.md

1# LiteOS Cortex-A<a name="EN-US_TOPIC_0000001096612501"></a>
2
3-   [Introduction](#section11660541593)
4-   [Directory Structure](#section161941989596)
5-   [Constraints](#section119744591305)
6-   [Usage](#section741617511812)
7-   [Preparations](#section1579912573329)
8-   [Source Code Acquisition](#section11443189655)
9-   [Compilation and Building](#section2081013992812)
10-   [Contribution](#section1371123476304)
11-   [Repositories Involved](#section1371113476307)
12
13## Introduction<a name="section11660541593"></a>
14
15The OpenHarmony LiteOS Cortex-A is a new-generation kernel developed based on the Huawei LiteOS kernel. Huawei LiteOS is a lightweight operating system \(OS\) built for the Internet of Things \(IoT\) field. With the rapid development of the IoT industry, OpenHarmony LiteOS Cortex-A brings small-sized, low-power, and high-performance experience and builds a unified and open ecosystem for developers. In addition, it provides rich kernel mechanisms, more comprehensive Portable Operating System Interface \(POSIX\), and a unified driver framework, Hardware Driver Foundation \(HDF\), which offers unified access for device developers and friendly development experience for application developers.  [Figure 1](#fig27311582210)  shows the architecture of the OpenHarmony LiteOS Cortex-A kernel.
16
17**Figure  1**  Architecture of the OpenHarmony LiteOS Cortex-A kernel<a name="fig27311582210"></a>
18![](figures/architecture-of-the-openharmony-liteos-cortex-a-kernel.png "architecture-of-the-openharmony-liteos-cortex-a-kernel")
19
20## Directory Structure<a name="section161941989596"></a>
21
22```
23/kernel/liteos_a
24├── apps                   # User-space init and shell application programs
25├── arch                   # System architecture, such as ARM
26│   └── arm                # Code for ARM architecture
27├── bsd                    # Code of the driver and adaptation layer module related to the FreeBSD, such as the USB module
28├── compat                 # Kernel API compatibility
29│   └── posix              # POSIX APIs
30├── drivers                # Kernel drivers
31│   └── char               # Character device
32│       ├── mem            # Driver for accessing physical input/output (I/O) devices
33│       ├── quickstart     # APIs for quick start of the system
34│       ├── random         # Driver for random number generators
35│       └── video          # Framework of the framebuffer driver
36├── fs                     # File system module, which mainly derives from the NuttX open-source project
37│   ├── fat                # FAT file system
38│   ├── jffs2              # JFFS2 file system
39│   ├── include            # Header files exposed externally
40│   ├── nfs                # NFS file system
41│   ├── proc               # proc file system
42│   ├── ramfs              # RAMFS file system
43│   └── vfs                # VFS layer
44├── kernel                 # Kernel modules including the process, memory, and IPC modules
45│   ├── base               # Basic kernel modules including the scheduling and memory modules
46│   ├── common             # Common components used by the kernel
47│   ├── extended           # Extended kernel modules including the dynamic loading, vDSO, and LiteIPC modules
48│   ├── include            # Header files exposed externally
49│   └── user               # Init process loading
50├── lib                    # Kernel library
51├── net                    # Network module, which mainly derives from the lwIP open-source project
52├── platform               # Code for supporting different systems on a chip (SOCs), such as Hi3516D V300
53│   ├── hw                 # Logic code related to clocks and interrupts
54│   ├── include            # Header files exposed externally
55│   └── uart               # Logic code related to the serial port
56├── platform               # Code for supporting different systems on a chip (SOCs), such as Hi3516D V300
57├── security               # Code related to security features, including process permission management and virtual ID mapping management
58├── syscall                # System calling
59└── tools                  # Building tools as well as related configuration and code
60```
61
62## Constraints<a name="section119744591305"></a>
63
64-   Programming languages: C and C++
65-   Applicable development boards: Hi3516D V300
66-   Hi3516D V300 uses the FAT file system by default.
67
68## Usage<a name="section741617511812"></a>
69
70OpenHarmony LiteOS Cortex-A supports the  [Hi3516D V300](https://gitee.com/openharmony/docs/blob/master/en/device-dev/quick-start/quickstart-appendix-hi3516.md). You can develop and run your applications based on this development board.
71
72### Preparations<a name="section1579912573329"></a>
73
74You need to set up the compilation environment on Ubuntu.
75
76-   [Setting Up Ubuntu Development Environment](https://gitee.com/openharmony/docs/blob/master/en/device-dev/quick-start/Readme-EN.md)
77
78### Source Code Acquisition<a name="section11443189655"></a>
79
80Download and decompress a set of source code on a Ubuntu server to acquire the  [source code](https://gitee.com/openharmony/docs/blob/master/en/device-dev/get-code/sourcecode-acquire.md).
81
82### Compilation and Building<a name="section2081013992812"></a>
83
84For details about how to develop the first application, see: [Developing the First Example Program Running on Hi3516](https://gitee.com/openharmony/docs/blob/master/en/device-dev/quick-start/quickstart-pkg-3516-helloworld.md)
85
86For compilation, please refer to the [compilation instructions](https://gitee.com/openharmony/docs/blob/master/en/device-dev/quick-start/quickstart-pkg-3516-build.md).
87
88## Contribution<a name="section1371123476304"></a>
89
90[How to involve](https://gitee.com/openharmony/docs/blob/HEAD/en/contribute/contribution-guide.md)
91
92[Commit message spec](https://gitee.com/openharmony/kernel_liteos_a/wikis/Commit%20message%20%E8%A7%84%E8%8C%83)
93
94[C&C++ Secure Coding Guide](https://gitee.com/openharmony/docs/blob/master/en/contribute/OpenHarmony-c-cpp-secure-coding-guide.md)
95
96[LiteOS-A Kernel Coding Style Guide](https://gitee.com/openharmony/kernel_liteos_a/wikis/LiteOS-A%20%E5%86%85%E6%A0%B8%E7%BC%96%E7%A0%81%E8%A7%84%E8%8C%83%E6%8C%87%E5%8D%97)
97
98## Repositories Involved<a name="section1371113476307"></a>
99
100[Kernel subsystem](https://gitee.com/openharmony/docs/blob/master/en/readme/kernel.md)
101
102[drivers\_liteos](https://gitee.com/openharmony/drivers_liteos/blob/master/README.md)
103
104[kernel\_liteos\_a](https://gitee.com/openharmony/kernel_liteos_a/blob/master/README.md)
105
106

README_zh-HK.md

1# LiteOS-A內核<a name="ZH-CN_TOPIC_0000001096612501"></a>
2
3- [簡介](#section11660541593)
4- [目錄](#section161941989596)
5- [約束](#section119744591305)
6- [使用說明](#section741617511812)
7- [準備](#section1579912573329)
8- [獲取源碼](#section11443189655)
9- [編譯構建](#section2081013992812)
10- [貢獻](#section1371123476304)
11- [相關倉](#section1371113476307)
12
13## 簡介<a name="section11660541593"></a>
14
15OpenHarmony LiteOS-A內核是基於Huawei LiteOS內核演進發展的新一代內核,Huawei LiteOS是面向IoT領域構建的輕量級物聯網操作系統。在IoT產業高速發展的潮流中,OpenHarmony LiteOS-A內核能夠帶給用戶小體積、低功耗、高性能的體驗以及統一開放的生態系統能力,新增了豐富的內核機制、更加全面的POSIX標準接口以及統一驅動框架**HDF**(OpenHarmony Driver Foundation)等,為設備廠商提供了更統一的接入方式,為OpenHarmony的應用開發者提供了更友好的開發體驗。圖1為OpenHarmony LiteOS-A內核架構圖:
16
17**圖 1** OpenHarmony LiteOS-A內核架構圖<a name="fig27311582210"></a>
18
19![](figures/OpenHarmony-LiteOS-A内核架构图.png "OpenHarmony-LiteOS-A內核架構圖")
20
21## 目錄<a name="section161941989596"></a>
22
23```
24/kernel/liteos_a
25├── apps # 用戶態的init和shell應用程序
26├── arch # 體系架構的目錄,如arm等
27│ └── arm # arm架構代碼
28├── bsd # freebsd相關的驅動和適配層模塊代碼引入,例如USB等
29├── compat # 內核接口兼容性目錄
30│ └── posix # posix相關接口
31├── drivers # 內核驅動
32│ └── char # 字符設備
33│ ├── mem # 訪問物理IO設備驅動
34│ ├── quickstart # 系統快速啟動接口目錄
35│ ├── random # 隨機數設備驅動
36│ └── video # framebuffer驅動框架
37├── fs # 文件系統模塊,主要來源於NuttX開源項目
38│ ├── fat # fat文件系統
39│ ├── jffs2 # jffs2文件系統
40│ ├── include # 對外暴露頭文件存放目錄
41│ ├── nfs # nfs文件系統
42│ ├── proc # proc文件系統
43│ ├── ramfs # ramfs文件系統
44│ └── vfs # vfs層
45├── kernel # 進程、內存、IPC等模塊
46│ ├── base # 基礎內核,包括調度、內存等模塊
47│ ├── common # 內核通用組件
48│ ├── extended # 擴展內核,包括動態加載、vdso、liteipc等模塊
49│ ├── include # 對外暴露頭文件存放目錄
50│ └── user # 加載init進程
51├── lib # 內核的lib庫
52├── net # 網絡模塊,主要來源於lwip開源項目
53├── platform # 支持不同的芯片平台代碼,如Hi3516DV300等
54│ ├── hw # 時鐘與中斷相關邏輯代碼
55│ ├── include # 對外暴露頭文件存放目錄
56│ └── uart # 串口相關邏輯代碼
57├── security # 安全特性相關的代碼,包括進程權限管理和虛擬id映射管理
58├── syscall # 系統調用
59└── tools # 構建工具及相關配置和代碼
60```
61
62## 約束<a name="section119744591305"></a>
63
64- 開發語言:C/C++;
65- 適用於Hi3516DV300單板;
66- Hi3516DV300默認使用FAT文件系統。
67
68## 使用說明<a name="section741617511812"></a>
69
70OpenHarmony LiteOS-A內核支持[Hi3516DV300](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-appendix-hi3516.md)單板,開發者可基於此單板開發運行自己的應用程序。
71
72### 準備<a name="section1579912573329"></a>
73
74開發者需要在Ubuntu上搭建編譯環境:
75
76- [編譯環境凖備](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/Readme-CN.md);
77
78### 獲取源碼<a name="section11443189655"></a>
79
80在Ubuntu服務器上下載並解壓一套源代碼,源碼獲取方式參考[源碼獲取](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/get-code/sourcecode-acquire.md)81
82### 編譯構建<a name="section2081013992812"></a>
83
84開發者開發第一個應用程序可參考:[helloworld for Hi3516DV300](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-pkg-3516-helloworld.md)85
86編譯可以參考:[編譯指導](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-pkg-3516-build.md)
87
88## 貢獻<a name="section1371123476304"></a>
89
90[如何貢獻](https://gitee.com/openharmony/docs/blob/HEAD/zh-cn/contribute/%E5%8F%82%E4%B8%8E%E8%B4%A1%E7%8C%AE.md)
91
92[Commit message規範](https://gitee.com/openharmony/kernel_liteos_a/wikis/Commit%20message%20%E8%A7%84%E8%8C%83)
93
94[OpenHarmony C&C++ 安全編程指南](https://gitee.com/openharmony/docs/blob/master/zh-cn/contribute/OpenHarmony-c-cpp-secure-coding-guide.md)
95
96[LiteOS-A 內核編碼規範指南](https://gitee.com/openharmony/kernel_liteos_a/wikis/LiteOS-A%20%E5%86%85%E6%A0%B8%E7%BC%96%E7%A0%81%E8%A7%84%E8%8C%83%E6%8C%87%E5%8D%97)
97
98## 相關倉<a name="section1371113476307"></a>
99
100[內核子系統](https://gitee.com/openharmony/docs/blob/master/zh-cn/readme/%E5%86%85%E6%A0%B8%E5%AD%90%E7%B3%BB%E7%BB%9F.md)
101
102[drivers\_liteos](https://gitee.com/openharmony/drivers_liteos/blob/master/README_zh.md)
103
104[kernel\_liteos\_a](https://gitee.com/openharmony/kernel_liteos_a/blob/master/README_zh-HK.md)
105

README_zh.md

1# LiteOS-A内核<a name="ZH-CN_TOPIC_0000001096612501"></a>
2
3-   [简介](#section11660541593)
4-   [目录](#section161941989596)
5-   [约束](#section119744591305)
6-   [使用说明](#section741617511812)
7-   [准备](#section1579912573329)
8-   [获取源码](#section11443189655)
9-   [编译构建](#section2081013992812)
10-   [贡献](#section1371123476304)
11-   [相关仓](#section1371113476307)
12
13## 简介<a name="section11660541593"></a>
14
15OpenHarmony LiteOS-A内核是基于Huawei LiteOS内核演进发展的新一代内核,Huawei LiteOS是面向IoT领域构建的轻量级物联网操作系统。在IoT产业高速发展的潮流中,OpenHarmony LiteOS-A内核能够带给用户小体积、低功耗、高性能的体验以及统一开放的生态系统能力,新增了丰富的内核机制、更加全面的POSIX标准接口以及统一驱动框架**HDF**(OpenHarmony Driver Foundation)等,为设备厂商提供了更统一的接入方式,为OpenHarmony的应用开发者提供了更友好的开发体验。图1为OpenHarmony LiteOS-A内核架构图:
16
17**图 1**  OpenHarmony LiteOS-A内核架构图<a name="fig27311582210"></a>
18![](figures/OpenHarmony-LiteOS-A内核架构图.png "OpenHarmony-LiteOS-A内核架构图")
19
20## 目录<a name="section161941989596"></a>
21
22```
23/kernel/liteos_a
24├── apps                   # 用户态的init和shell应用程序
25├── arch                   # 体系架构的目录,如arm等
26│   └── arm                # arm架构代码
27├── bsd                    # freebsd相关的驱动和适配层模块代码引入,例如USB等
28├── compat                 # 内核接口兼容性目录
29│   └── posix              # posix相关接口
30├── drivers                # 内核驱动
31│   └── char               # 字符设备
32│       ├── mem            # 访问物理IO设备驱动
33│       ├── quickstart     # 系统快速启动接口目录
34│       ├── random         # 随机数设备驱动
35│       └── video          # framebuffer驱动框架
36├── figures                # 内核架构图
37├── fs                     # 文件系统模块,主要来源于NuttX开源项目
38│   ├── fat                # fat文件系统
39│   ├── jffs2              # jffs2文件系统
40│   ├── include            # 对外暴露头文件存放目录
41│   ├── nfs                # nfs文件系统
42│   ├── proc               # proc文件系统
43│   ├── ramfs              # ramfs文件系统
44│   └── vfs                # vfs层
45├── kernel                 # 进程、内存、IPC等模块
46│   ├── base               # 基础内核,包括调度、内存等模块
47│   ├── common             # 内核通用组件
48│   ├── extended           # 扩展内核,包括动态加载、vdso、liteipc等模块
49│   ├── include            # 对外暴露头文件存放目录
50│   └── user               # 加载init进程
51├── lib                    # 内核的lib库
52├── net                    # 网络模块,主要来源于lwip开源项目
53├── platform               # 支持不同的芯片平台代码,如Hi3516DV300等
54│   ├── hw                 # 时钟与中断相关逻辑代码
55│   ├── include            # 对外暴露头文件存放目录
56│   └── uart               # 串口相关逻辑代码
57├── security               # 安全特性相关的代码,包括进程权限管理和虚拟id映射管理
58├── shell                  # 接收用户输入的命令,内核去执行
59├── syscall                # 系统调用
60├── testsuilts             # 测试套件
61└── tools                  # 构建工具及相关配置和代码
62```
63
64## 约束<a name="section119744591305"></a>
65
66-   开发语言:C/C++;
67-   适用于Hi3516DV300单板;
68-   Hi3516DV300默认使用FAT文件系统。
69
70## 使用说明<a name="section741617511812"></a>
71
72OpenHarmony LiteOS-A内核支持[Hi3516DV300](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-appendix-hi3516.md)单板。开发者可基于此单板开发运行自己的应用程序。
73
74### 准备<a name="section1579912573329"></a>
75
76开发者需要在Ubuntu上搭建编译环境:
77
78-   [编译环境准备](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/Readme-CN.md);
79
80### 获取源码<a name="section11443189655"></a>
81
82在Ubuntu服务器源码获取方式参考: [源码获取](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/get-code/sourcecode-acquire.md)83
84### 编译构建<a name="section2081013992812"></a>
85
86如果这是您的首次应用程序开发,可参考:[helloworld for Hi3516DV300](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-pkg-3516-helloworld.md)87
88编译可以参考:[编译指导](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-pkg-3516-build.md)
89
90测试参考:[单元测试](testsuites/unittest/tools/README.md)
91
92## 贡献<a name="section1371123476304"></a>
93
94[如何贡献](https://gitee.com/openharmony/docs/blob/HEAD/zh-cn/contribute/%E5%8F%82%E4%B8%8E%E8%B4%A1%E7%8C%AE.md)
95
96[Commit message规范](https://gitee.com/openharmony/kernel_liteos_a/wikis/Commit%20message%20%E8%A7%84%E8%8C%83)
97
98[OpenHarmony C&C++ 安全编程指南](https://gitee.com/openharmony/docs/blob/master/zh-cn/contribute/OpenHarmony-c-cpp-secure-coding-guide.md)
99
100[LiteOS-A 内核编码规范指南](https://gitee.com/openharmony/kernel_liteos_a/wikis/LiteOS-A%20%E5%86%85%E6%A0%B8%E7%BC%96%E7%A0%81%E8%A7%84%E8%8C%83%E6%8C%87%E5%8D%97)
101
102## 相关仓<a name="section1371113476307"></a>
103
104[内核子系统](https://gitee.com/openharmony/docs/blob/master/zh-cn/readme/%E5%86%85%E6%A0%B8%E5%AD%90%E7%B3%BB%E7%BB%9F.md)
105
106[drivers\_liteos](https://gitee.com/openharmony/drivers_liteos/blob/master/README_zh.md)
107
108[kernel\_liteos\_a](https://gitee.com/openharmony/kernel_liteos_a/blob/master/README_zh.md)
109
110