tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Path to kmods

On 12-Nov-2008, at 3:20 PM, Manuel Bouyer wrote:

On Wed, Nov 12, 2008 at 01:24:21PM -0500, Greg A. Woods; Planix, Inc. wrote:
And what if you load 'netbsd.old' or 'netbsd.test' from the boot
loader ?

As he said, "if we change /netbsd to a directory"...  :-)

The final-stage boot loader need only check if the path given is a
directory or a normal file -- if it's not a directory then everything
works as before.

Otherwise the boot loader could append "/kernel" or something similar
to the path given and then load that as the first "module".

But how does the kernel finds the right set of modules after that ?
The kernel may not even be on a filesystem accessible from the kernel !

I would require that all the modules for a given kernel be contained in files within the same directory -- i.e. you say "boot /netbsd.old" and the boot loader loads "/netbsd.old/kernel" and the kernel loads all its modules thereafter from /netbsd.old/*.

I.e. it would be a configuration error to try to load a kernel from a directory on a filesystem where the kernel could not thereafter load its own modules from. K.I.S.S.

Perhaps for the crazy case where someone wants to load one main module from somewhere then load all additional runtime modules from some other place there could be a command-line option to specify that other place. Or module names could optionally be compiled into the kernel with fully qualified pathnames?

                                        Greg A. Woods; Planix, Inc.

Attachment: PGP.sig
Description: This is a digitally signed message part

Home | Main Index | Thread Index | Old Index