Re: HOWTO build a kernel module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



BZ Benny wrote:
Hi,
Did somone know a good HOWTO build a kernel module in FC3

There's one in the release notes:

-------------------------------------------------------------------------

An exploded source tree is not required to build kernel modules against the currently in-use kernel.

For example, to build the foo.ko module, create the following file (named 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) SUBDIRS=$(PWD) modules

Issue the make command to build the foo.ko module.

-------------------------------------------------------------------------

That's all that's needed...

Paul.


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux