提交 a74e2a31 编写于 作者: Z zhuyunping

productdefine目录指导改为vendor目录下

Signed-off-by: Nzhuyunping <zhuyunping@huawei.com>
上级 0acd1b8e
...@@ -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,62 +9,54 @@ ...@@ -9,62 +9,54 @@
本文以移植名为MyProduct的开发板为例讲解移植过程,假定MyProduct是MyProductVendor公司的开发板,使用MySoCVendor公司生产的MySOC芯片作为处理器。 本文以移植名为MyProduct的开发板为例讲解移植过程,假定MyProduct是MyProductVendor公司的开发板,使用MySoCVendor公司生产的MySOC芯片作为处理器。
### 定义SOC
在“//productdefine/common/device”目录下创建以SOC名字命名的json文件,并指定CPU的架构。
如要移植一个叫MySOC的SOC,这个SOC采用32位ARM内核。配置如下:
//productdefine/common/device/MySOC.json
```
{
"target_os": "ohos",
"target_cpu": "arm"
}
```
根据实际情况,这里的target_cpu也可能是arm64 、riscv、 x86等。当前仅支持arm作为target_cpu。
### 定义产品 ### 定义产品
在“//productdefine/common/products”目录下创建以产品名命名的json文件。该文件用于描述产品所使用的SOC 以及所需的子系统。配置如下 在“//vendor/MyProductVendor”目录下创建以SOC名称的目录,在此目录下创建一个config.json文件,该文件用于描述产品所使用的SOC 以及所需的子系统。配置如下:
//productdefine/common/products/MyProduct.json //vendor/MyProductVendor/MySOC/config.json
``` ```
{ {
"product_name": "MyProduct", "product_name": "MyProduct",
"product_company" : "MyProductVendor", "version": "3.0",
"product_device": "MySOC", "type": "small",
"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":{}, "kernel_type": "linux",
... "kernel_version": "5.10",
"xts:phone_tests":{} "subsystems": [
} {
"subsystem": "ace",
"components": [
{ "component": "ace_engine_lite", "features":[""] }
]
},
]
} }
```
主要的配置内容包括:
1. product_device:配置所使用的SOC ```
主要的配置内容
2. type:配置系统的级别, 这里直接standard即可
product_name: 配置所使用的SOC 必填
3. parts:系统需要启用的子系统。子系统可以简单理解为一块独立构建的功能块。 version:版本 必填
type:配置的系统级别,包含(small,standard …) 必填
target_cpu :设备的cpu类型(根据实际情况,这里的target_cpu也可能是arm64 、riscv、 x86等。) 必填
ohos_version:操作系统版本 选填
device_company:device厂商名 必填
board:开发板名称 必填
kernel_type 选填
kernel_version 选填 kernel_type与 kernel_version在 standard 是固定的不需要写。
subsystems:系统需要启用的子系统。子系统可以简单理解位一块独立构建的功能块。必填
已定义的子系统可以在“//build/subsystem_config.json”中找到。当然你也可以定制子系统。 已定义的子系统可以在“//build/subsystem_config.json”中找到。当然你也可以定制子系统。
这里建议先拷贝Hi3516DV300 开发板的配置文件,删除掉 hisilicon_products 这个子系统。这个子系统为Hi3516DV300 SOC编译内核,显然不适合MySOC。 这里建议先拷贝Hi3516DV300 开发板的配置文件,删除掉 hisilicon_products 这个子系统。这个子系统为Hi3516DV300 SOC编译内核,显然不适合MySOC。
### 移植验证 ### 移植验证
至此,你可以使用如下命令,启动你产品的构建了: 至此,你可以使用如下命令,启动你产品的构建了:
......
...@@ -420,24 +420,30 @@ ohos_shared_library("module2") { ...@@ -420,24 +420,30 @@ 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": "small",
"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":{}, "kernel_type": "linux",
"account:os_account":{}, "kernel_version": "5.10",
"distributeddatamgr:native_appdatamgr":{}, "subsystems": [
"distributeddatamgr:distributeddatamgr":{}, {
"distributeddatamgr:appdatamgr_jskits":{}, "subsystem": "ace",
} "components": [
} { "component": "ace_engine_lite", "features":[""] }
]
},
...
]
}
``` ```
指明了产品名,产品厂商,产品设备,版本,要编译的系统类型,以及产品包含的部件。 指明了产品名,产品厂商,产品设备,版本,要编译的系统类型,以及产品包含的部件。
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册