Re: How to manage build process under autotools for kernel module
- From: Jiri Kosina <jikos@xxxxxxxx>
- Date: Tue, 19 Sep 2006 14:59:38 +0200
On Tue, 18 Sep 2006, john.calcote@xxxxxxxxx wrote:
My problem is packaging - I've never written a kernel module as an open
source project, and so I just don't know what's being done out there to
distribute such code. The user space portion of my project is based on
autotools, but as for the kernel module portion - well, I'm open to
suggestion ...
If you are using 2.6 kernel, it is common that the out-of-tree modules
also use the Kbuild (linux kernel build system). Let's say you have
hello.c and want to compile it against currently running kernel's source
as a module. The only Makefile you needs should then be something similar
to:
obj-m += hello.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
issuing 'make' will the use the kernel build system, headers,
configuration, etc. to build and link your hello.c into hello.ko.
--
Jiri Kosina
.
- Follow-Ups:
- Re: How to manage build process under autotools for kernel module
- From: john . calcote
- Re: How to manage build process under autotools for kernel module
- References:
- How to manage build process under autotools for kernel module
- From: john . calcote
- How to manage build process under autotools for kernel module
- Prev by Date: Re: what to do on linux?
- Next by Date: Re: How to manage build process under autotools for kernel module
- Previous by thread: How to manage build process under autotools for kernel module
- Next by thread: Re: How to manage build process under autotools for kernel module
- Index(es):
Relevant Pages
|