例如要生成文件fs/configfs/configfs.ko。
打开Kconfig 和 Makefile。
Kconfig
config CONFIGFS_FS
tristate "Userspace-driven configuration filesystem"
select SYSFS
help
configfs is a RAM-based filesystem that provides the converse
of sysfs's functionality. Where sysfs is a filesystem-based
view of kernel objects, configfs is a filesystem-based manager
of kernel objects, or config_items.
Both sysfs and configfs can and should exist together on the
same system. One is not a replacement for the other.
Makefile
#
# Makefile for the configfs virtual filesystem
#
obj-$(CONFIG_CONFIGFS_FS) += configfs.o
configfs-objs := inode.o file.o dir.o symlink.o mount.o item.o
根据Makefile。需要定义了CONFIG_CONFIGFS_FS 才可以编译 configfs
make menuconfig. 后输入/CONIFIGFS_FS 。回车搜索。
可以找到配置CONIFIGFS_FS。 在 File systems/Pseudo filesystems/Userspace-driven configuration filesystem 选择M.
然后 make moudules 可以生成 configfs.ko