未验证 提交 0408b9e9 编写于 作者: O openharmony_ci 提交者: Gitee

!16690 [翻译完成】#I6MZ1J

Merge pull request !16690 from Annie_wang/PR11396A
......@@ -240,7 +240,7 @@ 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.
--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.
--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
......@@ -381,4 +381,4 @@ You can add and build a product, component, chipset solution, and module. For de
- [Information Collected by the Open Source Software Notice](subsys-build-reference.md#information-collected-by-the-open-source-software-notice)
- [Parameters for Accelerating Local Build](subsys-build-reference.md#parameters-for-accelerating-local-build)
- [Viewing Ninja Build Information](subsys-build-reference.md#viewing-ninja-build-information)
- [Customizing the chip_prod Image](subsys-build-reference.md#customizing-the-chip_prod-image)
......@@ -198,3 +198,69 @@ You can graphically display the build time as follows:
1. Click **Success** under **Static Check**.
2. Click **Output** in the **Output** column. The **build.trace.html** file is displayed in the **build_trace** column on the left. Click the file to open it.
## Customizing the chip_prod Image
### When to Use
The different capabilities for the products in the same chip solution are placed in the **chip_prod** partition. You need to generate the **chip_prod.img** specific to the product.
### Procedure
1. Configure the **config.json** file.
In the **config.json** file, add **chipprod_config_path**, which specifies the path of the product definition file.
The file is named **chip_product_list.gni**, and in the **chip_product_list = ["productA", "productB", ...]** format.
Example:
To customize **chip_prod.img** for **MyProduct**, modify the **//vendor/Product vendor/MyProduct/config.json** as follows:
```shell
{
"product_name": "MyProduct", # Product name.
"version": "3.0", # config.json version, which is 3.0.
"chipprod_config_path": "", # (Optional) Path of the chipprod configuration file.
"subsystems": [
{
"subsystem": "arkui", # Subsystem of the product.
"components": [
{
"component": "ace_engine",
"features":[ "ace_engine_feature_enable_web = true",
"ace_engine_feature_enable_accessibility = true" ] }
]
},
{
...
}
...
More subsystems and components.
}
}
```
2. Configure the module.
If the configuration file has different product configurations, for example, to generate **chip_prod.img** for product A, you need to configure **install_images** and **module_install_dir** for module compilation.
The following uses **ohos_prebuilt_executable** as an example:
```shell
ohos_prebuilt_executable("moduleXXX"){
install_images = [ "chip_prod" ]
module_install_dir = "productA/etc/***" # The path must start with productA.
}
```
3. Run the build command.
```shell
./build.sh --product-name {product_name} --build-target chip_prod_image
```
4. Generate the images.
If products A and B are defined (**chip_product_list = ["productA", "productB"]**) and a module is installed in the products, the following images are generated:
```
images/productA/chip_prod.img
images/productB/chip_prod.img
```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册