OpenHarmony开发者论坛

标题: 使用三方Linux内核时需要移植的OpenHarmony补丁和需要打开的宏 [打印本页]

作者: Laval社区小助手    时间: 2023-10-31 11:14
标题: 使用三方Linux内核时需要移植的OpenHarmony补丁和需要打开的宏
[md]详情:https://laval.csdn.net/64b500215 ... tml?login=from_csdn

# 一、需要的OpenHarmony补丁

## 1、HDF patch

已有patch
kernel/linux/patches/linux-5.10/common\_patch/hdf.patch
可参考rk3568合入HDF patch

## 2、DFX patch

内核下源码位置:
drivers/staging/hilog
drivers/staging/hievent

## 3、Access Token patch安全增强

内核下源码位置:
drivers/accesstokenid

其他文件有少量修改,主要看下面这连个链接合入:
https://gitee.com/openharmony/kernel\_linux\_4.19/pulls/4
https://gitee.com/openharmony/kernel\_linux\_4.19/pulls/5

## 4、HMDFS 分布式文件系统

内核下源码位置:

fs/hmdfs

# 二、需要打开的宏

## 1、HDF相关的宏

CONFIG\_DRIVERS\_HDF=y
CONFIG\_HDF\_SUPPORT\_LEVEL=2
CONFIG\_DRIVERS\_HDF\_PLATFORM=y
CONFIG\_DRIVERS\_HDF\_PLATFORM\_GPIO=y
CONFIG\_DRIVERS\_HDF\_PLATFORM\_I2C=y
CONFIG\_DRIVERS\_HDF\_INPUT=y
CONFIG\_DRIVERS\_HDF\_TP\_5P5\_GT911=y
CONFIG\_DRIVERS\_HDF\_SENSOR=y
CONFIG\_DRIVERS\_HDF\_SENSOR\_ACCEL=y
CONFIG\_DRIVERS\_HDF\_SENSOR\_ACCEL\_BMI160=y
CONFIG\_DRIVERS\_HDF\_SENSOR\_ACCEL\_MXC6655XA=y
CONFIG\_DRIVERS\_HDF\_USB\_PNP\_NOTIFY=y
CONFIG\_DRIVERS\_HDF\_VIBRATOR=y
CONFIG\_DRIVERS\_HDF\_VIBRATOR\_LINEAR=y
CONFIG\_DRIVERS\_HDF\_DSOFTBUS=y
CONFIG\_DRIVERS\_HDF\_LIGHT=y

更多HDF宏,可根据业务需要开启。

## 2、其他宏

#

# BINDER //相关的宏,影响系统进程间通信;如不开启,系统服务会起不了

#

CONFIG\_ANDROID=y
CONFIG\_ANDROID\_BINDER\_IPC=y

# CONFIG\_ANDROID\_BINDERFS is not set

CONFIG\_ANDROID\_BINDER\_DEVICES="binder,hwbinder,vndbinder"

# CONFIG\_ANDROID\_BINDER\_IPC\_SELFTEST is not set

CONFIG\_BINDER\_TRANSACTION\_PROC\_BRIEF=y   //如不开启,AppFrezee日志中binder信息会缺失

CONFIG\_ACCESS\_TOKENID=y  //如不开启,softbus会起不来,Launcher起不来
CONFIG\_ASHMEM=y  //如不开启,foundation会起不了,Launcher起不来
CONFIG\_TLS=y
CONFIG\_UNIX\_SCM=y
CONFIG\_STREAM\_PARSER=y
CONFIG\_NET\_SOCK\_MSG=y
CONFIG\_BLK\_DEV\_INITRD=y

#

# HMDFS  //分布式文件系统相关的宏,影响媒体资源库

#

CONFIG\_HMDFS\_FS=y
CONFIG\_HMDFS\_FS\_PERMISSION=y
CONFIG\_HMDFS\_FS\_ENCRYPTION=y

#

# HYPERHOLD  //HYPERHOLD相关的宏,影响memmgr内存管理服务

#

CONFIG\_HYPERHOLD=y
CONFIG\_HYPERHOLD\_DEBUG=y
CONFIG\_HYPERHOLD\_ZSWAPD=y
CONFIG\_HYPERHOLD\_FILE\_LRU=y
CONFIG\_HYPERHOLD\_MEMCG=y

# CONFIG\_ZRAM\_GROUP=y

# CONFIG\_ZRAM\_GROUP\_DEBUG=y

CONFIG\_ZLIST\_DEBUG=y

# CONFIG\_ZRAM\_GROUP\_WRITEBACK=y

[/md]




欢迎光临 OpenHarmony开发者论坛 (https://forums.openharmony.cn/) Powered by Discuz! X3.5