1.在linux-3.0.8/driver@ mkdir mydriver
2.linux-3.0.8/driver/mydriver@ touch Makefile Kconfig led_dri.c(新建3个文件(驱动文件要放的目录))
2.1 在mydriver目录的 Makefile 中写入:
obj-$(MYDRIVER) = s5pv210_led.o
2.2 在mydriver目录的 Kconfig 中写入:
menuconfig MYDRIVER
tristate "My S5PV210 Driver Support"---help---
S5PV210 Driver Support written by myself
config S5PV210_LED_DRV
tristate "Led driver for S5PV210"
depends onMYDRIVER
help
you can select itby y/n/m
3.修改linux-3.0.8/driver目录下的Makefile和Kconfig
3.1 在Makefile中添加:
obj-(MYDRIVER) += mydriver/
3.2 在Kconfig中添加:
source "drivers/mydriver/Kconfig"4.在 Device Drivers --->
<*> My S5PV210 Driver Support --->
<*> Led driver for S5PV210
2. 自己写个菜单栏:
vim arch/arm/Kconfig
menu"test for menu"//在Kconfig图形界面的第一页
config FS_TEST //单选中了CONFIG_FS_TEST 值为y
tristate "test for config in Kconfig"//三值态 */M/" "help
you can say Y, M, N, but no effect //帮助choice//为单选
prompt "fruit type"default APPLE
help
Select a kind of fruit
config APPLE
bool "apple hao gui"//成员1
config LIULIAN
bool "liulian hao chou"//成员2
endchoice
endmenu