【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个驱动模块进行了注册,这种不太容易看到驱动所在的代码目录,第一种可以看到代码目录,各有优劣吧。 

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

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

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

js 深入理解生成器

目录 概述1 . 生成器基础2. 与普通函数的区别3. 通过 yield 中断执行3.1 yield 是干嘛的?3.2 yield 和 return 的区别3.3 每个生成器对象作用域都是独立的3.4 yeild 的使用位置3.5 生成器对象作为可迭代对象3.6 使用 yield 实现输入和输出3.6.1 yield实现输入3.6.1 …

4G物联网智能电表是什么?什么叫4G物联网智能电表?

4G物联网智能电表是一种结合了4G无线通信技术的新型电能计量设备,用于实时采集和传输用户的用电数据。它通过集成现代信息技术和电力电子技术,不仅能够精确测量电力消耗,还能实现远程数据传输、数据分析、远程控制等多种功能。本文将详细介绍…

【运维监控】influxdb 2.0+grafana 监控java 虚拟机以及方法耗时情况(2)

运维监控系列文章入口:【运维监控】系列文章汇总索引 文章目录 四、grafana集成influxdb监控java 虚拟机以及方法耗时情况1、添加grafana数据源2、添加grafana的dashboard1)、选择新建dashboard方式2)、导入dashboard 3、验证 关于java应用的…

CSS学习17--CSS3 过渡、2D变形、3D变形、动画

CSS3 过渡、2D变形、3D变形、动画 一、过渡二、2D变形 transform1.移动 translate2.缩放 scale3. 旋转 rotate4. 倾斜 skew 三、3D变形1. rotateX()rotateY() rotateZ()2. 体会透视 perspective3. translat…

[数据集][目标检测]车油口挡板开关闭合检测数据集VOC+YOLO格式138张2类别

数据集格式:Pascal VOC格式YOLO格式(不包含分割路径的txt文件,仅仅包含jpg图片以及对应的VOC格式xml文件和yolo格式txt文件) 图片数量(jpg文件个数):138 标注数量(xml文件个数):138 标注数量(txt文件个数):138 标注类别…

CleanMyMac X2024破解版mac电脑清理工具

今天,我要跟大家分享一个让我彻底告别电脑卡顿的秘密武器——CleanMyMac X。这不仅仅是一款普通的清理工具,它是你电脑的私人健身教练,让电脑焕发青春活力! CleanMyMac直装官方版下载地址: http://wm.makeding.com/i…

【通用分割模型】SAM 2论文翻译

文章目录 摘要1 引言2 相关工作3 任务:可提示视觉分割4 模型5 数据5.1 数据引擎5.2 SA-V数据集 6 零样本实验6.1 视频任务6.1.1 提示视频分割6.1.2 半监督视频对象分割6.1.3 公平性评估 6.2 图像任务 7 与半监督VOS的最新技术的比较8 数据和模型消融8.1 数据消融8.2…

JavaSE篇之内部类和图书系统

1.内部类(类中类) 在Java中,将一个类定义在另一个类内部,前者称为内部类,后者称为外部类。 注意事项: 1. 1.静态内部类(被static修饰的内部类) 1.在静态内部类的方法中不能直接引用外部类的成员变量&…

手把手教你捏一个自己的Agent

01 前言 Modelscope AgentFabric是一个基于ModelScope-Agent的交互式智能体应用,用于方便地创建针对各种现实应用量身定制智能体,目前已经在生产级别落地。 AgentFabric围绕可插拔和可定制的LLM构建,并增强了指令执行、额外知识检索和利用…

Qt控制开发板的LED

Qt控制开发板的LED 使用开发板的IO接口进行控制是嵌入式中非常重要的一点,就像冯诺依曼原理说的一样,一个计算机最起码要有输入输出吧,我们有了信息的接收和处理,那我们就要有输出。 我们在开发板上一般都是使用开发板的GPIO接口…

