提交 9eab6728 编写于 作者: A Annie_wang

update docs

Signed-off-by: NAnnie_wang <annie.wangli@huawei.com>
上级 43d1aae5
...@@ -193,17 +193,31 @@ Then, run the build commands in command line (CLI) mode or hb mode. ...@@ -193,17 +193,31 @@ Then, run the build commands in command line (CLI) mode or hb mode.
1. Using the CLI 1. Using the CLI
Run the following command in the root directory of the source code to build a full distribution: - Run the following command in the root directory of the source code to build a full distribution:
Release version:
```shell ```shell
./build.sh --product-name {product_name} ./build.sh --product-name {product_name}
``` ```
Debug version:
```shell
./build.sh --product-name {product_name} --gn-args is_debug=true
```
![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**<br>Due to the limitation of the image size, the full build for the debug version may fail to be burnt. You are advised to build the binary file for each module separately. Run the following command to build a module separately:
```shell
./build.sh --product-name {product_name} --gn-args is_debug=true --build-target {target_name}
```
**{product_name}** specifies the product platform supported by the current distribution, for example, **hispark_taurus_standard**. **{product_name}** specifies the product platform supported by the current distribution, for example, **hispark_taurus_standard**.
The image generated is stored in the **out/{device_name}/packages/phone/images/** directory. The image generated is stored in the **out/{device_name}/packages/phone/images/** directory.
The **./build.sh** command supports the following options: - The **./build.sh** command supports the following options:
```shell ```shell
-h, --help # Display help information and exit. -h, --help # Display help information and exit.
...@@ -224,12 +238,10 @@ Then, run the build commands in command line (CLI) mode or hb mode. ...@@ -224,12 +238,10 @@ Then, run the build commands in command line (CLI) mode or hb mode.
--fast-rebuild # Specify whether to allow fast rebuild. The default value is False. --fast-rebuild # Specify whether to allow fast rebuild. The default value is False.
--log-level=LOG_LEVEL # Specify the log level used in the build process. The options are debug, info, and error. The default value is info. --log-level=LOG_LEVEL # Specify the log level used in the build process. The options are debug, info, and error. The default value is info.
--device-type=DEVICE_TYPE # Specify the device type. The default value is default. --device-type=DEVICE_TYPE # Specify the device type. The default value is default.
--build-variant=BUILD_VARIANT # Specify the device operation mode. The default value is user. --build-variant=BUILD_VARIANT #Specify the device operation mode. The default value is user.
``` ```
2. Using the hb tool
2. Using the hb tool
**hb** is an OpenHarmony command line tool for executing build commands. Common hb commands are described as follows: **hb** is an OpenHarmony command line tool for executing build commands. Common hb commands are described as follows:
...@@ -249,7 +261,6 @@ Then, run the build commands in command line (CLI) mode or hb mode. ...@@ -249,7 +261,6 @@ Then, run the build commands in command line (CLI) mode or hb mode.
``` ```
- If you run **hb set** with no argument, the default setting process starts. - If you run **hb set** with no argument, the default setting process starts.
- You can run **hb set -root** *dir* to set the root directory of the source code. - You can run **hb set -root** *dir* to set the root directory of the source code.
- You can run **hb set -p** to set the product to build. - You can run **hb set -p** to set the product to build.
...@@ -324,9 +335,7 @@ Then, run the build commands in command line (CLI) mode or hb mode. ...@@ -324,9 +335,7 @@ Then, run the build commands in command line (CLI) mode or hb mode.
``` ```
- If you run **hb build** with no argument, the previously configured code directory, product, and options are used for the build. The **-f** option deletes all products to be built. It is equivalent to running **hb clean** and **hb build**. - If you run **hb build** with no argument, the previously configured code directory, product, and options are used for the build. The **-f** option deletes all products to be built. It is equivalent to running **hb clean** and **hb build**.
- You can run **hb build** *{component_name}* to build product components separately based on the development board and kernel set for the product, for example, **hb build kv_store**. - You can run **hb build** *{component_name}* to build product components separately based on the development board and kernel set for the product, for example, **hb build kv_store**.
- You can run **hb build -p ipcamera@hisilicon** to skip the setting step and build the product directly. - You can run **hb build -p ipcamera@hisilicon** to skip the setting step and build the product directly.
- You can run **hb build** in **device/board/device_company** to select the kernel and build an image that contains the kernel and drivers only based on the current development board and the selected kernel. - You can run **hb build** in **device/board/device_company** to select the kernel and build an image that contains the kernel and drivers only based on the current development board and the selected kernel.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册