【Linux】查看操作系统开机时初始化的驱动模块列表的一个方法

这个方法是摸索出来的,也不一定对:

1、驱动层module_init(module_init_function)作为模块初始化,并且提供模块内部初始化的函数名;

2、找到所有驱动目录drivers下所有module_init(module_init_function),在内核6.9.0版本实际上找到1979个:module_init_all_in_drivers_path.txt · r77683962/linux-6.9.0 - Gitee.comicon-default.png?t=O83Ahttps://gitee.com/r77683962/linux-6.9.0/blob/master/module_init_all_in_drivers_path.txt

命令行:

 find drivers  -name "*.c" | xargs -i grep -Hrn "^module_init(" {} > module_inits.txt 

3、从找到的模块函数中添加打印信息;

4、重新编译代码,重启系统,然后可以看到操作系统在驱动初始化时对哪些模块进行了初始化:

这是完整启动dmesg完整日志:

test_log/dmesg_modules_init.txt · r77683962/linux-6.9.0-testlog - Gitee.comicon-default.png?t=O83Ahttps://gitee.com/r77683962/linux-6.9.0-testlog/blob/c31fe277671c2270aa3b77d07b1727f593850ab7/test_log/dmesg_modules_init.txt内核最上层看到的是系统调用入口,最底层是驱动。

另一种方法是直接在driver_register函数添加打印信息:

