Thanks Apelete for your help, but the command you suggested returns the following:
root@imx6qsabrelite:~# cat /sys/module/kgdboc/parameters/kgdboc cat: can't open '/sys/module/kgdboc/parameters/kgdboc': No such file or directory root@imx6qsabrelite:~# echo ttymxc1,115200 > /sys/module/kgdboc/parameters/kgdboc -sh: can't create /sys/module/kgdboc/parameters/kgdboc: nonexistent directory What I miss? Giuseppe -----Messaggio originale----- Da: Apelete Seketeli [mailto:[email protected]] Inviato: martedì 17 settembre 2013 15:15 A: BITONTI Giuseppe (MM) Cc: [email protected] Oggetto: Re: [yocto] Kernel debugging over serial console? Hello Giuseppe, On 17-Sep-13, BITONTI Giuseppe (MM) wrote: > 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@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@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@imx6qsabrelite:~# I didn't dabble with OE or Yocto for a while, but from a pure Linux kernel point of view, it seems like something is amiss with your kgdb configuration. > 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 You kernel configuration looks ok, and the kgdboc parameter passed by u-boot to the kernel seems correct (at least syntactically speaking). > but it still does not work. Depending on the serial driver in use in the kernel, it sometimes happens that kgdboc is not configured despite the kgdboc parameter being passed to the kernel. To check that kgdboc is configured like you intended, from user-sapce please try: root@imx6qsabrelite:~# cat /sys/module/kgdboc/parameters/kgdboc Guessing from what you wrote, it should return: ttymxc1,115200 If it doesn't, please try configuring kgdboc from user-space: root@imx6qsabrelite:~# echo ttymxc1,115200 > /sys/module/kgdboc/parameters/kgdboc And then: root@imx6qsabrelite:~# echo g > /proc/sysrq-trigger Should break the kernel and let you connect to kgdb using, for instance, a gdb client. Hope it helps :-). Cheers. -- Apelete _______________________________________________ yocto mailing list [email protected] https://lists.yoctoproject.org/listinfo/yocto
