From e6bff76be32b54ca8ebb686d9f8eb17fc35f1c7d Mon Sep 17 00:00:00 2001 From: annie_wangli Date: Thu, 4 Nov 2021 11:15:51 +0800 Subject: [PATCH 1/7] update docs Signed-off-by: annie_wangli --- en/device-dev/kernel/kernel-standard-build.md | 48 +--- .../kernel/kernel-standard-overview.md | 5 +- en/device-dev/kernel/kernel-standard-patch.md | 38 ++- en/readme/kernel-subsystem.md | 232 ++++++++++++++++++ 4 files changed, 267 insertions(+), 56 deletions(-) create mode 100644 en/readme/kernel-subsystem.md diff --git a/en/device-dev/kernel/kernel-standard-build.md b/en/device-dev/kernel/kernel-standard-build.md index 5dd23ea6783..a9a7d069965 100644 --- a/en/device-dev/kernel/kernel-standard-build.md +++ b/en/device-dev/kernel/kernel-standard-build.md @@ -1,47 +1,11 @@ -# Guidelines for Compiling and Building the Linux Kernel +# Guidelines for Building the Linux Kernel -- [Example 1](#section19369206113115) - - [Scenario 1: Building the Native Kernel at the Version Level](#section1025111193220) - - [Scenario 2: Building the Modified Kernel Separately](#section17446652173211) +The following uses the Hi3516D V300 development board and Ubuntu x86 server as an example. - -## Example 1 - -The following uses the Hi3516D V300 board and Ubuntu x86 server as an example. - -### Scenario 1: Building the Native Kernel at the Version Level - -Perform a full build for the project to generate the **uImage** kernel image. +Perform a full build for the project to generate the **uImage** kernel image. ``` -./build.sh --product-name Hi3516DV300 # Build the uImage kernel image of the Hi3516D V300 board. +./build.sh --product-name Hi3516DV300 # Build the Hi3516D V300 image. + --build-target build_kernel # Build the uImage kernel image of Hi3516D V300. + --gn-args linux_kernel_version=\"linux-5.10\" # Build the specified kernel version. ``` - -### Scenario 2: Building the Modified Kernel Separately - -1. Set up the build environment. - - 1. Merge the required patch by referring to [guidelines for using patches on development boards](kernel-standard-patch.md). - 2. Prepare for the build environment. You can use the Arm Clang or GCC compiler. - - Enter the root directory of the project and configure environment variables: - - ``` - export PATH=`pwd`/prebuilts/clang/host/linux-x86/clang-r353983c/bin:`pwd`/prebuilts/gcc/linux-x86/arm/gcc-linaro-7.5.0-arm-linux-gnueabi/bin/:$PATH # Configure the build environment. - MAKE_OPTIONES="ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- CC=clang HOSTCC=clang" # Use Clang provided by the project. - ``` - -2. Modify the kernel code or kernel configuration \(**defconfig** file provided by OpenHarmony can be used for reference\). -3. Create a build directory and generate the **.config** file of the kernel. - - ``` - make ${MAKE_OPTIONES} hi3516dv300_emmc_smp_hos_l2_defconfig # Use the defconfig file to build the kernel. - ``` - -4. Build the kernel image. - - ``` - make ${MAKE_OPTIONES} -j32 uImage # Build the uImage kernel image. - ``` - - diff --git a/en/device-dev/kernel/kernel-standard-overview.md b/en/device-dev/kernel/kernel-standard-overview.md index 17096155d27..30ed851caef 100644 --- a/en/device-dev/kernel/kernel-standard-overview.md +++ b/en/device-dev/kernel/kernel-standard-overview.md @@ -15,7 +15,4 @@ The LTS version provides long-term kernel maintenance \(in fixing bugs and secur ## OpenHarmony Kernel Version Selection -You can select an appropriate LTS kernel version as the Linux kernel for OpenHarmony. Currently, LTS version 4.19 is used on most devices. LTS versions 4.4 to 4.14 are old and do not support new features. Additionally, these versions will no longer be maintained in 2023 as planned. In this regard, they can be adopted only by the systems for short-term use but are not suitable for the systems of the first release. The more up-to-date LTS version 5.4 has not been widely used in released products. In comparison, version 4.19 is more well-recognized and can shorten the kernel adaptation period. New versions will be released continuously. - -In OpenHarmony, the Linux kernel is recommended for devices whose memory is greater than or equal to 128 MB. - +Select an appropriate LTS kernel version as the Linux kernel for OpenHarmony. Currently, Linux-4.19 and Linux-5.10 are supported. diff --git a/en/device-dev/kernel/kernel-standard-patch.md b/en/device-dev/kernel/kernel-standard-patch.md index e1ecf1aad2a..6b159f09978 100644 --- a/en/device-dev/kernel/kernel-standard-patch.md +++ b/en/device-dev/kernel/kernel-standard-patch.md @@ -1,17 +1,35 @@ -# Guidelines for Using Patches on OpenHarmony Development Boards +# Applying Patches on OpenHarmony Development Boards -The patch files are stored in the **kernel/linux/patches/linux-4.19** source code path of the project. You can obtain the driver patch of a specific chip architecture from this directory. +1. Apply HDF patches. -To use the patch of a specific chip platform driver, you need to merge the required kernel patch into the kernel code. + Apply the HDF kernel patches matching your kernel version. For details, see the method in **kernel.mk** in the **kernel/linux/build** repository. + + ``` + $(OHOS_BUILD_HOME)/drivers/adapter/khdf/linux/patch_hdf.sh $(OHOS_BUILD_HOME) $(KERNEL_SRC_TMP_PATH) $(HDF_PATCH_FILE) + ``` -Merge the corresponding patches for different chip platforms. +2. Apply the chip driver patches. -The following uses Hi3516D V300 as an example: + The following uses Hi3516D V300 as an example. + + Place the patches for the chip component in the corresponding path based on the path and naming rules for the patches of the chip component in **kernel.mk** in the **kernel/linux/build** repository. + + ``` + DEVICE_PATCH_DIR := $(OHOS_BUILD_HOME)/kernel/linux/patches/${KERNEL_VERSION}/$(DEVICE_NAME)_patch + DEVICE_PATCH_FILE := $(DEVICE_PATCH_DIR)/$(DEVICE_NAME).patch + ``` -``` -patch -p1 < device/hisilicon/hi3516dv300/sdk_linux/open_source/linux/hisi_linux-4.19_hos_l2.patch -``` +3. Modify the **config** file to build. ->![](../public_sys-resources/icon-notice.gif) **NOTICE:** ->Because patches are applied after the code environment of **kernel/linux-4.19** is copied during compilation and building of the OpenHarmony project, you must retain the original code environment of **kernel/linux-4.19** before running the OpenHarmony version-level build command. + Place the **config** file for the chip component in the corresponding path based on the path and naming rules of the chip component in **kernel.mk** in the **kernel/linux/build** repository. + + ``` + KERNEL_CONFIG_PATH := $(OHOS_BUILD_HOME)/kernel/linux/config/${KERNEL_VERSION} + DEFCONFIG_FILE := $(DEVICE_NAME)_$(BUILD_TYPE)_defconfig + ``` + > **Note**: + > + >In the OpenHarmony project build process, patches are installed after **kernel/linux/linux-\*\.\*** is copied. Before using the version-level build command of OpenHarmony, ensure that the **kernel/linux/linux-\*\.\*** source code is available. + > + >The kernel built is generated in the **kernel** directory under the **out** directory. Modify the **config** file based on the kernel built, and copy the generated **.config** file to the corresponding path in the **config** repository. Then, the configuration takes effect. diff --git a/en/readme/kernel-subsystem.md b/en/readme/kernel-subsystem.md new file mode 100644 index 00000000000..d0fdb1bee61 --- /dev/null +++ b/en/readme/kernel-subsystem.md @@ -0,0 +1,232 @@ +# Kernel + +- [Introduction](#section11660541593) +- [LiteOS](#section6253122153515) +- [Linux](#section143373618411) +- [Directory Structure](#section21571344112) +- [Constraints](#section19647171710417) +- [Usage](#section1393789267) + - [LiteOS](#section118811457303) + - [Linux](#section1352114469620) + +- [Build](#section19369206113115) +- [Repositories Involved](#section27639463106) + +## Introduction + +OpenHarmony provides LiteOS and Linux for different levels of systems. LiteOS applies to mini and small systems. Linux applies to small and standard systems. + + + + + + + + + + + + + + + + + +