root@A:/var/log# grep -r "driver_register" dmesg  
[    0.263535] kernel: [drivers/base/driver.c driver_register 227] drv->name: gpio_stub_drv, drv->mod_name: (null), drv->bus->name: gpio, drv->bus->dev_name: (null)
[    0.263535] kernel: [drivers/base/driver.c driver_register 227] drv->name: reg-dummy, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    0.265980] kernel: [drivers/base/driver.c driver_register 227] drv->name: sram, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    0.265999] kernel: [drivers/base/driver.c driver_register 227] drv->name: syscon, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    0.266073] kernel: [drivers/base/driver.c driver_register 227] drv->name: dummy, drv->mod_name: (null), drv->bus->name: i2c, drv->bus->dev_name: (null)
[    0.267134] kernel: [drivers/base/driver.c driver_register 227] drv->name: ctrl, drv->mod_name: (null), drv->bus->name: serial-base, drv->bus->dev_name: (null)
[    0.267147] kernel: [drivers/base/driver.c driver_register 227] drv->name: port, drv->mod_name: (null), drv->bus->name: serial-base, drv->bus->dev_name: (null)
[    0.271741] kernel: [drivers/base/driver.c driver_register 227] drv->name: sx150x-pinctrl, drv->mod_name: (null), drv->bus->name: i2c, drv->bus->dev_name: (null)
[    0.271763] kernel: [drivers/base/driver.c driver_register 227] drv->name: byt_gpio, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    0.271778] kernel: [drivers/base/driver.c driver_register 227] drv->name: cherryview-pinctrl, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    0.271800] kernel: [drivers/base/driver.c driver_register 227] drv->name: palmas-gpio, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    0.271816] kernel: [drivers/base/driver.c driver_register 227] drv->name: rc5t583-gpio, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    0.271837] kernel: [drivers/base/driver.c driver_register 227] drv->name: tps6586x-gpio, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    0.271852] kernel: [drivers/base/driver.c driver_register 227] drv->name: tps65910-gpio, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    0.398535] kernel: [drivers/base/driver.c driver_register 227] drv->name: clk-lpss-atom, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    1.042535] kernel: [drivers/base/driver.c driver_register 227] drv->name: ec, drv->mod_name: (null), drv->bus->name: acpi, drv->bus->dev_name: (null)
[    1.043653] kernel: [drivers/base/driver.c driver_register 227] drv->name: 88PM860x, drv->mod_name: (null), drv->bus->name: i2c, drv->bus->dev_name: (null)
[    1.043705] kernel: [drivers/base/driver.c driver_register 227] drv->name: WM8400, drv->mod_name: (null), drv->bus->name: i2c, drv->bus->dev_name: (null)
[    1.043719] kernel: [drivers/base/driver.c driver_register 227] drv->name: wm831x, drv->mod_name: (null), drv->bus->name: i2c, drv->bus->dev_name: (null)
[    1.043731] kernel: [drivers/base/driver.c driver_register 227] drv->name: wm831x, drv->mod_name: (null), drv->bus->name: spi, drv->bus->dev_name: (null)
[    1.043743] kernel: [drivers/base/driver.c driver_register 227] drv->name: wm8350, drv->mod_name: (null), drv->bus->name: i2c, drv->bus->dev_name: (null)
[    1.043755] kernel: [drivers/base/driver.c driver_register 227] drv->name: tps65910, drv->mod_name: (null), drv->bus->name: i2c, drv->bus->dev_name: (null)
[    1.043768] kernel: [drivers/base/driver.c driver_register 227] drv->name: ezx-pcap, drv->mod_name: (null), drv->bus->name: spi, drv->bus->dev_name: (null)
[    1.043781] kernel: [drivers/base/driver.c driver_register 227] drv->name: da903x, drv->mod_name: (null), drv->bus->name: i2c, drv->bus->dev_name: (null)
[    1.043794] kernel: [drivers/base/driver.c driver_register 227] drv->name: da9052, drv->mod_name: (null), drv->bus->name: spi, drv->bus->dev_name: (null)
[    1.043807] kernel: [drivers/base/driver.c driver_register 227] drv->name: da9052, drv->mod_name: (null), drv->bus->name: i2c, drv->bus->dev_name: (null)
[    1.043825] kernel: [drivers/base/driver.c driver_register 227] drv->name: lp8788, drv->mod_name: (null), drv->bus->name: i2c, drv->bus->dev_name: (null)
[    1.043838] kernel: [drivers/base/driver.c driver_register 227] drv->name: da9055-pmic, drv->mod_name: (null), drv->bus->name: i2c, drv->bus->dev_name: (null)
[    1.043852] kernel: [drivers/base/driver.c driver_register 227] drv->name: max77843, drv->mod_name: (null), drv->bus->name: i2c, drv->bus->dev_name: (null)
[    1.043864] kernel: [drivers/base/driver.c driver_register 227] drv->name: max8925, drv->mod_name: (null), drv->bus->name: i2c, drv->bus->dev_name: (null)
[    1.043877] kernel: [drivers/base/driver.c driver_register 227] drv->name: max8997, drv->mod_name: (null), drv->bus->name: i2c, drv->bus->dev_name: (null)
[    1.043888] kernel: [drivers/base/driver.c driver_register 227] drv->name: max8998, drv->mod_name: (null), drv->bus->name: i2c, drv->bus->dev_name: (null)
[    1.043900] kernel: [drivers/base/driver.c driver_register 227] drv->name: tps6586x, drv->mod_name: (null), drv->bus->name: i2c, drv->bus->dev_name: (null)
[    1.043913] kernel: [drivers/base/driver.c driver_register 227] drv->name: tps65090, drv->mod_name: (null), drv->bus->name: i2c, drv->bus->dev_name: (null)
[    1.043925] kernel: [drivers/base/driver.c driver_register 227] drv->name: aat2870, drv->mod_name: (null), drv->bus->name: i2c, drv->bus->dev_name: (null)
[    1.043937] kernel: [drivers/base/driver.c driver_register 227] drv->name: palmas, drv->mod_name: (null), drv->bus->name: i2c, drv->bus->dev_name: (null)
[    1.043955] kernel: [drivers/base/driver.c driver_register 227] drv->name: rc5t583, drv->mod_name: (null), drv->bus->name: i2c, drv->bus->dev_name: (null)
[    1.043973] kernel: [drivers/base/driver.c driver_register 227] drv->name: as3711, drv->mod_name: (null), drv->bus->name: i2c, drv->bus->dev_name: (null)
[    1.044060] kernel: [drivers/base/driver.c driver_register 227] drv->name: nd_bus, drv->mod_name: libnvdimm, drv->bus->name: nd, drv->bus->dev_name: (null)
[    1.044072] kernel: [drivers/base/driver.c driver_register 227] drv->name: nvdimm, drv->mod_name: libnvdimm, drv->bus->name: nd, drv->bus->dev_name: (null)
[    1.044085] kernel: [drivers/base/driver.c driver_register 227] drv->name: nd_region, drv->mod_name: libnvdimm, drv->bus->name: nd, drv->bus->dev_name: (null)
[    1.044535] kernel: [drivers/base/driver.c driver_register 227] drv->name: Generic Clause 45 PHY, drv->mod_name: (null), drv->bus->name: mdio_bus, drv->bus->dev_name: (null)
[    1.044535] kernel: [drivers/base/driver.c driver_register 227] drv->name: Generic PHY, drv->mod_name: (null), drv->bus->name: mdio_bus, drv->bus->dev_name: (null)
[    1.044535] kernel: [drivers/base/driver.c driver_register 227] drv->name: usbfs, drv->mod_name: usbcore, drv->bus->name: usb, drv->bus->dev_name: (null)
[    1.044535] kernel: [drivers/base/driver.c driver_register 227] drv->name: hub, drv->mod_name: usbcore, drv->bus->name: usb, drv->bus->dev_name: (null)
[    1.044535] kernel: [drivers/base/driver.c driver_register 227] drv->name: usb, drv->mod_name: (null), drv->bus->name: usb, drv->bus->dev_name: (null)
[    1.044535] kernel: [drivers/base/driver.c driver_register 227] drv->name: i2c_designware, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    1.066535] kernel: [drivers/base/driver.c driver_register 227] drv->name: system, drv->mod_name: (null), drv->bus->name: pnp, drv->bus->dev_name: (null)
[    1.195016] kernel: [drivers/base/driver.c driver_register 227] drv->name: iosf_mbi_pci, drv->mod_name: iosf_mbi, drv->bus->name: pci, drv->bus->dev_name: (null)
[    1.195303] kernel: [drivers/base/driver.c driver_register 227] drv->name: alarmtimer, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    1.221663] kernel: [drivers/base/driver.c driver_register 227] drv->name: amd_gpio, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    1.221689] kernel: [drivers/base/driver.c driver_register 227] drv->name: basic-mmio-gpio, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    1.221713] kernel: [drivers/base/driver.c driver_register 227] drv->name: crystal_cove_gpio, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    1.221729] kernel: [drivers/base/driver.c driver_register 227] drv->name: crystal_cove_pwm, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    1.221743] kernel: [drivers/base/driver.c driver_register 227] drv->name: pwm-lpss, drv->mod_name: pwm_lpss_pci, drv->bus->name: pci, drv->bus->dev_name: (null)
[    1.221773] kernel: [drivers/base/driver.c driver_register 227] drv->name: pwm-lpss, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    1.221788] kernel: [drivers/base/driver.c driver_register 227] drv->name: aer, drv->mod_name: (null), drv->bus->name: pci_express, drv->bus->dev_name: (null)
[    1.221802] kernel: [drivers/base/driver.c driver_register 227] drv->name: pcie_pme, drv->mod_name: (null), drv->bus->name: pci_express, drv->bus->dev_name: (null)
[    1.221814] kernel: [drivers/base/driver.c driver_register 227] drv->name: dpc, drv->mod_name: (null), drv->bus->name: pci_express, drv->bus->dev_name: (null)
[    1.221832] kernel: [drivers/base/driver.c driver_register 227] drv->name: pciehp, drv->mod_name: (null), drv->bus->name: pci_express, drv->bus->dev_name: (null)
[    1.221846] kernel: [drivers/base/driver.c driver_register 227] drv->name: pcieport, drv->mod_name: pcieportdrv, drv->bus->name: pci, drv->bus->dev_name: (null)
[    1.271047] kernel: [drivers/base/driver.c driver_register 227] drv->name: shpchp, drv->mod_name: shpchp, drv->bus->name: pci, drv->bus->dev_name: (null)
[    1.271258] kernel: [drivers/base/driver.c driver_register 227] drv->name: dw-pcie, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    1.271280] kernel: [drivers/base/driver.c driver_register 227] drv->name: imsttfb, drv->mod_name: imsttfb, drv->bus->name: pci, drv->bus->dev_name: (null)
[    1.271306] kernel: [drivers/base/driver.c driver_register 227] drv->name: asiliantfb, drv->mod_name: asiliantfb, drv->bus->name: pci, drv->bus->dev_name: (null)
[    1.271329] kernel: [drivers/base/driver.c driver_register 227] drv->name: acpi-ged, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    1.271408] kernel: [drivers/base/driver.c driver_register 227] drv->name: ac, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    1.272230] kernel: [drivers/base/driver.c driver_register 227] drv->name: button, drv->mod_name: (null), drv->bus->name: acpi, drv->bus->dev_name: (null)
[    1.272677] kernel: [drivers/base/driver.c driver_register 227] drv->name: acpi-fan, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    1.272697] kernel: [drivers/base/driver.c driver_register 227] drv->name: processor, drv->mod_name: (null), drv->bus->name: cpu, drv->bus->dev_name: cpu
[    1.274281] kernel: [drivers/base/driver.c driver_register 227] drv->name: thermal, drv->mod_name: (null), drv->bus->name: acpi, drv->bus->dev_name: (null)
[    1.274454] kernel: [drivers/base/driver.c driver_register 227] drv->name: hardware_error_device, drv->mod_name: (null), drv->bus->name: acpi, drv->bus->dev_name: (null)
[    1.274611] kernel: [drivers/base/driver.c driver_register 227] drv->name: byt_crystal_cove_pmic, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    1.274628] kernel: [drivers/base/driver.c driver_register 227] drv->name: cht_crystal_cove_pmic, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    1.274644] kernel: [drivers/base/driver.c driver_register 227] drv->name: axp288_pmic_acpi, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    1.274673] kernel: [drivers/base/driver.c driver_register 227] drv->name: bxt_whiskey_cove_pmic, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    1.274688] kernel: [drivers/base/driver.c driver_register 227] drv->name: cht_whiskey_cove_pmic, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    1.274702] kernel: [drivers/base/driver.c driver_register 227] drv->name: cht_dollar_cove_ti_pmic, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    1.274717] kernel: [drivers/base/driver.c driver_register 227] drv->name: tps68470_pmic_opregion, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    1.274740] kernel: [drivers/base/driver.c driver_register 227] drv->name: gpio-clk, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    1.274759] kernel: [drivers/base/driver.c driver_register 227] drv->name: clk-fch, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    1.274772] kernel: [drivers/base/driver.c driver_register 227] drv->name: clk-pmc-atom, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    1.274787] kernel: [drivers/base/driver.c driver_register 227] drv->name: lgm-dma, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    1.274805] kernel: [drivers/base/driver.c driver_register 227] drv->name: virtio-mmio, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    1.274813] kernel: [drivers/base/driver.c driver_register 227] drv->name: battery, drv->mod_name: (null), drv->bus->name: acpi, drv->bus->dev_name: (null)
[    1.274820] kernel: [drivers/base/driver.c driver_register 227] drv->name: virtio-pci, drv->mod_name: virtio_pci, drv->bus->name: pci, drv->bus->dev_name: (null)
[    1.274845] kernel: [drivers/base/driver.c driver_register 227] drv->name: virtio_balloon, drv->mod_name: (null), drv->bus->name: virtio, drv->bus->dev_name: (null)
[    1.274861] kernel: [drivers/base/driver.c driver_register 227] drv->name: xen-platform-pci, drv->mod_name: platform_pci, drv->bus->name: pci, drv->bus->dev_name: (null)
[    1.274889] kernel: [drivers/base/driver.c driver_register 227] drv->name: simple-reset, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    1.275074] kernel: [drivers/base/driver.c driver_register 227] drv->name: serial, drv->mod_name: (null), drv->bus->name: pnp, drv->bus->dev_name: (null)
[    1.282191] kernel: [drivers/base/driver.c driver_register 227] drv->name: serial8250, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    1.282230] kernel: [drivers/base/driver.c driver_register 227] drv->name: 8250_mid, drv->mod_name: 8250_mid, drv->bus->name: pci, drv->bus->dev_name: (null)
[    1.282259] kernel: [drivers/base/driver.c driver_register 227] drv->name: serial, drv->mod_name: 8250_pci, drv->bus->name: pci, drv->bus->dev_name: (null)
[    1.282463] kernel: [drivers/base/driver.c driver_register 227] drv->name: max310x, drv->mod_name: (null), drv->bus->name: spi, drv->bus->dev_name: (null)
[    1.282483] kernel: [drivers/base/driver.c driver_register 227] drv->name: max310x, drv->mod_name: (null), drv->bus->name: i2c, drv->bus->dev_name: (null)
[    1.282500] kernel: [drivers/base/driver.c driver_register 227] drv->name: uart-sccnxp, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    1.282520] kernel: [drivers/base/driver.c driver_register 227] drv->name: kgdboc, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    1.282740] kernel: [drivers/base/driver.c driver_register 227] drv->name: virtio_console, drv->mod_name: (null), drv->bus->name: virtio, drv->bus->dev_name: (null)
[    1.282761] kernel: [drivers/base/driver.c driver_register 227] drv->name: virtio_rproc_serial, drv->mod_name: (null), drv->bus->name: virtio, drv->bus->dev_name: (null)
[    1.282878] kernel: [drivers/base/driver.c driver_register 227] drv->name: hpet, drv->mod_name: (null), drv->bus->name: acpi, drv->bus->dev_name: (null)
[    1.283579] kernel: [drivers/base/driver.c driver_register 227] drv->name: agpgart-amd64, drv->mod_name: amd64_agp, drv->bus->name: pci, drv->bus->dev_name: (null)
[    1.283620] kernel: [drivers/base/driver.c driver_register 227] drv->name: agpgart-intel, drv->mod_name: intel_agp, drv->bus->name: pci, drv->bus->dev_name: (null)
[    1.285805] kernel: [drivers/base/driver.c driver_register 227] drv->name: agpgart-via, drv->mod_name: via_agp, drv->bus->name: pci, drv->bus->dev_name: (null)
[    1.285848] kernel: [drivers/base/driver.c driver_register 227] drv->name: tpm_tis, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    1.285868] kernel: [drivers/base/driver.c driver_register 227] drv->name: tpm_tis, drv->mod_name: (null), drv->bus->name: pnp, drv->bus->dev_name: (null)
[    1.285888] kernel: [drivers/base/driver.c driver_register 227] drv->name: tpm_crb, drv->mod_name: (null), drv->bus->name: acpi, drv->bus->dev_name: (null)
[    1.286054] kernel: [drivers/base/driver.c driver_register 227] drv->name: virtio_iommu, drv->mod_name: (null), drv->bus->name: virtio, drv->bus->dev_name: (null)
[    1.292071] kernel: [drivers/base/driver.c driver_register 227] drv->name: simple-framebuffer, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    1.312198] kernel: [drivers/base/driver.c driver_register 227] drv->name: virtio_blk, drv->mod_name: (null), drv->bus->name: virtio, drv->bus->dev_name: (null)
[    1.312223] kernel: [drivers/base/driver.c driver_register 227] drv->name: tps65912, drv->mod_name: (null), drv->bus->name: i2c, drv->bus->dev_name: (null)
[    1.312241] kernel: [drivers/base/driver.c driver_register 227] drv->name: tps65912, drv->mod_name: (null), drv->bus->name: spi, drv->bus->dev_name: (null)
[    1.312255] kernel: [drivers/base/driver.c driver_register 227] drv->name: twl, drv->mod_name: (null), drv->bus->name: i2c, drv->bus->dev_name: (null)
[    1.312269] kernel: [drivers/base/driver.c driver_register 227] drv->name: twl4030-audio, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    1.312295] kernel: [drivers/base/driver.c driver_register 227] drv->name: twl6040, drv->mod_name: (null), drv->bus->name: i2c, drv->bus->dev_name: (null)
[    1.312333] kernel: [drivers/base/driver.c driver_register 227] drv->name: da9063, drv->mod_name: (null), drv->bus->name: i2c, drv->bus->dev_name: (null)
[    1.312351] kernel: [drivers/base/driver.c driver_register 227] drv->name: max14577, drv->mod_name: (null), drv->bus->name: i2c, drv->bus->dev_name: (null)
[    1.312365] kernel: [drivers/base/driver.c driver_register 227] drv->name: max77693, drv->mod_name: (null), drv->bus->name: i2c, drv->bus->dev_name: (null)
[    1.312378] kernel: [drivers/base/driver.c driver_register 227] drv->name: adp5520, drv->mod_name: (null), drv->bus->name: i2c, drv->bus->dev_name: (null)
[    1.312390] kernel: [drivers/base/driver.c driver_register 227] drv->name: crystal_cove_i2c, drv->mod_name: (null), drv->bus->name: i2c, drv->bus->dev_name: (null)
[    1.312405] kernel: [drivers/base/driver.c driver_register 227] drv->name: CHT Whiskey Cove PMIC, drv->mod_name: (null), drv->bus->name: i2c, drv->bus->dev_name: (null)
[    1.312425] kernel: [drivers/base/driver.c driver_register 227] drv->name: e820_pmem, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    1.312740] kernel: [drivers/base/driver.c driver_register 227] drv->name: virtio_scsi, drv->mod_name: (null), drv->bus->name: virtio, drv->bus->dev_name: (null)
[    1.312774] kernel: [drivers/base/driver.c driver_register 227] drv->name: sd, drv->mod_name: (null), drv->bus->name: scsi, drv->bus->dev_name: (null)
[    1.312793] kernel: [drivers/base/driver.c driver_register 227] drv->name: sr, drv->mod_name: (null), drv->bus->name: scsi, drv->bus->dev_name: (null)
[    1.312826] kernel: [drivers/base/driver.c driver_register 227] drv->name: ata_piix, drv->mod_name: ata_piix, drv->bus->name: pci, drv->bus->dev_name: (null)
[    1.314909] kernel: [drivers/base/driver.c driver_register 227] drv->name: pata_sis, drv->mod_name: pata_sis, drv->bus->name: pci, drv->bus->dev_name: (null)
[    1.314933] kernel: [drivers/base/driver.c driver_register 227] drv->name: ata_generic, drv->mod_name: ata_generic, drv->bus->name: pci, drv->bus->dev_name: (null)
[    1.314988] kernel: [drivers/base/driver.c driver_register 227] drv->name: Broadcom BCM84881, drv->mod_name: (null), drv->bus->name: mdio_bus, drv->bus->dev_name: (null)
[    1.315394] kernel: [drivers/base/driver.c driver_register 227] drv->name: virtio_net, drv->mod_name: (null), drv->bus->name: virtio, drv->bus->dev_name: (null)
[    1.315542] kernel: [drivers/base/driver.c driver_register 227] drv->name: dwc2, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    1.315578] kernel: [drivers/base/driver.c driver_register 227] drv->name: ehci-pci, drv->mod_name: ehci_pci, drv->bus->name: pci, drv->bus->dev_name: (null)
[    1.315626] kernel: [drivers/base/driver.c driver_register 227] drv->name: ehci-platform, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    1.315654] kernel: [drivers/base/driver.c driver_register 227] drv->name: ohci-pci, drv->mod_name: ohci_pci, drv->bus->name: pci, drv->bus->dev_name: (null)
[    1.315678] kernel: [drivers/base/driver.c driver_register 227] drv->name: ohci-platform, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    1.315725] kernel: [drivers/base/driver.c driver_register 227] drv->name: uhci_hcd, drv->mod_name: uhci_hcd, drv->bus->name: pci, drv->bus->dev_name: (null)
[    1.318587] kernel: [drivers/base/driver.c driver_register 227] drv->name: i8042 kbd, drv->mod_name: (null), drv->bus->name: pnp, drv->bus->dev_name: (null)
[    1.318625] kernel: [drivers/base/driver.c driver_register 227] drv->name: i8042 aux, drv->mod_name: (null), drv->bus->name: pnp, drv->bus->dev_name: (null)
[    1.318675] kernel: [drivers/base/driver.c driver_register 227] drv->name: i8042, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    1.320295] kernel: [drivers/base/driver.c driver_register 227] drv->name: atkbd, drv->mod_name: atkbd, drv->bus->name: serio, drv->bus->dev_name: (null)
[    1.320325] kernel: [drivers/base/driver.c driver_register 227] drv->name: elants_i2c, drv->mod_name: (null), drv->bus->name: i2c, drv->bus->dev_name: (null)
[    1.320540] kernel: [drivers/base/driver.c driver_register 227] drv->name: rtc_cmos, drv->mod_name: (null), drv->bus->name: pnp, drv->bus->dev_name: (null)
[    1.321910] kernel: [drivers/base/driver.c driver_register 227] drv->name: mt6323-pwrc, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    1.321929] kernel: [drivers/base/driver.c driver_register 227] drv->name: poweroff-restart, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    1.321946] kernel: [drivers/base/driver.c driver_register 227] drv->name: tps65086-restart, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    1.323043] kernel: [drivers/base/driver.c driver_register 227] drv->name: intel_scu, drv->mod_name: intel_scu_pcidrv, drv->bus->name: pci, drv->bus->dev_name: (null)
[    1.323089] kernel: [drivers/base/driver.c driver_register 227] drv->name: rproc-virtio, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    2.068687] kernel: [drivers/base/driver.c driver_register 227] drv->name: charger-manager, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    2.068732] kernel: [drivers/base/driver.c driver_register 227] drv->name: acpi-cpufreq, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    2.068761] kernel: [drivers/base/driver.c driver_register 227] drv->name: pcc-cpufreq, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    3.095184] kernel: [drivers/base/driver.c driver_register 227] drv->name: floppy, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    3.244886] kernel: [drivers/base/driver.c driver_register 227] drv->name: pata_acpi, drv->mod_name: pata_acpi, drv->bus->name: pci, drv->bus->dev_name: (null)
[    3.268718] kernel: [drivers/base/driver.c driver_register 227] drv->name: ahci, drv->mod_name: ahci, drv->bus->name: pci, drv->bus->dev_name: (null)
[    3.328734] kernel: [drivers/base/driver.c driver_register 227] drv->name: e1000, drv->mod_name: e1000, drv->bus->name: pci, drv->bus->dev_name: (null)
[    3.338325] kernel: [drivers/base/driver.c driver_register 227] drv->name: usbhid, drv->mod_name: usbhid, drv->bus->name: usb, drv->bus->dev_name: (null)
[    3.339205] kernel: [drivers/base/driver.c driver_register 227] drv->name: psmouse, drv->mod_name: psmouse, drv->bus->name: serio, drv->bus->dev_name: (null)
[    3.373274] kernel: [drivers/base/driver.c driver_register 227] drv->name: mptspi, drv->mod_name: mptspi, drv->bus->name: pci, drv->bus->dev_name: (null)
[    3.383359] kernel: [drivers/base/driver.c driver_register 227] drv->name: hid-generic, drv->mod_name: hid_generic, drv->bus->name: hid, drv->bus->dev_name: (null)
[    5.944697] kernel: [drivers/base/driver.c driver_register 227] drv->name: lp, drv->mod_name: lp, drv->bus->name: parport, drv->bus->dev_name: (null)
[    5.963017] kernel: [drivers/base/driver.c driver_register 227] drv->name: ppdev, drv->mod_name: ppdev, drv->bus->name: parport, drv->bus->dev_name: (null)
[    5.985266] kernel: [drivers/base/driver.c driver_register 227] drv->name: parport_pc, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)
[    5.985385] kernel: [drivers/base/driver.c driver_register 227] drv->name: parport_pc, drv->mod_name: (null), drv->bus->name: pnp, drv->bus->dev_name: (null)
[    5.989126] kernel: [drivers/base/driver.c driver_register 227] drv->name: parport_pc, drv->mod_name: parport_pc, drv->bus->name: pci, drv->bus->dev_name: (null)
[    6.244285] kernel: [drivers/base/driver.c driver_register 227] drv->name: vmwgfx, drv->mod_name: vmwgfx, drv->bus->name: pci, drv->bus->dev_name: (null)
[    6.848340] kernel: [drivers/base/driver.c driver_register 227] drv->name: vmw_vmci, drv->mod_name: vmw_vmci, drv->bus->name: pci, drv->bus->dev_name: (null)
[    7.529969] kernel: [drivers/base/driver.c driver_register 227] drv->name: serio_raw, drv->mod_name: serio_raw, drv->bus->name: serio, drv->bus->dev_name: (null)
[    9.356557] kernel: [drivers/base/driver.c driver_register 227] drv->name: piix4_smbus, drv->mod_name: i2c_piix4, drv->bus->name: pci, drv->bus->dev_name: (null)
[   10.185300] kernel: [drivers/base/driver.c driver_register 227] drv->name: snd_seq_midi, drv->mod_name: (null), drv->bus->name: snd_seq, drv->bus->dev_name: (null)
[   10.472591] kernel: [drivers/base/driver.c driver_register 227] drv->name: snd_ens1371, drv->mod_name: snd_ens1371, drv->bus->name: pci, drv->bus->dev_name: (null)
[   10.547640] kernel: [drivers/base/driver.c driver_register 227] drv->name: intel_rapl_msr, drv->mod_name: (null), drv->bus->name: platform, drv->bus->dev_name: (null)

 

 

 

 

