[yocto] Kernel debugging over serial console?

BITONTI Giuseppe (MM) giuseppe.bitonti at external.magnetimarelli.com
Tue Sep 17 05:32:34 PDT 2013


I am trying to debug the kernel through kgdb for an imx6 sabre lite board with the following kernel built from poky 1.4:

root at imx6qsabrelite:~# uname -a
Linux imx6qsabrelite 3.0.35-1.1.0+g2dc5560 #1 SMP PREEMPT Thu Aug 8 15:15:39 CEST 2013 armv7l GNU/Linux

The system boot well but when I try to enter in debugging mode it returns:

root at imx6qsabrelite:~# echo g > /proc/sysrq-trigger
SysRq : HELP : loglevel(0-9) reBoot Crash terminate-all-tasks(E) memory-full-oom-kill(F) kill-all-tasks(I) thaw-filesystems(J) saK show-backtrace-all-active-cpus(L) show-memory-usage(M) nice-all-RT-tasks(N) powerOff show-registers(P) show-all-timers(Q) unRaw Sync show-task-states(T) Unmount ETM buffer dump show-blocked-tasks(W)
root at imx6qsabrelite:~#

I have configured the kernel with the command:

bitbake -c menuconfig linux-imx

enabling:

-*- Magic SysRq key
[*] Kernel debugging
[*] Compile the kernel with debug info
[*] KGDB: kernel debugger
<*> KGDB: use kgdb over the serial console

I have also edited defconfig file in fsl-community-bsp-dylan/sources/meta-fsl-arm/recipes-kernel/linux/linux-imx-3.0.35/mx6q/ adding:

CONFIG_FRAME_POINTER=y
CONFIG_DEBUG_KERNEL=y
CONFIG_KGDB=y
CONFIG_DEBUG_INFO=y
CONFIG_KGDB_SERIAL_CONSOLE=y
CONFIG_MAGIC_SYSRQ=y

and added kernel parameter to bootargs with:

MX6QSABRELITE U-Boot > editenv mmcargs
edit: setenv bootargs console=${console},${baudrate} root=${mmcroot} kgdboc=ttymxc1,115200
MX6QSABRELITE U-Boot > saveenv
Saving Environment to MMC...
Writing to MMC(0)... done
MX6QSABRELITE U-Boot > boot

but it still does not work.

Thank You.

Giuseppe


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20130917/f5e1e69f/attachment.html>


More information about the yocto mailing list