Linux kernel hanging at boot, how to troubleshoot?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Linux kernel hanging at boot, how to troubleshoot?

1,216 Views
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

Labels (1)
0 Kudos
Reply
2 Replies

1,180 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Can you dump the ARMv8 registers like pstate?

0 Kudos
Reply

1,202 Views
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 Kudos
Reply