The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* Adding a new module in the Kernel source
@ 2006-03-16 11:29 beware
  2006-03-16 15:35 ` Sam Ravnborg
  0 siblings, 1 reply; 2+ messages in thread
From: beware @ 2006-03-16 11:29 UTC (permalink / raw)
  To: linux-kernel

Hi everybody,

I want to compile the last stable version of the Linux Kernel
(2.6.15.6) but i want to add my own module in the kernel.

Firstly, is it a good idea to do this? Or it's more simple to add this
module after the compilation and add it to the modules which are
automicaly laoded?

But, if i want to add this module in the kernel source, what do i have
to do for this operation?

Thank you.

PS : sorry for my not fluent english.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Adding a new module in the Kernel source
  2006-03-16 11:29 Adding a new module in the Kernel source beware
@ 2006-03-16 15:35 ` Sam Ravnborg
  0 siblings, 0 replies; 2+ messages in thread
From: Sam Ravnborg @ 2006-03-16 15:35 UTC (permalink / raw)
  To: beware; +Cc: linux-kernel

On Thu, Mar 16, 2006 at 12:29:19PM +0100, beware wrote:
> Hi everybody,
> 
> I want to compile the last stable version of the Linux Kernel
> (2.6.15.6) but i want to add my own module in the kernel.
> 
> Firstly, is it a good idea to do this? Or it's more simple to add this
> module after the compilation and add it to the modules which are
> automicaly laoded?
> 
> But, if i want to add this module in the kernel source, what do i have
> to do for this operation?
To include the module in kernel sources is simple.
Let's assume it is a char driver and the module is named beware.

1) copy source to drivers/char
cp beware.c $KERNEL_SRC_DIR/drivers/char/

2) Edit makefile to include your module:
Just above the clean-files statement add:
obj-y += beware.o

And you are ready to compile the kernel with your module built-in.

May I also refer you to Linux Device Drivers volume 3 (LDD3) and to
Documentation/kbuild/* in the kernel source.

	Sam

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-03-16 15:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-16 11:29 Adding a new module in the Kernel source beware
2006-03-16 15:35 ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox