kgdb help with imx6, and some funky console business

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

kgdb help with imx6, and some funky console business

1,631 Views
KevinChaves
Contributor I

I'm having a hard time building a kernel with kdbg support. In ltib i was able to configure the kernel and everything seemed to build. I'm using a nitrogen6x board though, I'm not sure how much stuff this will break.

Starting up with uboot I added kgdb args

setenv bootargs kgdboc=ttymxc0,115200 kgdbwait ip=dhcp

it doesn't stop, I aslo don't believe its loading the correct config to build, my kernel with debugging symbols is about the same size as my kernel without....

I tried to build directly with the sources, but when I do that, after configuring the kernel, it automatically restarts the config process... from the beginning without a menu.

My second problem is I have two serial ports, and my device is deciding to use both during startup, At some point it switches console output to the second serial port.

Tags (2)
0 Kudos
4 Replies

996 Views
KevinChaves
Contributor I



Kevin Chaves said:

serial output and kernel settings


and kernel .config

0 Kudos

996 Views
alisonchaiken_m
Contributor III
Kevin, thanks for your post.   I too have connected to i.MX6Q with kgdb using a kernel command line similar to yours.   As far as I can tell, there's no way to attach kgdb to the board except for kgdbwait, as drivers/tty/sysrq.c shows no implementation of sysrq-g magic key.   I'm wondering how you proceed once you connect the server at the kgdbwait prompt.  Once the gdbserver is connected over the console, what do you do next?

Like you apparently, I can attach with kgdbwait using the console:

$ arm-none-linux-gnueabi-gdb ./vmlinux

GNU gdb (Sourcery CodeBench 2011.03-119) 7.2.50.20100908-cvs

This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-none-linux-gnueabi".

Reading symbols from /home/achaiken/gitsrc/linux-kernel/vmlinux...done.

(gdb) connect

kgdb_breakpoint () at kernel/debug/debug_core.c:986

986         arch_kgdb_breakpoint();

Breakpoint 1 at 0x80488d00: file kernel/panic.c, line 87.

Breakpoint 2 at 0x8010aa0c: file fs/sync.c, line 100.

(gdb)) i b

Num Type       Disp Enb AddressWhat

1   breakpoint keep y   0x80488d00 in panic at kernel/panic.c:87

2   breakpoint keep y   0x8010aa0c in sys_sync at fs/sync.c:100

Unfortunately, when I type "continue" or even "next" or "step" at the gdb prompt, I never see the system come up, as determined by ping or ssh.(If I don't connect with kgdb, I can easily ping or ssh to the fully booted host.) I used kernel config similar to yours, and clearly the fact that I can connect in the first place shows that most of the configuration is right.  

Thanks for any suggestions,

Alison Chaiken


0 Kudos

996 Views
KevinChaves
Contributor I

serial output and kernel settings

0 Kudos

996 Views
KevinChaves
Contributor I

ah figured out one of my problems

I kept running menumake without defining the ARCH or CROSS_COMPILE before hand, so I was configuring it for a different build 

SUCCESS!

0 Kudos