tech-kern archive

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

Re: Path to kernel modules (second attempt)

On Jul 8, 2012, at 10:20 AM, Matthew Mondor wrote:

> On Sun, 8 Jul 2012 17:57:00 +0200
> Edgar Fuß <> wrote:
>>> Please not /kernel as it was already mentioned, it is too similar to
>>> /kern.
>> What about /netbsd? E.g. /netbsd/6.0_BETA/{modules,kernel,firmware}.
> /netbsd/amd64/6.0/GENERIC/{modules,kernel,firmware} :) ?

One more note about FreeBSD's structure.  In addition to looking in 
/boot/$KERNNAME, it will also look in /boot/modules.  This is done so that you 
can have multiple different kernels of the same version, that might use 
different internal KBIs that 3rd party drivers don't use.  You can install your 
3rd party driver into /boot/modules and load it with successive kernels (we 
move /boot/kernel to /boot/kernel.old before recreating the /boot/kernel to 
install the new kernel and modules).  This works well for similar versions (eg 
9.0, 9.1), but works less well with 8.x->9.x.

> But can the kernel easily detect that its image was booted in a
> particular directory, and use that as base directory to look for
> modules?  Also, how more complex would this be for the bootloader that
> also needs to preload a few modules to be able to boot?

FreeBSD's boot loader passes this in...


Home | Main Index | Thread Index | Old Index