From fa0d85e6646a81090b7d97533740cc52ec0da9d9 Mon Sep 17 00:00:00 2001 From: SimonLi Date: Tue, 20 Jul 2021 11:52:56 +0800 Subject: [PATCH] =?UTF-8?q?docs(readme):=20=E4=BF=AE=E5=A4=8DREADME?= =?UTF-8?q?=E7=9A=84=E7=9B=B8=E5=85=B3issue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit close https://gitee.com/openharmony-sig/vendor_ohos/commit/09c6b014d5b09df631f274bb260057a8ba515d84#diff_note_5899727 Signed-off-by: SimonLi --- README.md | 47 +++++++++++++++++++++++++++++++++++++++++---- README_zh.md | 54 ++++++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 91 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 48a9f57..0410863 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # vendor_ohos -[TOC] - ## Introduction The repository is mainly developed by OpenHarmony community, rather than the @@ -14,17 +12,58 @@ Graphic display product samples of virt platform supporting QEMU's ARMv7-a architecture, samples of virt platform supporting RISC-V architecture, and samples of Cortex-M4 architecture. +code path: + +``` +device/qemu/ --- device_qemu repository path +├── arm_mps2_an386 --- Cortex-M4 architecture MPS2-AN386 platform +├── arm_virt --- ARMv7-a architecture virt platform +├── drivers --- virt drivers +└── riscv32_virt --- RISC-V architecture virt platform +vendor/ohos/ --- vendor_ohos repository path +├── qemu_small_system_demo --- small system default demo +├── qemu_mini_system_demo --- mini system default demo +└── qemu_riscv_mini_system_demo --- mini system demo with riscv architecture +``` + ## Installation [QEMU Install Guide](https://gitee.com/openharmony/device_qemu/blob/master/README.md) ## Usage +1. run command `hb set` to select the product target ``` -hb set -hb build +ohos + > qemu_small_system_demo + qemu_mini_system_demo ``` +`qemu_small_system_demo` indicates small system product demo, it contains +system components, such as graphic, foundation, etc. + +`qemu_mini_system_demo` indicates mini system product demo, it contains +system components, such as samgr, hilog, etc. + +2. run command `hb build` to start building。 + +3. To run the image with qemu. In details, + +3.1 `qemu_small_system_demo` target, + +``` +./qemu-init +./qemu-run +``` + +use `vnc-client` to connect the host's 5920 port. + +3.2 `qemu_mini_system_demo` target, + +``` +cd device/qemu/arm_mps2_an386 +./qemu_run.sh ../../../out/arm_mps2_an386/bin/liteos +``` ## Contribution [How to involve](https://gitee.com/openharmony/docs/blob/master/en/contribute/contribution.md) diff --git a/README_zh.md b/README_zh.md index 41d3aed..0cdec57 100644 --- a/README_zh.md +++ b/README_zh.md @@ -1,26 +1,68 @@ # vendor_ohos -[TOC] - ## 介绍 -该仓库下主要用作OpenHarmony社区开发的,而非某个厂商单独开发的典型产品样例代码 -托管,主要包括类似QEMU的图形、软总线等特性产品的开发。 +该仓库托管OpenHarmony社区开发的,而非某个厂商单独开发的典型产品样例代码,主要 +包括类似QEMU(Quick Emulator)的图形、软总线等特性产品的开发。 ## 软件架构 支持QEMU的ARMv7-a架构的virt平台的图形显示产品样例,支持RISC-V架构的virt平台的 样例,以及Cortex-M4架构的样例。 +代码路径: + +``` +device/qemu/ --- device_qemu 仓库路径 +├── arm_mps2_an386 --- Cortex-M4 架构的 MPS2-AN386 单板模拟 +├── arm_virt --- ARMv7-a 架构的 virt 单板模拟 +├── drivers --- virt驱动目录 +└── riscv32_virt --- RISC-V 架构的 virt 单板模拟 +vendor/ohos/ --- vendor_ohos 仓库路径 +├── qemu_small_system_demo --- 小型系统的样例 +├── qemu_mini_system_demo --- 微型系统的样例 +└── qemu_riscv_mini_system_demo --- 微型系统的 RISC-V 架构的样例 +``` + ## 安装教程 [QEMU的安装参考链接](https://gitee.com/openharmony/device_qemu#qemu%E5%AE%89%E8%A3%85) ## 使用说明 +1. 运行`hb set`命令选择对应的产品样例。 ``` -hb set -hb build +ohos + > qemu_small_system_demo + qemu_mini_system_demo +``` + +其中, + +`qemu_small_system_demo`表示小型系统的样例,它会集成OpenHarmony上层组件,例如: +graphic、foundation等。 + +`qemu_mini_system_demo`表示微型系统的样例,它会集成OpenHarmony上层组件,例如: +samgr、hilog等。 + +2. 运行`hb build`进行编译。 + +3. 将编译出的镜像基于qemu来运行,方法如下: + +3.1 `qemu_small_system_demo`的运行方法是 + +``` +./qemu-init +./qemu-run +``` + +再用`vnc-client`连接该主机的5920端口 + +3.2 `qemu_mini_system_demo`的运行方法是 + +``` +cd device/qemu/arm_mps2_an386 +./qemu_run.sh ../../../out/arm_mps2_an386/bin/liteos ``` ## 贡献