Linux 串口驱动初始化前置定位crash log

浪子不回头ぞ 提交于 2019-12-03 06:41:50
在kernel串口驱动初始化前crash时,无log输出,只有到lk的log:
[5980] booting linux @ 0x80008000, ramdisk @ 0x82300000 (1023690), tags/device tree @ 0x82100000
 
 
--- a/kernel/msm-3.18/drivers/tty/serial/msm_serial_hs_lite.c
+++ b/kernel/msm-3.18/drivers/tty/serial/msm_serial_hs_lite.c
@@ -2032,7 +2032,7 @@ EARLYCON_DECLARE(msm_hsl_uart, msm_hsl_earlycon_setup);
OF_EARLYCON_DECLARE(msm_hsl_uart, "qcom,msm-hsl-uart", msm_hsl_earlycon_setup);
#endif
 
-module_init(msm_serial_hsl_init);
+arch_initcall(msm_serial_hsl_init);
module_exit(msm_serial_hsl_exit);
 
MODULE_DESCRIPTION("Driver for msm HSUART serial device");
 
修改前:
[ 1.098150] msm_hsl_console_setup: console setup on port #0
修改后
[ 0.610525] msm_hsl_console_setup: console setup on port #0
 
修改后可以看到crash的相关 log
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!