Re : Re: System calls effect after booting phase ??
From: selvakumar nagendran
Date: Wed Dec 29 2004 - 23:13:52 EST
Thank u for the help,
In the kconfig.tk file, under which section
should we add the line CONFIG_FOO. Will u plz
elaborate the process?
Thanks,
selva
--- Valdis.Kletnieks@xxxxxx wrote:
> 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...
>
> ATTACHMENT part 2 application/pgp-signature
__________________________________
Do you Yahoo!?
The all-new My Yahoo! - Get yours free!
http://my.yahoo.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/