提交 5c35dd86 编写于 作者: D duangavin123

update 导入OpenHarmony工程

Signed-off-by: Nduangavin123 <duanxichao@huawei.com>
上级 46134eb9
# Overview<a name="EN-US_TOPIC_0000001152533331"></a>
# Overview<a name="EN-US_TOPIC_0000001191785779"></a>
- [System Types](#section767218232110)
- [Document Outline](#section19810171681218)
......@@ -69,21 +69,21 @@ In addition, OpenHarmony provides a series of optional system components that ca
</td>
<td class="cellrowborder" valign="top" width="35.61356135613561%" headers="mcps1.2.4.1.2 "><p id="p857711379158"><a name="p857711379158"></a><a name="p857711379158"></a>Using basic capabilities of <span id="text8928941123820"><a name="text8928941123820"></a><a name="text8928941123820"></a>OpenHarmony</span></p>
</td>
<td class="cellrowborder" valign="top" width="35.91359135913591%" headers="mcps1.2.4.1.3 "><a name="ul1577103716159"></a><a name="ul1577103716159"></a><ul id="ul1577103716159"><li><a href="kernel/kernel-lite.md">Kernel</a></li><li><a href="driver/Readme-EN.md">HDF</a></li><li><a href="subsystems/Readme-EN.md">Subsystems</a></li><li><a href="security/safety-safeguide-security.md">Security Guidelines</a></li><li><a href="security/oem_security_privacy.md">Privacy Protection</a></li></ul>
<td class="cellrowborder" valign="top" width="35.91359135913591%" headers="mcps1.2.4.1.3 "><a name="ul1577103716159"></a><a name="ul1577103716159"></a><ul id="ul1577103716159"><li><a href="kernel/kernel-lite.md">Kernel</a></li><li><a href="driver/Readme-EN.md">HDF</a></li><li><a href="subsystems/Readme-EN.md">Subsystems</a></li><li><a href="security/security-guidelines-overall.md">Security Guidelines</a></li><li><a href="security/security-privacy-protection.md">Privacy Protection</a></li></ul>
</td>
</tr>
<tr id="row10602193719152"><td class="cellrowborder" valign="top" width="28.472847284728473%" headers="mcps1.2.4.1.1 "><p id="p857873713152"><a name="p857873713152"></a><a name="p857873713152"></a>Advanced development</p>
</td>
<td class="cellrowborder" valign="top" width="35.61356135613561%" headers="mcps1.2.4.1.2 "><p id="p155782037201518"><a name="p155782037201518"></a><a name="p155782037201518"></a>Developing smart devices based on system capabilities</p>
</td>
<td class="cellrowborder" valign="top" width="35.91359135913591%" headers="mcps1.2.4.1.3 "><a name="ul257883731519"></a><a name="ul257883731519"></a><ul id="ul257883731519"><li><a href="guide/device-wifi.md">WLAN-connected products</a></li><li><a href="guide/device-iotcamera-control.md">Screenless camera products</a></li><li><a href="guide/device-camera.md">Products with a camera and a screen</a></li></ul>
<td class="cellrowborder" valign="top" width="35.91359135913591%" headers="mcps1.2.4.1.3 "><a name="ul257883731519"></a><a name="ul257883731519"></a><ul id="ul257883731519"><li><a href="guide/device-wifi.md">WLAN-connected Products</a></li><li><a href="guide/device-iotcamera-control.md">Cameras Without a Screen</a></li><li><a href="guide/device-camera.md">Cameras with a Screen</a></li></ul>
</td>
</tr>
<tr id="row360273716155"><td class="cellrowborder" valign="top" width="28.472847284728473%" headers="mcps1.2.4.1.1 "><p id="p12579163711513"><a name="p12579163711513"></a><a name="p12579163711513"></a>Porting and adaptation</p>
</td>
<td class="cellrowborder" valign="top" width="35.61356135613561%" headers="mcps1.2.4.1.2 "><a name="ul12579137121512"></a><a name="ul12579137121512"></a><ul id="ul12579137121512"><li>Porting and adapting the <span id="text1415622205014"><a name="text1415622205014"></a><a name="text1415622205014"></a>OpenHarmony</span> to an SoC</li><li>Porting and adapting the <span id="text82061719165013"><a name="text82061719165013"></a><a name="text82061719165013"></a>OpenHarmony</span> to a third-party library</li></ul>
</td>
<td class="cellrowborder" valign="top" width="35.91359135913591%" headers="mcps1.2.4.1.3 "><a name="ul157903731520"></a><a name="ul157903731520"></a><ul id="ul157903731520"><li><a href="porting/transplant-minichip.md">Mini System SoC Porting Guide</a></li><li><a href="porting/transplant-smallchip.md">Small System SoC Porting Guide</a></li><li><a href="porting/transplant-thirdparty.md">Third-Party Library Porting Guide</a></li></ul>
<td class="cellrowborder" valign="top" width="35.91359135913591%" headers="mcps1.2.4.1.3 "><a name="ul157903731520"></a><a name="ul157903731520"></a><ul id="ul157903731520"><li><a href="porting/porting-minichip.md">Mini System SoC Porting Guide</a></li><li><a href="porting/porting-smallchip.md">Small System SoC Porting Guide</a></li><li><a href="porting/porting-thirdparty.md">Third-Party Library Porting Guide</a></li></ul>
</td>
</tr>
<tr id="row9601737181517"><td class="cellrowborder" valign="top" width="28.472847284728473%" headers="mcps1.2.4.1.1 "><p id="p25791037131519"><a name="p25791037131519"></a><a name="p25791037131519"></a>Contributing components</p>
......@@ -114,9 +114,9 @@ In addition, OpenHarmony provides a series of optional system components that ca
</th>
</tr>
</thead>
<tbody><tr id="row9662532514"><td class="cellrowborder" valign="top" width="27.872787278727873%" headers="mcps1.2.4.1.1 "><p id="p066105317513"><a name="p066105317513"></a><a name="p066105317513"></a>About <span id="text1545619991"><a name="text1545619991"></a><a name="text1545619991"></a>OpenHarmony</span></p>
<tbody><tr id="row9662532514"><td class="cellrowborder" valign="top" width="27.872787278727873%" headers="mcps1.2.4.1.1 "><p id="p066105317513"><a name="p066105317513"></a><a name="p066105317513"></a>About <span id="text1523091643"><a name="text1523091643"></a><a name="text1523091643"></a>OpenHarmony</span></p>
</td>
<td class="cellrowborder" valign="top" width="36.053605360536054%" headers="mcps1.2.4.1.2 "><p id="p16673531512"><a name="p16673531512"></a><a name="p16673531512"></a>Getting familiar with <span id="text1309556605"><a name="text1309556605"></a><a name="text1309556605"></a>OpenHarmony</span></p>
<td class="cellrowborder" valign="top" width="36.053605360536054%" headers="mcps1.2.4.1.2 "><p id="p16673531512"><a name="p16673531512"></a><a name="p16673531512"></a>Getting familiar with <span id="text280142300"><a name="text280142300"></a><a name="text280142300"></a>OpenHarmony</span></p>
</td>
<td class="cellrowborder" valign="top" width="36.07360736073608%" headers="mcps1.2.4.1.3 "><a name="ul10673531517"></a><a name="ul10673531517"></a><ul id="ul10673531517"><li><a href="https://gitee.com/openharmony" target="_blank" rel="noopener noreferrer">About OpenHarmony</a></li><li><a href="glossary/glossary.md">Glossary</a></li></ul>
</td>
......@@ -137,28 +137,29 @@ In addition, OpenHarmony provides a series of optional system components that ca
</tr>
<tr id="row1168155365119"><td class="cellrowborder" valign="top" width="27.872787278727873%" headers="mcps1.2.4.1.1 "><p id="p96810536514"><a name="p96810536514"></a><a name="p96810536514"></a>Basic capabilities</p>
</td>
<td class="cellrowborder" valign="top" width="36.053605360536054%" headers="mcps1.2.4.1.2 "><p id="p136812535511"><a name="p136812535511"></a><a name="p136812535511"></a>Using basic capabilities of <span id="text1378072723"><a name="text1378072723"></a><a name="text1378072723"></a>OpenHarmony</span></p>
<td class="cellrowborder" valign="top" width="36.053605360536054%" headers="mcps1.2.4.1.2 "><p id="p136812535511"><a name="p136812535511"></a><a name="p136812535511"></a>Using basic capabilities of <span id="text2027331797"><a name="text2027331797"></a><a name="text2027331797"></a>OpenHarmony</span></p>
</td>
<td class="cellrowborder" valign="top" width="36.07360736073608%" headers="mcps1.2.4.1.3 "><a name="ul1954915235272"></a><a name="ul1954915235272"></a><ul id="ul1954915235272"><li><a href="kernel/kernel-lite.md">Kernel</a></li><li><a href="driver/Readme-EN.md">HDF</a></li><li><a href="subsystems/Readme-EN.md">Subsystems</a></li><li><a href="security/safety-safeguide-security.md">Security Guidelines</a></li><li><a href="security/oem_security_privacy.md">Privacy Protection</a></li></ul>
<td class="cellrowborder" valign="top" width="36.07360736073608%" headers="mcps1.2.4.1.3 "><a name="ul1954915235272"></a><a name="ul1954915235272"></a><ul id="ul1954915235272"><li><a href="kernel/kernel-lite.md">Kernel</a></li><li><a href="driver/Readme-EN.md">HDF</a></li><li><a href="subsystems/Readme-EN.md">Subsystems</a></li><li><a href="security/security-privacy-protection.md">Security Guidelines</a></li><li><a href="security/security-privacy-protection.md">Privacy Protection</a></li></ul>
</td>
</tr>
<tr id="row1368195345111"><td class="cellrowborder" valign="top" width="27.872787278727873%" headers="mcps1.2.4.1.1 "><p id="p16681853145115"><a name="p16681853145115"></a><a name="p16681853145115"></a>Advanced development</p>
</td>
<td class="cellrowborder" valign="top" width="36.053605360536054%" headers="mcps1.2.4.1.2 "><p id="p1568753135116"><a name="p1568753135116"></a><a name="p1568753135116"></a>Developing smart devices based on system capabilities</p>
</td>
<td class="cellrowborder" valign="top" width="36.07360736073608%" headers="mcps1.2.4.1.3 "><a name="ul136895314518"></a><a name="ul136895314518"></a><ul id="ul136895314518"><li><a href="guide/oem_device_clockapp_des.md">Development Example for Clock Apps</a></li><li><a href="guide/device-driver-demo.md">Development Example for Platform Drivers</a></li><li><a href="guide/device-outerdriver-demo.md">Development Example for Peripheral Drivers</a></li></ul>
<td class="cellrowborder" valign="top" width="36.07360736073608%" headers="mcps1.2.4.1.3 "><a name="ul136895314518"></a><a name="ul136895314518"></a><ul id="ul136895314518"><li><a href="guide/device-clock-guide.md">Development Example for Clock Apps</a></li><li><a href="guide/device-driver-demo.md">Development Example for Platform Drivers</a></li><li><a href="guide/device-outerdriver-demo.md">Development Example for Peripheral Drivers</a></li></ul>
</td>
</tr>
<tr id="row66915375119"><td class="cellrowborder" valign="top" width="27.872787278727873%" headers="mcps1.2.4.1.1 "><p id="p4696535512"><a name="p4696535512"></a><a name="p4696535512"></a>Porting and adaptation</p>
</td>
<td class="cellrowborder" valign="top" width="36.053605360536054%" headers="mcps1.2.4.1.2 "><p id="p185185615284"><a name="p185185615284"></a><a name="p185185615284"></a>Porting and adapting the <span id="text1434016533511"><a name="text1434016533511"></a><a name="text1434016533511"></a>OpenHarmony</span> to a third-party library</p>
</td>
<td class="cellrowborder" valign="top" width="36.07360736073608%" headers="mcps1.2.4.1.3 "><p id="p10262183114555"><a name="p10262183114555"></a><a name="p10262183114555"></a><a href="porting/transplant-thirdparty.md">Third-Party Library Porting Guide</a></p>
<td class="cellrowborder" valign="top" width="36.07360736073608%" headers="mcps1.2.4.1.3 "><p id="p10262183114555"><a name="p10262183114555"></a><a name="p10262183114555"></a><a href="porting/porting-thirdparty.md">Third-Party Library Porting Guide</a></p>
<p id="p123471211096"><a name="p123471211096"></a><a name="p123471211096"></a><a href="porting/standard-system-porting-guide">Standard System SoC Porting Guide</a></p>
</td>
</tr>
<tr id="row869853125119"><td class="cellrowborder" valign="top" width="27.872787278727873%" headers="mcps1.2.4.1.1 "><p id="p3691530511"><a name="p3691530511"></a><a name="p3691530511"></a>Contributing components</p>
</td>
<td class="cellrowborder" valign="top" width="36.053605360536054%" headers="mcps1.2.4.1.2 "><p id="p1469115335113"><a name="p1469115335113"></a><a name="p1469115335113"></a>Contributing components to <span id="text1209814279"><a name="text1209814279"></a><a name="text1209814279"></a>OpenHarmony</span></p>
<td class="cellrowborder" valign="top" width="36.053605360536054%" headers="mcps1.2.4.1.2 "><p id="p1469115335113"><a name="p1469115335113"></a><a name="p1469115335113"></a>Contributing components to <span id="text262674084"><a name="text262674084"></a><a name="text262674084"></a>OpenHarmony</span></p>
</td>
<td class="cellrowborder" valign="top" width="36.07360736073608%" headers="mcps1.2.4.1.3 "><a name="ul87045395116"></a><a name="ul87045395116"></a><ul id="ul87045395116"><li><a href="bundles/bundles-standard-rules.md">Component Development Specifications</a></li><li><a href="bundles/bundles-guide.md">Component Development Guidelines</a></li><li><a href="bundles/bundles-demo.md">HPM User Guide</a></li></ul>
</td>
......
# Development Example<a name="EN-US_TOPIC_0000001072143838"></a>
This following uses the Hi3861 platform as an example to describe how to install, compile, and package components by using HPM.
The following uses the Hi3861 platform as an example to describe how to install and build bundles by using the hpm.
1. Run the following commands to initialize the installation directory \(whose name can be customized\):
1. Run the following commands to create a directory \(its name can be customized\) and create a default project based on the dist template:
```
mkdir test3861
cd test3861
hpm init -t dist
hpm init -t dist myproduct
```
If the following information is displayed, the initialization is successful:
If the following information is displayed, the project is created:
```
Initialization finished.
```
2. Run the following command to install the **wifi\_iot** distribution:
2. Run the following command to install the **hispark\_pegasus** distribution:
```
hpm install @ohos/wifi_iot
hpm install @ohos/hispark_pegasus
```
If the following information is displayed, the installation is successful:
......@@ -29,16 +29,16 @@ This following uses the Hi3861 platform as an example to describe how to install
```
>![](../public_sys-resources/icon-note.gif) **NOTE:**
>Run the following command for the Hi3516 platform:
>If you are using the Hi3516 platform, run the following command:
>```
>hpm install @ohos/ip_camera_hi3516dv300
>hpm install @ohos/hispark_taurus
>```
>Run the following command for the Hi3518 platform:
>If you are using the Hi3518 platform, run the following command:
>```
>hpm install @ohos/ip_camera_hi3518ev300
>hpm install @ohos/hispark_aries
>```
3. Run the following command to build and package components:
3. Run the following command to build and package bundles:
```
hpm dist
......
# Preparations<a name="EN-US_TOPIC_0000001071315859"></a>
# Configuring the Compilation Environment<a name="EN-US_TOPIC_0000001071315859"></a>
- [Linux Server](#section20979554791)
- [Node.js](#section9954105413153)
- [HPM](#section15937194904819)
- [Installing hpm-cli Tool](#section15937194904819)
- [Python Environment](#section1621819180417)
- [File Packaging Tool](#section77617165913)
- [SCons](#section20558439191516)
![](figure/3516dv300.png)
## Linux Server<a name="section20979554791"></a>
Prepare a 64-bit Linux server running Ubuntu 16.04 or later. HPM supports Windows Server, but the open-source Hi3861, Hi3516, and Hi3518 solutions support only Ubuntu.
Prepare a 64-bit Linux server running Ubuntu 16.04 or later. \(Currently, the compilation in the Windows environment is not fully supported.\)
Configure Ubuntu to use bash as the Linux system shell, by performing the following:
......@@ -26,7 +28,7 @@ ln -s bash /bin/sh
## Node.js<a name="section9954105413153"></a>
>![](../public_sys-resources/icon-note.gif) **NOTE:**
>If the Node.js version of the source is outdated, run the following command before running **apt-get install**:
>If the **Node.js** version of the source is outdated, run the following command before running **apt-get install**:
>```
>curl -L https://deb.nodesource.com/setup_12.x | bash
>```
......@@ -38,31 +40,31 @@ sudo apt-get install nodejs
sudo apt-get install npm
```
Run the following commands to view Node.js and NPM versions:
Run the following commands to view **Node.js** and npm versions:
```
node --version # Check the Node.js version.
npm --version # Check the NPM version.
npm --version # Check the npm version.
```
## HPM<a name="section15937194904819"></a>
## Installing hpm-cli Tool<a name="section15937194904819"></a>
Install the **hpm-cli** command line tool by using the NPM \(default source: https://registry.npmjs.org/\) provided by the Node.js.
Install the **hpm-cli** command line tool by using the npm \(default source: https://registry.npmjs.org/\) provided by **Node.js**.
```
npm install -g @ohos/hpm-cli
```
After **hpm-cli** is installed, run the following command to view default HPM configurations:
After **hpm-cli** is installed, run the following command to view the default hpm configurations:
```
hpm config
```
You can modify the default configurations as required. The following lists common HPM configurations:
You can modify the default configurations as required. The following lists common hpm configurations:
```
registry = https://hpm.harmonyos.com # Register with the HPM registration center. This is mandatory for downloading components.
registry = https://hpm.harmonyos.com # Address of the hpm registry. This is mandatory for downloading bundles.
strictSsl = true # Enable strict SSL verification as HTTPS is used for connection.
http_proxy = http://your-proxy-server:port # Configure the HTTP proxy.
https_proxy = http://your-proxy-server:port # Configure the HTTPS proxy.
......@@ -124,14 +126,14 @@ sudo apt-get install mtools
python3 -m pip install scons
```
3. Run the following command to check whether SCons is successfully installed. If the installation is successful, the query result as shown in [Figure 1](#fig235815252492) is displayed.
3. Run the following command to check whether SCons is successfully installed. If the installation is successful, the query result shown in [Figure 1](#fig235815252492) is displayed.
```
scons -v
```
**Figure 1** Successful installation \(SCons version requirement: 3.0.4 or later\)<a name="fig235815252492"></a>
![](figure/successful-installation-(scons-version-requirement-3-0-4-or-later)-25.png "successful-installation-(scons-version-requirement-3-0-4-or-later)-25")
![](figure/successful-installation-(scons-version-requirement-3-0-4-or-later)-28.png "successful-installation-(scons-version-requirement-3-0-4-or-later)-28")
>![](../public_sys-resources/icon-note.gif) **NOTE:**
......
# Introduction<a name="EN-US_TOPIC_0000001071487274"></a>
HarmonyOS Package Manager \(HPM\) manages and distributes OpenHarmony component packages. It offers you a tool set to obtain and customize OpenHarmony source code and perform operations such as installation, compilation, packaging, and upgrade.
HarmonyOS package manager \(hpm\) manages and distributes OpenHarmony bundles. It offers you a tool set to obtain and customize OpenHarmony source code and perform operations such as installation, building, packaging, and upgrade.
This document describes how to use HPM to install, compile, and package OpenHarmony components.
This document describes how to use the hpm to install, build, and package OpenHarmony bundles.
......@@ -2,7 +2,7 @@
- **[Introduction](bundles-demo-hpmdescription.md)**
- **[Preparations](bundles-demo-environment.md)**
- **[Configuring the Compilation Environment](bundles-demo-environment.md)**
- **[Development Example](bundles-demo-devsample.md)**
......
# Bundle Development<a name="EN-US_TOPIC_0000001051690861"></a>
# Developing Bundles<a name="EN-US_TOPIC_0000001051690861"></a>
- [Developing OpenHarmony Bundles](#section1976410130540)
- [Creating a Bundle](#section717481119145)
- [Modifying a Bundle](#section102861955201410)
- [Using HPM-provided Template to Create a Bundle](#section15882846181510)
- [Building a Bundle](#section136732148541)
- [Defining the Building Script](#section10274147111610)
- [Executing the Building Script](#section879301916172)
- [Defining an Existing Project as a Bundle](#section102861955201410)
- [Releasing the Bundle on the HPM Platform](#section1318574233211)
- [Referencing a Bundle](#section19311124115315)
- [Installing a Bundle Globally](#section165131927192120)
- [Compiling a Bundle](#section136732148541)
- [Defining the Build Script](#section10274147111610)
- [Executing the Build Script](#section879301916172)
- [Defining a Distribution](#section413216495619)
- [Defining Scripts](#section11503171219190)
- [Distributing](#section4694125521912)
- [Burning](#section1746331545413)
- [Debugging](#section6742131615549)
- [Building a Distribution](#section4694125521912)
## Developing OpenHarmony Bundles<a name="section1976410130540"></a>
You can use any of the following methods to develop OpenHarmony bundles:
You have an option to use any of the following methods to develop OpenHarmony bundles:
- Develop a brand new bundle from scratch.
- Rewrite code of an existing non-bundle to develop a bundle.
- Use HPM-provided bundle templates to quickly develop a bundle.
- Create a new bundle from scratch.
- Define an existing source code project as a bundle.
## Creating a Bundle<a name="section717481119145"></a>
Generally, you can find commonly used bundles on the [HPM](https://hpm.harmonyos.com/#/en/home) website. If they cannot meet your requirements, you can develop your own bundles.
Generally, you can find commonly used bundles on the [HPM](https://hpm.harmonyos.com/#/en/home) website. If they cannot meet your requirements, you can develop a bundle on your own.
You can publish bundles in the HPM repository if you like, so that your peers have an option to use them. Assume that you want to create a bundle named **my-bundle** in the **D:/source** directory:
You can publish bundles in the HPM repository if you like, so that your peers have an option to use them.
Run the **hpm init** command to create the scaffold code for this bundle. For example, you can go to the **D:/source** directory and run the following command:
Assume that you are planning to create a new bundle **my-bundle** in **D:/source**. Run the **hpm init** command to create the scaffold code for this bundle. For example, you can go to **D:/source** and run the following command:
```
hpm init -t default -d demo my-bundle
hpm init -t default -d demo mybundle
```
The following files are generated in the **source** directory:
The **'default'** template will be used to create a bundle named **mybundle** in the **demo** directory in **D:/source**.
```
mybundle
├── bundle.json # Metadata description file of the bundle
├── example # Example of testing bundle functions
│ └── main.c
├── include # Internal header files of the bundle
│ └── mybundle.h
├── README.md # Brief description of the bundle
└── src # Source code of the bundle
└─ mybundle.c
demo
├── headers # Header file (example)
│ └── main.h
└── src # Source code (example)
│ └─ main.c
├── bundle.json # Metadata declaration file
└── LICENSE # License agreement
└── Makefile # Compilation description file (example)
└── README.md # Readme file
```
Then, complete your coding based on service requirements. Finally, use **git** to commit your code \(including the **bundle.json** file\) to the code hosting repository, such as gitee.
Then, complete your coding based on service requirements and generate the build script. Finally, use **git** to commit your code \(including the **bundle.json** file\) to the code hosting repository, such as gitee.
>![](../public_sys-resources/icon-note.gif) **NOTE:**
>```
>hpm init -t {templatename} -d {dir} {name}
>```
>- **-t \{templatename\}** indicates the template name.
>- **-d \{dir\}** indicates the path for storing the bundle to be created.
>- **name** indicates the name of the bundle to be created.
The hpm provides a few default templates. More templates are available on the HPM server. You can run the **hpm search -t template** command to search for a template stored on the server.
![](figure/en-us_image_0000001134127844.png)
## Modifying a Bundle<a name="section102861955201410"></a>
## Defining an Existing Project as a Bundle<a name="section102861955201410"></a>
If you have code unqualified for the OpenHarmony bundle structure, modify your code to match an HPM bundle. In the code directory \(for example, **mybundle2**\) storing your code, run the following command with the bundle name and version specified:
If you have a code project and need to distribute it on the HPM platform, run the following command in the current project directory, for example, **mybundle2**:
```
hpm init
```
1. Enter a bundle name \(**mybundle2** as an example\) and press **Enter**.
2. Enter the bundle version \(**1.0.0** as an example\) and press **Enter**. A **bundle.json** file is generated in the current bundle directory.
3. Add other descriptions in **bundle.json**, which is publishable.
2. Enter the version and description. A **bundle.json** file will be generated in the current directory.
3. Open the** bundle.json** file as you like.
```
$ hpm init
Your bundle will be created in dirname E:\demo\mybundle2
Your bundle will be created in directory ~\demo\mybundle2
? bundle name mybundel2
? version 1.0.0
Init finished!
...
Initialization finished.
```
1. Modify other information \(such as the author, code repository, code directory, command script, and dependent bundles\) in **bundle.json**.
1. Modify other information \(such as the author, code repository, code directory, command script, and dependent bundles\) in **bundle.json**. An example is shown below:
```
{
"name": "mybundle2",
"version": "1.0.0",
"publishAs": "source",
"publishAs": "code-segment",
"dirs":{
".":[
"README.md"
],
"src":[
"test.c"
],
"header":[
"header/test.h"
],
"src/common":[
"src/common/foobar.txt"
]
".":["README.md"],
"src":["test.c"],
"header":["header/test.h" ],
"src/common":["src/common/foobar.txt"]
},
"scripts": {
"build": "make -${args}"
"build": "make -${args}"
},
"dependencies": {
"@ohos/cjson": "^1.0.0",
"@ohos/": "^1.2.0"
"@ohos/cjson": "^1.0.0",
"@ohos/foobar": "^1.2.0"
}
}
```
## Using HPM-provided Template to Create a Bundle<a name="section15882846181510"></a>
## Releasing the Bundle on the HPM Platform<a name="section1318574233211"></a>
To release a bundle on the HPM platform, you need to obtain an account and create an organization \(or join an existing organization\). For details, see the online help on the [HPM](https://hpm.harmonyos.com/#/en/home) website.
After that, generate a public key on the local PC based on your invitation code \(which can be obtained on the **My profile** page on the HPM website\), and configure the public key on the **My profile** page.
```
hpm config set loginUser {your-invitation-code}
hpm gen-keys
```
The generated file will be stored in **\~\\Users\\yourname\\.hpm\\key**. Copy the content in the public key file **publicKey\_your-account.pem** to the SSH public key on your **My profile** page.
After finishing the preceding operations, you then have the permission to release bundles in your organization.
In the directory where the bundle is located, run the following command to package and release the bundle:
```
hpm publish
```
>![](../public_sys-resources/icon-note.gif) **NOTE:**
>- To avoid bundle name conflicts, name a released bundle in the format of **@org\_name/bundle\_name**.
>- Your account must also be a member of **org\_name** so that you can release or update bundles in the organization.
>- The released bundles take effect only after security and content reviews.
## Referencing a Bundle<a name="section19311124115315"></a>
Generally, when developing a project, you may need to reference other bundles in order to accelerate development of specific functions. Installing dependencies could be a good way.
Go to the HPM website, search for bundles that meet your service requirements by keywords, and then introduce the bundles to your project.
The HPM provides **default** and **simple** templates as well as other templates that are stored on the server.
Run the following command in your bundle project. Make sure that the project directory contains the **bundle.json** file.
You can run the **hpm search -t template** command to search for a template stored on the server.
```
$ hpm install @scope/the_bundle
```
The referenced bundle will be installed under **ohos\_bundle** in the directory where your project is located. The directory structure is as follows:
```
project
├── ohos_bundle
│ └── scope
│ └─ the_bundle # <--- Referenced bundle
└── src
│ └─ main.c
├── bundle.json # Metadata declaration file
└── LICENSE
└── Makefile
└── README.md
```
![](figure/en-us_image_0000001051452177.png)
Open the **bundle.json** file. You will see that the bundle has been introduced to the dependencies of your project.
```
{
"dependencies": {
"@scope/the_bundle": "^1.0.0"
}
}
```
Then, select your desired template based on the information below **description**, use the selected template to quickly create the bundle scaffold, and run the following command with the **-t** and **-d** parameters specified:
You can also edit the dependencies of multiple bundles in this file at a time.
```
hpm init -t {templatename} -d dir name
{
"dependencies": {
"@scope/the_bundle1": "^1.0.0",
"@scope/the_bundle2": "^2.0.0",
"@scope/the_bundle3": "^3.0.0",
"@scope/the_bundle4": "^1.1.0"
}
}
```
- **\{templatename\}** indicates the template name.
- **dir** indicates the path for storing the bundle to be created.
- **name** indicates the name of the bundle to be created.
Run the **hpm install** command again to download and install all bundles that have not been installed.
## Installing a Bundle Globally<a name="section165131927192120"></a>
## Building a Bundle<a name="section136732148541"></a>
If the referenced bundle is one shared by multiple projects, for example, the compiler toolchain, you can install it globally.
After completing code development, you need to build the bundle. The HPM supports command integration so that you can select any build tool \(such as **make**, **gcc**, and **gn**\) suitable for your project. You only need to define the **build** command in the **scripts** in the **bundle.json** file of your project, and then you run the hpm command **build** to perform building.
Run the following command in your bundle project. Make sure that the project directory contains the **bundle.json** file.
## Defining the Building Script<a name="section10274147111610"></a>
```
$ hpm install -g @scope/the_tool
```
The referenced bundle will be installed in the directory specified by the **globalRepo** parameter of the **hpm config** command.
```
~\.hpm\global
│ └── scope
│ └─ the_tool # <--- Referenced bundle
```
>![](../public_sys-resources/icon-note.gif) **NOTE:**
>- For a bundle installed in a project, you can reference it using the environment variable **DEP\_SCOPE\_bundle\_name** when running the hpm compilation command.
>For example, after you run **hpm i @opensource/gn** to install a bundle, you can edit the build script in the **bundle.json** file as follows:
>```
>"scripts": {
> "build": "${DEP_OPENSOURCE_gn}/gn --version"
> },
>```
>Then, you can run the **hpm build** command to call GN functions.
>- For a globally installed bundle, you can directly call the bundle using an environment variable or reference the bundle using the **$\{key\}/tool\_name** parameter when running the **hpm config set key value** command. For example:
>```
>hpm i -g @ohos/opensource/gn
>hpm config BUILD_SYS_GN ~/.hpm/global/ohos_bundles/opensource/gn
>```
>You can edit the build script in the **bundle.json** file as follows:
>```
>"scripts": {
> "build": "${BUILD_SYS_GN}/gn --version"
> },
>```
>Then, you can run the **hpm build** command to call GN functions.
## Compiling a Bundle<a name="section136732148541"></a>
If the bundle code can be independently compiled once you finish coding, you can configure build tools and scripts to generate binary files.
The hpm supports command integration so that you can select any build tool \(such as **make**, **gcc**, and **gn**\) suitable for your project. You only need to define the **build** command in the **scripts** in the **bundle.json** file of your project, and then you run the hpm command **build** to perform building.
## Defining the Build Script<a name="section10274147111610"></a>
This section uses how to build an executable file **helloworld** in the **app** directory as an example.
......@@ -162,7 +266,7 @@ executable("hello_world") {
>- **executable** is a built-in template of **gn**. You can run the **gn help executable** command to view how to use this template.
>- **sources** represents the source code path, and **include\_dirs** represents the header file path.
## Executing the Building Script<a name="section879301916172"></a>
## Executing the Build Script<a name="section879301916172"></a>
Run the following command:
......@@ -176,41 +280,87 @@ After all building operations are complete, the message "build succeed" is displ
## Defining a Distribution<a name="section413216495619"></a>
A distribution refers to an image file of an executable OpenHarmony solution composed of a group of bundles. It contains many dependent bundles and provides scripts to illustrate how to compile and link these bundles.
This process states the dependent bundles and how to compile and link the bundles to generate image files.
This section uses the hb compilation framework as an example.
## Defining Scripts<a name="section11503171219190"></a>
Define scripts in **bundle.json** as follows:
An example definition in the **bundle.json** file is as follows:
\{
"name": "@your/dist\_name",
"version": "2.2.0",
```
{
"name": "my_dist",
"version": "1.0.0",
"publishAs": "distribution",
"scripts": {
"dist": "make -${args}"
},
"base": {
"name": "dist-bundle",
"version": "1.0.0"
},
"envs": {
"args": "x86"
},
"dependencies": {
}
}
```
## Distributing<a name="section4694125521912"></a>
"description": "describe it",
"scripts": \{
"config\_hb": "hb set -root $DEP\_BUNDLE\_BASE",
"dist": "PATH=/root/.local/bin:$\{DEP\_OHOS\_gn\}:$\{DEP\_OHOS\_ninja\}/ninja:$\{DEP\_OHOS\_llvm\}/llvm/bin:$\{DEP\_OHOS\_hc\_gen\}/hc-gen:$\{PATH\} && ./scripts/dist.sh"
\},
"envs": \{
"debug": false
\},
"dirs": \{
"scripts": "scripts/\*"
Run the following command in the current distribution directory:
\},
"dependencies": \{
"@ohos/build\_lite": "2.2.0",
"@ohos/gn": "1.1.1",
"@ohos/llvm": "1.1.1",
"@ohos/hc\_gen": "1.1.0",
"@ohos/ninja": "1.1.0",
...
\},
"ohos": \{
"os": "2.2-Beta",
"board": "hi3516",
"kernel": "liteos-a"
\},
"keywords": \[ "hispark", "hi3516" \],
"repository": "https://gitee.com/openharmony/your-project",
"license": "Apache V2"
\}
## Building a Distribution<a name="section4694125521912"></a>
Run the following command in the root directory of the current distribution:
```
hpm dist
```
The **hpm-cli** tool automatically performs compiling and packing, and generates an image file of the **dist** script defined based on **scripts**. The following is an example:
The **hpm-cli** tool automatically starts compilation. After the compilation is complete, an image file will be generated, as shown below:
```
out
......@@ -218,23 +368,23 @@ out
|-xx.file
```
## Burning<a name="section1746331545413"></a>
Burning
The building result of the distribution can be burnt into devices, for example, by using the **hiburn** tool. You need to configure burning parameters in the **bundle.json** file of the distribution.
The build result of the distribution can be burnt into devices, for example, by using the **hiburn** tool. You need to configure burning parameters in the **bundle.json** file of the distribution.
```
"scripts": {
"flash": "{$DEP_HIBURN}/hiburn"
"flash": "{$DEP_HIBURN}/hiburn"
},
```
You should set burning parameters by referring to the specific guide on the burning tool you use.
Set the path of the **hiburn** tool and set burning parameters. For details, see the **hiburn** tool guide.
```
hpm config set DEP_HIBURN {hiburn_path}
hpm run flash
```
## Debugging<a name="section6742131615549"></a>
Start debugging after you have burnt the image file of the distribution into devices. The debugging process varies according to specific development boards and IDE debugging tools.
>![](../public_sys-resources/icon-note.gif) **NOTE:**
>The preceding example describes only how to define the **bundle.json** file. The burning tool is subject to the actual development board.
# Bundle Development<a name="EN-US_TOPIC_0000001051452100"></a>
- [Overview](#section112136415486)
- [Preparations](#section12731192104816)
- [Hardware Requirements](#section71851750144814)
- [Installing Node.js and the hpm-cli Tool](#section675199493)
- [\(Optional\) Modifying HPM Configurations](#section1940205015499)
- [Downloading OpenHarmony Code](#section42591118155217)
- [Installing Dependent Bundles](#section644212530524)
# Overview<a name="EN-US_TOPIC_0000001051452100"></a>
- [Bundle Development](#section15640113715318)
- [Bundle](#section196713235514)
- [Distribution](#section155387501033)
## Overview<a name="section112136415486"></a>
This section describes the bundle-specific concepts in HarmonyOS. It uses an example to step you through how to create, develop, build, release, and install a bundle using the **hpm-cli** tool.
This document describes how to develop OpenHarmony bundles and distributions, and how to create, develop, and build code, as well as burn and debug devices by using a command line tool.
## Bundle<a name="section196713235514"></a>
- A bundle usually maps onto a code repository, which is a code archive with the **bundle.json**, **README**, and **LICENSE** files.
- A distribution consists of multiple bundles. Each distribution integrates various bundles of a comprehensive system, such as the driver, kernel, framework, and applications. These bundles can be used for device burning.
A bundle is a term used in HarmonyOS to indicate a distribution. A bundle is equivalent to a package and it usually contains the following contents:
**Table 1** Differences between a bundle and a distribution
- Distributed binary file \(binary type\)
- Distributed source code file \(source code/code snippet type\)
- Build script \(distribution type\)
- Bundle description files:
- **bundle.json**: metadata declaration \(name, version, dependency, etc.\)
- **LICENSE**: license agreement
- **README.md**: readme file
- **CHANGELOG.md**: change log \(optional\)
<a name="table6287133615412"></a>
<table><thead align="left"><tr id="row17288183614415"><th class="cellrowborder" valign="top" width="16.24162416241624%" id="mcps1.2.4.1.1"><p id="p528818361545"><a name="p528818361545"></a><a name="p528818361545"></a>Aspect</p>
</th>
<th class="cellrowborder" valign="top" width="33.31333133313331%" id="mcps1.2.4.1.2"><p id="p1288836247"><a name="p1288836247"></a><a name="p1288836247"></a>Bundle</p>
</th>
<th class="cellrowborder" valign="top" width="50.44504450445044%" id="mcps1.2.4.1.3"><p id="p112885362418"><a name="p112885362418"></a><a name="p112885362418"></a>Distribution</p>
</th>
</tr>
</thead>
<tbody><tr id="row1728813361848"><td class="cellrowborder" valign="top" width="16.24162416241624%" headers="mcps1.2.4.1.1 "><p id="p2010613564815"><a name="p2010613564815"></a><a name="p2010613564815"></a>Application scenario</p>
</td>
<td class="cellrowborder" valign="top" width="33.31333133313331%" headers="mcps1.2.4.1.2 "><p id="p1910555184818"><a name="p1910555184818"></a><a name="p1910555184818"></a>Feature-oriented</p>
</td>
<td class="cellrowborder" valign="top" width="50.44504450445044%" headers="mcps1.2.4.1.3 "><p id="p13871955484"><a name="p13871955484"></a><a name="p13871955484"></a>System-oriented</p>
</td>
</tr>
<tr id="row676745614472"><td class="cellrowborder" valign="top" width="16.24162416241624%" headers="mcps1.2.4.1.1 "><p id="p1028816365414"><a name="p1028816365414"></a><a name="p1028816365414"></a>Content</p>
</td>
<td class="cellrowborder" valign="top" width="33.31333133313331%" headers="mcps1.2.4.1.2 "><p id="p428812361042"><a name="p428812361042"></a><a name="p428812361042"></a>Codes or a binary library for implementing features</p>
</td>
<td class="cellrowborder" valign="top" width="50.44504450445044%" headers="mcps1.2.4.1.3 "><p id="p328817366417"><a name="p328817366417"></a><a name="p328817366417"></a>List of dependent bundles as well as their compiling and building scripts</p>
</td>
</tr>
<tr id="row95114356"><td class="cellrowborder" valign="top" width="16.24162416241624%" headers="mcps1.2.4.1.1 "><p id="p184894513517"><a name="p184894513517"></a><a name="p184894513517"></a>Integrity</p>
</td>
<td class="cellrowborder" valign="top" width="33.31333133313331%" headers="mcps1.2.4.1.2 "><p id="p1951741155"><a name="p1951741155"></a><a name="p1951741155"></a>A part of the operating system</p>
</td>
<td class="cellrowborder" valign="top" width="50.44504450445044%" headers="mcps1.2.4.1.3 "><p id="p20521542512"><a name="p20521542512"></a><a name="p20521542512"></a>An entire operating system</p>
</td>
</tr>
<tr id="row13581419518"><td class="cellrowborder" valign="top" width="16.24162416241624%" headers="mcps1.2.4.1.1 "><p id="p859171059"><a name="p859171059"></a><a name="p859171059"></a>Compilation result</p>
</td>
<td class="cellrowborder" valign="top" width="33.31333133313331%" headers="mcps1.2.4.1.2 "><p id="p259201355"><a name="p259201355"></a><a name="p259201355"></a>Bundles</p>
</td>
<td class="cellrowborder" valign="top" width="50.44504450445044%" headers="mcps1.2.4.1.3 "><p id="p459414519"><a name="p459414519"></a><a name="p459414519"></a>System image</p>
</td>
</tr>
</tbody>
</table>
**Figure 1** Composition of bundles and distributions<a name="fig85033524124"></a>
>![](../public_sys-resources/icon-note.gif) **NOTE:**
>Bundles can be classified into the following types: binary, source code, code snippet, template, plug-in, distribution, and so on. A bundle can depend on other bundles. The dependency relationship can be represented by a directed acyclic graph \(DAG\).
After you release a bundle on the [HPM](https://hpm.harmonyos.com/#/en/home) platform, other developers can download, install, and use the bundle through the HarmonyOS Package Manager \(hpm\).
![](figure/组件0924.png)
A bundle must be uniquely named in the format **@scope/name** in the namespace. Independent evolution is supported for each bundle.
## Preparations<a name="section12731192104816"></a>
## Distribution<a name="section155387501033"></a>
### Hardware Requirements<a name="section71851750144814"></a>
A distribution is a complete HarmonyOS release that integrates various bundles, including drivers, kernels, frameworks, and applications. A distribution can also be distributed on the [HPM](https://hpm.harmonyos.com/#/en/home) platform through bundles.
- Development boards \(examples: Hi3861, Hi3516D V300, and Hi3518E V300\)
- Host computer \(Windows workstation\)
- Linux server
>![](../public_sys-resources/icon-note.gif) **NOTE:**
>The metadata of a distribution describes only the dependent bundles and build script compilation methods. It does not cover binary images of the distribution. When downloading a distribution, you also need to download the dependent bundles. You can obtain the system image file for burning only after finishing installation and compilation.
>A distribution is inheritable. Specifically, you can add bundles to or delete bundles from an existing distribution to create your own distribution.
**Figure 2** Hardware connections<a name="fig113816181847"></a>
![](figure/hardware-connections-23.png "hardware-connections-23")
**Figure 1** Relationship between bundles and a distribution<a name="fig85033524124"></a>
### Installing **Node.js** and the **hpm-cli** Tool<a name="section675199493"></a>
1. Install **Node.js**.
Download **Node.js** from its official website and install it on your local PC.
You are advised to install [Node.js](https://nodejs.org/) 12.x \(including npm 6.14.4\) or a later version \(12.13.0 or later is recommended\).
2. Install the **hpm-cli** tool using **npm** delivered with **Node.js**. Run the following command:
```
npm install -g @ohos/hpm-cli
```
3. Run the following command to check whether the installation is successful. If an HPM version is displayed, the installation is successful.
```
hpm -V or hpm --version
```
4. \(Optional\) Run the following command to upgrade the HPM version if needed:
```
npm update -g @ohos/hpm-cli
```
### \(Optional\) Modifying HPM Configurations<a name="section1940205015499"></a>
After the **hpm-cli** tool is installed, run the following command to view HPM configurations:
```
hpm config
```
Default HPM configurations are displayed upon the command execution. You can modify the default configurations as required. The following lists common HPM configurations:
```
registry = https://hpm.harmonyos.com/hpm/registry/api # Configure the address of the HPM registry (mandatory for downloading bundles).
login = https://hpm.harmonyos.com/hpm/auth/pk # Configure the address for HPM login (mandatory for publishing bundles).
loginUser = {your-account} # Configure the account for HPM login (mandatory for publishing bundles).
shellPath = C:\WINDOWS\System32\cmd.exe # Configure the shell for running HPM commands.
globalRepo = C:\Users\yourname\.global # Configure the path for storing bundles that are installed globally.
http_proxy = http://your-proxy-server:port # Configure the HTTP proxy.
https_proxy = http://your-proxy-server:port # Configure the HTTPS proxy.
```
For details about **hpm-cli** commands, see [HPM Commands](bundles-guide-overview.md).
### Downloading OpenHarmony Code<a name="section42591118155217"></a>
For details, see [Source Code Acquisition](../get-code/sourcecode-acquire.md).
### Installing Dependent Bundles<a name="section644212530524"></a>
The HPM publishes commonly used development tools \(such as those for burning, compiling, and compression\) as bundles. You can run the following command to install these tools. After the command is executed, the system automatically downloads and installs the tools, which need to be installed globally only once.
```
hpm i -g @ohos/llvm
hpm i -g @ohos/ninja
hpm i -g @ohos/gn
hpm i -g @ohos/hc_gen
hpm i -g @ohos/sysroot
```
These are a set of development tools \(such as **gn** and **ninja**\). With these tools, you can start your general bundle development based on source code.
## Bundle Development<a name="section15640113715318"></a>
![](figure/组件和发行版的构成-英文.png)
# Preparations<a name="EN-US_TOPIC_0000001051770836"></a>
# Installing hpm-cli Tool<a name="EN-US_TOPIC_0000001051770836"></a>
- [Hardware Requirements](#section98535485518)
- [Installing Node.js and the hpm-cli Tool](#section106591616205311)
- [\(Optional\) Modifying HPM Configurations](#section71821165412)
- [Installing Node.js and hpm](#section106591616205311)
- [\(Optional\) Configuring hpm](#section71821165412)
- [Downloading OpenHarmony Code](#section102338221707)
- [Installing Dependent Bundles](#section19233183315020)
## Hardware Requirements<a name="section98535485518"></a>
To develop a bundle, you first need to install the HarmonyOS Package Manager \(hpm\), a cross-platform command line tool developed based on Node.js. To run the hpm, you need to install Node.js, and then install the hpm using the Node Package Manager \(npm\).
- Development boards \(examples: Hi3861, Hi3516D V300, and Hi3518E V300\)
- Host computer \(Windows workstation\)
- Linux server
**Figure 1** Hardware connections<a name="fig113816181847"></a>
![](figure/hardware-connections-24.png "hardware-connections-24")
## Installing **Node.js** and the **hpm-cli** Tool<a name="section106591616205311"></a>
## Installing Node.js and hpm<a name="section106591616205311"></a>
1. Install **Node.js**.
......@@ -29,37 +20,49 @@
npm install -g @ohos/hpm-cli
```
3. Run the following command to check whether the installation is successful. If an HPM version is displayed, the installation is successful.
3. Run the following command to check whether the installation is successful. If an hpm version is displayed, the installation is successful.
```
hpm -V or hpm --version
```
4. \(Optional\) Run the following command to upgrade the HPM version if needed:
4. \(Optional\) Run the following command to upgrade the hpm version if needed:
```
npm update -g @ohos/hpm-cli
```
## \(Optional\) Modifying HPM Configurations<a name="section71821165412"></a>
## \(Optional\) Configuring hpm<a name="section71821165412"></a>
After the **hpm-cli** tool is installed, run the following command to view HPM configurations:
After the **hpm-cli** tool is installed, run the following command to view the hpm configuration if you need to modify the configuration information, such as proxy and shell:
```
hpm config
```
Default HPM configurations are displayed upon the command execution. You can modify the default configurations as required. The following lists common HPM configurations:
Default hpm configurations are displayed upon successful command execution. You can modify the default configurations as required. The following lists common hpm configurations:
```
registry = https://hpm.harmonyos.com/hpm/registry/api # Configure the address of the HPM registry, mandatory for downloading bundles.
login = https://hpm.harmonyos.com/hpm/auth/pk # Configure the address for HPM login, mandatory for publishing bundles.
loginUser = {your-account} # Configure the account for HPM login, mandatory for publishing bundles.
shellPath = C:\WINDOWS\System32\cmd.exe # Configure the shell for running HPM commands.
globalRepo = C:\Users\yourname\.global # Configure the path for storing bundles that are installed globally.
http_proxy = http://your-proxy-server:port # Configure the HTTP proxy.
https_proxy = http://your-proxy-server:port # Configure the HTTPS proxy.
registry = https://hpm.harmonyos.com
### login Settings
# loginUser = invitation_code
#### Path Settings
shellPath = C:\WINDOWS\System32\cmd.exe
# shellPath = C:\Program Files\Git\bin\sh.exe
# globalRepo = C:\Users\username\.hpm\global
#### Network Settings
# no_proxy = *.server.com
# http_proxy = http://user:pwd@proxy_server:port
# https_proxy = http://user:pwd@proxy_server:port
# strictSsl = true
#### Other Settings
# privateSupport = true|false
# ignoreBundles = @ohos/llvm,@ohos/gn,
# OSPlatform = Auto|linux|darwin|win32
```
For details about **hpm-cli** commands, see [HPM Commands](bundles-guide-overview.md).
......@@ -68,17 +71,3 @@ For details about **hpm-cli** commands, see [HPM Commands](bundles-guide-over
For details, see [Source Code Acquisition](../get-code/sourcecode-acquire.md).
## Installing Dependent Bundles<a name="section19233183315020"></a>
The HPM publishes commonly used development tools \(such as those for burning, compiling, and compression\) as bundles. You can run the following command to install these tools. After the command is executed, the system automatically downloads and installs the tools, which need to be installed globally only once.
```
hpm i -g @ohos/llvm
hpm i -g @ohos/ninja
hpm i -g @ohos/gn
hpm i -g @ohos/hc_gen
hpm i -g @ohos/sysroot
```
These are a set of development tools \(such as **gn** and **ninja**\). With these tools, you can start your general bundle development based on source code.
# Development Guidelines<a name="EN-US_TOPIC_0000001157319417"></a>
- **[Bundle Development](bundles-guide-overview.md)**
- **[Overview](bundles-guide-overview.md)**
- **[Preparations](bundles-guide-prepare.md)**
- **[Installing hpm-cli Tool](bundles-guide-prepare.md)**
- **[Bundle Development](bundles-guide-develop.md)**
- **[Developing Bundles](bundles-guide-develop.md)**
# Development Specifications<a name="EN-US_TOPIC_0000001051452141"></a>
# Bundle Development Specifications<a name="EN-US_TOPIC_0000001051452141"></a>
- [Overview](#section1725818533344)
- [Definition](#section4821219183514)
- [Bundle Division Principles](#section1089794263513)
- [Bundle Division Rules](#section1089794263513)
- [Bundle Dependency](#section25701647163710)
- [Bundle Composition](#section185538333914)
......@@ -40,7 +40,7 @@ Bundles are designed for reuse purposes. Any reusable modules can be defined as
- Code snippet
- Distribution
### Bundle Division Principles<a name="section1089794263513"></a>
### Bundle Division Rules<a name="section1089794263513"></a>
In principle, bundles should be grouped at a fine-grained granularity as much as possible to achieve maximum reuse. The following factors are taken into account regarding bundle division:
......@@ -59,7 +59,7 @@ A bundle dependency can be mandatory or optional.
A bundle contains the following:
- **src** directory for storing code files or code library
- **src** directory for storing code files or code library of the bundle
- **ohos\_bundles** folder for storing dependent bundles \(It is automatically generated during bundle installation, without the need to submit to the code library.\)
- **README.md** file for describing the bundle
- **bundle.json** file for declaring metadata of the bundle
......@@ -138,7 +138,7 @@ Each **bundle.json** file has the following fields:
- **version**: a bundle version number, for example, 1.0.0. The version number must comply with the Semantic Versioning Specification \(SemVer\) standards.
- **description**: a brief description of a bundle
- **dependencies**: bundles that a bundle depends on
- **dependencies**: bundles on which this bundle depends.
- **envs**: parameters required for bundle compilation, including global parameters and dependency parameters.
......@@ -170,7 +170,7 @@ A basic **bundle.json** file needs to be enriched by bundle dependencies to im
}
```
In this example, **my-bundle** depends on **net 1.0.0**. After you globally install the hpm-cli tool, run the following command to obtain bundle dependencies from the remote repository:
In the preceding example, the **my-bundle** bundle depends on the **net 1.0.0** bundle. After you globally install the hpm-cli tool, run the following command to obtain bundle dependencies from the remote repository:
```
hpm install
......@@ -246,7 +246,7 @@ You can use the hpm-cli tool to manage the lifecycle of a bundle. The following
</td>
<td class="cellrowborder" valign="top" width="30.623062306230626%" headers="mcps1.2.4.1.2 "><p id="p2046811558481"><a name="p2046811558481"></a><a name="p2046811558481"></a>hpm init bundle</p>
</td>
<td class="cellrowborder" valign="top" width="48.42484248424842%" headers="mcps1.2.4.1.3 "><p id="p1646818557481"><a name="p1646818557481"></a><a name="p1646818557481"></a>Creates a bundle project.</p>
<td class="cellrowborder" valign="top" width="48.42484248424842%" headers="mcps1.2.4.1.3 "><p id="p1646818557481"><a name="p1646818557481"></a><a name="p1646818557481"></a>Create a bundle project.</p>
</td>
</tr>
<tr id="row351184593713"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p18991313496"><a name="p18991313496"></a><a name="p18991313496"></a>hpm init -t template</p>
......@@ -472,7 +472,7 @@ As it is rather complex to redefine the functionality of a distribution, OpenHar
}
```
In this example, the current bundle inherits from the **dist-wifi-iot 1.0.0** bundle of the distribution.
In this example, the current bundle inherits from the **Bundledist-wifi-iot 1.0.0** bundle of the distribution.
Each distribution consists of many dependent bundles, which are represented by the **dependencies** field in **bundle.json**. Some dependencies are mandatory, and others can be added or removed required. In the **bundle.json** file, bundle names prefixed with a question mark \(?\) represent optional dependent bundles. If you want to inherit from a distribution involving such bundles, you can remove them and then add other bundles.
......
# Bundle Development<a name="EN-US_TOPIC_0000001111039520"></a>
- **[Development Specifications](bundles-standard-rules.md)**
- **[Bundle Development Specifications](bundles-standard-rules.md)**
- **[Development Guidelines](bundles-guide.md)**
......
# drivers
- [HDF](driver-hdf.md)
- [HDF](drive-hdf.md)
- [HDF Overview](driver-hdf-overview.md)
- [driverr Development](driver-hdf-development.md)
- [driverr Service Management](driver-hdf-servicemanage.md)
- [driverr Message Mechanism Management](driver-hdf-news.md)
- [driverr Configuration Management](driver-hdf-manage.md)
- [Driver Development](driver-hdf-development.md)
- [Driver Service Management](driver-hdf-servicemanage.md)
- [Driver Message Mechanism Management](driver-hdf-news.md)
- [Driver Configuration Management](driver-hdf-manage.md)
- [HDF Development Example](driver-hdf-sample.md)
- [Platform driverrs](driver-platform.md)
- [Platform Drivers](drive-platform.md)
- [GPIO](driver-platform-gpio-des.md)
- [I2C](driver-platform-i2c-des.md)
- [RTC](driver-platform-rtc-des.md)
......@@ -16,7 +16,7 @@
- [UART](driver-platform-uart-des.md)
- [Watchdog](driver-platform-watchdog-des.md)
- [MIPI DSI](driver-platform-mipidsi-des.md)
- [Peripherals](driver-peripherals.md)
- [Peripherals](drive-peripherals.md)
- [LCD](driver-peripherals-lcd-des.md)
- [TOUCHSCREEN](driver-peripherals-touch-des.md)
- [Sensor](driver-peripherals-sensor-des.md)
......
......@@ -2,13 +2,13 @@
- **[HDF Overview](driver-hdf-overview.md)**
- **[driverr Development](driver-hdf-development.md)**
- **[Driver Development](driver-hdf-development.md)**
- **[driverr Service Management](driver-hdf-servicemanage.md)**
- **[Driver Service Management](driver-hdf-servicemanage.md)**
- **[driverr Message Mechanism Management](driver-hdf-news.md)**
- **[Driver Message Mechanism Management](driver-hdf-news.md)**
- **[driverr Configuration Management](driver-hdf-manage.md)**
- **[Driver Configuration Management](driver-hdf-manage.md)**
- **[HDF Development Example](driver-hdf-sample.md)**
......
# Platform drivers<a name="EN-US_TOPIC_0000001111199424"></a>
# Platform Drivers<a name="EN-US_TOPIC_0000001111199424"></a>
- **[GPIO](driver-platform-gpio-des.md)**
......
# Driver Usage Guidelines<a name="EN-US_TOPIC_0000001111039544"></a>
- **[HDF](driver-hdf.md)**
- **[HDF](drive-hdf.md)**
- **[Platform Drivers](driver-platform.md)**
- **[Platform Drivers](drive-platform.md)**
- **[Peripherals](driver-peripherals.md)**
- **[Peripherals](drive-peripherals.md)**
......@@ -66,7 +66,6 @@ Driver development based on the HDF consists of two parts: driver implementation
HDF_INIT(g_sampleDriverEntry);
```
2. Compile the driver code.
- Use the **Makefile** template provided by the HDF to compile the driver code.
......@@ -86,7 +85,6 @@ Driver development based on the HDF consists of two parts: driver implementation
LIB_SUBDIRS += # Directory of Makefile
```
3. Configure the driver.
HDF Configuration Source \(HCS\) is the source code that describes the configuration of the HDF. For details about the HCS, see [Driver Configuration Management](driver-hdf-manage.md).
......@@ -169,7 +167,7 @@ Driver development based on the HDF consists of two parts: driver implementation
> DEVICE_PRELOAD_INVALID
> } DevicePreload;
> ```
> When the **preload** field in the configuration file is set to **0** \(**DEVICE\_PRELOAD\_ENABLE**\), the driver is loaded by default during system startup. When this field is set to **1** \(**DEVICE\_PRELOAD\_ENABLE\_STEP2**\), the driver is loaded after system startup if quick start is enabled; it is loaded during system startup otherwise. When this field is set to **2** \(**DEVICE\_PRELOAD\_DISABLE**\), the driver is not loaded by default during system startup and can be dynamically loaded later. If the driver service does not exist when a user-level application obtains the driver service \(for details about how to obtain the driver service, see [Driver Message Mechanism Management](drive-hdf-news.md)\), the HDF attempts to dynamically load the driver.
> When the **preload** field in the configuration file is set to **0** \(**DEVICE\_PRELOAD\_ENABLE**\), the driver is loaded by default during system startup. When this field is set to **1** \(**DEVICE\_PRELOAD\_ENABLE\_STEP2**\), the driver is loaded after system startup if quick start is enabled; it is loaded during system startup otherwise. When this field is set to **2** \(**DEVICE\_PRELOAD\_DISABLE**\), the driver is not loaded by default during system startup and can be dynamically loaded later. If the driver service does not exist when a user-level application obtains the driver service \(for details about how to obtain the driver service, see [Driver Message Mechanism Management](driver-hdf-news.md)\), the HDF attempts to dynamically load the driver.
>- Sequential loading \(drivers must be loaded by default\)
> In the configuration file, the **priority** field \(the value is an integer ranging from 0 to 200\) indicates the priority of the host and driver. For drivers in different hosts, a smaller host priority value indicates a higher driver loading priority; for drivers in the same host, a smaller driver priority value indicates a higher driver loading priority.
......@@ -49,7 +49,7 @@ The message mechanism provides the following features:
## How to Develop<a name="section946912121153"></a>
1. Set the value of the **policy** field in the driver configuration information to **2** \(SERVICE\_POLICY\_CAPACITY, see [Driver Service Management](drive-hdf-servicemanage.md)\).
1. Set the value of the **policy** field in the driver configuration information to **2** \(SERVICE\_POLICY\_CAPACITY, see [Driver Service Management](driver-hdf-servicemanage.md)\).
```
device_sample :: Device {
......
......@@ -10,7 +10,7 @@
## Overview<a name="section141575391542"></a>
The Liquid Crystal Display \(LCD\) driver powers on the LCD and initializes internal LCD registers through APIs to enable the LCD to work properly. The display driver is developed based on the hardware driver foundation \([HDF](drive-hdf-overview.md)\). It provides power-on, power-off, and sending of the initialization sequence for LCD hardware across OSs and platforms. The display driver model is shown in [Figure 1](#fig69138814229).
The Liquid Crystal Display \(LCD\) driver powers on the LCD and initializes internal LCD registers through APIs to enable the LCD to work properly. The display driver is developed based on the hardware driver foundation \([HDF](driver-hdf-overview.md)\). It provides power-on, power-off, and sending of the initialization sequence for LCD hardware across OSs and platforms. The display driver model is shown in [Figure 1](#fig69138814229).
**Figure 1** Architecture of the display driver model<a name="fig69138814229"></a>
![](figure/architecture-of-the-display-driver-model.png "architecture-of-the-display-driver-model")
......@@ -66,7 +66,6 @@ The display driver model is developed based on the HDF, platform APIs, and APIs
Based on the LCD hardware interfaces, use the I2C, SPI, and MIPI interfaces provided by the platform to download the LCD initialization sequence. For details, see the SPEC provided by the LCD supplier.
4. Implement other HDF interfaces as required, for example, the **Release** interface.
5. Use the HDF to create other device nodes for implementing service logic or debugging as required.
......
......@@ -68,14 +68,13 @@ The interfaces shown in the figure are described as follows:
Generally, the touchscreen driver IC is separated from the LCD driver IC. In this case, the touchscreen driver IC requires both 1.8 V and 3.3 V power supplies. Nowadays, the touchscreen driver IC and LCD driver IC can be integrated. Therefore, the touchscreen, requires only the 1.8 V power supply, and the 3.3 V power required internally is supplied by the LCD VSP power \(typical value: 5.5 V\) in the driver IC.
2. **I/O control interfaces**
- RESET: reset pin, which is used to reset the driver IC on the host when suspending or resuming the system.
- INT: interrupt pin, which needs to be set to the input direction and pull-up status during driver initialization. After detecting an external touch signal, the driver triggers the interrupt by operating the interrupt pin. The driver reads the touch reporting data in the ISR function.
3. **Communications interfaces**
- I2C: Since only a small amount of touch data is reported by the touchscreen, I2C is used to transmit the reported data. For details about the I2C protocol and interfaces, see [I2C](drive-platform-i2c-des.md#section1695201514281).
- SPI: In addition to touch reporting data coordinates, some vendors need to obtain basic capacitance data. Therefore, Serial Peripheral Interface \(SPI\) is used to transmit such huge amount of data. For details about the SPI protocol and interfaces, see [SPI](drive-platform-spi-des.md#section71363452477).
- I2C: Since only a small amount of touch data is reported by the touchscreen, I2C is used to transmit the reported data. For details about the I2C protocol and interfaces, see [I2C](driver-platform-i2c-des.md#section1695201514281).
- SPI: In addition to touch reporting data coordinates, some vendors need to obtain basic capacitance data. Therefore, Serial Peripheral Interface \(SPI\) is used to transmit such huge amount of data. For details about the SPI protocol and interfaces, see [SPI](driver-platform-spi-des.md#section71363452477).
## Development Guidelines<a name="section65745222184"></a>
......@@ -109,7 +108,7 @@ Regardless of the OS and system on a chip \(SoC\), the input driver is developed
3. Implement differentiated adaptation APIs of the touchscreen.
Use the platform APIs to perform operations for the reset pins, interrupt pins, and power based on the communications interfaces designed for boards. For details about the GPIO-related operations, see [GPIO](drive-platform-gpio-des.md#section259614242196).
Use the platform APIs to perform operations for the reset pins, interrupt pins, and power based on the communications interfaces designed for boards. For details about the GPIO-related operations, see [GPIO](driver-platform-gpio-des.md#section259614242196).
## Development Example<a name="section263714411191"></a>
......
......@@ -106,7 +106,7 @@ The method for converting GPIO pin numbers varies according to the GPIO controll
A controller manages 12 groups of GPIO pins. Each group contains 8 GPIO pins.
GPIO pin number = GPIO group index \(0-11\) x Number of GPIO pins in each group \(8\) + Offset in the group
GPIO pin number = GPIO group index \(011\) x Number of GPIO pins in each group \(8\) + Offset in the group
Example: GPIO number of GPIO10\_3 = 10 x 8 + 3 = 83
......
......@@ -132,7 +132,7 @@ Before performing SPI communication, obtain an SPI device handle by calling **S
DevHandle SpiOpen\(const struct SpiDevInfo \*info\);
**Table 2** Description of **SpiOpen**
**Table 2** Description of SpiOpen
<a name="table7603619123820"></a>
<table><tbody><tr id="row1060351914386"><td class="cellrowborder" valign="top" width="50%"><p id="p14603181917382"><a name="p14603181917382"></a><a name="p14603181917382"></a><strong id="b139290298482"><a name="b139290298482"></a><a name="b139290298482"></a>Parameter</strong></p>
......@@ -185,7 +185,7 @@ After obtaining the SPI device handle, obtain the SPI device configuration param
int32\_t SpiGetCfg\(DevHandle handle, struct SpiCfg \*cfg\);
**Table 3** Description of **SpiGetCfg**
**Table 3** Description of SpiGetCfg
<a name="table14209152141313"></a>
<table><tbody><tr id="row1420918529133"><td class="cellrowborder" valign="top" width="50%"><p id="p42091852141314"><a name="p42091852141314"></a><a name="p42091852141314"></a><strong id="b6279123012486"><a name="b6279123012486"></a><a name="b6279123012486"></a>Parameter</strong></p>
......@@ -224,7 +224,7 @@ int32\_t SpiGetCfg\(DevHandle handle, struct SpiCfg \*cfg\);
```
int32_t ret;
struct SpiCfg cfg = {0}; /* SPI configuration information */
ret = SpiGetCfg(spiHandle, &cfg); /* Set SPI device configuration parameters. */
ret = SpiGetCfg(spiHandle, &cfg); /* Obtain SPI device configuration parameters. */
if (ret != 0) {
HDF_LOGE("SpiGetCfg: failed, ret %d\n", ret);
}
......@@ -236,7 +236,7 @@ After obtaining the SPI device handle, set SPI device configuration parameters b
int32\_t SpiSetCfg\(DevHandle handle, struct SpiCfg \*cfg\);
**Table 4** Description of **SpiSetCfg**
**Table 4** Description of SpiSetCfg
<a name="table219052945210"></a>
<table><tbody><tr id="row14191192918522"><td class="cellrowborder" valign="top" width="50%"><p id="p17424155016529"><a name="p17424155016529"></a><a name="p17424155016529"></a><strong id="b11281163011480"><a name="b11281163011480"></a><a name="b11281163011480"></a>Parameter</strong></p>
......@@ -293,7 +293,7 @@ To write data into an SPI device only once, call the following function:
int32\_t SpiWrite\(DevHandle handle, uint8\_t \*buf, uint32\_t len\);
**Table 5** Description of **SpiWrite**
**Table 5** Description of SpiWrite
<a name="table1018490043"></a>
<table><tbody><tr id="row31848013417"><td class="cellrowborder" valign="top" width="50%"><p id="p1415816132411"><a name="p1415816132411"></a><a name="p1415816132411"></a><strong id="b42810303484"><a name="b42810303484"></a><a name="b42810303484"></a>Parameter</strong></p>
......@@ -350,7 +350,7 @@ To read data from an SPI device only once, call the following function:
int32\_t SpiRead\(DevHandle handle, uint8\_t \*buf, uint32\_t len\);
**Table 6** Description of **SpiRead**
**Table 6** Description of SpiRead
<a name="table0265191412124"></a>
<table><tbody><tr id="row42651914141213"><td class="cellrowborder" valign="top" width="50%"><p id="p1483184123"><a name="p1483184123"></a><a name="p1483184123"></a><strong id="b528223019480"><a name="b528223019480"></a><a name="b528223019480"></a>Parameter</strong></p>
......@@ -407,7 +407,7 @@ To launch a custom transfer, call the following function:
int32\_t SpiTransfer\(DevHandle handle, struct SpiMsg \*msgs, uint32\_t count\);
**Table 7** Description of **SpiTransfer**
**Table 7** Description of SpiTransfer
<a name="table1934414174212"></a>
<table><tbody><tr id="row1134415176216"><td class="cellrowborder" valign="top" width="50%"><p id="p13295152320217"><a name="p13295152320217"></a><a name="p13295152320217"></a><strong id="b1628393012482"><a name="b1628393012482"></a><a name="b1628393012482"></a>Parameter</strong></p>
......@@ -474,7 +474,7 @@ void SpiClose\(DevHandle handle\);
This function will release the resources previously obtained.
**Table 8** Description of **SpiClose**
**Table 8** Description of SpiClose
<a name="table72517953115"></a>
<table><tbody><tr id="row1525793312"><td class="cellrowborder" valign="top" width="50%"><p id="p115402031153111"><a name="p115402031153111"></a><a name="p115402031153111"></a><strong id="b1728493044820"><a name="b1728493044820"></a><a name="b1728493044820"></a>Parameter</strong></p>
......@@ -491,7 +491,7 @@ This function will release the resources previously obtained.
</table>
```
PalHandleDestroy(spiHandle); /* Destroy the SPI device handle. */
SpiClose(spiHandle); /* Destroy the SPI device handle. */
```
## Usage Example<a name="section06541058155120"></a>
......@@ -540,7 +540,7 @@ void SpiTestSample(void)
HDF_LOGE("SpiWrite: failed, ret %d\n", ret);
goto err;
}
/* Read data of a specified length from an SPI device. */
/* Read data of a specific length from an SPI device. */
ret = SpiRead(spiHandle, rbuff, 4);
if (ret != 0) {
HDF_LOGE("SpiRead: failed, ret %d\n", ret);
......
......@@ -180,13 +180,13 @@ hb set
1. Obtain the Docker image.
```
docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.2
docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.1
```
2. Go to the root directory of OpenHarmony code and run the following command to access the Docker build environment:
```
docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.2
docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.1
```
......@@ -208,7 +208,7 @@ hb set
3. Go to the root directory of OpenHarmony code and run the following command to access the Docker build environment:
```
docker run -it -v $(pwd):/home/openharmony openharmony-docker-standard:0.0.2
docker run -it -v $(pwd):/home/openharmony openharmony-docker-standard:0.0.1
```
......@@ -287,9 +287,8 @@ Start building. Docker can be automatically installed only in Ubuntu. If you are
hpm run docker
```
This example uses the **@ohos/hispark\_taurus** solution for illustration. If the execution is successful, the output is as follows:
```
...
ohos ipcamera_hispark_taurus build success!
......
......@@ -9,7 +9,7 @@ HUAWEI DevEco Device Tool is a one-stop integrated development environment \(IDE
The roadmap of Huawei DevEco Device Tool for supporting OpenHarmony device development is shown in the figure below.
![](figure/3-22.png)
![](figure/3-27.png)
## Acquiring the Application Development Tool \(HUAWEI DevEco Studio\)<a name="section0904101019258"></a>
......
......@@ -51,7 +51,7 @@ This document describes how to acquire OpenHarmony source code and provides its
1. Register your account with Gitee.
2. Register an SSH public key for access to Gitee.
3. Install the [git client](http://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](http://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"
......@@ -109,7 +109,7 @@ This document describes how to acquire OpenHarmony source code and provides its
- Obtaining the source code of other OpenHarmony releases
For details about how to obtain the source code of other OpenHarmony releases, see the [Release Notes](https://gitee.com/openharmony/docs/blob/master/en/release-notes/Readme.md).
For details about how to obtain the source code of other OpenHarmony releases, see the [Release Notes](https://gitee.com/openharmony/docs/blob/master/en/release-notes/OpenHarmony-Release-Notes.md).
## Method 2: Acquiring Source Code from HPM<a name="section463013147412"></a>
......@@ -162,7 +162,6 @@ You must install **Node.js** and HPM on your local PC. The installation proced
![](figure/en-us_image_0000001119915556.png)
2. Learn more about 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.
......@@ -185,7 +184,6 @@ You must install **Node.js** and HPM on your local PC. The installation proced
![](figure/en-us_image_0000001166715379.png)
4. Download and install bundles.
1. Decompress the downloaded file using the CLI tool CMD \(shell in Linux\).
2. In the generated directory, run the **hpm install** command.
......@@ -197,7 +195,7 @@ You must install **Node.js** and HPM on your local PC. The installation proced
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.
>![](../public_sys-resources/icon-note.gif) **NOTE:**
>- 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](https://gitee.com/openharmony/docs/tree/master/en/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](https://gitee.com/openharmony/docs/tree/master/en/release-notes).
>- The Master 1.0 version is no longer maintained.
**Table 1** Sites for acquiring source code from image sites
......
# Glossary<a name="EN-US_TOPIC_0000001111039518"></a>
# Glossary<a name="EN-US_TOPIC_0000001124038030"></a>
- [A](#en-us_topic_0000001050749051_section1679023922312)
- [B](#en-us_topic_0000001050749051_section62182102017)
- [D](#en-us_topic_0000001050749051_section1670294920236)
- [F](#en-us_topic_0000001050749051_section5406185415236)
- [H](#en-us_topic_0000001050749051_section891816813243)
- [I](#en-us_topic_0000001050749051_section10124052142516)
- [P](#en-us_topic_0000001050749051_section779354121411)
- [S](#en-us_topic_0000001050749051_section25661636182615)
## A<a name="en-us_topic_0000001050749051_section1679023922312"></a>
- **Ability**
An ability is an abstraction of a functionality that an application can provide. Abilities of applications are classified into two types: Feature Ability \(FA\) and Particle Ability \(PA\).
- **AbilitySlice**
An AbilitySlice is the combination of a single visualized UI and its interactive logic. AbilitySlice is the fundamental unit of a Feature Ability. A Feature Ability can contain a group of UIs representing closely associated services, and each UI corresponds to one AbilitySlice.
- **AMS**
Ability Manager Service, a service that manages abilities
## B<a name="en-us_topic_0000001050749051_section62182102017"></a>
- **BMS**
Bundle Manager Service, a service that manages application bundles
## D<a name="en-us_topic_0000001050749051_section1670294920236"></a>
- **DevEco Studio for Embedded**
Integrated development environment \(IDE\) for developing embedded devices
- **DMS**
Distributed Management Service, a service used for distributed data management
## F<a name="en-us_topic_0000001050749051_section5406185415236"></a>
- **FA**
Feature Ability, representing an ability with a UI for interacting with users
## H<a name="en-us_topic_0000001050749051_section891816813243"></a>
- **HAP**
OpenHarmony Ability Package, released as a HAP file. One HAP file describes all content of an application, including code, resources, third-party libraries, and a configuration file.
- **HCS**
HDF Configuration Source \(HCS\) describes the HDF configuration using key-value pairs. HCS is designed to decouple configuration code from driver code, thereby facilitating configuration management.
- **HC-GEN**
HDF Configuration Generator \(HC-GEN\) is a tool for converting a configuration file into a file that can be read by the target software.
- **HDF**
Hardware Driver Foundation that allows unified access from peripheral devices and provides foundation for driver development and management in OpenHarmony
## I<a name="en-us_topic_0000001050749051_section10124052142516"></a>
- **IDN**
Intelligent Distributed Networking, a distributed networking capability unit specific to OpenHarmony. You can use IDN to obtain the device list and device states and subscribe to the connection state changes of devices on the distributed network.
## P<a name="en-us_topic_0000001050749051_section779354121411"></a>
- **PA**
Particle Ability, representing an ability without a UI. PAs are invoked to implement Feature Ability \(FA\) functionalities. For example, a PA runs in the background to provide the computing capability or acts as a data warehouse to provide the data access capability.
## S<a name="en-us_topic_0000001050749051_section25661636182615"></a>
- **Super virtual device**
Also called super device. It integrates the capabilities of multiple devices through the distributed technology into a virtual hardware resource pool and then centrally manages and schedules these capabilities based on application requirements.
- **System type**
- Mini system: refers to a system running on the devices whose memory is greater than or equal to 128 KB and that are equipped with only limited resources and MCU processors such as ARM Cortex-M and 32-bit RISC-V. This system provides rich short-distance connection capabilities and a bus for accessing peripherals. This system applies to smart home products such as LinkIoT module devices and sensors.
- Small system: refers to a system running on the devices whose memory is greater than or equal to 1 MB and that are equipped with application processors such as ARM Cortex-A. This system provides higher security capabilities, standard graphics frameworks, and video encoding and decoding capabilities. This system applies to smart home products such as IP cameras, peephole cameras, and routers as well as smart travel products such as event data recorders \(EDRs\).
- Standard system: refers to a system running on the devices whose memory is greater than or equal to 128 MB and that are equipped with application processors such as ARM Cortex-A. This system provides a complete application framework supporting the enhanced interaction, 3D GPU, hardware composer, diverse components, and rich animations. This system applies to high-end refrigerator displays.
- Large system: refers to a system running on the devices whose memory is greater than or equal to 1 GB and that are equipped with application processors such as ARM Cortex-A. This system provides a complete compatible application framework. This system applies to smart TVs and watches.
- **[Glossary](glossary.md)**
# Development Examples
- [WLAN-connected Products](device-wifi.md)
- [LED Peripheral Control](device-wifi-led-outcontrol.md)
- [Third-Party SDK Integration](device-wifi-sdk.md)
- [LED Peripheral Control](device-wlan-led-outcontrol.md)
- [Third-Party SDK Integration](device-wlan-sdk.md)
- [Cameras Without a Screen](device-iotcamera.md)
- [Camera Control](device-iotcamera-control.md)
- [Overview](device-iotcamera-control-overview.md)
......@@ -22,11 +22,11 @@
- [Overview](device-camera-visual-overview.md)
- [Preparations](device-camera-visual-prepare.md)
- [Adding Pages](device-camera-visual-addpage.md)
- [Building the Home Page](device-camera-visual-first-page.md)
- [Building the Home Page](device-camera-visual-firstpage.md)
- [Building the Details Page](device-camera-visual-details.md)
- [Debugging and Packaging](device-camera-visual-debug.md)
- [Running on the Device](device-camera-visual-run.md)
- [FAQs](device-camera-visual-faqs.md)
- [Development Guidelines on Clock Apps](oem_device_clockapp_des.md)
- [Development Guidelines on Clock Apps](device-clock-guide.md)
- [Development Example for Platform Drivers](device-driver-demo.md)
- [Development Example for Peripheral Drivers](device-outerdriver-demo.md)
\ No newline at end of file
......@@ -111,7 +111,6 @@ The following steps describe how to build the home page with a flexible layout t
}
```
- **index="\{\{swiperPage\}\}" duration="500" onchange="swiperChange"** sets the component attribute and event. **duration="500"** indicates that the duration of the swiping animation is 500 ms.
- **index="\{\{swiperPage\}\}"** specifies the index of the child component of **<swiper\>**. **\{\{swiperPage\}\}** indicates that the index value is dynamically bound to the **swiperPage** variable in the JavaScript code. The index value changes with the **swiperPage** value.
- **onchange="swiperChange"** binds the change event of the **<swiper\>** component to the **swiperChange** function. The JavaScript code is as follows:
......@@ -141,7 +140,6 @@ The following steps describe how to build the home page with a flexible layout t
}
```
4. Set the information about a city to be displayed on a screen. On each screen, information of different types is displayed using different components.
Add two **<stack\>** as child components \(directional layout\) to **<swiper\>**. Add **<text\>**, **<image\>**, **<progress\>**, and other components to each **<stack\>** to display the information. The following example shows the page structure:
......
......@@ -6,7 +6,7 @@
- **[Adding Pages](device-camera-visual-addpage.md)**
- **[Building the Home Page](device-camera-visual-first-page.md)**
- **[Building the Home Page](device-camera-visual-firstpage.md)**
- **[Building the Details Page](device-camera-visual-details.md)**
......
......@@ -29,7 +29,7 @@ Download and install DevEco Studio. For details, see the [HUAWEI DevEco Studio
The Clock app displays the current time through a clock face and numbers.
As shown in [Figure 1 Clock display effect](oem_device_clockapp_des.md#fig7763172132019), the UI consists of two parts:
As shown in [Figure 1 Clock display effect](#fig7763172132019), the UI consists of two parts:
- Clock face area: displays a dynamic analog clock whose hands rotate accurately.
- Digital time area: displays the current time in numerals.
......@@ -177,9 +177,8 @@ To build such an app, we can create a page that has a flexible layout with two r
</div>
```
- **index.css**
```
.container {
flex-direction: column;
......@@ -217,11 +216,10 @@ To build such an app, we can create a page that has a flexible layout with two r
}
```
- **index.js**
A **.js** file is used to implement logic interactions of the clock app. The following **.js** file implements the function of periodically obtaining the system time.
```
export default {
timer: undefined,
......@@ -263,7 +261,7 @@ After finishing writing the app code, you need to sign and package the app befor
## Running on the Real Device<a name="section092721731511"></a>
Before you install the app and run it on the development board, install the DevEco Device Tool by following operations provided in [HUAWEI DevEco Device Tool User Guide](https://device.harmonyos.com/en/docs/ide/user-guides/tool_install-0000001050164976). Burn OpenHarmony into the development board, and run it on the board. For details about how to build, burn, and run an image, see [Getting Started with Hi3516](../quick-start/quickstart-standard.md). After the image is running normally and the system is started properly, perform the following steps to install or uninstall the app:
Before you install the app and run it on the development board, install the DevEco Device Tool by following operations provided in [HUAWEI DevEco Device Tool User Guide](https://device.harmonyos.com/en/docs/ide/user-guides/service_introduction-0000001050166905). Burn OpenHarmony into the development board, and run it on the board. For details about how to build, burn, and run an image, see . After the image is running normally and the system is started properly, perform the following steps to install or uninstall the app:
1. Obtain the HDC client from the following path:
......
......@@ -34,7 +34,7 @@ In this example, an I2C driver is used. [Figure 1](#fig148041484161) shows the
## Preparations<a name="section6926133918422"></a>
Follow the instructions in [Environment Setup for Standard System](../quick-start/quickstart-standard.md).
Follow the instructions in [Environment Setup for Standard System](../quick-start/quickstart-standard-description.md).
>![](../public_sys-resources/icon-notice.gif) **NOTICE:**
>This development example applies to standard, small, and mini OpenHarmony systems. The following sections use the standard system as an example. You can refer to the specific guide for your system to set up the environment.
......
......@@ -22,7 +22,7 @@
## Overview<a name="section86753818426"></a>
This document describes how to develop a touchscreen driver on the Hi3516D V300 development board using the HDF input driver model, helping you quickly get started with peripheral driver development.
This document describes how to develop a touchscreen driver on the Hi3516D V300 development board using the HDF input driver model, helping you quickly get started with OpenHarmony peripheral driver development.
### Hardware Resources<a name="section123071189431"></a>
......@@ -40,7 +40,7 @@ The input driver model mainly consists of the device manager, common drivers, an
In addition, the input driver model implements functions for reporting input data and parsing input device configurations.
For details about the input driver model, see [Touchscreen Overview](../driver/drive-peripherals-touch-des.md#section175431838101617).
For details about the input driver model, see [Touchscreen Overview](../driver/driver-peripherals-touch-des.md#section175431838101617).
## Setting Up the Environment<a name="section661075474418"></a>
......
# WLAN-connected Products<a name="EN-US_TOPIC_0000001157479363"></a>
- **[LED Peripheral Control](device-wifi-led-outcontrol.md)**
- **[LED Peripheral Control](device-wlan-led-outcontrol.md)**
- **[Third-Party SDK Integration](device-wifi-sdk.md)**
- **[Third-Party SDK Integration](device-wlan-sdk.md)**
......@@ -6,7 +6,7 @@
- **[Cameras with a Screen](device-camera.md)**
- **[Development Guidelines on Clock Apps](oem_device_clockapp_des.md)**
- **[Development Guidelines on Clock Apps](device-clock-guide.md)**
- **[Development Example for Platform Drivers](device-driver-demo.md)**
......
# Kernel
- [Kernel for Mini and Small Systems](kernel-lite.md)
- [Kernel for Mini Systems](kernel-lite-mini.md)
- [Kernel Overview](kernel-mini-overview.md)
- [Basic Kernel](kernel-mini-basic.md)
- [Interrupt Management](kernel-mini-basic-interrupt.md)
- [Basic Concepts](kernel-mini-basic-interrupt-concept.md)
- [Development Guidelines](kernel-mini-basic-interrupt-guide.md)
- [Task Management](kernel-mini-basic-task.md)
- [Basic Concepts](kernel-mini-basic-task-basic.md)
- [Development Guidelines](kernel-mini-basic-task-guide.md)
- [Memory Management](kernel-mini-basic-memory.md)
- [Basic Concepts](kernel-mini-basic-memory-basic.md)
- [Static Memory](kernel-mini-basic-memory-static.md)
- [Dynamic Memory](kernel-mini-basic-memory-dynamic.md)
- [Kernel Communication Mechanisms](kernel-mini-basic-ipc.md)
- [Event](kernel-mini-basic-ipc-event.md)
- [Basic Concepts](kernel-mini-basic-ipc-event-basic.md)
- [Development Guidelines](kernel-mini-basic-ipc-event-guide.md)
- [Mutex](kernel-mini-basic-ipc-mutex.md)
- [Basic Concepts](kernel-mini-basic-ipc-mutex-basic.md)
- [Development Guidelines](kernel-mini-basic-ipc-mutex-guide.md)
- [Queue](kernel-mini-basic-ipc-queue.md)
- [Basic Concepts](kernel-mini-basic-ipc-queue-basic.md)
- [Development Guidelines](kernel-mini-basic-ipc-queue-guide.md)
- [Semaphore](kernel-mini-basic-ipc-sem.md)
- [Basic Concepts](kernel-mini-basic-ipc-sem-basic.md)
- [Development Guidelines](kernel-mini-basic-ipc-sem-guide.md)
- [Time Management](kernel-basic-mini-time.md)
- [Basic Concepts](kernel-mini-basic-time-basic.md)
- [Development Guidelines](kernel-mini-basic-time-guide.md)
- [Software Timer](kernel-mini-basic-soft.md)
- [Basic Concepts](kernel-mini-basic-soft-basic.md)
- [Development Guidelines](kernel-mini-basic-soft-guide.md)
- [Extension Components](kernel-mini-extend.md)
- [C++ Support](kernel-mini-extend-support.md)
- [CPUP](kernel-mini-extend-cpup.md)
- [Basic Concepts](kernel-mini-extend-cpup-basic.md)
- [Development Guidelines](kernel-mini-extend-cpup-guide.md)
- [Dynamic Loading](kernel-mini-extend-dynamic-loading.md)
- [Basic Concepts](kernel-mini-extend-dynamic-loading-basic.md)
- [Development Guidelines](kernel-mini-extend-dynamic-loading-guide.md)
- [File System](kernel-mini-extend-file.md)
- [FAT](kernel-mini-extend-file-fat.md)
- [LittleFS](kernel-mini-extend-file-lit.md)
- [Basic Concepts](kernel-mini-extend-file-littlefs-basic.md)
- [Development Guidelines](kernel-mini-extend-file-littlefs-guide.md)
- [Kernel Debugging](kernel-memory-inner.md)
- [Memory Debugging](kernel-mini-memory-debug.md)
- [Memory Information Statistics](kernel-mini-memory-debug-mes.md)
- [Memory Leak Check](kernel-mini-imemory-debug-det.md)
- [Memory Corruption Check](kernel-mini-memory-debug-cet.md)
- [Exception Debugging](kernel-mini-memory-exception.md)
- [Trace Debugging](kernel-mini-memory-trace.md)
- [Appendix](kernel-mini-app.md)
- [Kernel Coding Specification](kernel-mini-appx-code.md)
- [Basic Data Structure](kernel-mini-appx-data.md)
- [Doubly Linked List](kernel-mini-appx-data-list.md)
- [Standard Libraries](kernel-mini-appx-lib.md)
- [CMSIS Support](kernel-mini-appx-lib-cmsis.md)
- [POSIX Support](kernel-mini-appx-lib-posix.md)
- [Kernel for Small Systems](kernel-lite-small.md)
- [Basic Kernel](kernel-lite-small-basic.md)
- [Process](kernel-lite-small-process.md)
- [Thread](kernel-lite-small-thread.md)
- [Memory](kernel-lite-small-memory.md)
- [Network](kernel-lite-small-net.md)
- [File System](kernel-lite-small-file.md)
- [VFS](kernel-lite-small-file-vfs.md)
- [NFS](kernel-lite-small-file-nfs.md)
- [RAMFS](kernel-lite-small-file-ramfs.md)
- [FAT](kernel-lite-small-file-fat.md)
- [JFFS2](kernel-lite-small-file-jffs.md)
- [Standard Library](kernel-lite-small-lib.md)
- [Standard Library](kernel-lite-small-lib-standard.md)
- [Differences from the Linux Standard Library](kernel-lite-small-lib-differ.md)
- [Commissioning](kernel-lite-small-shell.md)
- [Introduction to the Shell](kernel-lite-small-shell-des.md)
- [Shell Command Development Guidelines](kernel-lite-small-shell-guide.md)
- [Shell Command Programming Example](kernel-lite-small-shell-sample.md)
- [Shell Command Reference](kernel-lite-small-shell-cmd.md)
- [System Commands](kernel-lite-small-shell-cmd-sys.md)
- [cpup](kernel-lite-small-shell-cmd-sys-cpup.md)
- [date](kernel-lite-small-shell-cmd-sys-date.md)
- [dmesg](kernel-lite-small-shell-cmd-sys-demsg.md)
- [exec](kernel-lite-small-shell-cmd-sys-exec.md)
- [free](kernel-lite-small-shell-cmd-sys-free.md)
- [help](kernel-lite-small-shell-cmd-sys-help.md)
- [hwi](kernel-lite-small-shell-cmd-sys-hwi.md)
- [kill](kernel-lite-small-shell-cmd-sys-kill.md)
- [log](kernel-lite-small-shell-cmd-sys-log.md)
- [memcheck](kernel-lite-small-shell-cmd-sys-mem.md)
- [oom](kernel-lite-small-shell-cmd-sys-oom.md)
- [pmm](kernel-lite-small-shell-cmd-sys-pmm.md)
- [reset](kernel-lite-small-shell-cmd-sys-reset.md)
- [sem](kernel-lite-small-shell-cmd-sys-sem.md)
- [stack](kernel-lite-small-shell-cmd-sys-stack.md)
- [su](kernel-lite-small-shell-cmd-sys-su.md)
- [swtmr](kernel-lite-small-shell-cmd-sys-swymr.md)
- [systeminfo](kernel-lite-small-shell-cmd-sys-sys.md)
- [task](kernel-lite-small-shell-cmd-sys-task.md)
- [uname](kernel-lite-small-shell-cmd-sys-uname.md)
- [vmm](kernel-lite-small-shell-cmd-sys-vmm.md)
- [watch](kernel-lite-small-shell-cmd-sys-watch.md)
- [File Commands](kernel-lite-small-shell-cmd-file.md)
- [cat](kernel-lite-small-shell-cmd-file-cat.md)
- [cd](kernel-lite-small-shell-cmd-file-cd.md)
- [chgrp](kernel-lite-small-shell-cmd-file-chgrp.md)
- [chmod](kernel-lite-small-shell-cmd-file-chmod.md)
- [chown](kernel-lite-small-shell-cmd-file-chown.md)
- [cp](kernel-lite-small-shell-cmd-file-cp.md)
- [format](kernel-lite-small-shell-cmd-file-format.md)
- [ls](kernel-lite-small-shell-cmd-file-is.md)
- [lsfd](kernel-lite-small-shell-cmd-file-isfd.md)
- [mkdir](kernel-lite-small-shell-cmd-file-mkdir.md)
- [mount](kernel-lite-small-shell-cmd-file-mount.md)
- [partinfo](kernel-lite-small-shell-cmd-file-part.md)
- [partition](kernel-lite-small-shell-cmd-file-partion.md)
- [pwd](kernel-lite-small-shell-cmd-file-pwd.md)
- [rm](kernel-lite-small-shell-cmd-file-rm.md)
- [rmdir](kernel-lite-small-shell-cmd-file-rmdir.md)
- [statfs](kernel-lite-small-shell-cmd-file-sta.md)
- [sync](kernel-lite-small-shell-cmd-file-sync.md)
- [touch](kernel-lite-small-shell-cmd-file-touch.md)
- [writeproc](kernel-lite-small-shell-cmd-file-write.md)
- [umount](kernel-lite-small-shell-cmd-file-umount.md)
- [Network Commands](kernel-lite-small-shell-cmd-net.md)
- [arp](kernel-lite-small-shell-cmd-net-arp.md)
- [dhclient](kernel-lite-small-shell-cmd-net-dh.md)
- [dns](kernel-lite-small-shell-cmd-net-dns.md)
- [ifconfig](kernel-lite-small-shell-cmd-net-ipc.md)
- [ipdebug](kernel-lite-small-shell-cmd-net-ipd.md)
- [netstat](kernel-lite-small-shell-cmd-net-net.md)
- [ntpdate](kernel-lite-small-shell-cmd-net-ntp.md)
- [ping](kernel-lite-small-shell-cmd-net-ping.md)
- [ping6](kernel-lite-small-shell-cmd-net-ping6.md)
- [telnet](kernel-lite-small-shell-cmd-net-tel.md)
- [tftp](kernel-lite-small-shell-cmd-net-tftp.md)
- [Magic Key Usage](kernel-lite-small-shell-cmd-mag.md)
- [User-Space Exception Information](kernel-lite-small-shell-cmd-abn.md)
- [Kernel Overview](kernel-small-overview.md)
- [Kernel Startup](kernel-small-start.md)
- [Startup in Kernel Space](kernel-small-start-kernel.md)
- [Startup in User Space](kernel-small-start-user.md)
- [Basic Kernel](kernel-small-basics.md)
- [Interrupt and Exception Handling](kernel-small-basic-interrupt.md)
- [Process Management](kernel-small-basic-process.md)
- [Process](kernel-small-basic-process-process.md)
- [Thread](kernel-small-basic-process-thread.md)
- [Scheduler](kernel-small-basic-process-scheduler.md)
- [Memory Management](kernel-small-basic-memory.md)
- [Heap Memory Management](kernel-small-basic-memory-heap.md)
- [Physical Memory Management](kernel-small-basic-memory-physical.md)
- [Virtual Memory Management](kernel-small-basic-memory-virtual.md)
- [Virtual-to-Physical Mapping](kernel-small-basic-inner-reflect.md)
- [Kernel Communication Mechanisms](kernel-small-basic-trans.md)
- [Event](kernel-small-basic-trans-event.md)
- [Semaphore](kernel-small-basic-trans-semaphore.md)
- [Mutex](kernel-small-basic-trans-mutex.md)
- [Queue](kernel-small-basic-trans-queue.md)
- [RW Lock](kernel-small-basic-trans-rwlock.md)
- [Futex](kernel-small-basic-trans-user-mutex.md)
- [Signal](kernel-small-basic-trans-user-signal.md)
- [Time Management](kernel-small-basic-time.md)
- [Software Timer](kernel-small-basic-softtimer.md)
- [Atomic Operation](kernel-small-basic-atomic.md)
- [Extension Components](kernel-small-bundles.md)
- [System Call](kernel-small-bundles-system.md)
- [Dynamic Loading and Linking](kernel-small-bundles-linking.md)
- [Virtual Dynamic Shared Object](kernel-small-bundles-share.md)
- [LiteIPC](kernel-small-bundles-ipc.md)
- [File Systems](kernel-small-bundles-fs.md)
- [Virtual File System](kernel-small-bundles-fs-virtual.md)
- [Supported File Systems](kernel-small-bundles-fs-support.md)
- [FAT](kernel-small-bundles-fs-support-fat.md)
- [JFFS2](kernel-small-bundles-fs-support-jffs2.md)
- [NFS](kernel-small-bundles-fs-support-nfs.md)
- [Ramfs](kernel-small-bundles-fs-support-ramfs.md)
- [procfs](kernel-small-bundles-fs-support-procfs.md)
- [File System Adaptation](kernel-small-bundles-fs-new.md)
- [Debugging and Tools](kernel-small-debug.md)
- [Shell](kernel-small-debug-shell.md)
- [Introduction to the Shell](kernel-small-debug-shell-overview.md)
- [Shell Command Development Guidelines](kernel-small-debug-shell-guide.md)
- [Shell Command Programming Example](kernel-small-debug-shell-build.md)
- [Shell Command Reference](kernel-small-debug-shell-details.md)
- [System Commands](kernel-small-debug-shell-cmd.md)
- [cpup](kernel-small-debug-shell-cmd-cpup.md)
- [date](kernel-small-debug-shell-cmd-date.md)
- [dmesg](kernel-small-debug-shell-cmd-dmesg.md)
- [exec](kernel-small-debug-shell-cmd-exec.md)
- [free](kernel-small-debug-shell-cmd-free.md)
- [help](kernel-small-debug-shell-cmd-help.md)
- [hwi](kernel-small-debug-shell-cmd-hwi.md)
- [kill](kernel-small-debug-shell-cmd-kill.md)
- [log](kernel-small-debug-shell-cmd-log.md)
- [memcheck](kernel-small-debug-shell-cmd-memcheck.md)
- [oom](kernel-small-debug-shell-cmd-oom.md)
- [pmm](kernel-small-debug-shell-cmd-pmm.md)
- [reset](kernel-small-debug-shell-cmd-reset.md)
- [sem](kernel-small-debug-shell-cmd-sem.md)
- [stack](kernel-small-debug-shell-cmd-stack.md)
- [su](kernel-small-debug-shell-cmd-su.md)
- [swtmr](kernel-small-debug-shell-cmd-swtmr.md)
- [systeminfo](kernel-small-debug-shell-cmd-sysinfo.md)
- [task](kernel-small-debug-shell-cmd-task.md)
- [uname](kernel-small-debug-shell-cmd-uname.md)
- [vmm](kernel-small-debug-shell-cmd-vmm.md)
- [watch](kernel-small-debug-shell-cmd-watch.md)
- [File Commands](kernel-small-debug-shell-file.md)
- [cat](kernel-small-debug-shell-file-cat.md)
- [cd](kernel-small-debug-shell-file-cd.md)
- [chgrp](kernel-small-debug-shell-file-chgrp.md)
- [chmod](kernel-small-debug-shell-file-chmod.md)
- [chown](kernel-small-debug-shell-file-chown.md)
- [cp](kernel-small-debug-shell-file-cp.md)
- [format](kernel-small-debug-shell-file-format.md)
- [ls](kernel-small-debug-shell-file-ls.md)
- [lsfd](kernel-small-debug-shell-file-lsfd.md)
- [mkdir](kernel-small-debug-shell-file-mkdir.md)
- [mount](kernel-small-debug-shell-file-mount.md)
- [partinfo](kernel-small-debug-shell-file-partinfo.md)
- [partition](kernel-small-debug-shell-file-partition.md)
- [pwd](kernel-small-debug-shell-file-pwd.md)
- [rm](kernel-small-debug-shell-file-rm.md)
- [rmdir](kernel-small-debug-shell-file-rmdir.md)
- [statfs](kernel-small-debug-shell-file-statfs.md)
- [sync](kernel-small-debug-shell-file-sync.md)
- [touch](kernel-small-debug-shell-file-touch.md)
- [writeproc](kernel-small-debug-shell-file-write.md)
- [umount](kernel-small-debug-shell-file-umount.md)
- [Network Commands](kernel-small-debug-shell-net.md)
- [arp](kernel-small-debug-shell-net-arp.md)
- [dhclient](kernel-small-debug-shell-net-dhclient.md)
- [dns](kernel-small-debug-shell-net-dns.md)
- [ifconfig](kernel-small-debug-shell-net-ifconfig.md)
- [ipdebug](kernel-small-debug-shell-net-ipdebug.md)
- [netstat](kernel-small-debug-shell-net-netstat.md)
- [ntpdate](kernel-small-debug-shell-net-ntpdate.md)
- [ping](kernel-small-debug-shell-net-ping.md)
- [ping6](kernel-small-debug-shell-net-ping6.md)
- [telnet](kernel-small-debug-shell-net-telnet.md)
- [tftp](kernel-small-debug-shell-net-tftp.md)
- [Magic Key](kernel-small-debug-shell-magickey.md)
- [User-Space Exception Information](kernel-small-debug-shell-error.md)
- [Trace](kernel-small-debug-trace.md)
- [Process Commissioning](kernel-small-debug-process.md)
- [CPUP](kernel-small-debug-process-cpu.md)
- [Memory Debugging](kernel-small-debug-memory.md)
- [Memory Information Statistics](kernel-small-debug-memory-info.md)
- [Memory Leak Check](kernel-small-debug-memory-leak.md)
- [Memory Corruption Check](kernel-small-debug-memory-corrupt.md)
- [Other Kernel Debugging Methods](kernel-small-debug-other.md)
- [Dying Gasp](kernel-small-debug-trace-other-lastwords.md)
- [Common Fault Locating Methods](kernel-small-debug-trace-other-faqs.md)
- [Appendix](kernel-small-apx.md)
- [Basic Data Structure](kernel-small-apx-structure.md)
- [Doubly Linked List](kernel-small-apx-dll.md)
- [Bitwise Operation](kernel-small-apx-bitwise.md)
- [Standard Library](kernel-small-apx-library.md)
- [Kernel for Standard Systems](kernel-standard.md)
- [Linux Kernel Overview](kernel-standard-des.md)
- [Linux Kernel Overview](kernel-standard-overview.md)
- [Guidelines for Using Patches on OpenHarmony Development Boards](kernel-standard-patch.md)
- [Guidelines for Compiling and Building the Linux Kernel](kernel-standard-build.md)
\ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册