diff --git a/en/device-dev/kernel/kernel-standard-patch.md b/en/device-dev/kernel/kernel-standard-patch.md index 9845278874991b0c820ae147e7532ac9a41ef1cf..55448b5f893fc22fa938b8ea111fc42ce92d6068 100644 --- a/en/device-dev/kernel/kernel-standard-patch.md +++ b/en/device-dev/kernel/kernel-standard-patch.md @@ -5,7 +5,7 @@ Apply the HDF patches based on the kernel version in the **kernel/linux/build** repository. For details, see the method for applying the HDF patch in **kernel.mk**. ``` - $(OHOS_BUILD_HOME)/drivers/adapter/khdf/linux/patch_hdf.sh $(OHOS_BUILD_HOME) $(KERNEL_SRC_TMP_PATH) $(HDF_PATCH_FILE) + $(OHOS_BUILD_HOME)/drivers/hdf_core/adapter/khdf/linux/patch_hdf.sh $(OHOS_BUILD_HOME) $(KERNEL_SRC_TMP_PATH) $(KERNEL_PATCH_PATH) $(DEVICE_NAME) ``` 2. Apply the chip driver patches. diff --git a/en/device-dev/porting/porting-linux-kernel.md b/en/device-dev/porting/porting-linux-kernel.md index b05cc605918f7e83b6e244f5f4b97fe61a9c889d..81b5fd7812343e478e163f4d6e6d73ea816da342 100644 --- a/en/device-dev/porting/porting-linux-kernel.md +++ b/en/device-dev/porting/porting-linux-kernel.md @@ -131,14 +131,14 @@ For details about how to use the logs, see [Hilog\_lite](https://gitee.com/openh Run the shell script to apply HDF patches. - 1. Set the three variables in the **patch\_hdf.sh** script. + 1. Set the four variables in the **patch\_hdf.sh** script. 2. Obtain the **patch\_hdf.sh** script. - 3. Run the **patch\_hdf.sh** script to pass the three variables in sequence. + 3. Run the **patch\_hdf.sh** script to pass the four variables in sequence. Run the following command: ``` - ./patch_hdf.sh [Project root directory path] [Kernel directory path] [HDF patch file] + ./patch_hdf.sh [Project root directory path] [Kernel directory path] [Kernel patch path] [Device name] ``` The following uses Raspberry Pi 3b as an example: @@ -148,7 +148,8 @@ For details about how to use the logs, see [Hilog\_lite](https://gitee.com/openh PROJ_ROOT/drivers/adapter/khdf/linux/patch_hdf.sh \ PROJ_ROOT # Specify the path of the project root directory.\ PROJ_ROOT/out/KERNEL_OBJ/kernel/src_tmp/linux-rpi3b # Specify the kernel directory for applying the patch.\ - PROJ_ROOT/kernel/linux/patches/linux-4.19/hi3516dv300_patch/hdf.patch # HDF patch file. + PROJ_ROOT/kernel/linux/patches/linux-4.19 # Kernel patch patch.\ + hi3516dv300 # Device name. ``` 2. Configure the **config** file. diff --git a/en/readme/kernel.md b/en/readme/kernel.md index 03395200e5d1873463fb231e8f65b2a0bf5c0f7c..470d4cf0be35257de3fc0c17184b509fdc783898 100644 --- a/en/readme/kernel.md +++ b/en/readme/kernel.md @@ -64,18 +64,23 @@ kernel/ │ ├── linux-4.19 # OpenHarmony linux-4.19 common kernel │ ├── linux-5.10 # OpenHarmony linux-5.10 common kernel │ ├── build -│ │ ├── BUILD.gn # GN file of the build framework +│ │ ├── BUILD.gn # GN file of the build framework │ │ ├── kernel.mk # Kernel build file │ │ └── ohos.build # Kernel build component file │ ├── patches │ │ ├── linux-4.19 # linux-4.19 patches +│ │ │   ├── common_patch +│ │ │   │ └── hdf.patch # linux-4.19 HDF patches │ │ │   └── hi3516dv300_patch -│ │ │   ├── hi3516dv300.patch # linux-4.19 Hi3516D V300 SOC patches -│ │ │   └── hdf.patch # linux-4.19 Hi3516D V300 HDF patches +│ │ │   └── hi3516dv300.patch # linux-4.19 Hi3516D V300 SOC patches │ │ └── linux-5.10 +│ │    ├── common_patch +│ │    │ └── hdf.patch # linux-5.10 HDF patches │ │    └── hi3516dv300_patch -│ │    ├── hi3516dv300.patch # linux-5.10 Hi3516D V300 SOC patches -│ │    └── hdf.patch # linux-5.10 Hi3516D V300 HDF patches +│ │    │ └── hi3516dv300.patch # linux-5.10 Hi3516D V300 SOC patches +│ │    └── rkrk3568_patch +│ │    ├── kernel.patch # linux-5.10 rk3568 SOC patches +│ │    └── hdf.patch # linux-5.10 rk3568 customized HDF patches │ └── config │ ├── linux-4.19 │ │   └── arch @@ -151,7 +156,7 @@ For details, see "Usage" in LiteOS-A Kernel [README](https://gitee.com/openharmo Apply the HDF kernel patches matching your kernel version. For details, see the method in **kernel.mk** in the **kernel/linux/build** repository. ``` - $(OHOS_BUILD_HOME)/drivers/adapter/khdf/linux/patch_hdf.sh $(OHOS_BUILD_HOME) $(KERNEL_SRC_TMP_PATH) $(HDF_PATCH_FILE) + $(OHOS_BUILD_HOME)/drivers/hdf_core/adapter/khdf/linux/patch_hdf.sh $(OHOS_BUILD_HOME) $(KERNEL_SRC_TMP_PATH) $(KERNEL_PATCH_PATH) $(DEVICE_NAME) ``` 2. Apply the chip driver patches. diff --git a/zh-cn/device-dev/kernel/kernel-standard-patch.md b/zh-cn/device-dev/kernel/kernel-standard-patch.md index 8f9e30ec2f37a35873fbe3a9c7314a79d2580d76..71d41ca8257764b8a3cd43801511ffe7e10ff840 100644 --- a/zh-cn/device-dev/kernel/kernel-standard-patch.md +++ b/zh-cn/device-dev/kernel/kernel-standard-patch.md @@ -3,7 +3,7 @@ 1. 合入HDF补丁 在kernel/linux/build仓中,按照kernel.mk中HDF的补丁合入方法,合入不同内核版本对应的HDF内核补丁: ``` - $(OHOS_BUILD_HOME)/drivers/adapter/khdf/linux/patch_hdf.sh $(OHOS_BUILD_HOME) $(KERNEL_SRC_TMP_PATH) $(HDF_PATCH_FILE) + $(OHOS_BUILD_HOME)/drivers/hdf_core/adapter/khdf/linux/patch_hdf.sh $(OHOS_BUILD_HOME) $(KERNEL_SRC_TMP_PATH) $(KERNEL_PATCH_PATH) $(DEVICE_NAME) ``` 2. 合入芯片平台驱动补丁 diff --git a/zh-cn/device-dev/porting/porting-linux-kernel.md b/zh-cn/device-dev/porting/porting-linux-kernel.md index 81d561b37f77a458c5e40540b19234e91aeecc8f..93dbae61ffc75a8fa2380236cbdf9e68d3360070 100644 --- a/zh-cn/device-dev/porting/porting-linux-kernel.md +++ b/zh-cn/device-dev/porting/porting-linux-kernel.md @@ -144,15 +144,15 @@ obj-$(CONFIG_HIEVENT) += hievent/ 1. 打HDF补丁。 在Linux内核打HDF补丁时,执行补丁shell脚本合入HDF补丁。 - 1. 配置HDF补丁脚本的三个变量参数。 + 1. 配置HDF补丁脚本的四个变量参数。 2. 获取patch_hdf.sh脚本。 - 3. 执行patch_hdf.sh脚本依次传入三个变量参数。 + 3. 执行patch_hdf.sh脚本依次传入四个变量参数。 - patch_hdf.sh脚本三个参数含义为:第一个入参为工程根目录路径,第二入参为内核目录路径,第三个入参为hdf补丁文件。 + patch_hdf.sh脚本四个参数含义为:第一个入参为工程根目录路径,第二入参为内核目录路径,第三个入参为内核版本路径,第四个参数是当前设备名。 ``` - ./patch_hdf.sh [工程根目录路径] [内核目录路径] [hdf补丁文件] + ./patch_hdf.sh [工程根目录路径] [内核目录路径] [内核补丁路径] [设备名] ``` 以树莓派3b为示例介绍: @@ -163,7 +163,8 @@ obj-$(CONFIG_HIEVENT) += hievent/ PROJ_ROOT/drivers/adapter/khdf/linux/patch_hdf.sh \ PROJ_ROOT # 指定工程根目录路径 \ PROJ_ROOT/out/KERNEL_OBJ/kernel/src_tmp/linux-rpi3b # 打补丁的内核目录路径 \ - PROJ_ROOT/kernel/linux/patches/linux-4.19/hi3516dv300_patch/hdf.patch # HDF补丁文件 + PROJ_ROOT/kernel/linux/patches/linux-4.19 # 内核补丁路径.\ + hi3516dv300 # 设备名. ``` 2. 配置config。 diff --git "a/zh-cn/readme/\345\206\205\346\240\270\345\255\220\347\263\273\347\273\237.md" "b/zh-cn/readme/\345\206\205\346\240\270\345\255\220\347\263\273\347\273\237.md" old mode 100755 new mode 100644 index 747c945ffd6b5c074942072a1bcff0081fc50e1e..53e16d1b619e6bfa1c38136b3a12598a0b6f9501 --- "a/zh-cn/readme/\345\206\205\346\240\270\345\255\220\347\263\273\347\273\237.md" +++ "b/zh-cn/readme/\345\206\205\346\240\270\345\255\220\347\263\273\347\273\237.md" @@ -75,18 +75,23 @@ kernel/ │ ├── linux-4.19 # OpenHarmony linux-4.19 Common kernel │ ├── linux-5.10 # OpenHarmony linux-5.10 Common kernel │ ├── build -│ │ ├── BUILD.gn # 编译框架GN文件 +│ │ ├── BUILD.gn # 编译框架GN文件 │ │ ├── kernel.mk # 内核编译文件 │ │ └── ohos.build # 内核编译组件文件 │ ├── patches │ │ ├── linux-4.19 # linux-4.19 相关patch +│ │ │   ├── common_patch +│ │ │   │ └── hdf.patch # linux-4.19 HDF patches │ │ │   └── hi3516dv300_patch -│ │ │   ├── hi3516dv300.patch # linux-4.19 hi3516dv300 SOC patch -│ │ │   └── hdf.patch # linux-4.19 hi3516dv300 hdf patch +│ │ │   └── hi3516dv300.patch # linux-4.19 Hi3516D V300 SOC patches │ │ └── linux-5.10 +│ │    ├── common_patch +│ │    │ └── hdf.patch # linux-5.10 HDF patches │ │    └── hi3516dv300_patch -│ │    ├── hi3516dv300.patch # linux-5.10 hi3516dv300 SOC patch -│ │    └── hdf.patch # linux-5.10 hi3516dv300 hdf patch +│ │    │ └── hi3516dv300.patch # linux-5.10 Hi3516D V300 SOC patches +│ │    └── rkrk3568_patch +│ │    ├── kernel.patch # linux-5.10 rk3568 SOC patches +│ │    └── hdf.patch # linux-5.10 rk3568 定制 HDF patches │ └── config │ ├── linux-4.19 │ │   └── arch @@ -162,7 +167,7 @@ Hi3518EV300默认使用jffs2文件系统,Hi3516DV300默认使用FAT文件系 在kernel/linux/build仓中,按照kernel.mk中HDF的补丁合入方法,合入不同内核版本对应的HDF内核补丁: ``` - $(OHOS_BUILD_HOME)/drivers/adapter/khdf/linux/patch_hdf.sh $(OHOS_BUILD_HOME) $(KERNEL_SRC_TMP_PATH) $(HDF_PATCH_FILE) + $(OHOS_BUILD_HOME)/drivers/hdf_core/adapter/khdf/linux/patch_hdf.sh $(OHOS_BUILD_HOME) $(KERNEL_SRC_TMP_PATH) $(KERNEL_PATCH_PATH) $(DEVICE_NAME) ``` 2. 合入芯片平台驱动补丁