diff --git a/en/device-dev/porting/standard-system-porting-guide.md b/en/device-dev/porting/standard-system-porting-guide.md index 98caa433d6170a9d52f0cdbf4e61f55d77d78afa..567640435d6d991910760d19c0e2243837a3c0d4 100644 --- a/en/device-dev/porting/standard-system-porting-guide.md +++ b/en/device-dev/porting/standard-system-porting-guide.md @@ -4,7 +4,7 @@ This document describes the general process for porting a development board, rat ## Defining a Development Board -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 a Product @@ -63,7 +63,7 @@ The main configurations are as follows: You can find predefined subsystems in **//build/subsystem\_config.json**. You can also customize subsystems. -You are advised to copy the configuration file of Hi3516D V300 and delete the **hisilicon\_products** subsystem, which is used to compile the kernel for Hi3516D V300. +You are advised to copy the configuration file of Hi3516D V300 and delete the **hisilicon\_products** subsystem, which is used to compile the kernel for Hi3516D V300. ### Verifying the Porting @@ -73,7 +73,7 @@ Run the following command to start the build of your product: ./build.sh --product-name MyProduct ``` -After the build is complete, you can view the built OpenHarmony image file in **//out/{device_name}/packages/phone/images**. +After the build is complete, you can view the built OpenHarmony image file in **//out/{device_name}/packages/phone/images**. ## Porting the Kernel @@ -81,7 +81,7 @@ Now, you need to port the Linux kernel to enable it to run successfully. ### 1. Adding a Kernel-built Subsystem to the SoC -Add the following subsystem configuration to the **//build/subsystem\_config.json** file: +Add the following subsystem configuration to the **//build/subsystem\_config.json** file: ``` "MySOCVendor_products": { @@ -92,13 +92,13 @@ Add the following subsystem configuration to the **//build/subsystem\_config.js }, ``` -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. +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 -The OpenHarmony source code provides the Linux kernel 4.19, which is archived in **//kernel/linux-4.19**. This section uses this kernel version as an example to describe how to build the kernel. +The OpenHarmony source code provides the Linux kernel 4.19, which is archived in **//kernel/linux-4.19**. This section uses this kernel version as an example to describe how to build the kernel. -The path for building the subsystem is defined when you define the subsystem in the previous step. The path is **//device/MySOCVendor/MySOC/build**. Now, you need to create a build script in this path to instruct the build system to build the kernel. +The path for building the subsystem is defined when you define the subsystem in the previous step. The path is **//device/MySOCVendor/MySOC/build**. Now, you need to create a build script in this path to instruct the build system to build the kernel. The recommended directory structure is as follows: @@ -111,7 +111,7 @@ The recommended directory structure is as follows: │ ├── ohos.build ``` -The **BUILD.gn** file is the only entry for building the subsystem. +The **BUILD.gn** file is the only entry for building the subsystem. The expected build result is as follows: @@ -144,11 +144,11 @@ Now start build, and check whether the kernel image is generated as expected. This section describes how to port a Liquid Crystal Display \(LCD\) driver. The hardware driver framework \(HDF\) designs a driver model for the LCD. To support an LCD, you must compile a driver, generate a model instance in the driver, and register the instance. -The LCD drivers are stored in the **//drivers/framework/model/display/driver/panel** directory. +The LCD drivers are stored in the **//drivers/framework/model/display/driver/panel** directory. - Create a panel driver. -In the **Init** method of the driver, call **RegisterPanel** to register the model instance. +In the **Init** method of the driver, call **RegisterPanel** to register the model instance. ``` int32_t XXXInit(struct HdfDeviceObject *object) @@ -172,7 +172,7 @@ struct HdfDriverEntry g_xxxxDevEntry = { HDF_INIT(g_xxxxDevEntry); ``` -- Configure and load the panel driver. All device information about the product is defined in the **//vendor/MyProductVendor/MyProduct/config/device\_info/device\_info.hcs** file. Modify the file by adding configurations for the device named **device\_lcd** to the host named **display**. Note: The value of **moduleName** must be the same as that in the panel driver. +- Configure and load the panel driver. All device information about the product is defined in the **//vendor/MyProductVendor/MyProduct/config/device\_info/device\_info.hcs** file. Modify the file by adding configurations for the device named **device\_lcd** to the host named **display**. Note: The value of **moduleName** must be the same as that in the panel driver. ``` root { @@ -190,15 +190,15 @@ root { } ``` -For details about driver development, see [LCD](../driver/driver-peripherals-lcd-des.md). +For details about driver development, see [LCD](../driver/driver-peripherals-lcd-des.md). ### 2. Touchscreen -This section describes how to port a touchscreen driver. The touchscreen driver is stored in the **//drivers/framework/model/input/driver/touchscreen** directory. To port a touchscreen driver, register a **ChipDevice** model instance. +This section describes how to port a touchscreen driver. The touchscreen driver is stored in the **//drivers/framework/model/input/driver/touchscreen** directory. To port a touchscreen driver, register a **ChipDevice** model instance. - Create a touchscreen driver. -Create the **touch\_ic\_name.c** file in the directory. Replace **ic\_name** with the name of your chip. The file template is as follows: +Create the **touch\_ic\_name.c** file in the directory. Replace **ic\_name** with the name of your chip. The file template is as follows: ``` #include "hdf_touch.h" @@ -222,7 +222,7 @@ struct HdfDriverEntry g_touchXXXXChipEntry = { HDF_INIT(g_touchXXXXChipEntry); ``` -Implement the following interfaces in **ChipDevice**: +Implement the following interfaces in **ChipDevice**: