On Sat, May 31, 2008 at 08:57:37PM +0100, Andrew Doran wrote: > .kobjs (already compiled kernel modules) can be added to the OBJS list in > the kernel Makefile, and will be built into the system. No other glue is > required. They should work as expected and show up as "builtins" in > modstat's output. That's cool. > The kernel configuration files have keywords that allow various chunks of > code to be compiled in: file-system, pseudo-device, options, and so on. I > would like to add another keyword: module. It would cause make to chdir to > sys/modules/foo, build the module and link the resulting .kobj into the > kernel. > > For components built that way, there would be only one source of information > about how to build (the Makefile under sys/modules). As a side effect, > static configuration through ifdefs would be discouraged because it wouldn't > be of much use if the feature was to be loaded at run time. > > Comments? Why not go all the way directly? Everything that can be built as a module will be built as such, and only included in the static kernel if the user wants it. Isn't it what FreeBSD does? Then there is the question of how to handle cfdata_t stuff, but in most cases modules are happy with a default "catch all" cfdata_t entry. If the user wants to wire anything down, s/he might as well only get it in the static kernel. The point is that the user doesn't have to know the names or the contents of the modules, until it is time to load one at least. Do I make sense? Cus people around me are drinking loads of beer and I'm afraid I might get drunk just breathing the same air. -- Quentin Garnier - cube%cubidou.net@localhost - cube%NetBSD.org@localhost "See the look on my face from staying too long in one place [...] every time the morning breaks I know I'm closer to falling" KT Tunstall, Saving My Face, Drastic Fantastic, 2007.
Attachment:
pgp043D2Qyy1X.pgp
Description: PGP signature