1 在编译success 的driver中 添加文件夹
mkdir bunfly
创建3个文件, bunfly.c
vim Kconfig
menuconfig bunfly_MODULE
bool "bunfly modul"
help
"bunfly test module"
vim Makefile
obj-$(MENUCONFIG_BUNFLY_MODULE) += bunfly.oh</span>
到上一个目录配置Kconfig 和 Mak'file
Kconfig
source "drivers/memory/Kconfig"
source "drivers/iio/Kconfig"
source "drivers/vme/Kconfig"
source "drivers/bunfly/Kconfig"</span>
Makfile
obj-$(CONFIG_MEMORY) += memory/
obj-$(CONFIG_IIO) += iio/
obj-$(CONFIG_VME_BUS) += vme/
obj-$(MENUCONFIG_BUNFLY_MODULE) += bunfly/
make menuconfig
<span style="font-size:18px;"> Remoteproc drivers (EXPERIMENTAL) ---> │ │
│ │ Rpmsg drivers (EXPERIMENTAL) ---> │ │
│ │ [ ] Virtualization drivers ---> │ │
│ │ [*] Generic Dynamic Voltage and Frequency Scaling (DVFS) support ---> │ │
│ │ < > External Connector Class (extcon) support ---> │ │
│ │ [ ] Memory Controller drivers ---> │ │
│ │ < > Industrial I/O support ---> │ │
│ │ [ ] bunfly modul ---> </span>