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

!3846 productdefine目录指导改为vendor目录下

Merge pull request !3846 from xiyue5/master
...@@ -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.
``` ```
......
...@@ -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 productdefine\common\products\rk3568.json file, add the hello part after the existing part. In the vendor\hisilicon\rk3568\config.json file, add the hello part after the existing part.
``` ```
"usb:usb_manager_native":{}, "usb:usb_manager_native":{},
......
...@@ -9,56 +9,62 @@ ...@@ -9,56 +9,62 @@
本文以移植名为MyProduct的开发板为例讲解移植过程,假定MyProduct是MyProductVendor公司的开发板,使用MySoCVendor公司生产的MySOC芯片作为处理器。 本文以移植名为MyProduct的开发板为例讲解移植过程,假定MyProduct是MyProductVendor公司的开发板,使用MySoCVendor公司生产的MySOC芯片作为处理器。
### 定义SOC ### 定义产品
在“//productdefine/common/device”目录下创建以SOC名字命名的json文件,并指定CPU的架构。
如要移植一个叫MySOC的SOC,这个SOC采用32位ARM内核。配置如下: 在“//vendor/MyProductVendor/{product_name}名称的目录下创建一个config.json文件,该文件用于描述产品所使用的SOC 以及所需的子系统。配置如下:
//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":[""] }
]
},
]
} }
``` ```
主要的配置内容
根据实际情况,这里的target_cpu也可能是arm64 、riscv、 x86等。当前仅支持arm作为target_cpu。 product_name: 产品名称 必填
version:版本 必填
### 定义产品 type:配置的系统级别,包含(small,standard …) 必填
在“//productdefine/common/products”目录下创建以产品名命名的json文件。该文件用于描述产品所使用的SOC 以及所需的子系统。配置如下 target_cpu :设备的cpu类型(根据实际情况,这里的target_cpu也可能是arm64 、riscv、 x86等。) 必填
//productdefine/common/products/MyProduct.json ohos_version:操作系统版本 选填
device_company:device厂商名 必填
```
{
"product_name": "MyProduct",
"product_company" : "MyProductVendor",
"product_device": "MySOC",
"version": "2.0",
"type": "standard",
"parts":{
"ace:ace_engine_standard":{},
"ace:napi":{},
...
"xts:phone_tests":{}
}
}
``` board:开发板名称 必填
enable_ramdisk:是否启动ramdisk 必填
kernel_type 选填
主要的配置内容包括: kernel_version 选填 kernel_type与 kernel_version在 standard 是固定的不需要写。
1. product_device:配置所使用的SOC subsystems:系统需要启用的子系统。子系统可以简单理解位一块独立构建的功能块。必填
2. type:配置系统的级别, 这里直接standard即可 product_company:不体现在配置中,而是目录名,vendor下一级目录就是product_company,BUILD.gn脚本依然可以访问。
3. parts:系统需要启用的子系统。子系统可以简单理解为一块独立构建的功能块。
已定义的子系统可以在“//build/subsystem_config.json”中找到。当然你也可以定制子系统。 已定义的子系统可以在“//build/subsystem_config.json”中找到。当然你也可以定制子系统。
......
...@@ -420,27 +420,32 @@ ohos_shared_library("module2") { ...@@ -420,27 +420,32 @@ ohos_shared_library("module2") {
鸿蒙操作系统的配置文件主要有四个。 鸿蒙操作系统的配置文件主要有四个。
1. productdefine/common/products目录下的产品名.json文件。 1. vendor\产品厂商\产品名\config.json
``` ```
{ {
"product_name": "Hi3516DV300", "product_name": "MyProduct",
"product_company": "hisilicon", "version": "3.0",
"product_device": "hi3516dv300", "type": "standard",
"version": "2.0", "target_cpu": "arm",
"type": "standard", "ohos_version": "OpenHarmony 1.0",
"parts":{ "device_company": "MyProductVendor",
"ace:ace_engine_standard":{}, "board": "MySOC",
"ace:napi":{}, "enable_ramdisk": true,
"account:os_account":{}, "subsystems": [
"distributeddatamgr:native_appdatamgr":{}, {
"distributeddatamgr:distributeddatamgr":{}, "subsystem": "ace",
"distributeddatamgr:appdatamgr_jskits":{}, "components": [
} { "component": "ace_engine_lite", "features":[""] }
} ]
},
...
]
}
``` ```
指明了产品名,产品厂商,产品设备,版本,要编译的系统类型,以及产品包含的部件 指明了产品名,产品厂商,产品设备,版本,要编译的系统类型,以及产品包含的子系统
2. build目录下的subsystem_config.json文件。 2. build目录下的subsystem_config.json文件。
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册