Building a single kernel module
J. K. Cliburn
jcliburn at gmail.com
Tue Dec 20 14:49:25 UTC 2005
Instructions for (re)building a single kernel module in FC4 are simple
and outlined in the Release Notes thusly.
********************************************
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.
********************************************
I've done this in the past, but for some reason, today it doesn't
work. I'm trying to rebuild the via-velocity kernel module.
[root at osprey net]# uname -r
2.6.14-1.1653_FC4
[root at osprey net]# pwd
/usr/src/redhat/BUILD/kernel-2.6.14/linux-2.6.14/drivers/net
[root at osprey net]# ls -l via-velocity.c
-rw-r--r-- 2 root root 88213 Dec 20 08:09 via-velocity.c
[root at osprey net]# cat Makefile
obj-m := via-velocity.o
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
default:
$(MAKE) -C $(KDIR) M=$(PWD) modules
[root at osprey net]# make
make: Nothing to be done for `default'.
Surely I'm overlooking something trivial. Any ideas what it is?
Thanks,
Jay
More information about the fedora-list
mailing list