Score:1

how can I list all static builtin drivers in kernel, such as pcieport and pciehp?

de flag

with lspci I can see things like:

Slot:   00:02.0
Class:  PCI bridge [0604]
Vendor: Red Hat, Inc. [1b36]
Device: QEMU PCIe Root port [000c]
Driver: pcieport

In dmesg I can see pcieport 0000:00:02.0: pciehp: Slot #0 AttnBtn+ PwrCtrl+ MRL- AttnInd+ PwrInd+ HotPlug+ Surprise+ Interlock+ NoCompl- IbPresDis- LLActRep+

However, cat /lib/modules/$(uname -r)/modules.builtin | grep pci does not show any of them. depmod -v neither.

So I guess, these 2 drivers are actually static builtin in the kernel which is not module. In kernel config (/boot/config-$(uname -r)) I can see CONFIG_HOTPLUG_PCI_PCIE=y. But I do not even know this flag till I dig into the kernel source code. I wonder is there any easy way to list all the driver names of static builtins?

Tom Yan avatar
in flag
Probably they are not compiled as module.
de flag
can be static builtin in the kernel. But how do I list those static ones? I want to see all drivers available
Tom Yan avatar
in flag
What exactly do you mean by list / see though? The build config of the kernel you are using? Or are you looking for the location of corresponding source code in the tree?
de flag
I want the static driver names according to current system's kernel config. I know the kernel config in /boot, but that is not straightforward. I try to get the actual driver names as in `/sys/bus/pci_express/drivers` not something like `CONFIG_X86_TSC=y` from the current kernel config, it is hard to associate it with the actual driver names.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.