如何获取在 Linux 内核启动期间初始化/探测的所有模块/驱动程序的详细信息? [英] How to get details of all modules / drivers that were initialized / probed during the Linux kernel boot?
问题描述
我需要在内核引导期间调用|初始化|探测的模块/驱动程序序列.
I need the sequence of modules/drivers that are invoked|initialized|probed during the kernl boot.
能否请您告诉我是否有任何 Flash 命令行选项可用于获取此序列?
Can you please let me know if any flash command-line option available to get this sequence ?
推荐答案
传递选项initcall_debug";内核命令行上的 将导致将内置驱动程序的每个 init 例程的计时信息打印到控制台.initcalls 用于初始化静态链接的内核驱动程序和子系统,并为 Linux 引导过程贡献大量时间.(在挂载根文件系统之后,可加载模块才可用.)
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.)
输出如下:
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
参考:http://elinux.org/Initcall_Debug
指定内核参数ignore_loglevel";连同initcall_debug"将确保信息将在启动时显示.
Specifying the kernel parameter "ignore_loglevel" along with the "initcall_debug" will ensure that the information will be displayed during boot.
这篇关于如何获取在 Linux 内核启动期间初始化/探测的所有模块/驱动程序的详细信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!