从打印的结果来看,一共169个驱动模块进行了注册,这种不太容易看到驱动所在的代码目录,第一种可以看到代码目录,各有优劣吧。 

方法也是摸索出来的,不一定对。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/425739.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

你的绩效是不是常年都是B

原创不易,求赞,求关注,🙏🙏🙏🙏🙏🙏🙏🙏 目录 原创不易,求赞,求关注,🙏🙏&#x1f64…

http连接github远程仓库密码问题解决办法

目录 一、问题:使用http连接失败 二、解决办法:使用个人访问令牌。 1、生成访问令牌: 步骤 1: 登录 GitHub 步骤 2: 进入设置页面 步骤 3: 生成新的访问令牌 步骤 4: 配置访问令牌 步骤 5: 复制令牌 2. 使用访问令牌 一、问题&#…

图像滤波---各项异性扩散滤波使用笔记及代码

图像滤波---各项异性扩散滤波使用笔记及代码 一、文章内容介绍二、各项异性扩散滤波和各项同性滤波1、各项同性滤波2、各项异性扩散滤波3、各项异性和各项同性的对比 三、各项异性扩散滤波的原理介绍四、各项异性扩散滤波公式五、公式中的参数使用说明1、扩散速率 λ \lambda λ…

kubernetes中pause容器的作用与源码详解

概述 摘要:上一篇文章我们介绍了kubernetes是如何通过pause容器来构建一个pod。本文我们对pause容器做一个总结,并再此基础上次深入浅出,从pause容器的源码详细了解pause容器的实现原理。 正文 pause容器是什么 在 Kubernetes 中&#xff…

STM32(十五):I2C通信

I2C通信 I2C(Inter IC Bus)是由Philips公司开发的一种通用数据总线,实现单片机读写外部模块寄存器的功能。 两根通信线:SCL(Serial Clock)、SDA(Serial Data) 同步,半双工…

css百分比布局中height:100%不起作用

百分比布局时,我们有时候会遇到给高度 height 设置百分比后无效的情况,而宽度设置百分比却是正常的。 当为一个元素的高度设定为百分比高度时,是相对于父元素的高度来计算的。当没有给父元素设置高度(height)时或设置…

Celery的使用

Celery 一、Celery概述1. 特点:2. celery组成3. 安装与使用4. 邮箱配置二、Celery的使用实操——发送邮件1. 安装2. 配置一、Celery概述 1. 特点: 2. celery组成 配置任务队列Broker,采用redis保存要执行的任务队列 Client:任务的发出者 Worker:任务的处理者 3. 安装与使用…

『功能项目』第三职业弓弩的平A【58】

我们打开上一篇57第二职业法师的平A的项目, 本章要做的事情是实现第三职业弓弩的平A伤害 首先修改脚本:MagicBall.cs 将脚本挂载在Sphere预制体身上 注意组件设置 运行项目 本章做了第三职业弓弩的平A伤害及显示伤害UI 接下来文章的内容: …

如何升级用 Helm 安装的极狐GitLab Runner?

本分分享如何对 Helm 安装的 Runner 进行升级。整个过程分为三步:1、确定 Runner 最新版本或者想要升级的版本是否存在;2、用 Helm upgrade 命令进行升级;3、升级确认。 极狐GitLab 为 GitLab 的中国发行版,中文版本对中国用户更…

Mac笔记本上查看/user/目录下的文件的几种方法

在Mac笔记本上查看/user/下的文件,可以通过多种方法实现。以下是一些常见的方法: 一、使用Finder 打开Finder:点击Dock栏中的Finder图标,或者使用快捷键Command F。 导航到用户目录: 在Finder的菜单栏中&#xff0…

编译运行 webAssembly(wasm)

环境准备&#xff1a; lunix下docker 参考https://hub.docker.com/r/emscripten/emsdk 拉编译环境 docker pull emscripten/emsdk 编译 随便找个目录&#xff0c;敲下面命令&#xff0c;编译一个webAssembly 程序 # create helloworld.cpp cat << EOF > hellowo…

【nginx】搭配okhttp 配置反向代理

nginx的默认是一个反向代理。 nginx会默认把输入的请求,转向其他的服务器执行。 这些转向的服务器与客户端发起的服务器不是同一个。 客户端只认识nginx,不知道ngiix转向何方。 正向代理修改okhttp的proxy,实际上很多代理都是正向的。 反向代理修改请求路径到nginx。 感觉还…

在线IP代理检测:保护您的网络安全

在互联网飞速发展的今天&#xff0c;越来越多的人开始意识到网络安全和隐私保护的重要性。在线IP代理检测工具作为一种有效的网络安全手段&#xff0c;能够帮助用户识别和检测IP代理的使用情况&#xff0c;从而更好地保护个人隐私和数据安全。本文将详细介绍在线IP代理检测的相…

鸿蒙开发之ArkUI 界面篇 五

Image 图片组件&#xff0c;用专门用于显示图片 语法&#xff1a;Image(图片源)&#xff0c;这里可以是网络、也可以是本地的图片 例如&#xff1a;Image(https://wxls-cms.oss-cn-hangzhou.aliyuncs.com/online/2024-04-18/218da022-f4bf-456a-99af-5cb8e157f7b8.jpg)效果如下…

# wps必须要登录激活才能使用吗?

WPS 必须登录激活才能使用吗&#xff1f; 如下图&#xff0c;当我们使用WPS时&#xff0c;不登录会显示工具栏灰色不可用状态。 答&#xff1a;WPS 不一定要登录激活才能使用。 一、免费使用的情况 1、基础功能 在不登录的情况下&#xff0c;用户可以使用 WPS 的一些基础功…

