Step 1:
root@chaozang:/home/linux-2.6.25.8/arch/arm# vim Kconfig
source "net/Kconfig"
menu "Device Drivers"
source "drivers/chaozang/Kconfig"<-----------------------------------------------------------------------------New added!!!! by CZ, This is the top level. 2013-01-28 19:28
source "drivers/base/Kconfig"
source "drivers/connector/Kconfig"
Step 2:
root@chaozang:/home/linux-2.6.25.8/drivers/chaozang# ls
chaozang_drv1.c Kconfig Makefile
Step 3:
root@chaozang:/home/linux-2.6.25.8/drivers/chaozang# vim Kconfig
menu "LED devices test"
depends on HAS_IOMEM
config CHAOZANG_LEDS
bool "CHAOZANG LED Support"
help
nothing to say! just test! 2013-01-28
endmenu
Step 4:
root@chaozang:/home/linux-2.6.25.8/drivers/chaozang# vim Makefile
# LED Core
obj-$(CONFIG_CHAOZANG_LEDS) += chaozang_drv1.o
Step 5:
root@chaozang:/home/linux-2.6.25.8# make menuconfig
x CONFIG_CHAOZANG_LEDS: x
x x
x nothing to say! just test! 2013-01-28 x
x x
x Symbol: CHAOZANG_LEDS [=n] x
x Prompt: CHAOZANG LED Support x
x Defined at drivers/chaozang/Kconfig:5 x
x Depends on: HAS_IOMEM x
x Location: x
x -> Device Drivers x
x -> LED devices test x
--------------------------------------------------
Attention:
if
tristate "CHAOZANG LED Support"
then
root@chaozang:/home/linux-2.6.25.8# make SUBDIR=drivers/chaozang/ modules
----------------------------------------------------------------------------------
Contact:zangchao.cn@gmail.com