etc:users:jcmvbkbc:omap-support-pieces
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
etc:users:jcmvbkbc:omap-support-pieces [2009/06/29 22:48] – gdb session script jcmvbkbc | users: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.35 | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | ===== Startup plan ===== | ||
+ | * [2/3] find optimal debugging techniques and real HW/qemu split; | ||
+ | * [3/4] make minimal working/ | ||
+ | * [0] compile domain glossary. | ||
===== Debug interfaces ===== | ===== Debug interfaces ===== | ||
===== Subsystems' | ===== Subsystems' | ||
+ | |||
+ | * SPI, MMC, USB, mac80211: ok | ||
===== Debugging in qemu ===== | ===== Debugging in qemu ===== | ||
- | Need CONFIG_DEBUG_INFO=y | + | ==== Kernel configuration ==== |
+ | * CONFIG_DEBUG_INFO=y for symbolic debugging | ||
+ | * CONFIG_FRAME_POINTER=y (which is only possible when CONFIG_ARM_UNWIND=n) + CONFIG_DEBUG_BUGVERBOSE=y for symbolic backtrace on oopses and BUGs; | ||
- | Magic numbers: | + | ==== Kernel command line parameters ==== |
+ | |||
+ | * initcall_debug=1 -- make kernel print all _init function calls during kernel_init; | ||
+ | |||
+ | ==== Magic numbers | ||
* 0x80000000 -- here the kernel is loaded | * 0x80000000 -- here the kernel is loaded | ||
- | * 0x80008000 -- here we jump after it's been decompressed | + | * 0x80008000 -- here we jump after decompression (.text.head that has VA of 0xc0008000 has PA 0x80008000 until MMU is active) |
- | * 0x80027000 | + | * 0xc0026000 |
- | Script for gdb session: | + | |
+ | |||
+ | ==== Booting n8x0 kernel in qemu ==== | ||
+ | < | ||
+ | qemu-system-arm -M n810 -kernel " | ||
+ | </ | ||
+ | |||
+ | ==== Script for gdb session | ||
< | < | ||
target remote 127.0.0.1: | target remote 127.0.0.1: | ||
break *0x80008000 | break *0x80008000 | ||
- | add-symbol-file ~/ | ||
</ | </ | ||
+ | |||
+ | To debug kernel as usual: | ||
+ | symbol-file linux-omap-2.6/ | ||
+ | |||
+ | To debug compression-related stuff from the very beginning (start, arch/ | ||
+ | add-symbol-file linux-omap-2.6/ | ||
+ | |||
+ | To debug kernel from stext (arch/ | ||
+ | add-symbol-file linux-omap-2.6/ | ||
+ | |||
+ | To debug kernel from start_kernel (init/ | ||
+ | add-symbol-file linux-omap-2.6/ | ||
+ | |||
+ | ==== "Blank screen" | ||
+ | |||
+ | 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 ===== | ===== Debugging on real HW ===== | ||
+ | ==== Dealing with retu watchdog ==== | ||
+ | Need to periodically touch it, like this: | ||
+ | < | ||
+ | while true | ||
+ | do | ||
+ | echo 63 > / | ||
+ | sleep 1 | ||
+ | done | ||
+ | </ |
etc/users/jcmvbkbc/omap-support-pieces.txt · Last modified: 2016/08/08 20:53 by kel