How to get details of all modules / drivers that were initialized / probed during the Linux kernel boot?

被刻印的时光 ゝ 提交于 2019-12-01 17:32:10

问题


I need the sequence of modules/drivers that are invoked|initialized|probed during the kernl boot.

Can you please let me know if any flash command-line option available to get this sequence ?


回答1:


Passing the option "initcall_debug" on the kernel command line will cause timing information to be printed to the console for each init routine of built-in drivers. The initcalls are used to initialize statically linked kernel drivers and subsystems and contribute a significant amount of time to the Linux boot process. (Loadable modules are not available until after the root filesystem has been mounted.)

The output looks like:

calling  tty_class_init+0x0/0x44 @ 1
initcall tty_class_init+0x0/0x44 returned 0 after 9765 usecs
calling  spi_init+0x0/0x90 @ 1
initcall spi_init+0x0/0x90 returned 0 after 9765 usecs

Reference: http://elinux.org/Initcall_Debug

Addendum

Specifying the kernel parameter "ignore_loglevel" along with the "initcall_debug" will ensure that the information will be displayed during boot.




回答2:


After enabling both initcall_debug=1 and ignore_loglevel=1 on the kernel command line, I am able to see the module initialization start and end times. The below link has more details on this.

https://chengyihe.wordpress.com/2015/12/13/android-kernel-enable-initcall_debug-to-debug-initcall/



来源:https://stackoverflow.com/questions/37272109/how-to-get-details-of-all-modules-drivers-that-were-initialized-probed-durin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!