Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README_zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ openvela 支持各种不同的架构(ARM32、ARM64、RISC-V、Xtensa、MIPS、

| 子仓库链接 | 描述 |
| :----------------------------------------------------------- | :----------------------------------------------------------- |
| [frameworks](https://github.com/open-vela/frameworks) | openvela 服务框架:主要包含蓝牙、电话、图形、多媒体、应用框架、安全、系统服务框架(KVDB、OTA、healthd、binder、charger 等)。|
| [vendor](https://github.com/open-vela/vendor) | 芯片原厂的驱动和框架。 |
| [nuttx](https://github.com/open-vela/nuttx) | 基于开源实时操作系统 NuttX 打造的内核,提供基础的内核功能,包括任务调度、跨进程通信、文件系统、TCP/IP 协议栈、设备驱动和电源管理等,同时对上提供标准的 POSIX 接口。如果您想要对 NuttX 操作系统有更深入了解,可以在 [Apache NuttX](https://nuttx.apache.org/) 官网查看更多信息。 |
| [apps](https://github.com/open-vela/nuttx-apps) | `apps` 是开源实时操作系统(NuttX)的应用程序库,包含了一系列为 NuttX RTOS 设计的应用程序和实用工具。这些应用程序和工具包括 shell 命令行工具、文件系统工具、网络工具等,它们可以帮助开发者更方便地开发和调试基于 NuttX RTOS 的嵌入式系统。 |
| [external](https://github.com/open-vela/external) | openvela 引入的三方库。 |
| [tests]([../../../../open-vela/tests](https://github.com/open-vela/tests)) | 该仓库包含接口测试,具体包括多媒体、文件系统、内存管理和 socket 通信等核心 API 的测试。 |
| [docs](https://github.com/open-vela/docs) | openvela 对应的开发者文档。 |
| [frameworks](../../../../open-vela/frameworks) | openvela 服务框架:主要包含蓝牙、电话、图形、多媒体、应用框架、安全、系统服务框架(KVDB、OTA、healthd、binder、charger 等)。|
| [vendor](../../../../open-vela/vendor) | 芯片原厂的驱动和框架。 |
| [nuttx](../../../../open-vela/nuttx) | 基于开源实时操作系统 NuttX 打造的内核,提供基础的内核功能,包括任务调度、跨进程通信、文件系统、TCP/IP 协议栈、设备驱动和电源管理等,同时对上提供标准的 POSIX 接口。如果您想要对 NuttX 操作系统有更深入了解,可以在 [Apache NuttX](https://nuttx.apache.org/) 官网查看更多信息。 |
| [apps](../../../../open-vela/apps) | `apps` 是开源实时操作系统(NuttX)的应用程序库,包含了一系列为 NuttX RTOS 设计的应用程序和实用工具。这些应用程序和工具包括 shell 命令行工具、文件系统工具、网络工具等,它们可以帮助开发者更方便地开发和调试基于 NuttX RTOS 的嵌入式系统。 |
| [external](../../../../open-vela/external) | openvela 引入的三方库。 |
| [tests](../../../../open-vela/tests) | 该仓库包含接口测试,具体包括多媒体、文件系统、内存管理和 socket 通信等核心 API 的测试。 |
| [docs](../../../../open-vela/docs) | openvela 对应的开发者文档。 |

## 示例

Expand Down
20 changes: 10 additions & 10 deletions en/device_dev_guide/build/build_system.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Build System

## 1. Overview
## I. Overview

In the current version, **openvela** uses `Makefile` to organize the build process. The main entry point for the build process is located in the `nuttx/Makefile` file. Depending on the host platform, different core build files are executed:

Expand All @@ -13,11 +13,11 @@ The `nuttx/tools/` directory contains the necessary scripts and C programs requi

In addition to the core build files, the following key files and configurations are required to build **openvela**:

1. **Board-level macros and build options file:**
1. **Board-level macros and build options file.**
- **Location:** `nuttx/Make.defs`.
- **Source:** Copied from the template file located at `nuttx/board/${arch}/${chip}/${board}/${config}/scripts/Make.defs`.

2. **Conditional build configuration file:**
2. **Conditional build configuration file.**
- **Location:** `configs/defconfig` in the root directory.
- **Function:**
- Copied as `.config` and serves as the base configuration file for **openvela**, supporting highly customizable and modular configurations.
Expand All @@ -26,27 +26,27 @@ In addition to the core build files, the following key files and configurations

### 2. Key Points in the Build Process

1. **Configuring the Host Build Environment:**
1. **Configuring the Host Build Environment.**
Use the `nuttx/tools/configure.sh` script to select the appropriate configuration for the build host.

2. **Key File Inclusions:**
2. **Key File Inclusions.**
In the `Make.defs` file, the following two critical files are included and passed to different stages of the `Makefile` process:

- `nuttx/.config`: The build configuration file.
- `nuttx/tools/Config.mk`: A file containing common macro definitions.

3. **File Generation and Invocation:**

1. **File Generation:**
1. **File Generation.**
- At various stages of the `Makefile` execution, the `Makefile`, `Make.defs`, and `Make.dep` files in the `nuttx/` and `apps/` directories and their subdirectories are either generated or invoked.
- **`Make.dep`:** Generated using the `tools/mkdep` tool during the build process. Internally, it utilizes the `gcc -M` command to create dependency statements in a format compliant with `Makefile` build targets.

2. **File Invocation:**
2. **File Invocation.**
- `Makefile` files in subdirectories include the board-level macros configuration file `nuttx/Make.defs` at the top.

By organizing the build system in this way, **openvela** achieves a flexible build process that supports multi-platform builds and highly modular configurations.

## 2. Build Dependency Tree
## II. Build Dependency Tree

The following section summarizes the build target dependency tree based on the **FlatMode sim:nsh** board configuration.

Expand Down Expand Up @@ -398,7 +398,7 @@ endif
sort > $(TOPDIR)/System.map
```

### Key Points:
### Key Points

- Intermediate File Generation: Produces the `nuttx.rel` file as an intermediate result of the link process.
- Symbol Table Processing: Uses `OBJCOPY` and `sed` to modify the symbol table, ensuring symbol names conform to requirements.
Expand Down Expand Up @@ -474,7 +474,7 @@ endif
$(call POSTBUILD, $(TOPDIR))
```

### Key Points:
### Key Points

- Multi-format support: Generate `.hex`, `.srec`, `.bin`, and `uImage` files based on configuration options.
- U-Boot image generation: Use the `mkimage` tool to create the `uImage` file, with support for automatically copying it to the TFTP directory.
Expand Down
2 changes: 1 addition & 1 deletion zh-cn/contribute/process/doc_dev_process.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

如果你负责开发某一特性,你需要与文档团队一起配合,确保在版本发布之前完成该特性所配套文档的开发。否则,未提供配套文档的特性在发布时可能被移除。

1. 联系[文档团队资料作者](https://github.com/open-vela/docs/blob/dev/zh-cn/contribute/process/doc_reviewer.md),讨论文档设计。
1. 联系[文档团队资料作者](./doc_reviewer.md),讨论文档设计。
2. 参考[文档写作模板](https://github.com/open-vela/docs/tree/dev/zh-cn/contribute/template)进行配套文档的写作。
3. 为功能特性撰写详细的文档初稿,提交 PR 并在描述中提供对应的需求 `Issue` 链接。

Expand Down
4 changes: 2 additions & 2 deletions zh-cn/demo/Music_Player_Example_zh-cn.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 音乐播放器 Demo
# 音乐播放器

\[ [English](./../../en/demo/Music_Player_Example.md) | 简体中文 \]

Expand Down Expand Up @@ -179,4 +179,4 @@ music_player &

2. 退出模拟器。

3. 重新执行 [步骤三](#步骤三-启动模拟器并推送资源)[步骤四](#步骤四-启动音乐播放器)。
3. 重新执行[步骤三](#步骤三-启动模拟器并推送资源)[步骤四](#步骤四-启动音乐播放器)。
4 changes: 2 additions & 2 deletions zh-cn/demo/Smart_Band_Example_zh-cn.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 手环 Bandx Demo
# 手环 Bandx

\[ [English](../../en/demo/Smart_Band_Example.md) | 简体中文 \]

Expand Down Expand Up @@ -152,4 +152,4 @@ sudo apt install android-tools-adb

#### 解决方案

请按 [步骤三](#步骤三-启动模拟器并推送资源) 进行资源推送。
请按[步骤三](#步骤三-启动模拟器并推送资源)进行资源推送。
4 changes: 2 additions & 2 deletions zh-cn/demo/X_Track_zh-cn.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 自行车码表示例
# 自行车码表

\[ [English](../../en/demo/X_Track.md) | 简体中文 \]

Expand Down Expand Up @@ -157,7 +157,7 @@ sudo apt install android-tools-adb

#### 解决方案

请按 [步骤三](#步骤三-启动模拟器并推送资源) 进行资源推送。
请按[步骤三](#步骤三-启动模拟器并推送资源)进行资源推送。

### 3. 为什么没有地图显示功能

Expand Down
2 changes: 1 addition & 1 deletion zh-cn/demo/hello_world/Hello_World.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 添加 Hello World 示例
# 添加 Hello World

## 一、概述

Expand Down
11 changes: 6 additions & 5 deletions zh-cn/device_dev_guide/build/build_system.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,34 @@

除了核心编译文件外,编译 openvela 时还需要以下关键文件和配置:

1. 板级构建宏定义与构建选项文件
1. 板级构建宏定义与构建选项文件

- 文件位置:`nuttx/Make.defs`。
- 来源:从模板文件 `nuttx/board/${arch}/${chip}/${board}/${config}/scripts/Make.defs` 拷贝而来。

2. 条件编译配置文件
2. 条件编译配置文件

- 文件位置:根目录的 `configs/defconfig`。
- 功能:被拷贝为 `.config` 文件,作为 openvela 的基础配置文件,支持高度裁剪和模块化配置。
- 实现方式:通过各模块目录中的 `kernel Kconfig` 实现模块化配置。

### 2、编译流程关键点

1. 配置编译主机
1. 配置编译主机

使用 `nuttx/tools/configure.sh` 脚本选择编译主机的配置。

2. 关键文件包含
2. 关键文件包含

在 `Make.defs` 文件中,包含以下两个关键文件,这些文件会被传递给各阶段的 Makefile:

- `nuttx/.config`:构建配置文件。
- `nuttx/tools/Config.mk`:通用宏定义文件。

3. 文件生成与调用
3. 文件生成与调用

1. 文件生成

- 在 `nuttx/` 和 `apps/` 的各级子目录中,`Makefile`、`Make.defs` 和 `Make.dep` 文件会在 `Makefile` 执行的各阶段中被调用或生成。
- `Make.dep`:由工具 `tools/mkdep` 在编译过程中生成,其内部使用 `gcc -M` 命令生成符合 `Makefile` 构建目标格式的依赖语句。

Expand Down
4 changes: 2 additions & 2 deletions zh-cn/device_dev_guide/driver/driver_development.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ openvela 的驱动框架相对简单,并未提供像 Linux 系统中那样复

在 openvela 中,应用层通过系统调用访问驱动,其调用流程如下:

**系统调用 -> VFS(Virtual File System)-> 驱动**
系统调用 -> VFS(Virtual File System)-> 驱动。

为了理解驱动如何注册到文件系统中,需要先了解相关的数据结构。这些数据结构的定义位于 `include/nuttx/fs/fs.h` 文件中。

Expand Down Expand Up @@ -180,7 +180,7 @@ int register_driver(FAR const char *path, FAR const struct file_operations *fops
- 将 `priv` 数据存储到 `inode` 的私有字段中。
- 该字段通常用于存放驱动的私有数据,例如硬件相关的上下文信息。

## 二 驱动内部结构
## 二驱动内部结构

### 1、驱动类型与层次结构

Expand Down
25 changes: 9 additions & 16 deletions zh-cn/device_dev_guide/file_system/file_system.md
Original file line number Diff line number Diff line change
Expand Up @@ -592,13 +592,12 @@ int nx_mount(FAR const char *source, FAR const char *target,

文件系统挂载操作主要完成如下关键步骤:

1. (可选)查找文件系统操作函数集和块设备驱动(若需要)
1. (可选)查找文件系统操作函数集和块设备驱动。

- 调用 `mount_findfs()` 函数,根据传入的参数 `filesystemtype` 查找对应的文件系统操作函数集 `mops`。
- 如果文件系统需要块设备支持,则调用 `find_blockdriver()` 函数,根据传入的参数 `source` 查找对应的块设备驱动。

目的:
确定文件系统的操作方式,并关联相应的块设备驱动(如果需要),为后续的挂载操作做准备。
目的:确定文件系统的操作方式,并关联相应的块设备驱动(如果需要),为后续的挂载操作做准备。

> 注意
>
Expand All @@ -611,13 +610,11 @@ int nx_mount(FAR const char *source, FAR const char *target,
- 如果找到对应的 `inode`,检查其是否为有效的目录节点。
- 如果未找到对应的 `inode`,调用 `inode_reserve()` 函数创建一个新的 `mountpt_inode` 节点。

目的:

确定挂载点在文件系统中的位置,确保后续可以将文件系统挂载到指定路径。
目的:确定挂载点在文件系统中的位置,确保后续可以将文件系统挂载到指定路径。

> 注意
- > 挂载点必须是有效的目录节点,不能是特殊节点(如设备节点)。
- > 如果 `inode_reserve()` 失败,可能是因为路径无效、节点已存在或内存不足。
> - 挂载点必须是有效的目录节点,不能是特殊节点(如设备节点)。
> - 如果 `inode_reserve()` 失败,可能是因为路径无效、节点已存在或内存不足。

3. (可选)绑定文件系统与块设备驱动。

Expand All @@ -626,9 +623,7 @@ int nx_mount(FAR const char *source, FAR const char *target,
- 对于不需要块设备支持的文件系统,`bind()` 函数可能无需特殊处理。
- 对于需要块设备支持的文件系统,`bind()` 函数会将文件系统的整体状态保存在`fshandle` 中。

目的:

实现文件系统与块设备驱动的关联(如果需要),使文件系统能够通过块设备进行数据读写操作。
目的:实现文件系统与块设备驱动的关联(如果需要),使文件系统能够通过块设备进行数据读写操作。

> 注意
>
Expand All @@ -641,10 +636,8 @@ int nx_mount(FAR const char *source, FAR const char *target,
- 设置操作函数集 `mops`。
- 将文件系统的整体状态(`fshandle`)存储到 `mountpt_inode` 的 `i_private` 字段中。

目的:

完成挂载点的最终设置,使文件系统成功挂载到指定路径。
目的:完成挂载点的最终设置,使文件系统成功挂载到指定路径。

> 说明
- > 挂载完成后,用户可以通过挂载点访问文件系统中的文件和目录。
- > 当打开挂载点 `mountpt_inode` 时,系统会根据 `i_private` 字段取出对应的文件系统信息。
> - 挂载完成后,用户可以通过挂载点访问文件系统中的文件和目录。
> - 当打开挂载点 `mountpt_inode` 时,系统会根据 `i_private` 字段取出对应的文件系统信息。
4 changes: 2 additions & 2 deletions zh-cn/device_dev_guide/kernal/KernelDev.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ openvela 内核基于当前实时嵌入式操作系统中对 POSIX 标准支持
- 文件系统与网络支持:兼容多种文件系统和网络连接协议。
- 驱动接口兼容性:兼容 Linux/xBSD 驱动访问接口,为上层通用 Linux 用户程序、模块组件复用和互联通信奠定基础。

这些特性使得 Openvela 能够在嵌入式设备中提供高效、可靠的实时操作能力。
这些特性使得 openvela 能够在嵌入式设备中提供高效、可靠的实时操作能力。

## 二、支持的处理器架构

Expand Down Expand Up @@ -43,7 +43,7 @@ openvela 同时支持以下多处理器模式:
1. SMP(Symmetric Multiprocessing):多个处理器共享同一内存和总线,提升并发响应效率。
2. AMP(Asymmetric Multiprocessing):每个处理器拥有独立的内存和总线,并通过通信机制实现协作。

这些特性使得 Openvela 能够在多个芯片和子系统上同时部署,确保系统的可靠性和实时性能。
这些特性使得 openvela 能够在多个芯片和子系统上同时部署,确保系统的可靠性和实时性能。

## 三、相关仓

Expand Down
Loading