Letux Kernel

Debugging

You are looking at an old revision of the page Debugging. This revision was created by Nikolaus Schaller.

Table of Content

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.

http://elinux.org/Debugging_by_printing#Accessing_the_printk_buffer_after_a_silent_hang_on_boot

  1. compile the kernel
  2. fgrep __log_buf System.map if you have downloaded a binary kernel we have a matching System.map at e.g. http://download.goldelico.com/letux-kernel/latest/src/

  3. the address printed is virtual memory

  4. physical memory starts at 0x8000000 - so you have to translate by good guess
  5. boot until the kernel hangs
  6. reset (not power off!) the board by hardware reset so that RAM keeps contents
  7. interrupt U-Boot
  8. md $address

Created: 7 years 10 months ago
by Nikolaus Schaller

Updated: 7 years 10 months ago
by Nikolaus Schaller

Old Revisions