接下來(lái),我們添加LED 設(shè)備的內(nèi)核配置選項(xiàng),打開(kāi)drivers/char/Kconfig 文件,添加如下紅色部分內(nèi)容: config DEVKMEM ????????? bool "/dev/kmem virtual device support" ????????? default y ????????? help ???????????? Say Y here if you want to support the /dev/kmem device. The ???????????? /dev/kmem device is rarely used, but can be used for certain ???????????? kind of kernel debugging operations. ???????????? When in doubt, say "N". config LEDS_MINI2440 ?????????? tristate "LED Support for Mini2440 GPIO LEDs" ?????????? depends on MACH_MINI2440 ?????????? default y if MACH_MINI2440
?????????? help ????????????????? This option enables support for LEDs connected to GPIO lines ?????????????????? on Mini2440 boards. config MINI2440_ADC ?????????? bool "ADC driver for FriendlyARM Mini2440 development boards" ?????????? depends on MACH_MINI2440 ?????????? default y if MACH_MINI2440 ?????????? help ??????????????? this is ADC driver for FriendlyARM Mini2440 development boards ??????????????? Notes: the touch-screen-driver required this option 接下來(lái),再根據(jù)該驅(qū)動(dòng)的配置定義,把對(duì)應(yīng)的驅(qū)動(dòng)目標(biāo)文件加入內(nèi)核中,打開(kāi)linux-2.6.32.2/drivers/char/Makefile 文件,添加如下紅色部分內(nèi)容: obj-$(CONFIG_JS_RTC) += js-rtc.o js-rtc-y = rtc.o obj-$(CONFIG_LEDS_MINI2440) += mini2440_leds.o obj-$(CONFIG_MINI2440_ADC) += mini2440_adc.o # Files generated that shall be removed upon make clean clean-files := consolemap_deftbl.c defkeymap.c 這樣,我們就在內(nèi)核中添加做好了LED 驅(qū)動(dòng)