生成.config文件并进行内核编译选项的配置,此文件中声明了哪些功能和特性需要开启。
1 | cp /boot/config-`uname -r` /usr/src/kernels/kernel-5.10.0-136.12.0/.config |
1 2 | cd /usr/src/kernels/kernel-5.10.0-136.12.0/ make menuconfig |
在出现如图所示的内核配置界面中,如图1所示,进行内核编译选项的配置,具体配置项如表1所示。
配置项 |
配置要求 |
配置结果对照 |
.config中显示的配置结果 |
---|---|---|---|
KBOX |
Y |
[*] Kernel support for Kbox |
CONFIG_KBOX=y |
ANDROID_BINDER_DEVICES |
binder,hwbinder,vndbinder |
(binder,hwbinder,vndbinder) Android Binder devices |
CONFIG_ANDROID_BINDER_DEVICES="binder,hwbinder,vndbinder" |
HISI_PMU |
M |
<M> HiSilicon SoC PMU drivers |
CONFIG_HISI_PMU=m |
SYSTEM_TRUSTED_KEYS |
清空内容 |
( ) Additional X.509 keys for default system keyring |
CONFIG_SYSTEM_TRUSTED_KEYS="" |
DEBUG_INFO |
N |
[ ] Compile the kernel with debug info |
# CONFIG_DEBUG_INFO is not set |
PID_RESERVE |
N |
[ ] Support for reserve pid |
# CONFIG_PID_RESERVE is not set |
PSI_DEFAULT_DISABLED |
N |
[ ] Require boot parameter to enable pressure stall information tracking |
# CONFIG_PSI_DEFAULT_DISABLED is not set |
配置方法说明:
配置示例如下: