On Fri, Jan 25, 2013 at 1:24 PM, Nuno J. Silva <nunojsi...@ist.utl.pt> wrote:
> Is there any syntax to check if something is either disabled or built as
> a module?

Very problematic.  What is built in for the currently running kernel
can be fairly reliably determined by grepping /proc/config.gz - IF
support for that was enabled in the kernel.  But, there is no
guarantee that this kernel will be running on the next boot.
Determining what is build as a module really requires interpreting the
contents of /lib/modules - a module could have been built after the
kernel was built, in which case /proc/config.gz might indicate no
support even though it is supported.  I don't think DEVTMPFS can be
made a module, however (not sure on that).

You can also check /usr/src/linux/.config, but the sources might not
correspond to the running kernel, or the kernel on the next reboot, or
whatever.

It really is a touchy situation, hence all the emails in the thread.
You can build something that will work OK 80% of the time though by
checking the source tree.

Part of me wonders if we should just ship a binary kernel/initramfs as
an option.  Then again, users could just use genkernel and get
something like that anyway.  My main issue with genkernel is that its
default options are focused more on the install CD than ordinary use -
things like tuners/multimedia/lirc and the like tend to not be
enabled.  I would think a typical desktop-oriented distro is going to
enable as a module anything that doesn't cause breakage.

Rich

Reply via email to