diff --git a/en/device-dev/get-code/Readme-EN.md b/en/device-dev/get-code/Readme-EN.md index 5f5dacc4a6cefdf06912a3046c6350a95ff40c5c..c9774a3987b5b7db5cb445dad70bb8ca742a5729 100644 --- a/en/device-dev/get-code/Readme-EN.md +++ b/en/device-dev/get-code/Readme-EN.md @@ -1,7 +1,7 @@ # Source Code Acquisition -- [Source Code Acquisition](sourcecode-acquire.md) -- [Tool Acquisition](gettools.md) - - [Docker Environment](gettools-acquire.md) - - [IDE](gettools-ide.md) - +- [Obtaining Source Code](sourcecode-acquire.md) +- Obtaining Tools + - [Overview](gettools-overview.md) + - [Docker Environments](gettools-acquire.md) + - [IDE](gettools-ide.md) diff --git a/en/device-dev/get-code/gettools-overview.md b/en/device-dev/get-code/gettools-overview.md new file mode 100644 index 0000000000000000000000000000000000000000..9b0e63ba4face13990aaefa6b4e512825fd5c7a0 --- /dev/null +++ b/en/device-dev/get-code/gettools-overview.md @@ -0,0 +1,10 @@ +# Overview + +To streamline your device development process, OpenHarmony provides the useful tools listed below. + +**Table 1** Tools for device development + +| Tool | Description | Related Resources| +| ---- | ------ | ------ | +| DevEco Device Tool | A one-stop integrated development environment (IDE) provided for developers of OpenHarmony-powered smart devices. It allows on-demand component customization, as well as code editing, compilation, burning, and debugging. The tool supports C and C++ languages and can be installed in Visual Studio Code as a plug-in.| [HUAWEI DevEco Device Tool User Guide](https://device.harmonyos.com/en/docs/documentation/guide/service_introduction-0000001050166905)| +| Docker | A containerization platform used to build and containerize applications. The Docker environments in OpenHarmony encapsulate compilation toolchains for different OpenHarmony variants, so you can start your building straightaway without having to install the compilation toolchain on your own.| [Docker Environment](gettools-acquire.md)| diff --git a/en/device-dev/get-code/sourcecode-acquire.md b/en/device-dev/get-code/sourcecode-acquire.md index 4561cc2511ddf645fb2b4e5a533d85ef6bf93f83..619c8837ac8b430a21a3aa5692945a329db37e7c 100644 --- a/en/device-dev/get-code/sourcecode-acquire.md +++ b/en/device-dev/get-code/sourcecode-acquire.md @@ -4,16 +4,16 @@ OpenHarmony is an open-source project launched by the OpenAtom Foundation. The purpose of this project is to build an open, distributed operating system \(OS\) framework for smart IoT devices in the full-scenario, full-connectivity, and full-intelligence era. -The open-source code repositories are available at [https://openharmony.gitee.com](https://openharmony.gitee.com). +The open-source code repositories are available at [https://openharmony.gitee.com](https://openharmony.gitee.com). ## Overview of Source Code Acquisition You can use any of the following methods to acquire the OpenHarmony source code: -- **Method 1**: Acquire the source code from the Gitee code repository. You can use the **repo** or **git** tool to download the latest code from the code repository. -- **Method 2**: Acquire the source code from [DevEco Marketplace](https://repo.harmonyos.com/#/en/home). Visit [DevEco Marketplace](https://repo.harmonyos.com/#/en/home), search for your desired open-source distribution, and download the bundle list \(or customize bundles and download the bundle list\). Then use **hpm-cli** to download and install the bundles and compilation toolchain on your local PC. +- **Method 1**: Acquire the source code from the Gitee code repository. You can use the **repo** or **git** tool to download the latest code from the code repository. +- **Method 2**: Acquire the source code from [DevEco Marketplace](https://repo.harmonyos.com/#/en/home). Visit [DevEco Marketplace](https://repo.harmonyos.com/#/en/home), search for your desired open-source distribution, and download the bundle list \(or customize bundles and download the bundle list\). Then use the **hpm-cli** tool to download and install the bundles and compilation toolchain on your local PC. - **Method 3**: Download the compressed file of a distribution from a mirror site. This method provides a fast download speed, so you can also use this method for obtaining the source code of an earlier version. -- **Method 4**: Acquire the source code from the GitHub image repository. You can use the **repo** or **git** tool to download the latest code from the code repository. +- **Method 4**: Acquire the source code from the GitHub image repository. You can use the **repo** or **git** tool to download the latest code from the code repository. ## Method 1: Acquiring Source Code from the Gitee Code Repository @@ -34,7 +34,7 @@ You can use any of the following methods to acquire the OpenHarmony source code: 1. Register your account with Gitee. 2. Register an SSH public key for access to Gitee. -3. Install the [git client](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) and [git-lfs](https://gitee.com/vcs-all-in-one/git-lfs?_from=gitee_search#downloading), and configure basic user information. +3. Install the [git client](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) and [git-lfs](https://gitee.com/vcs-all-in-one/git-lfs?_from=gitee_search#downloading), and configure basic user information. ``` git config --global user.name "yourname" @@ -42,7 +42,7 @@ You can use any of the following methods to acquire the OpenHarmony source code: git config --global credential.helper store ``` -4. Run the following commands to install the **repo** tool: +4. Run the following commands to install the **repo** tool: ``` curl -s https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 > /usr/local/bin/repo # If you do not have the access permission to this directory, download the tool to any other accessible directory and configure the directory to the environment variable. @@ -53,14 +53,13 @@ You can use any of the following methods to acquire the OpenHarmony source code: ### How to Use -**Obtaining the Source Code for Mini/Small/Standard Systems** ->![](../public_sys-resources/icon-note.gif) **NOTE:** +>![](../public_sys-resources/icon-note.gif) **NOTE** >Download the master code if you want to get quick access to the latest features for your development. Download the release code, which is more stable, if you want to develop commercial functionalities. - **Obtaining OpenHarmony master code** - Method 1 \(recommended\): Use the **repo** tool to download the source code over SSH. \(You must have registered an SSH public key for access to Gitee.\) + Method 1 \(recommended\): Use the **repo** tool to download the source code over SSH. \(You must have registered an SSH public key for access to Gitee.\) ``` repo init -u git@gitee.com:openharmony/manifest.git -b master --no-repo-verify @@ -68,7 +67,7 @@ You can use any of the following methods to acquire the OpenHarmony source code: repo forall -c 'git lfs pull' ``` - Method 2: Use the **repo** tool to download the source code over HTTPS. + Method 2: Use the **repo** tool to download the source code over HTTPS. ``` repo init -u https://gitee.com/openharmony/manifest.git -b master --no-repo-verify @@ -78,26 +77,26 @@ You can use any of the following methods to acquire the OpenHarmony source code: - **Obtaining OpenHarmony release code** - For details about how to obtain the source code of an OpenHarmony release, see the [Release-Notes](../../release-notes/Readme.md). + For details about how to obtain the source code of an OpenHarmony release, see the [Release-Notes](../../release-notes/Readme.md). ## Method 2: Acquiring Source Code from DevEco Marketplace ### When to Use -If OpenHarmony is new to you, sample solutions are helpful to your development. You can obtain an open-source distribution from [DevEco Marketplace](https://repo.harmonyos.com/#/en/home), or customize a distribution by adding or deleting bundles of an open-source distribution. Then use **hpm-cli** to download and install the bundles and compilation toolchain on your local PC. +If OpenHarmony is new to you, sample solutions are helpful to your development. You can obtain an open-source distribution from [DevEco Marketplace](https://repo.harmonyos.com/#/en/home), or customize a distribution by adding or deleting bundles of an open-source distribution. Then use the **hpm-cli** tool to download and install the bundles and compilation toolchain on your local PC. ### Prerequisites -You must install **Node.js** and HPM on your local PC. The installation procedure is as follows: +You must install **Node.js** and HPM on your local PC. The installation procedure is as follows: -1. Install **Node.js**. +1. Install **Node.js**. - Download **Node.js** from its official website and install it on your local PC. + Download **Node.js** from its official website and install it on your local PC. - The [Node.js](https://nodejs.org/) version must be 12.x \(including npm 6.14.4\) or later. An LTS version is recommended. + The [Node.js](https://nodejs.org/) version must be 12.x \(including npm 6.14.4\) or later. An LTS version is recommended. -2. Install the hpm-cli tool using **npm** delivered with **Node.js**. +2. Install the **hpm-cli** tool using **npm** delivered with **Node.js**. Open the CMD window and run the following command: @@ -121,54 +120,54 @@ You must install **Node.js** and HPM on your local PC. The installation proced ### How to Use 1. Search for distributions. - 1. Access [DevEco Marketplace](https://repo.harmonyos.com/#/en/home), and click **Equipment Bundle**. - 2. Enter a keyword, for example, **camera**, in the search box, and click the search icon. All matched distributions will be displayed on the **Open Source Distribution** page. - 3. Specify filter criteria, such as the category, OS, kernel, and board, to further filter the distributions. + 1. Access [DevEco Marketplace](https://repo.harmonyos.com/#/en/home), and click **Equipment Bundle**. Then go to the **Open Source Distribution** page. + 2. Enter a keyword \(for example: **camera**\) in the search box. All matched distributions are found. + 3. Specify filter criteria, such as the bundle type \(for example: **Board support** or **Kernel support**\), to further filter the distributions. 4. Find your desired distribution and click it to view details. - **Figure 1** HPM page + **Figure 1** HPM page ![](figure/hpm-page.png "hpm-page") 2. Learn more about the distribution. - 1. Read the information about the distribution to learn its application scenarios, features, bundles, usage, and customization methods, as shown in the following figure. - 2. Click **Download** to download the distribution to your local PC. - 3. Click **Custom** to add or delete bundles of the distribution. + 1. Read carefully the information about the distribution to learn its application scenarios, features, bundles, usage, and customization methods, as shown in the following figure. + 2. Click **Download** if you want to download the distribution to your local PC. + 3. Click **Custom** if you want to add or delete bundles of the distribution. - **Figure 2** Example distribution - ![](figure/example-distribution.png "example-distribution") + **Figure 2** Example distribution + ![](figure/example-distribution.png "example-distribution") 3. Customize bundles. - 1. Access the **Custom solution** page, as shown in the following figure. - 2. Set the toggle switch next to a specific optional bundle to delete it from the distribution, or click **Add bundle** to add new bundles. + 1. Access the **Custom solution** page, as shown in the following figure. + 2. Set the toggle switch next to a specific optional bundle to delete it from the distribution, or click **Add bundle** to add new bundles. 3. Enter the basic information about your project, including the bundle name, version, and description, on the right pane. - 4. Click **Download**. The system then generates the OpenHarmony code structure file \(for example, **my\_cust\_dist.zip**\) and saves it to your local PC. + 4. Click **Download**. The system generates the OpenHarmony code structure file \(for example, **my\_cust\_dist.zip**\) and saves it to your local PC. - **Figure 3** Customizing bundles + **Figure 3** Customizing bundles ![](figure/customizing-bundles.png "customizing-bundles") 4. Install bundles. - 1. Decompress the downloaded code structure file using CMD on Windows \(or shell in Linux\). - 2. In the generated directory, run the **hpm install** command to download and install bundles. If the **Install successful** message is displayed, the command has been executed successfully. - 3. The downloaded bundles will be stored in the **ohos\_bundles** folder under the project directory. \(The source code of some bundles will be copied to a specified directory after the bundles are installed.\) + 1. Decompress the downloaded code structure file using CMD on Windows (or shell in Linux). + 2. In the generated directory, run the **hpm install** command to download and install bundles. If the **Install successful** message is displayed, the command has been executed successfully. + 3. Obtain the bundles. The downloaded bundles are stored in the **ohos\_bundles** folder under the project directory. \(The source code of some bundles will be copied to a specified directory after the bundles are installed.\) ## Method 3: Acquiring Source Code from a Mirror Site To ensure the download performance, you are advised to download the source code or the corresponding solution from the image library of the respective site listed in the table below. -The table below provides only the sites for downloading the latest OpenHarmony master and LTS code. For details about how to obtain the source code of earlier versions, see the [Release-Notes](../../release-notes/Readme.md). +The table below provides only the sites for downloading the latest OpenHarmony master and LTS code. For details about how to obtain the source code of earlier versions, see the [Release-Notes](../../release-notes/Readme.md). -**Table 1** Sites for acquiring source code +**Table 1** Sites for acquiring source code -

