提交 1ab7e409 编写于 作者: Z zhuyunping

更新 cn 与zh-cn 把指向productdefine目录下的修改调整为vendor目录下

Signed-off-by: Nxiyue5 <liuxiyue5@huawei.com>
上级 4db51297
...@@ -6,51 +6,60 @@ This document describes the general process for porting a development board, rat ...@@ -6,51 +6,60 @@ This document describes the general process for porting a development board, rat
This document uses the process of porting a development board named **MyProduct** as an example. This development board is provided by **MyProductVendor** and uses the SoC **MySOC** produced by **MySoCVendor**. This document uses the process of porting a development board named **MyProduct** as an example. This development board is provided by **MyProductVendor** and uses the SoC **MySOC** produced by **MySoCVendor**.
### Defining an SoC<a name="section135mcpsimp"></a> ### Defining a Product<a name="section145mcpsimp"></a>
Create a JSON file named after the SoC name in the **//productdefine/common/device** directory and specify the CPU architecture.
For example, to port **MySOC**, which uses a 32-bit ARM kernel, configure the file as follows: Create a config.json file in the directory with the name "//vendor/MyProductVendor/{product_name}. This file is used to describe the SoC used by the product and the required subsystems. configure the file as follows:
//productdefine/common/device/MySOC.json //vendor/MyProductVendor/MyProduct/config.json
``` ```
{ {
"target_os": "ohos", "product_name": "MyProduct",
"target_cpu": "arm" "version": "3.0",
"type": "standard",
"target_cpu": "arm",
"ohos_version": "OpenHarmony 1.0",
"device_company": "MyProductVendor",
"board": "MyProduct",
"enable_ramdisk": true,
"subsystems": [
{
"subsystem": "ace",
"components": [
{ "component": "ace_engine_lite", "features":[""] }
]
},
]
} }
``` ```
Currently, **target\_cpu** can be set to **arm** only. In the future, you can set the value depending on the CPU architecture, such as **arm64**, **riscv**, or **x86**. The main configurations are as follows:
### Defining a Product<a name="section145mcpsimp"></a> product_name: The product name Required
Create a JSON file named after the product name in the **//productdefine/common/products** directory. This file is used to describe the SoC used by the product and the required subsystems. Configure the file as follows: version:version Required
//productdefine/common/products/MyProduct.json type:Configured at the system level, containing (small, standard ...) Required
``` target_cpu :The CPU type of the device (depending on the actual situation, the target_cpu here may also be arm64, riscv, x86, etc. ) Required
{
"product_name": "MyProduct",
"product_company" : "MyProductVendor",
"product_device": "MySOC",
"version": "2.0",
"type": "standard",
"parts":{
"ace:ace_engine_standard":{},
"ace:napi":{},
...
"xts:phone_tests":{}
}
}
``` ohos_version:Operating system version Optional
The main configurations are as follows: device_company:device Manufacturer name Required
board:Board name Required
enable_ramdisk:Whether to startramdisk Required
kernel_type and kernel_version: Optional : kernel_type with kernel_version is fixed in the standard and does not need to be written.
subsystems:The subsystem that the system needs to be enabled. Subsystems can simply understand a piece of function that is built independently. Required
1. **product\_device**: SoC used by the product. product_company:Not reflected in the configuration, but in the directory name, the next directory of the vendor is product_company, build.gn script can still be accessed.
2. **type**: system level. In this example, set it to **standard**.
3. **parts**: subsystem to enable. A subsystem can be treated as an independently built functional block.
You can find available subsystems in **//build/subsystem\_config.json**. You can also customize subsystems. You can find available subsystems in **//build/subsystem\_config.json**. You can also customize subsystems.
...@@ -83,7 +92,7 @@ Add the following subsystem configuration to the **//build/subsystem\_config.js ...@@ -83,7 +92,7 @@ Add the following subsystem configuration to the **//build/subsystem\_config.js
}, },
``` ```
Then, open the configuration file **//productdefine/common/products/MyProduct.json**, which is used to define the product, and add the new subsystem to the product. Then, open the configuration file **//vendor/MyProductVendor/MyProduct/config.json**, which is used to define the product, and add the new subsystem to the product.
### 2. Building the Kernel<a name="section182mcpsimp"></a> ### 2. Building the Kernel<a name="section182mcpsimp"></a>
......
...@@ -19,9 +19,9 @@ applications/sample/hello ...@@ -19,9 +19,9 @@ applications/sample/hello
├── bundle.json ├── bundle.json
build build
└── subsystem_config.json └── subsystem_config.json
productdefine/common vendor/hisilicon
└── products └── Hi3516DV300
└── Hi3516DV300.json └── config.json
``` ```
......
...@@ -19,9 +19,9 @@ applications/sample/hello ...@@ -19,9 +19,9 @@ applications/sample/hello
├── bundle.json ├── bundle.json
build build
└── subsystem_config.json └── subsystem_config.json
productdefine/common vendor/hihope
└── products └── rk3568
└── rk3568.json └── config.json
``` ```
...@@ -150,7 +150,7 @@ Perform the steps below in the source code directory: ...@@ -150,7 +150,7 @@ Perform the steps below in the source code directory:
4. Modify the product configuration file. 4. Modify the product configuration file.
In the vendor\hisilicon\rk3568\config.json file, add the hello part after the existing part. In the vendor\hihope\rk3568\config.json file, add the hello part after the existing part.
``` ```
"usb:usb_manager_native":{}, "usb:usb_manager_native":{},
......
...@@ -19,9 +19,9 @@ applications/sample/hello ...@@ -19,9 +19,9 @@ applications/sample/hello
│ └── bundle.json │ └── bundle.json
build build
└── subsystem_config.json └── subsystem_config.json
productdefine/common vendor/hisilicon
└── products └── Hi3516DV300
└── Hi3568DV300.json └── config.json
``` ```
...@@ -151,7 +151,7 @@ Perform the steps below in the source code directory: ...@@ -151,7 +151,7 @@ Perform the steps below in the source code directory:
4. Modify the product configuration file. 4. Modify the product configuration file.
In the **productdefine/common/products/Hi3516DV300.json** file, add the **hello** part after the existing part. In the **vendor\hisilicon\Hi3516DV300\config.json** file, add the **hello** part after the existing part.
``` ```
......
...@@ -18,9 +18,9 @@ applications/sample/hello ...@@ -18,9 +18,9 @@ applications/sample/hello
│ └── bundle.json │ └── bundle.json
build build
└── subsystem_config.json └── subsystem_config.json
productdefine/common vendor/hihope
└── products └── rk3568
└── rk3568.json └── config.json
``` ```
...@@ -149,7 +149,7 @@ Perform the steps below in the source code directory: ...@@ -149,7 +149,7 @@ Perform the steps below in the source code directory:
4. Modify the product configuration file. 4. Modify the product configuration file.
In the **productdefine/common/products/rk3568.json** file, add the **hello** part after the existing part. In the **vendor\hihope\rk3568\config.json** file, add the **hello** part after the existing part.
``` ```
"usb:usb_manager_native":{}, "usb:usb_manager_native":{},
......
...@@ -207,7 +207,7 @@ The process to build OpenHarmony is as follows: ...@@ -207,7 +207,7 @@ The process to build OpenHarmony is as follows:
2. Add the module to the product configuration file. 2. Add the module to the product configuration file.
Add the module to the product configuration file **productdefine/common/products/\{product-name\}.json**. Add the module to the product configuration file **//vendor/{product_company}/{product-name}/config.json。**.
Add "subsystem\_examples:partA" to the product configuration file. **partA** will be built and packaged into the distribution. Add "subsystem\_examples:partA" to the product configuration file. **partA** will be built and packaged into the distribution.
......
...@@ -101,7 +101,7 @@ product_company:不体现在配置中,而是目录名,vendor下一级目 ...@@ -101,7 +101,7 @@ product_company:不体现在配置中,而是目录名,vendor下一级目
}, },
``` ```
接着需要修改定义产品的配置文件//productdefine/common/products/MyProduct.json,将刚刚定义的子系统加入到产品中。 接着需要修改定义产品的配置文件//vendor/MyProductVendor/MyProduct/config.json,将刚刚定义的子系统加入到产品中。
### 2. 编译内核 ### 2. 编译内核
......
...@@ -19,9 +19,9 @@ applications/sample/hello ...@@ -19,9 +19,9 @@ applications/sample/hello
├── bundle.json ├── bundle.json
build build
└── subsystem_config.json └── subsystem_config.json
productdefine/common vendor/hisilicon
└── products └── Hi3516DV300
└── Hi3516DV300.json └── config.json
``` ```
...@@ -151,7 +151,7 @@ productdefine/common ...@@ -151,7 +151,7 @@ productdefine/common
4. 修改产品配置文件。 4. 修改产品配置文件。
productdefine\common\products\Hi3516DV300.json中添加对应的hello部件,直接添加到原有部件后即可。 vendor\hisilicon\Hi3516DV300\config.json中添加对应的hello部件,直接添加到原有部件后即可。
``` ```
......
...@@ -19,9 +19,9 @@ applications/sample/hello ...@@ -19,9 +19,9 @@ applications/sample/hello
├── bundle.json ├── bundle.json
build build
└── subsystem_config.json └── subsystem_config.json
productdefine/common vendor/hihope
└── products └── rk3568
└── rk3568.json └── config.json
``` ```
...@@ -150,7 +150,7 @@ productdefine/common ...@@ -150,7 +150,7 @@ productdefine/common
4. 修改产品配置文件。 4. 修改产品配置文件。
productdefine\common\products\rk3568.json中添加对应的hello部件,直接添加到原有部件后即可。 vendor\hihope\rk3568\config.json中添加对应的hello部件,直接添加到原有部件后即可。
``` ```
"usb:usb_manager_native":{}, "usb:usb_manager_native":{},
......
...@@ -19,9 +19,9 @@ applications/sample/hello ...@@ -19,9 +19,9 @@ applications/sample/hello
│ └── bundle.json │ └── bundle.json
build build
└── subsystem_config.json └── subsystem_config.json
productdefine/common vendor/hisilicon
└── products └── Hi3516DV300
└── Hi3568DV300.json └── config.json
``` ```
...@@ -151,7 +151,7 @@ productdefine/common ...@@ -151,7 +151,7 @@ productdefine/common
4. 修改产品配置文件。 4. 修改产品配置文件。
productdefine/common/products/Hi3516DV300.json中添加对应的hello部件,直接添加到原有部件后即可。 vendor\hisilicon\Hi3516DV300\config.json中添加对应的hello部件,直接添加到原有部件后即可。
``` ```
......
...@@ -18,9 +18,9 @@ applications/sample/hello ...@@ -18,9 +18,9 @@ applications/sample/hello
│ └── bundle.json │ └── bundle.json
build build
└── subsystem_config.json └── subsystem_config.json
productdefine/common vendor/hihope
└── products └── rk3568
└── rk3568.json └── config.json
``` ```
...@@ -149,7 +149,7 @@ productdefine/common ...@@ -149,7 +149,7 @@ productdefine/common
4. 修改产品配置文件。 4. 修改产品配置文件。
productdefine/common/products/rk3568.json中添加对应的hello部件,直接添加到原有部件后即可。 vendor\hihope\rk3568\config.json中添加对应的hello部件,直接添加到原有部件后即可。
``` ```
"usb:usb_manager_native":{}, "usb:usb_manager_native":{},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册