- 论坛徽章:
- 0
|
http://docs.fedoraproject.org/release-notes/fc4/
- 6.2.2.4. Building Only Kernel Modules
- An exploded source tree is not required to build a kernel module, such as your own device driver, against the currently in-use kernel.
- For example, to build the foo.ko module, create the following Makefile in the directory containing the foo.c file:
- obj-m := foo.o
- KDIR := /lib/modules/$(shell uname -r)/build
- PWD := $(shell pwd)
- default:
- $(MAKE) -C $(KDIR) M=$(PWD) modules
- Issue the make command to build the foo.ko module.
复制代码 |
|