3.Java高级编程实用类介绍(一)

三、Java高级编程实用类介绍(一) 文章目录 三、Java高级编程实用类介绍(一)一、枚举类型二、包装类三、Math 一、枚举类型 使用enum进行定义 public enum 枚举名字{值1,值2.... }二、包装类 每个基本类型在java.lang包中都有一个相应的包装类 /** new包装类&#xff08;字符…

python selenium网页操作

一、安装依赖 pip install -U seleniumselenium1.py&#xff1a; from selenium import webdriver from selenium.webdriver.common.by import Bydriver webdriver.Chrome() driver.get("https://www.selenium.dev/selenium/web/web-form.html") title driver.ti…

uniapp使用高德地图设置marker标记点,后续根据接口数据改变某个marker标记点,动态更新

最近写的一个功能属实把我难倒了,刚开始我请求一次数据获取所有标记点,然后设置到地图上,然后后面根据socket传来的数据对这些标记点实时更新,改变标记点的图片或者文字, 1:第一个想法是直接全量替换,事实证明这样不行,会很卡顿,有明显闪烁感,如果标记点比较少,就十几个可以用…

[数据集][图像分类]茶叶病害分类数据集6749张7类别

数据集类型&#xff1a;图像分类用&#xff0c;不可用于目标检测无标注文件 数据集格式&#xff1a;仅仅包含jpg图片&#xff0c;每个类别文件夹下面存放着对应图片 图片数量(jpg文件个数)&#xff1a;6749 分类类别数&#xff1a;7 类别名称:["Unlabeled","alg…

反编译 AndroidManifest.xml文件-android反编译技术

一、安卓打包后目录 想要查看原来版本配置和关联信息&#xff0c;被打包了&#xff0c;这时候需要工具 AXMLPrinter2.jar 二、反编译环境要求 序号软件说明1java电脑得有java环境2AXMLPrinter2.jarapk中xml解析文件 三、反编译指令 java -jar AXMLPrinter2.jar "C:\Us…