System Level

+

Mini System

+

Small System

+

Standard System

+

LiteOS

+

+

+

×

+

Linux

+

×

+

+

+
+ +## LiteOS + +OpenHarmony LiteOS is a real-time OS kernel developed for IoT devices. It boasts lightweight features as the real-time operating system (RTOS) and is easy-to-use like Linux. + +LiteOS provides basic kernel functions, such as process and thread scheduling, memory management, inter-process communication (IPC), and timer management. + +The LiteOS source code is stored in **kernel\\_liteos\\_a** and **kernel\\_liteos\\_m** repositories. The **kernel\\_liteos\\_a** repository stores kernel code for small and standard systems. The **kernel\\_liteos\\_m** repository stores kernel code for mini systems. This document describes the **kernel\\_liteos\\_a** repository. Figure 1 shows the architecture of OpenHarmony LiteOS-A. + +**Figure 1** OpenHarmony LiteOS-A kernel architecture +![](figures/OpenHarmony-LiteOS-A Kernel Architecture.png "OpenHarmony-LiteOS-A Kernel Architecture") + +## Linux + +Evolved from the open-source Linux kernel LTS 4.19.y and 5.10.y, the OpenHarmony Linux kernel has incorporated CVE patches and OpenHarmony features as the OpenHarmony common kernel baseline. Vendors can complete the kernel adaptation by applying the driver patches for boards. + +For more information about Linux LTS 4.19.y, visit the [official kernel website](https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/log/?h=linux-4.19.y). + +For more information about Linux LTS 5.10.y, visit the [official kernel website] (https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/log/?h=linux-5.10.y). + +During the build process, you can merge the driver code based on the chip platform and build the kernel image. All patches are licensed under GNU General Public License (GPL) 2.0. + +## Directory Structure + +``` +kernel/ +├── linux +│ ├── linux-4.19 # OpenHarmony linux-4.19 common kernel +│ ├── linux-5.10 # OpenHarmony linux-5.10 common kernel +│ ├── build +│ │ ├── BUILD.gn # GN file of the build framework +│ │ ├── kernel.mk # Kernel build file +│ │ └── ohos.build # Kernel build component file +│ ├── patches +│ │ ├── linux-4.19 # linux-4.19 patches +│ │ │   └── hi3516dv300_patch +│ │ │   ├── hi3516dv300.patch # linux-4.19 Hi3516D V300 SOC patches +│ │ │   └── hdf.patch # linux-4.19 Hi3516D V300 HDF patches +│ │ └── linux-5.10 +│ │    └── hi3516dv300_patch +│ │    ├── hi3516dv300.patch # linux-5.10 Hi3516D V300 SOC patches +│ │    └── hdf.patch # linux-5.10 Hi3516D V300 HDF patches +│ └── config +│ ├── linux-4.19 +│ │   └── arch +│ │   └── arm +│ │   └── configs +│ │ ├── hi3516dv300_small_defconfig # Small-system defconfig of the open-source Hi3516D V300 development board from HiSilicon +│ │ ├── hi3516dv300_standard_defconfig # Standard-system defconfig of the open-source Hi3516D V300 development board from HiSilicon +│ │ ├── small_common_defconfig # Common defconfig of the small-system kernel +│ │ └── standard_common_defconfig # Common defconfig of the standard-system kernel +│ └── linux-5.10 +│ └── arch +│ └── arm +│ └── configs +│ ├── hi3516dv300_small_defconfig # Small-system defconfig of the open-source Hi3516D V300 development board from HiSilicon +│ ├── hi3516dv300_standard_defconfig # Standard-system defconfig of the open-source Hi3516D V300 development board from HiSilicon +│ ├── small_common_defconfig # Common defconfig of the small-system kernel +│ └── standard_common_defconfig # Common defconfig of the standard-system kernel +└── liteos_a # Baseline code of the LiteOS kernel + ├── apps # User-mode init and shell applications + ├── arch # Directory of the system architecture, such as arm + │ └── arm # Code for arm + ├── 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 system start + │ ├── random # Driver for random number generators + │ └── video # Framework of the framebuffer driver + ├── fs # File system module, which 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 of 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 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 +``` + +## Constraints + +LiteOS: + +By default, the Hi3518E V300 uses the JFFS2 file system, and Hi3516D V300 uses the FAT file system. Adaptation must be performed if you want to use other file systems. + +## Usage + +### LiteOS + +For details, see "Usage" in LiteOS-A Kernel [README](https://gitee.com/openharmony/kernel_liteos_a/blob/master/README.md) and LiteOS-M Kernel [README](https://gitee.com/openharmony/kernel_liteos_m/blob/master/README.md). + +### Linux + +1. Apply HDF patches. + + Apply the HDF kernel patches matching your kernel version. For details, see the method in **kernel.mk** in the **kernel/linux/build** repository. + + ``` + $(OHOS_BUILD_HOME)/drivers/adapter/khdf/linux/patch_hdf.sh $(OHOS_BUILD_HOME) $(KERNEL_SRC_TMP_PATH) $(HDF_PATCH_FILE) + ``` + +2. Apply the chip driver patches. + + The following uses Hi3516D V300 as an example. + + Place the patches for the chip component in the corresponding path based on the path and naming rules for the patches of the chip component in **kernel.mk** in the **kernel/linux/build** repository. + + ``` + DEVICE_PATCH_DIR := $(OHOS_BUILD_HOME)/kernel/linux/patches/${KERNEL_VERSION}/$(DEVICE_NAME)_patch + DEVICE_PATCH_FILE := $(DEVICE_PATCH_DIR)/$(DEVICE_NAME).patch + ``` + +3. Modify the **config** file to build. + + Place the **config** file for the chip component in the corresponding path based on the path and naming rules of the chip component in **kernel.mk** in the **kernel/linux/build** repository. + + ``` + KERNEL_CONFIG_PATH := $(OHOS_BUILD_HOME)/kernel/linux/config/${KERNEL_VERSION} + DEFCONFIG_FILE := $(DEVICE_NAME)_$(BUILD_TYPE)_defconfig + ``` + + > **Note**: + > + >In the OpenHarmony project build process, patches are installed after **kernel/linux/linux-\*\.\*** is copied. Before using the version-level build command of OpenHarmony, ensure that the **kernel/linux/linux-\*\.\*** source code is available. + > + >The kernel built is generated in the **kernel** directory under the **out** directory. Modify the **config** file based on the kernel built, and copy the generated **.config** file to the corresponding path in the **config** repository. Then, the configuration takes effect. + +## Build + +The following uses the Hi3516D V300 development board and Ubuntu x86 server as an example. + +Perform a full build for the project to generate the **uImage** kernel image. + +``` +./build.sh --product-name Hi3516DV300 # Build the Hi3516D V300 image. + --build-target build_kernel # Build the uImage kernel image of Hi3516D V300. + --gn-args linux_kernel_version=\"linux-5.10\" # Build the specified kernel version. +``` + +## Repositories Involved + +**Kernel** + +LiteOS: + +[drivers\_liteos](https://gitee.com/openharmony/drivers_liteos/blob/master/README.md) + +[kernel\_liteos\_a](https://gitee.com/openharmony/kernel_liteos_a/blob/master/README.md) + +[kernel\_liteos\_m](https://gitee.com/openharmony/kernel_liteos_m/blob/master/README.md) + +[device\_qemu](https://gitee.com/openharmony/device_qemu/blob/master/README.md) + +[prebuilts\_lite\_sysroot](https://gitee.com/openharmony/prebuilts_lite_sysroot/blob/master/README.md) + +Linux: + +[kernel\_linux\_patches](https://gitee.com/openharmony/kernel_linux_patches/blob/master/README.md) + +[kernel\_linux\_config](https://gitee.com/openharmony/kernel_linux_config/blob/master/README.md) + +[kernel\_linux\_build](https://gitee.com/openharmony/kernel_linux_build/blob/master/README.md) + +[kernel\_linux\_4.19](https://gitee.com/openharmony/kernel_linux_4.19/blob/master/README) + +[kernel\_linux\_5.10](https://gitee.com/openharmony/kernel_linux_5.10/blob/master/README) -- Gitee From 82cea0350aa081e79b9e5e6ef1a7cf0db421ac19 Mon Sep 17 00:00:00 2001 From: Annie_wang Date: Thu, 4 Nov 2021 06:00:52 +0000 Subject: [PATCH 2/7] update en/readme/kernel-subsystem.md. Signed-off-by: Annie_wang --- en/readme/kernel-subsystem.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/readme/kernel-subsystem.md b/en/readme/kernel-subsystem.md index d0fdb1bee61..ea28ec22675 100644 --- a/en/readme/kernel-subsystem.md +++ b/en/readme/kernel-subsystem.md @@ -55,7 +55,7 @@ LiteOS provides basic kernel functions, such as process and thread scheduling, m The LiteOS source code is stored in **kernel\\_liteos\\_a** and **kernel\\_liteos\\_m** repositories. The **kernel\\_liteos\\_a** repository stores kernel code for small and standard systems. The **kernel\\_liteos\\_m** repository stores kernel code for mini systems. This document describes the **kernel\\_liteos\\_a** repository. Figure 1 shows the architecture of OpenHarmony LiteOS-A. **Figure 1** OpenHarmony LiteOS-A kernel architecture -![](figures/OpenHarmony-LiteOS-A Kernel Architecture.png "OpenHarmony-LiteOS-A Kernel Architecture") +![](figures/architecture-of-the-openharmony-liteos-cortex-a-kernel.png "OpenHarmony-LiteOS-A Kernel Architecture") ## Linux -- Gitee From 550e6b2fe3c8ed5f4424449fc1324bd441ec29f3 Mon Sep 17 00:00:00 2001 From: Annie_wang Date: Thu, 4 Nov 2021 06:06:39 +0000 Subject: [PATCH 3/7] update en/readme/kernel-subsystem.md. Signed-off-by: Annie_wang --- en/readme/kernel-subsystem.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/readme/kernel-subsystem.md b/en/readme/kernel-subsystem.md index ea28ec22675..5706ca26148 100644 --- a/en/readme/kernel-subsystem.md +++ b/en/readme/kernel-subsystem.md @@ -63,7 +63,7 @@ Evolved from the open-source Linux kernel LTS 4.19.y and 5.10.y, the OpenHarmony For more information about Linux LTS 4.19.y, visit the [official kernel website](https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/log/?h=linux-4.19.y). -For more information about Linux LTS 5.10.y, visit the [official kernel website] (https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/log/?h=linux-5.10.y). +For more information about Linux LTS 5.10.y, visit the [official kernel website](https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/log/?h=linux-5.10.y). During the build process, you can merge the driver code based on the chip platform and build the kernel image. All patches are licensed under GNU General Public License (GPL) 2.0. -- Gitee From 13e6845c76f847fe53a256aabbe89445a7ab6fd8 Mon Sep 17 00:00:00 2001 From: Annie_wang Date: Thu, 4 Nov 2021 08:33:46 +0000 Subject: [PATCH 4/7] update en/device-dev/subsystems/subsys-testguide-test.md. Signed-off-by: Annie_wang --- en/device-dev/subsystems/subsys-testguide-test.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/device-dev/subsystems/subsys-testguide-test.md b/en/device-dev/subsystems/subsys-testguide-test.md index b18949a8f2d..8b2fbc575f8 100644 --- a/en/device-dev/subsystems/subsys-testguide-test.md +++ b/en/device-dev/subsystems/subsys-testguide-test.md @@ -719,7 +719,7 @@ Test cases cannot be built on Windows. You need to run the following command to > - --**product-name**: specifies the name of the product to build, for example, **Hi3516DV300**. > - --**build-target**: specifies the target to build. It is optional. **make_test** indicates all test cases. You can set the build options based on requirements. -When the build is complete, the test cases are automatically saved in the **out/ohos-arm-release/packages/phone/images/tests** directory. +When the build is complete, the test cases are automatically saved in the **out/ohos-arm-release/packages/phone/tests** directory. #### Setting Up the Execution Environment 1. On Windows, create the **Test** directory in the test framework and then create the **testcase** directory in the **Test** directory. -- Gitee From 59a64cae7ab2ef86e07148a8635b151d3315ea05 Mon Sep 17 00:00:00 2001 From: Annie_wang Date: Tue, 9 Nov 2021 02:58:28 +0000 Subject: [PATCH 5/7] update en/device-dev/subsystems/subsys-testguide-envbuild.md. Signed-off-by: Annie_wang --- .../subsystems/subsys-testguide-envbuild.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/en/device-dev/subsystems/subsys-testguide-envbuild.md b/en/device-dev/subsystems/subsys-testguide-envbuild.md index 7e81b6cb4b2..76feb621c0d 100644 --- a/en/device-dev/subsystems/subsys-testguide-envbuild.md +++ b/en/device-dev/subsystems/subsys-testguide-envbuild.md @@ -5,8 +5,8 @@ |Environment|Operating System|Linux Extended Component|Python|Python Plug-ins|NFS Server|HDC| |------------|------------|------------|------------|------------|------------|------------| -|Version|Ubuntu 18.04 or later|libreadline-dev|3.7.5 or later|pyserial 3.3 or later, paramiko 2.7.1 or later, setuptools 40.8.0 or later, and rsa4.0 or later|haneWIN NFS Server 1.2.50 or later, or NFS v4 or later| 1.1.0 or later| -|Description|Provides code build environment.|Plug-in used to read commands.|Language used by the test framework.|pyserial: supports Python serial port communication.
paramiko: allows Python to use SSH.
setuptools: allows Python packages to be created and distributed easily.
rsa: implements RSA encryption in Python.|Enables devices to be connected through the serial port.| A tool that enables devices to be connected through the HarmonyOS Device Connector (HDC).| +|Version|Ubuntu 18.04 or later|libreadline-dev|3.7.5 or later|- pySerial 3.3 or later
- Paramiko 2.7.1 or later
- Setuptools 40.8.0 or later
- rsa4.0 or later|haneWIN NFS Server 1.2.50 or later, or NFS v4 or later| 1.1.0 or later| +|Description|Provides code build environment.|Plug-in used to read commands.|Language used by the test framework.|- pySerial: supports Python serial port communication.
- Paramiko: allows Python to use SSH.
- Setuptools: allows Python packages to be created and distributed easily.
- rsa: implements RSA encryption in Python.|Enables devices to be connected through the serial port.| A tool that enables devices to be connected through the HarmonyOS Device Connector (HDC).| ## Installation Process 1. Run the following command to install the Linux extended component libreadline: @@ -21,7 +21,7 @@ libreadline-dev is already the newest version (7.0-3). 0 upgraded, 0 newly installed, 0 to remove and 11 not upgraded. ``` -2. Run the following command to install the setuptools plug-in: +2. Run the following command to install the Setuptools plug-in: ``` pip3 install setuptools ``` @@ -29,7 +29,7 @@ ``` Requirement already satisfied: setuptools in d:\programs\python37\lib\site-packages (41.2.0) ``` -3. Run the following command to install the paramiko plug-in: +3. Run the following command to install the Paramiko plug-in: ``` pip3 install paramiko ``` @@ -47,7 +47,7 @@ Installing collected packages: pyasn1, rsa Successfully installed pyasn1-0.4.8 rsa-4.7 ``` -5. Run the following command to install the pyserial plug-in: +5. Run the following command to install the pySerial plug-in: ``` pip3 install pyserial ``` @@ -80,4 +80,4 @@ | Check whether Python is installed successfully.|Run the **python --version** command.|The Python version is 3.7.5 or later.| | Check whether Python plug-ins are successfully installed.|Go to the **test/developertest** directory and run **run.bat** or **run.sh**.| The **>>>** prompt is displayed.| |Check the NFS server status (for the devices that support only serial port output).|Log in to the development board through the serial port and run the **mount** command to mount the NFS.|The file directory can be mounted.| -|Check whether the HDC is successfully installed.|Run the **hdc_std -v** command.|The HDC version is 1.1.0 or later.| +|Check whether the HDC tool is successfully installed.|Run the **hdc_std -v** command.|The HDC version is 1.1.0 or later.| -- Gitee From b8f215884999e945037ff982dfa4883bb7c20171 Mon Sep 17 00:00:00 2001 From: Annie_wang Date: Tue, 9 Nov 2021 03:05:56 +0000 Subject: [PATCH 6/7] update en/device-dev/subsystems/subsys-testguide-test.md. Signed-off-by: Annie_wang --- .../subsystems/subsys-testguide-test.md | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/en/device-dev/subsystems/subsys-testguide-test.md b/en/device-dev/subsystems/subsys-testguide-test.md index 8b2fbc575f8..c037ff22c31 100644 --- a/en/device-dev/subsystems/subsys-testguide-test.md +++ b/en/device-dev/subsystems/subsys-testguide-test.md @@ -230,7 +230,7 @@ Example: - The expected result of each test case must have an assertion. - The test case level must be specified. - It is recommended that the test be implemented step by step according to the template. - - The comment must contain the test case name, description, type, and requirement number. The test case description must be in the @tc.xxx format. The test case type @tc.type can be any of the following: + - The comment must contain the test case name, description, type, and requirement number, which are in the @tc.xxx: value format. The test case type @tc.type can be any of the following: | Test Case Type|Function test|Performance test|Reliability test|Security test|Fuzz test| | ------------|------------|------------|------------|------------|------------| @@ -656,7 +656,7 @@ Perform the following steps: >- **target_name** indicates the test suite name defined in the **BUILD.gn** file in the **test** directory. >- **preparer** indicates the action to perform before the test suite is executed. >- **src="res"** indicates that the test resources are in the **resource** directory under the **test** directory. - >- **src="out"** indicates that the test resources are in the **out/release/$(component)** directory. + >- **src="out"** indicates that the test resources are in the **out/release/$(part)** directory. ## Executing Test Cases Before executing test cases, you need to modify the configuration based on the device used. @@ -730,7 +730,7 @@ When the build is complete, the test cases are automatically saved in the **out/ 3. Modify the **user_config.xml** file. ``` - . + false @@ -757,16 +757,16 @@ When the build is complete, the test cases are automatically saved in the **out/ ``` In the command: ``` - -t [TESTTYPE]: specifies the test case type, which can be UT, MST, ST, or PERF. This parameter is mandatory. - -tp [TESTTYPE]: specifies a part, which can be used independently. - -tm [TESTTYPE]: specifies a module. This parameter must be specified together with -tp. - -ts [TESTTYPE]: specifies a test suite, which can be used independently. - -tc [TESTTYPE]: specifies a test case. This parameter must be specified together with -ts. + -t [TESTTYPE]: specifies the test type, which can be UT, MST, ST, or PERF. This parameter is mandatory. + -tp [TESTPART]: specifies the part to test. This parameter can be used independently. + -tm [TESTMODULE]: specifies the module to test. This parameter must be specified together with -tp. + -ts [TESTSUITE]: specifies the test suite. This parameter can be used independently. + -tc [TESTCASE]: specifies the test case. This parameter must be specified together with -ts. You can run -h to display help information. ``` ### Executing Test Cases on Linux #### Mapping Remote Port -To enable test cases to be executed on a remote Linux server or a Linux VM, map the port to enable communication between the device and the remove server or VM. Configure port mapping as follows: +To enable test cases to be executed on a remote Linux server or a Linux VM, map the port to enable communication between the device and the remote server or VM. Configure port mapping as follows: 1. On the HDC server, run the following commands: ``` hdc_std kill @@ -797,11 +797,11 @@ To enable test cases to be executed on a remote Linux server or a Linux VM, map ``` In the command: ``` - -t [TESTTYPE]: specifies the test case type, which can be UT, MST, ST, or PERF. This parameter is mandatory. - -tp [TESTTYPE]: specifies a part, which can be used independently. - -tm [TESTTYPE]: specifies a module. This parameter must be specified together with -tp. - -ts [TESTTYPE]: specifies a test suite, which can be used independently. - -tc [TESTTYPE]: specifies a test case. This parameter must be specified together with -ts. + -t [TESTTYPE]: specifies the test type, which can be UT, MST, ST, or PERF. This parameter is mandatory. + -tp [TESTPART]: specifies the part to test. This parameter can be used independently. + -tm [TESTMODULE]: specifies the module to test. This parameter must be specified together with -tp. + -ts [TESTSUITE]: specifies the test suite. This parameter can be used independently. + -tc [TESTCASE]: specifies the test case. This parameter must be specified together with -ts. You can run -h to display help information. ``` -- Gitee From 6bbd78ae969dbc2763bbb0f960ec57ff04bfad91 Mon Sep 17 00:00:00 2001 From: Annie_wang Date: Fri, 12 Nov 2021 09:12:01 +0000 Subject: [PATCH 7/7] update en/readme/kernel-subsystem.md. Signed-off-by: Annie_wang --- en/readme/kernel-subsystem.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/en/readme/kernel-subsystem.md b/en/readme/kernel-subsystem.md index 5706ca26148..65ef7049361 100644 --- a/en/readme/kernel-subsystem.md +++ b/en/readme/kernel-subsystem.md @@ -221,12 +221,6 @@ LiteOS: Linux: -[kernel\_linux\_patches](https://gitee.com/openharmony/kernel_linux_patches/blob/master/README.md) - -[kernel\_linux\_config](https://gitee.com/openharmony/kernel_linux_config/blob/master/README.md) - -[kernel\_linux\_build](https://gitee.com/openharmony/kernel_linux_build/blob/master/README.md) - [kernel\_linux\_4.19](https://gitee.com/openharmony/kernel_linux_4.19/blob/master/README) [kernel\_linux\_5.10](https://gitee.com/openharmony/kernel_linux_5.10/blob/master/README) -- Gitee