我正在尝试安装 Linux 外部内核模块。我已经解压了完整的源代码压缩包:有源代码 (.c)、Kconfig 和 Makefile。
在向 .config 添加选项时make menuconfig
,我得到了
make: *** 没有规则来制作目标“menuconfig”。停止。
(我试过make menuconfig
了/usr/src/Linux-header-3.xxxx
,它确实有效;菜单弹出!)
我对这种make menuconfig
机制有点困惑。我是否必须将我的 Kconfig 与 Linux 顶级 Makefile(Kconfig?)链接或添加另一个 Kbuild 文件?
下面列出了几个文件:
配置:
config PMFS
tristate "Persistent and Protected PM file system support"
depends on HAS_IOMEM
select CRC16
help
If your system has a block of fast (comparable in access speed to
system memory) and non-volatile byte-addressable memory and you wish to
mount a light-weight, full-featured, and space-efficient filesystem over
it, say Y here, and read <file:Documentation/filesystems/pmfs.txt>.
To compile this as a module, choose M here: the module will be
called pmfs.
config PMFS_XIP
bool "Execute-in-place in PMFS"
depends on PMFS && BLOCK
help
Say Y here to enable XIP feature of PMFS.
config PMFS_WRITE_PROTECT
bool "PMFS write protection"
depends on PMFS && MMU && HAVE_SET_MEMORY_RO
default y
help
Say Y here to enable the write protect feature of PMFS.
config PMFS_TEST
boolean
depends on PMFS
config PMFS_TEST_MODULE
tristate "PMFS Test"
depends on PMFS && PMFS_WRITE_PROTECT && m
select PMFS_TEST
help
Say Y here to build a simple module to test the protection of
PMFS. The module will be called pmfs_test.
生成文件:
obj-$(CONFIG_PMFS) += pmfs.o
obj-$(CONFIG_PMFS_TEST_MODULE) += pmfs_test.o
pmfs-y := bbuild.o balloc.o dir.o file.o inode.o namei.o super.o symlink.o ioctl.o journal.o
pmfs-$(CONFIG_PMFS_WRITE_PROTECT) += wprotect.o
pmfs-$(CONFIG_PMFS_XIP) += xip.o