Tips and Tricks for Debugging
Kernel hangs suddenly in the middle of good messages or just says Starting... and hangs
Usually the kernel tried to printk() some messages but the UART driver did yet not become available, so we can't see anything on the console.
The same may be the case if the kernel suddenly becomes unable to operate the UART (e.g. interrupts are permanently blocked).
We can try to read the full log buffer from U-Boot.
compile the kernel or find the exactly matching System.map. If you have downloaded a binary kernel we have it e.g. at http://download.goldelico.com/letux-kernel/latest/src/
fgrep __log_buf System.map
c132e2dc b __log_buf
the address printed is virtual memory (subtract CONFIG_PAGE_OFFSET which is 0xc0000000)
- add physical memory start (0x8000000)
- boot until the kernel hangs
- reset (not power off!) the board by hardware reset so that RAM keeps contents. On Pyra, RESET is pressing simultaneously top left shoulder button and power button.
- interrupt U-Boot so that you get to the U-Boot prompt
- md $address 1000
- By looking through the timestamps you should be able to identify the last line.