LTS Code

+ - - - @@ -235,85 +234,85 @@ The table below provides only the sites for downloading the latest OpenHarmony m - - - - - - - - - - - - - - - - - - - - - - - - - - - -

LTS Code

Version Information

+

Version Information

Site

+

Site

SHA-256 Verification Code

+

SHA-256 Verification Code

-

Master Code

+

Master Code

Version Information

+

Version Information

Site

+

Site

SHA-256 Verification Code

+

SHA-256 Verification Code

Full code base (for mini, small, and standard systems)

3.1 Beta

+

3.1 Release

Download

+

Download

Download

+

Download

Hi3516 standard system solution (binary)

3.1 Beta

+

3.1 Release

Download

+

Download

Download

+

Download

RK3568 standard system solution (binary)

3.1 Beta

+

3.1 Release

Download

+

Download

Download

+

Download

Hi3861 solution (binary)

3.1 Beta

+

3.1 Release

Download

+

Download

Download

+

Download

Hi3516 solution-LiteOS (binary)

3.1 Beta

+

3.1 Release

Download

+

Download

Download

+

Download

Hi3516 solution-Linux (binary)

3.1 Beta

+

3.1 Release

Download

+

Download

Download

+

Download

RELEASE-NOTES

3.1 Beta

+

3.1 Release

