On Wed, 5 Sep 2001 11:12:59 +0530,
r1vamsi@xxxxxxxxxx wrote:
>Lkcd could very well register kdb command and do what ever. However, when
>lkcd is linked into the kernel (which is the case most of the time), how
>can it be sure that kdb is initialized before lkcd's init (where in it
>could call kdb_register()) ?
kdb is initialized just after mem_init(), in init/main.c::start_kernel().
If lkcd is called from start_kernel() then call it after kdb. If lkcd
uses __initcall then it is initialized long after kdb has started.
>Is there any other way to ensure correct ordering of init calls, besides
>linking the objects in the desired sequence in the Makefiles?
Either hand code the call sequence in start_kernel() or use __initcall
and control the init order using the link order in the makefiles.
Those are the only two choices.
|