lkml.org 
[lkml]   [2004]   [Dec]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: System calls effect after booting phase ??
From
Date
On Wed, 29 Dec 2004 03:25:10 PST, selvakumar nagendran said:

> Now, I want to store them in a table. But I want
> this operation to be started right after the initial
> booting phase itself part of the loading kernel
> itself. What should I do to add my module into the
> already compiled kernel image just like a standard
> kernel module?

Possibility 1:
Load them from an initrd image while booting. If you're already
using an initrd, and this is "early enough", you just need to put the
module into the initrd, and make sure the /linuxrc or whatever script
does an insmod for it. This has the advantage of working for out-of-tree
modules.

Possibility 2:
Build them into the kernel. For in-tree modules, this is done with
a bit of Kconfig/Makefile magic. In the Kconfig file, you can define
a CONFIG_FOO variable, and then in the Makefile, do this:

obj-$(CONFIG_FOO) += foo.o

So if CONFIG_FOO is set to 'y' (build into kernel), it gets
added to the obj-y target list and then linked in. If it's set to
'm' (module) or 'n' (don't build at all), it's added to the obj-m or obj-n
targets, which then aren't linked into the kernel.

Not sure how you'd go about building an out-of-tree module into the kernel,
or if that's even supposed to be possible...
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 14:09    [W:0.026 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site