General TC > General TC Talk
[Solved] drivers: how to find kernel built-ins?
GNUser:
I'm running lshw and looking at the driver= field for my various hardware components. Several of the drivers seem to be loadable kernel modules because they show up in the output of lsmod (e.g., snd_hda_intel, ath9k, xhci_hcd). Other drivers do not show up in the output of lsmod so I'm assuming they are kernel built-ins (e.g., ahci, pcieport, uhci_hcd).
Is there direct way--i.e., not process of exclusion--to find out which drivers are kernel built-ins (on a running TCL11 64bit system in case it matters)?
P.S. I found this: https://superuser.com/questions/577307/how-to-get-a-list-of-active-drivers-that-are-statically-built-into-the-linux-ker but I cannot find any file named "modules.builtin" on my system. Maybe looking at the config file used to build the kernel (where "=Y" means built-in) is the only place where I'm going to find a list of built-ins?
curaga:
The kernel config file may be easiest.
GNUser:
Hi, curaga. I was beginning to suspect that. Thanks for confirming.
Rich:
Hi GNUser
I think that file is created when make modules is run. Unfortunately it does not get included in the initrd. To the best of my knowledge,
the only way to recreate it is to fetch the source and config files and run make modules. That will create the following files:
modules.builtin: These modules are already built into the kernel.
modules.order: This is the list of external modules built for this kernel. It includes their path so you know where to find them.
modules.dep: Module dependencies. Each line contains ModuleName: followed by its dependencies, if any.
modules.alias: This file can help you track down the correct driver if you know the hardwares Vendor ID and Product ID.
modules.symbols: If you get symbol not found messages in dmesg, search for it here. It may point to a missing module.
GNUser:
--- Quote from: Rich on August 10, 2020, 01:59:27 PM ---I think that file is created when make modules is run.
--- End quote ---
Thanks for the tip, Rich. It took a few hours on my rickety hardware, but I ran make modules on the kernel source (using tinycore's patches and config for TCL11 64bit) just to get my hands on those files. The resulting modules.builtin and modules.order are attached, in case anyone else wants them.
modules.dep, modules.alias, and modules.symbols didn't get created for some reason. Oh, well.
--- Code: ---bruno@x200:~/Downloads/linux-5.4.3$ find . -name 'modules.dep'
bruno@x200:~/Downloads/linux-5.4.3$ find . -name 'modules.alias'
bruno@x200:~/Downloads/linux-5.4.3$ find . -name 'modules.symbols'
bruno@x200:~/Downloads/linux-5.4.3$
--- End code ---
Navigation
[0] Message Index
[#] Next page
Go to full version