添加,修改kconfig 的方法html
[SOLUTION]ide
第一种方式:ui
a、在Kconfig文件添加/修改一个Kconfig 选项 :spa
在mediatek/platform/<platform>/kernel/Kconfig/ * 配置一个Kconfig选项,orm
例如:config MTK_TESThtm
bool "test item"
default y
---help---
for testget
b、为添加的Kconfig 选项设置其值:it
在 mediatek/config/<platform>/autoconfig/kconifg/platform or mediatek/config/<project>/autoconfig/kconifg/project添加kconfig选项的值,编译
例如:CONFIG_MTK_TEST=y 表示build into kernelform
而后就能够在文件中使用该选项:例,在mediatek/kernel/drivers/test/Makefile 中obj - $(CONFIG_MTK_TEST) +=test.o
第二种方式:
使用make menuconfig ,来配置kernel的选项
a、 首先经过下面的方式进入menuconfig, 在project 下输入:
cd kernel
TARGET_PRODUCT=<project> make menuconfig
在弹出的窗口后,enter < / >进入查找窗口,输入要查找的kernel feature名称查到该feature后,选择开启或者关闭该feature, 保存,退出menuconfig
b、 完成上述配置后, 将.config复制到mediatek/config/$project/autoconfig/
kconfig/目录下并重命名为project
而后进行编译kernel