Leetcode 旋转图像

解题思路: 转置矩阵:通过将矩阵的行列互换来实现转置操作。水平翻转矩阵:通过将每行的数据进行对称交换,从而完成90度旋转。 通过这两个步骤,矩阵就会顺时针旋转90度。 class Solution { public:void rotate(vector…

数仓建设:为什么我们的数据容易被业务方质疑?

目录 0 问题背景 1 问题产生的原因 2 问题解决方案 3 小结 数字化建设通关指南专栏原价99,现在活动价39.9,按照阶梯式增长,直到恢复原价 0 问题背景 “ 在数字化建设进程中,无论是处于数据产品的你,或是数据开发的…

【鸿蒙】HarmonyOS NEXT星河入门到实战8-自定义组件-组件通信

目录 1、模块化语法 1.1 模块化基本认知 1.2 默认导出和导入 1.2.1 在ets下新建tools目录 1.2.2 在tools下新建moduls.ets文件 1.2.3 index.ets 1.3 按需导出和导入 1.4 全部导入 2、自定义组件 -基础 2.1 自定义组件 - 基本使用 2.2 自定义组件 -通用样式 2.2.1 et…

重生奇迹MU 红龙剑士的风采 游戏玩家的记忆

在重生奇迹MU游戏中,剑士是一个老牌职业,而其中红龙剑士更是备受瞩目的角色。红龙剑士选手身着一身红色龙王装,仿佛已经沐浴了敌人的鲜血,是一个经验丰富的剑手。很多老玩家都信任剑士这个职业,并视其为忠实的伙伴&…

运行PaddleOCR报错:requests.exceptions.SSLError: HTTPSconnectionPool……

文章目录 问题描述解决方法 问题描述 在运行以下代码时报错: ocr PaddleOCR(lang"en")解决方法 打开cmd,输入以下命令,查找Python解释器所在路径。 找到 Lib\site-packages\paddleocr\ppocr\utils\network.py,将代码…

对于mapper层代码的理解

昨天在改需求的时候,改了一天,发现关于数据库映射那里出现了问题。 因为我对于后端的mapper层了解的并不深,所以导致我改了一天还没发现问题所在。当我好不容易发现了问题出在mapper层,结果我发现我不会改哈哈哈,还是…

错误: 编码GBK的不可映射字符的解决方法

之前我一直用的eclipse来编写java代码,从来没有出现过这个错误,但是转到VS中后我写个中文注释都没法写,写了就报错,于是开始探索原因 出现这种问题大概率你是在官网下载的JDK,默认是国际版的,他在编译时如果…

QGis二次开发 —— 1、Windows10搭建Vs2017-QGis环境(附Vs2017环境效果)(附:Qt助手加入QGis接口说明文档)

OSGeo4W简介 更高级的 QGIS 用户应该使用 OSGeo4W 包。此安装程序可以并行安装多个版本的 QGIS,并且还可以进行更高效的更新,因为每个新版本仅下载和安装更改的组件。      OSGeo4W 存储库包含许多来自 OSGeo 项目的软件。包括 QGIS 和所有依赖项&a…

【图像识别】摄像头捕捉运动到静止视频帧(免费源码分享)

【图像识别】摄像头捕捉运动到静止视频帧(免费源码分享) 1. 本文摘要 本文实现了一个OpenCV和PyQT5 结合的摄像头视频捕捉和运动检测线程,实现了一款界面软件用于功能演示。主要使用帧差法实现,摄像头捕捉运动到静止的图片,捕捉到的图片可用…

朗迪锋亮相2024年中国国际服务贸易交易会

9月12日至14日,2024中国国际服务贸易交易会(以下简称“服贸会”)在国家会议中心和首钢园区成功举办。本届服贸会由商务部和北京市人民政府共同主办,继续秉承“全球服务 互惠共享”的宗旨,与参展企业一同聚焦“共享智慧…