Is there a way to list the compiled in drivers/modules the way lsmod lists
the non-compiled in ones? I have poked around /proc, the man pages and
Google but so far the answer has eluded me.
Andy
Printable View
Is there a way to list the compiled in drivers/modules the way lsmod lists
the non-compiled in ones? I have poked around /proc, the man pages and
Google but so far the answer has eluded me.
Andy
> Is there a way to list the compiled in drivers/modules the way lsmod lists[color=blue]
> the non-compiled in ones? *I have poked around /proc, the man pages and
> Google but so far the answer has eluded me.[/color]
i guess all modules resides in /lib/modules/<kernel-version>/modules
Willy Sudiarto Raharjo wrote:
[color=blue][color=green]
>> Is there a way to list the compiled in drivers/modules the way lsmod
>> lists the non-compiled in ones? *I have poked around /proc, the man pages
>> and Google but so far the answer has eluded me.[/color]
>
> i guess all modules resides in /lib/modules/<kernel-version>/modules[/color]
Thanks for taking the time to reply, but what I had asked was about
compiled-in drivers, not drivers that were compiled as modules.
Andy
On Thu, 07 Aug 2008 22:19:26 -0500, Andy Johnson wrote:
[color=blue]
> Is there a way to list the compiled in drivers/modules the way lsmod lists
> the non-compiled in ones? I have poked around /proc, the man pages and
> Google but so far the answer has eluded me.
>
> Andy
>[/color]
$ cat /proc/config.gz | gzip -cd | grep "=m$"
--
Douglas Mayne
On Sat, 09 Aug 2008 16:05:29 -0600, Douglas Mayne wrote:
[color=blue]
> On Thu, 07 Aug 2008 22:19:26 -0500, Andy Johnson wrote:
>[color=green]
>> Is there a way to list the compiled in drivers/modules the way lsmod lists
>> the non-compiled in ones? I have poked around /proc, the man pages and
>> Google but so far the answer has eluded me.
>>
>> Andy
>>[/color]
> $ cat /proc/config.gz | gzip -cd | grep "=m$"
>[/color]
Oops. That gives alll modules. To get built-in kernel features:
$ cat /proc/config.gz | gzip -cd | grep "=y$"
On Sat, 09 Aug 2008 16:09:19 -0600, Douglas Mayne <doug@localhost.localnet> wrote:
[color=blue]
>On Sat, 09 Aug 2008 16:05:29 -0600, Douglas Mayne wrote:
>[color=green]
>> On Thu, 07 Aug 2008 22:19:26 -0500, Andy Johnson wrote:
>>[color=darkred]
>>> Is there a way to list the compiled in drivers/modules the way lsmod lists
>>> the non-compiled in ones? I have poked around /proc, the man pages and
>>> Google but so far the answer has eluded me.
>>>
>>> Andy
>>>[/color]
>> $ cat /proc/config.gz | gzip -cd | grep "=m$"
>>[/color]
>Oops. That gives alll modules. To get built-in kernel features:
>
>$ cat /proc/config.gz | gzip -cd | grep "=y$"[/color]
UUOC?
s/cat/zcat/ ?? :)
IOW: zcat /proc/config.gz | grep "=y$"
or
grep "=y$" /boot/config-$(uname -r)
Grant.
--
[url]http://bugsplatter.id.au/[/url]
Grant wrote:
[color=blue][color=green][color=darkred]
>>> $ cat /proc/config.gz | gzip -cd | grep "=m$"
>>>[/color]
>> Oops. That gives alll modules. To get built-in kernel features:
>>
>> $ cat /proc/config.gz | gzip -cd | grep "=y$"[/color]
>
> UUOC?
>
> s/cat/zcat/ ?? :)
>
> IOW: zcat /proc/config.gz | grep "=y$"[/color]
<nitpicking>
UUOZC ? (useless use of zcat)
Try just: zgrep "=y$" /proc/config.gz
</nitpicking>
But the output obtained by this command, or the variants
that ware mentioned earlier, is hardly usable to determine
which drivers are compiled in.
Firstly: The parameter names are very cryptic to read.
Secondly: Lots of these parameters don't define a driver that
is compiled in, but only set optional features of drivers
(even of drivers compiled as a module). Look for instance at
the following snippet of "zcat /proc/config.gz".
[...]
#
# File systems
#
CONFIG_EXT2_FS=m
# CONFIG_EXT2_FS_XATTR is not set
# CONFIG_EXT2_FS_XIP is not set
CONFIG_EXT3_FS=m
CONFIG_EXT3_FS_XATTR=y
CONFIG_EXT3_FS_POSIX_ACL=y
CONFIG_EXT3_FS_SECURITY=y
CONFIG_EXT4DEV_FS=m
CONFIG_EXT4DEV_FS_XATTR=y
CONFIG_EXT4DEV_FS_POSIX_ACL=y
CONFIG_EXT4DEV_FS_SECURITY=y
CONFIG_JBD=m
CONFIG_JBD2=m
CONFIG_FS_MBCACHE=m
CONFIG_REISERFS_FS=m
# CONFIG_REISERFS_CHECK is not set
# CONFIG_REISERFS_PROC_INFO is not set
CONFIG_REISERFS_FS_XATTR=y
CONFIG_REISERFS_FS_POSIX_ACL=y
CONFIG_REISERFS_FS_SECURITY=y
CONFIG_JFS_FS=m
CONFIG_JFS_POSIX_ACL=y
CONFIG_JFS_SECURITY=y
[...]
This is from the 2.6.24.5-smp kernel configuration of a Slackware 12.1
system. *All* lines of this snippet ending with "=y" define options of
drivers that are compiled as a module.
I guess that a full listing with "zless /proc/config.gz" will give you
a better overview than a filtered "zgrep '=y$' /proc/config.gz".
And no, I don't know a way to list all compiled in drivers. I guess
that you'll get the best overview by cd-ing to /usr/src/linux and
browsing your configuration with "make xconfig" or "make menuconfig".
You need to have the kernel sources installed for that and you must
ensure that your /usr/src/linux/.config reflects the configuration
thant you want to examine. You'll need root access rights to run
"make xconfig" or "make menuconfig".
Regards,
Kees.
--
Kees Theunissen.
Some interesting ideas, but still it seems that we don't have a concensus on
how to do this. I asked firstly because I have a fair number of modules:
$ wc -l /proc/modules
114 /proc/modules
But secondly because I'm also curious as to what is compiled in that can't
be a module, such as PCI or input (selecting virtual terminal support
compiles it in). Another example is that dmidecode lists some drivers that
aren't modules, so I know they're in there somewhere.
Andy