Table of Contents

N8x0 support in linux-omap

Current kernel: 2.6.35

Rootfs and kernel config

Startup plan

Debug interfaces

Subsystems' status

Debugging in qemu

Kernel configuration

Kernel command line parameters

Magic numbers

Booting n8x0 kernel in qemu

qemu-system-arm -M n810 -kernel "linux-omap-2.6/arch/arm/boot/zImage" -s -sd mmcblk0 -usb

Script for gdb session

target remote 127.0.0.1:1234
break *0x80008000

To debug kernel as usual:

symbol-file linux-omap-2.6/vmlinux

To debug compression-related stuff from the very beginning (start, arch/arm/boot/compressed/head.S) till start_kernel:

add-symbol-file linux-omap-2.6/arch/arm/boot/compressed/vmlinux 0x80000000

To debug kernel from stext (arch/arm/kernel/head.S) until MMU is active:

add-symbol-file linux-omap-2.6/vmlinux 0x80026000 -s .text.head 0x80008000

To debug kernel from start_kernel (init/main.c):

add-symbol-file linux-omap-2.6/vmlinux 0xc0026000

"Blank screen" debugging

Whatever happens, ^C breaks into the running kernel. If the screen is blank, dmesg-like log may be viewed through

x/10000s log_buf

Or even through

dump memory kmsg.log log_buf log_buf+10000

Debugging on real HW

Dealing with retu watchdog

Need to periodically touch it, like this:

while true
do
 echo 63 > /sys/devices/platform/retu-watchdog/period
 sleep 1
done