1. 简介
-
IO命令需要依赖DEVMEM,而DEVMEM默认是关闭的,所以导致IO默认无法使用,如果调试需要使用
IO命令可以按如下修改:
2. mkcombinedroot 配置
2.1 删除CONFIG_DEVMEM
jack@jack-Precision-5820-Tower:/armsom-w3-android$ vim mkcombinedroot/configs/android-11.config
# 删除掉下面这行:
# CONFIG_DEVMEM is not set
2.2 编译Android
如果要编译Android,则还需要修改如下代码
cd rk3588_android12.0/kernel/configs
diff --git a/android-5.10/android-base.config b/android-5.10/android-base.config
index 5de76f0..6dcdf86 100644
--- a/android-5.10/android-base.config
+++ b/android-5.10/android-base.config
@@ -2,7 +2,6 @@
# CONFIG_ANDROID_LOW_MEMORY_KILLER is not set
# CONFIG_ANDROID_PARANOID_NETWORK is not set
# CONFIG_BPFILTER is not set
-# CONFIG_DEVMEM is not set
# CONFIG_FHANDLE is not set
# CONFIG_FW_CACHE is not set
# CONFIG_IP6_NF_NAT is not set
diff --git a/s/android-4.19/android-base-conditional.xml b/s/android-
4.19/android-base-conditional.xml
index c7de80c..fba1afa 100644
--- a/s/android-4.19/android-base-conditional.xml
+++ b/s/android-4.19/android-base-conditional.xml
@@ -17,10 +17,6 @@
<key>CONFIG_CPU_SW_DOMAIN_PAN</key>
<value type="bool">y</value>
</config>
- <config>
- <key>CONFIG_DEVKMEM</key>
- <value type="bool">n</value>
- </config>
<config>
<key>CONFIG_OABI_COMPAT</key>
<value type="bool">n</value>
@@ -77,10 +73,6 @@
<value type="bool">y</value>
</config>
</conditions>
- <config>
- <key>CONFIG_DEVKMEM</key>
- <value type="bool">n</value>
- </config>
<config>
<key>CONFIG_PAGE_TABLE_ISOLATION</key>
<value type="bool">y</value>
diff --git a/s/android-4.19/android-base.config b/s/android-4.19/androidbase.config
index d2bb2ad..8f23882 100644
--- a/s/android-4.19/android-base.config
+++ b/s/android-4.19/android-base.config
@@ -2,7 +2,6 @@
# CONFIG_ANDROID_LOW_MEMORY_KILLER is not set
# CONFIG_ANDROID_PARANOID_NETWORK is not set
# CONFIG_BPFILTER is not set
-# CONFIG_DEVMEM is not set
# CONFIG_FHANDLE is not set
# CONFIG_FW_CACHE is not set
# CONFIG_IP6_NF_NAT is not set
diff --git a/s/android-5.10/android-base-conditional.xml b/s/android-
5.10/android-base-conditional.xml
index aae1847..2dc3e25 100644
--- a/s/android-5.10/android-base-conditional.xml
+++ b/s/android-5.10/android-base-conditional.xml
@@ -17,10 +17,6 @@
<key>CONFIG_CPU_SW_DOMAIN_PAN</key>
<value type="bool">y</value>
</config>
- <config>
- <key>CONFIG_DEVKMEM</key>
- <value type="bool">n</value>
- </config>
<config>
<key>CONFIG_OABI_COMPAT</key>
<value type="bool">n</value>
@@ -101,10 +97,6 @@
<value type="bool">y</value>
</config>
</conditions>
- <config>
- <key>CONFIG_DEVKMEM</key>
- <value type="bool">n</value>
- </config>
<config>
<key>CONFIG_KFENCE</key>
<value type="bool">y</value>
diff --git a/s/android-5.10/android-base.config b/s/android-5.10/androidbase.config
index d6e1f5a..d7078da 100644
--- a/s/android-5.10/android-base.config
+++ b/s/android-5.10/android-base.config
@@ -2,7 +2,6 @@
# CONFIG_ANDROID_LOW_MEMORY_KILLER is not set
# CONFIG_ANDROID_PARANOID_NETWORK is not set
# CONFIG_BPFILTER is not set
-# CONFIG_DEVMEM is not set
# CONFIG_FHANDLE is not set
# CONFIG_FW_CACHE is not set
# CONFIG_IP6_NF_NAT is not set
tips: 关键目录kernel/config,mkcombinedroot/configs/,搜索CONFIG_DEVMEM 统一去掉
配制后请重新编译kernel即可。
2.3 实测
rk3588_armsom_w3:/ # io -4 -l 4 0xFD5F4008
fd5f4008: 00008000