Download

+

Download

-

Compiler Toolchain

+

Compiler Toolchain

Version Information

+

Version Information

Site

+

Site

SHA-256 Verification Code

+

SHA-256 Verification Code

Compiler toolchain

@@ -328,9 +327,12 @@ The table below provides only the sites for downloading the latest OpenHarmony m
-## Method 4: Acquiring Source Code from the GitHub Image Repository \(at 23:00 UTC Every Day\) +## Method 4: Acquiring Source Code from the GitHub Image Repository -Method 1 \(recommended\): Use the **repo** tool to download the source code over SSH. \(You must have registered an SSH public key for access to GitHub. For details, see [Adding a new SSH key to your GitHub account](https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account).\) +>![](../public_sys-resources/icon-note.gif) **NOTE** +> The image repository is synchronized at 23:00 (UTC +8:00) every day. + +Method 1 \(recommended\): Use the **repo** tool to download the source code over SSH. \(You must have registered an SSH public key for access to GitHub. For details, see [Adding a new SSH key to your GitHub account](https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account).\) ``` repo init -u git@github.com:openharmony/manifest.git -b master --no-repo-verify @@ -338,7 +340,7 @@ repo sync -c repo forall -c 'git lfs pull' ``` -Method 2: Use the **repo** tool to download the source code over HTTPS. +Method 2: Use the **repo** tool to download the source code over HTTPS. ``` repo init -u https://github.com/openharmony/manifest.git -b master --no-repo-verify @@ -350,7 +352,7 @@ repo forall -c 'git lfs pull' The following table describes the OpenHarmony source code directories. -**Table 2** Source code directories +**Table 2** Source code directories - -

Name

@@ -371,7 +373,7 @@ The following table describes the OpenHarmony source code directories.

build

Bundle-based compilation, building, and configuration scripts

+

Bundle-based compilation, build, and configuration scripts

docs

@@ -401,7 +403,7 @@ The following table describes the OpenHarmony source code directories.

prebuilts

Compiler and tool chain subsystem

+

Compiler and toolchain subsystem

test

@@ -431,4 +433,3 @@ The following table describes the OpenHarmony source code directories.
-