android7.1配置/dev/mem节点

说明

  如果想要用adb操作寄存器的方式来修改gpio值,那么需要将/dev/mem这个配置进去才能用,不然提示找不到/dev/mem。

实现

zhoujy@TP:~/data/android/sc826_cn_01_00/msm_8953_git/kernel/msm-3.18$ git show 1ba0903d6ea8a073d6d99c2003162d776eb85eb4
commit 1ba0903d6ea8a073d6d99c2003162d776eb85eb4
Author: zhoujinyan 
Date:   Tue May 26 09:50:44 2020 +0800

    [kernel]配置/dev/mem节点

diff --git a/kernel/msm-3.18/arch/arm64/configs/msmcortex-sc826cn01-perf_defconfig b/kernel/msm-3.18/arch/arm64/configs/msmcortex-sc826cn01-perf_defconfig
index 43a04f8..712441f 100755
--- a/kernel/msm-3.18/arch/arm64/configs/msmcortex-sc826cn01-perf_defconfig
+++ b/kernel/msm-3.18/arch/arm64/configs/msmcortex-sc826cn01-perf_defconfig
@@ -317,6 +317,7 @@ CONFIG_INPUT_GPIO=y
 # CONFIG_LEGACY_PTYS is not set
 # CONFIG_DEVMEM is not set
 # CONFIG_DEVKMEM is not set
+CONFIG_DEVMEM=y
 CONFIG_SERIAL_MSM_HS=y
 CONFIG_SERIAL_MSM_SMD=y
 CONFIG_DIAG_CHAR=y

 

你可能感兴趣的:(android驱动,/dev/mem)