kernel linker: Overriding a driver shipped with kernel via module?

Warner Losh imp at bsdimp.com
Wed Nov 19 04:10:12 UTC 2014


On Nov 18, 2014, at 5:59 PM, Xin Li <delphij at delphij.net> wrote:
> It would be, however, a win if we could strip down the kernel
> significantly and only load the _required_ modules that are sufficient
> to support the kernel to start /etc/rc, where we can load additional
> modules on demand (via devd for instance) because this would reduce
> I/O at loader stage.  I think we need to teach loader to determine
> which storage drivers and possibly NFS and network devices to load.

For years on my laptop, I ran a stripped kernel and only loaded ata.ko
and friends from the boot loader (I can’t recall if I had to compile in syscons
and atakbd or if I loaded them). I dynamically loaded the rest, but the
way I did it was extremely hackish and ugly (I used nomatch stuff that I
added to whenever I found new hardware to a file I always appended to).

You don’t need to load any network junk for the laptop case in the boot
loader unless you are a weird mutant that networks boots the stuff.

Warner

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20141118/fb482255/attachment.sig>


More information about the freebsd-arch mailing list