I'm trying to install a Linux external kernel module. I've unpacked the full source tarball: there are source codes (.c), Kconfig, and Makefile.
While adding options to .config with make menuconfig
, I got
make: *** No rule to make target `menuconfig'. Stop.
(I tried make menuconfig
under /usr/src/Linux-header-3.xxxx
and it did work; the menu pops out!)
I'm a little confused with this make menuconfig
mechanism. Did I have to link my Kconfig with Linux top-level Makefile (Kconfig?) or add another Kbuild file?
several files are listed below:
Kconfig:
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.
Makefile:
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