From: Fundu <fundu_1999@yahoo.com>
To: linux embedded <linux-embedded@vger.kernel.org>
Cc: Amol Lad <amol.lad@gmail.com>
Subject: Re: Module init for compiled in vs loaded modules
Date: Tue, 19 Aug 2008 10:26:10 -0700 (PDT) [thread overview]
Message-ID: <487558.67644.qm@web63404.mail.re1.yahoo.com> (raw)
> linux/init.h:
>
> #ifndef MODULE
> ...
> #define module_init(x) __initcall(x);
> #define __initcall(fn) device_initcall(fn)
> #define device_initcall(fn)
> __define_initcall("6",fn)
> #define __define_initcall(level,fn) \
> static initcall_t __initcall_##fn __attribute_used__
> \
> __attribute__((__section__(".initcall" level
> ".init"))) = fn
> ...
> #endif
>
> initcalls are processed in do_initcalls function in
> init/main.c
>
> static void __init do_basic_setup(void)
> {
> ....
> do_initcalls();
> }
>
> >
> > thanks !
>
> Amol
thanks Rajat and Amol.
One other question,
1) how does the kernel know which module to load first in order to satisfy dependencies issues ?
2) is there a way i could print the module init fn name from do_initcalls. to see in what order compiled in modules are called.
tia.
next reply other threads:[~2008-08-19 17:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-19 17:26 Fundu [this message]
2008-08-20 9:06 ` Module init for compiled in vs loaded modules Geert Uytterhoeven
-- strict thread matches above, loose matches on Subject: below --
2008-08-18 17:20 ftp large files to new server Bhikkhu Mettavihari
2008-08-19 1:46 ` Module init for compiled in vs loaded modules Fundu
2008-08-19 6:02 ` Santosh
2008-08-18 16:00 embedded rootfs utility Grant Likely
2008-08-19 1:44 ` Module init for compiled in vs loaded modules Fundu
2008-08-19 4:29 ` Amol Lad
2008-08-19 16:11 ` T Ziomek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=487558.67644.qm@web63404.mail.re1.yahoo.com \
--to=fundu_1999@yahoo.com \
--cc=amol.lad@gmail.com \
--cc=linux-embedded@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.