Skip to content
字数
208 字
阅读时间
1 分钟

在调试内核的过程中,我们常常需要知道模块的运行情况,确定模块是否执行,Probe函数是否执行成功。以及initcall的启动顺序。 我们可以利用内核参数initcall_debug进行调试。

我们可以选择如下2种方式进行调试:

  • 通过uboot命令行,添加到bootargs
shell
#uboot下执行
setenv bootargs "${bootargs} initcall_debug"
saveenv
  • 使用设备树:
shell
&chosen {
  bootargs = "initcall_debug earlycon=uart8250,mmio32,0xfeb50000 console=ttyFIQ0 irqchip.gicv3_pseudo_nmi=0 rw rootwait rcupdate.rcu_expedited=1 rcu_nocbs=all";
};

效果如下: 可以看到先打印的是Probe函数结果,然后就是打印init执行的返回结果。

贡献者

The avatar of contributor named as Px Px

页面历史

撰写