Linux kernel hanging at boot, how to troubleshoot?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Linux kernel hanging at boot, how to troubleshoot?

1,029 次查看
andreaaizza
Contributor III

Hi,

this is a general question, even if it has been repoduced with latest linux-imx `lf-5.15.32-2.0.0`. On a MX6S7, booting zImage (linux+initrd)+DTB hangs and becomes irresponsive (JTAG Jlink+GDB shows broken back trace), always at the same point:

```

...[ OK ] Started Configure LED GPIOs.
[ OK ] Started /etc/rc.local Compatibility.
Starting OpenSSH server daemon...
[ OK ] Started Network Name Resolution.
[ 13.317953] 8021q: 802.1Q VLAN Support v1.8
[ OK ] Reached target Host and Network Name Lookups.
[ OK ] Started D-Bus System Message Bus.
[ 13.588549] Generic PHY 2188000.ethernet-1:01: attached PHY driver (mii_bus:phy_addr=2188000.ethernet-1:01, irq=POLL)

```

Apart from many statements:

* kernel_defconf is same as another booting kernel

* buildroot_defconf (packages) is same as another working build

the question is: how do I troubleshoot this or similar issue where kernel gets hanging at boot and irresponsive?

 

Best I could do is using JLink+GDB (vmlinux with KALLSYMS_ALL andd CPU_IDLE to avoid JTAG disconnects), but breaking before the hanging is not that easy (how to do that?).

 

Cheers,

Andrea

标签 (1)
0 项奖励
回复
2 回复数

993 次查看
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Can you dump the ARMv8 registers like pstate?

0 项奖励
回复

1,015 次查看
andreaaizza
Contributor III

more: it appears it is the rootfs creating problems. Hanging follows the rootfs. Using other zImage (kernel only, no INITRAMFS) with this rootfs.cpio.uboot and same DTB it hangs at the same point, while using this zImage with other roots.cpio.uboot works fine. Still the question: how to troubleshoot in this and simliar cases?

0 项奖励
回复