From 1ab7e409c9929fa82cf626f0aea1f2bd8f3f686f Mon Sep 17 00:00:00 2001 From: zhuyunping Date: Thu, 12 May 2022 11:16:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20cn=20=E4=B8=8Ezh-cn=20?= =?UTF-8?q?=E6=8A=8A=E6=8C=87=E5=90=91productdefine=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E4=B8=8B=E7=9A=84=E4=BF=AE=E6=94=B9=E8=B0=83=E6=95=B4=E4=B8=BA?= =?UTF-8?q?vendor=E7=9B=AE=E5=BD=95=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xiyue5 --- .../porting/standard-system-porting-guide.md | 71 +++++++++++-------- ...tart-ide-standard-running-hi3516-create.md | 6 +- ...tart-ide-standard-running-rk3568-create.md | 8 +-- ...ickstart-standard-running-hi3516-create.md | 8 +-- ...ickstart-standard-running-rk3568-create.md | 8 +-- .../subsystems/subsys-build-standard-large.md | 2 +- .../porting/standard-system-porting-guide.md | 2 +- ...tart-ide-standard-running-hi3516-create.md | 8 +-- ...tart-ide-standard-running-rk3568-create.md | 8 +-- ...ickstart-standard-running-hi3516-create.md | 8 +-- ...ickstart-standard-running-rk3568-create.md | 8 +-- 11 files changed, 73 insertions(+), 64 deletions(-) diff --git a/en/device-dev/porting/standard-system-porting-guide.md b/en/device-dev/porting/standard-system-porting-guide.md index 57531dbcab..4cb9b45621 100644 --- a/en/device-dev/porting/standard-system-porting-guide.md +++ b/en/device-dev/porting/standard-system-porting-guide.md @@ -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**. -### Defining an SoC - -Create a JSON file named after the SoC name in the **//productdefine/common/device** directory and specify the CPU architecture. +### Defining a Product -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", - "target_cpu": "arm" + "product_name": "MyProduct", + "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 +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 -``` -{ - "product_name": "MyProduct", - "product_company" : "MyProductVendor", - "product_device": "MySOC", - "version": "2.0", - "type": "standard", - "parts":{ - "ace:ace_engine_standard":{}, - "ace:napi":{}, - ... - "xts:phone_tests":{} - } -} +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 -``` +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. -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. +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. 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 }, ``` -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 diff --git a/en/device-dev/quick-start/quickstart-ide-standard-running-hi3516-create.md b/en/device-dev/quick-start/quickstart-ide-standard-running-hi3516-create.md index 3d686adeb8..cec86501be 100644 --- a/en/device-dev/quick-start/quickstart-ide-standard-running-hi3516-create.md +++ b/en/device-dev/quick-start/quickstart-ide-standard-running-hi3516-create.md @@ -19,9 +19,9 @@ applications/sample/hello ├── bundle.json build └── subsystem_config.json -productdefine/common -└── products - └── Hi3516DV300.json +vendor/hisilicon +└── Hi3516DV300 + └── config.json ``` diff --git a/en/device-dev/quick-start/quickstart-ide-standard-running-rk3568-create.md b/en/device-dev/quick-start/quickstart-ide-standard-running-rk3568-create.md index 3ef3b3589c..6025ddf569 100644 --- a/en/device-dev/quick-start/quickstart-ide-standard-running-rk3568-create.md +++ b/en/device-dev/quick-start/quickstart-ide-standard-running-rk3568-create.md @@ -19,9 +19,9 @@ applications/sample/hello ├── bundle.json build └── subsystem_config.json -productdefine/common -└── products - └── rk3568.json +vendor/hihope +└── rk3568 + └── config.json ``` @@ -150,7 +150,7 @@ Perform the steps below in the source code directory: 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":{}, diff --git a/en/device-dev/quick-start/quickstart-standard-running-hi3516-create.md b/en/device-dev/quick-start/quickstart-standard-running-hi3516-create.md index e0ffea9670..7bae60ad6f 100644 --- a/en/device-dev/quick-start/quickstart-standard-running-hi3516-create.md +++ b/en/device-dev/quick-start/quickstart-standard-running-hi3516-create.md @@ -19,9 +19,9 @@ applications/sample/hello │ └── bundle.json build └── subsystem_config.json -productdefine/common -└── products - └── Hi3568DV300.json +vendor/hisilicon +└── Hi3516DV300 + └── config.json ``` @@ -151,7 +151,7 @@ Perform the steps below in the source code directory: 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. ``` diff --git a/en/device-dev/quick-start/quickstart-standard-running-rk3568-create.md b/en/device-dev/quick-start/quickstart-standard-running-rk3568-create.md index 523e9f334d..aa730ed0aa 100644 --- a/en/device-dev/quick-start/quickstart-standard-running-rk3568-create.md +++ b/en/device-dev/quick-start/quickstart-standard-running-rk3568-create.md @@ -18,9 +18,9 @@ applications/sample/hello │ └── bundle.json build └── subsystem_config.json -productdefine/common -└── products - └── rk3568.json +vendor/hihope +└── rk3568 + └── config.json ``` @@ -149,7 +149,7 @@ Perform the steps below in the source code directory: 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":{}, diff --git a/en/device-dev/subsystems/subsys-build-standard-large.md b/en/device-dev/subsystems/subsys-build-standard-large.md index d47fbd1d23..e85445c79d 100644 --- a/en/device-dev/subsystems/subsys-build-standard-large.md +++ b/en/device-dev/subsystems/subsys-build-standard-large.md @@ -207,7 +207,7 @@ The process to build OpenHarmony is as follows: 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. diff --git a/zh-cn/device-dev/porting/standard-system-porting-guide.md b/zh-cn/device-dev/porting/standard-system-porting-guide.md index f0a8832118..ac3d4a9b4c 100644 --- a/zh-cn/device-dev/porting/standard-system-porting-guide.md +++ b/zh-cn/device-dev/porting/standard-system-porting-guide.md @@ -101,7 +101,7 @@ product_company:不体现在配置中,而是目录名,vendor下一级目 }, ``` -接着需要修改定义产品的配置文件//productdefine/common/products/MyProduct.json,将刚刚定义的子系统加入到产品中。 +接着需要修改定义产品的配置文件//vendor/MyProductVendor/MyProduct/config.json,将刚刚定义的子系统加入到产品中。 ### 2. 编译内核 diff --git a/zh-cn/device-dev/quick-start/quickstart-ide-standard-running-hi3516-create.md b/zh-cn/device-dev/quick-start/quickstart-ide-standard-running-hi3516-create.md index c7048712ad..642bf816d9 100644 --- a/zh-cn/device-dev/quick-start/quickstart-ide-standard-running-hi3516-create.md +++ b/zh-cn/device-dev/quick-start/quickstart-ide-standard-running-hi3516-create.md @@ -19,9 +19,9 @@ applications/sample/hello ├── bundle.json build └── subsystem_config.json -productdefine/common -└── products - └── Hi3516DV300.json +vendor/hisilicon +└── Hi3516DV300 + └── config.json ``` @@ -151,7 +151,7 @@ productdefine/common 4. 修改产品配置文件。 - 在productdefine\common\products\Hi3516DV300.json中添加对应的hello部件,直接添加到原有部件后即可。 + 在vendor\hisilicon\Hi3516DV300\config.json中添加对应的hello部件,直接添加到原有部件后即可。 ``` diff --git a/zh-cn/device-dev/quick-start/quickstart-ide-standard-running-rk3568-create.md b/zh-cn/device-dev/quick-start/quickstart-ide-standard-running-rk3568-create.md index 40beafc0ed..3317bbbb2f 100644 --- a/zh-cn/device-dev/quick-start/quickstart-ide-standard-running-rk3568-create.md +++ b/zh-cn/device-dev/quick-start/quickstart-ide-standard-running-rk3568-create.md @@ -19,9 +19,9 @@ applications/sample/hello ├── bundle.json build └── subsystem_config.json -productdefine/common -└── products - └── rk3568.json +vendor/hihope +└── rk3568 + └── config.json ``` @@ -150,7 +150,7 @@ productdefine/common 4. 修改产品配置文件。 - 在productdefine\common\products\rk3568.json中添加对应的hello部件,直接添加到原有部件后即可。 + 在vendor\hihope\rk3568\config.json中添加对应的hello部件,直接添加到原有部件后即可。 ``` "usb:usb_manager_native":{}, diff --git a/zh-cn/device-dev/quick-start/quickstart-standard-running-hi3516-create.md b/zh-cn/device-dev/quick-start/quickstart-standard-running-hi3516-create.md index b0cef24b4d..e9f5296716 100644 --- a/zh-cn/device-dev/quick-start/quickstart-standard-running-hi3516-create.md +++ b/zh-cn/device-dev/quick-start/quickstart-standard-running-hi3516-create.md @@ -19,9 +19,9 @@ applications/sample/hello │ └── bundle.json build └── subsystem_config.json -productdefine/common -└── products - └── Hi3568DV300.json +vendor/hisilicon +└── Hi3516DV300 + └── config.json ``` @@ -151,7 +151,7 @@ productdefine/common 4. 修改产品配置文件。 - 在productdefine/common/products/Hi3516DV300.json中添加对应的hello部件,直接添加到原有部件后即可。 + 在vendor\hisilicon\Hi3516DV300\config.json中添加对应的hello部件,直接添加到原有部件后即可。 ``` diff --git a/zh-cn/device-dev/quick-start/quickstart-standard-running-rk3568-create.md b/zh-cn/device-dev/quick-start/quickstart-standard-running-rk3568-create.md index 0ad654203f..544792e495 100644 --- a/zh-cn/device-dev/quick-start/quickstart-standard-running-rk3568-create.md +++ b/zh-cn/device-dev/quick-start/quickstart-standard-running-rk3568-create.md @@ -18,9 +18,9 @@ applications/sample/hello │ └── bundle.json build └── subsystem_config.json -productdefine/common -└── products - └── rk3568.json +vendor/hihope +└── rk3568 + └── config.json ``` @@ -149,7 +149,7 @@ productdefine/common 4. 修改产品配置文件。 - 在productdefine/common/products/rk3568.json中添加对应的hello部件,直接添加到原有部件后即可。 + 在vendor\hihope\rk3568\config.json中添加对应的hello部件,直接添加到原有部件后即可。 ``` "usb:usb_manager_native":{}, -- GitLab