2009-01-30 09:04:37

by George Kumar

[permalink] [raw]
Subject: Is there a way to set the order of initialization of different systems ?

Hi,

I would like to explore if there is a way so that I can set the order
of initialization of different kernel sub systems. The main reason I
would like to do this is because I have a network driver built
statically in the kernel which wants to download firmware from the
disk, but the IDE subsystem and root FS is not mounted yet so it
basically hangs for a minute waiting to dowload firmware and then
proceeds with the boot sequence. If I could ensure that IDE subsys is
initialized and root FS is mounted before networking is initialized,
this problem probably will not occur.

Thanks.
George.


2009-01-30 09:41:45

by Jon Masters

[permalink] [raw]
Subject: Re: Is there a way to set the order of initialization of different systems ?

On Fri, 2009-01-30 at 01:03 -0800, George Kumar wrote:

> I would like to explore if there is a way so that I can set the order
> of initialization of different kernel sub systems. The main reason I
> would like to do this is because I have a network driver built
> statically in the kernel which wants to download firmware from the
> disk, but the IDE subsystem and root FS is not mounted yet so it
> basically hangs for a minute waiting to dowload firmware and then
> proceeds with the boot sequence. If I could ensure that IDE subsys is
> initialized and root FS is mounted before networking is initialized,
> this problem probably will not occur.

This is why we have initrds and similar. What you want is already done
quite successfully by a number of implementations in which the driver
will load, and cause a uevent to be emitted as it seeks firmware that
will be supplied to it. There's absolutely no reason for your driver to
be reading the firmware files directly from disk when we have
infrastructure like request_firmware around.

LWN wrote this article back in 2003: http://lwn.net/Articles/32997/

Jon.