Open Source & Linux Lab

It's better when it's simple

User Tools

Site Tools


etc:users:jcmvbkbc:omap-support-pieces

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
etc:users:jcmvbkbc:omap-support-pieces [2009/07/04 21:30] – debugging notes jcmvbkbcusers:jcmvbkbc:omap-support-pieces [2016/08/07 00:34] – ↷ Page moved from user:jcmvbkbc:omap-support-pieces to users:jcmvbkbc:omap-support-pieces kel
Line 1: Line 1:
 ====== N8x0 support in linux-omap ====== ====== N8x0 support in linux-omap ======
  
-Current kernel: 2.6.31-rc1-omap1+Current kernel: 2.6.35 
 + 
 +[[http://jcmvbkbc.spb.ru/~dumb/ws/osll/n8x0/|Rootfs and kernel config]]
  
 ===== Startup plan ===== ===== Startup plan =====
-  * find optimal debugging techniques and real HW/qemu split; +  * [2/3] find optimal debugging techniques and real HW/qemu split; 
-  * make minimal working/debuggable configuration; +  * [3/4] make minimal working/debuggable configuration; 
-  * compile domain glossary.+  * [0] compile domain glossary.
  
 ===== Debug interfaces ===== ===== Debug interfaces =====
 ===== Subsystems' status ===== ===== Subsystems' status =====
 +
 +  * SPI, MMC, USB, mac80211: ok
  
 ===== Debugging in qemu ===== ===== Debugging in qemu =====
  
-Need CONFIG_DEBUG_INFO=y in kernel configuration for symbolic debugging to work.+==== Kernel configuration ==== 
 +  * CONFIG_DEBUG_INFO=y for symbolic debugging to work
 +  * CONFIG_FRAME_POINTER=y (which is only possible when CONFIG_ARM_UNWIND=n) + CONFIG_DEBUG_BUGVERBOSE=y for symbolic backtrace on oopses and BUGs;
  
 ==== Kernel command line parameters ==== ==== Kernel command line parameters ====
Line 23: Line 29:
   * 0x80008000 -- here we jump after decompression (.text.head that has VA of 0xc0008000 has PA 0x80008000 until MMU is active)   * 0x80008000 -- here we jump after decompression (.text.head that has VA of 0xc0008000 has PA 0x80008000 until MMU is active)
   * 0xc0026000 -- 'arm-linux-gnu-objdump -x vmlinux' says that .text starts here   * 0xc0026000 -- 'arm-linux-gnu-objdump -x vmlinux' says that .text starts here
 +
 +
 +
 +==== Booting n8x0 kernel in qemu ====
 +<code>
 +qemu-system-arm -M n810 -kernel "linux-omap-2.6/arch/arm/boot/zImage" -s -sd mmcblk0 -usb
 +</code>
  
 ==== Script for gdb session ==== ==== Script for gdb session ====
Line 29: Line 42:
 break *0x80008000 break *0x80008000
 </code> </code>
 +
 +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: To debug compression-related stuff from the very beginning (start, arch/arm/boot/compressed/head.S) till start_kernel:
-  add-symbol-file ~/ws/osll/omap/20090610/linux-omap-2.6/arch/arm/boot/compressed/vmlinux 0x80000000+  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: To debug kernel from stext (arch/arm/kernel/head.S) until MMU is active:
-  add-symbol-file ~/ws/osll/omap/20090610/linux-omap-2.6/vmlinux 0x80026000 -s .text.head 0x80008000+  add-symbol-file linux-omap-2.6/vmlinux 0x80026000 -s .text.head 0x80008000
  
 To debug kernel from start_kernel (init/main.c): To debug kernel from start_kernel (init/main.c):
-  add-symbol-file ~/ws/osll/omap/20090610/linux-omap-2.6/vmlinux 0xc0026000+  add-symbol-file linux-omap-2.6/vmlinux 0xc0026000
  
 ==== "Blank screen" debugging ==== ==== "Blank screen" debugging ====
  
 Whatever happens, ^C breaks into the running kernel. If the screen is blank, dmesg-like log may be viewed through Whatever happens, ^C breaks into the running kernel. If the screen is blank, dmesg-like log may be viewed through
-  display/10000s log_buf+  x/10000s log_buf 
 + 
 +Or even through 
 +  dump memory kmsg.log log_buf log_buf+10000
  
 ===== Debugging on real HW ===== ===== Debugging on real HW =====
 +==== Dealing with retu watchdog ====
 +Need to periodically touch it, like this:
 +<file>
 +while true
 +do
 + echo 63 > /sys/devices/platform/retu-watchdog/period
 + sleep 1
 +done
 +</file>
etc/users/jcmvbkbc/omap-support-pieces.txt · Last modified: 2016/08/08 20:53 by kel