LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
LinkBack Search this Thread
Old 07-22-2009, 04:46 PM   #1
cracorange
LQ Newbie
 
Registered: Jul 2009
Posts: 8

Rep: Reputation: 0
how to set up kgdb for 2.6.30 kernel


Hi I'd like to set up kgdb for 2.6.30 kernel.
Besides that, I have a question : is there a chance that 2.6.30 may run with a Hardy 8.04 distrib, in place of 2.6.24 original kernel ?

I hope so ...
Anyway, I've launched a kernel compilation 2,5 hour ago that should finish soon, just setting some options to use kgdb via menuconfig .

I think there are no more patches to apply to the kernel, am I right ?

If the build is finally ok, what should I do with this kernel ?
Use it on this machine (target) and put the sources on the other one (running kgdb) or run kgdb on this machine and put the kernel on the other one ?

Actually I've not really well understood that as you can guess it ...
Thanks for your help
 
Old 07-23-2009, 05:31 PM   #2
cracorange
LQ Newbie
 
Registered: Jul 2009
Posts: 8

Original Poster
Rep: Reputation: 0
Hi,
I've finally compiled 2.6.30 kernel with kgdb support.
I thought the kernel would wait while booting for a remote connection through kgdb, but actually it boots till the end and Gnome starts.
What should I do to make kgdb work ?
thanks for your help
 
Old 07-23-2009, 08:48 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 11,825

Rep: Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927
There is a docbook template for kgdb in the source tree. Start with the README file (always a good idea) at the top level of your source tree.
 
Old 07-26-2009, 04:37 AM   #4
cracorange
LQ Newbie
 
Registered: Jul 2009
Posts: 8

Original Poster
Rep: Reputation: 0
Hi,
Thanks for your help,
How do you get pdf or html out of .tmpl files, for instance in Documentation/DocBook directory, within kernel source directory .
I tried to type make, then tried make pdfdocs, but none of these commands worked
 
Old 07-27-2009, 04:38 AM   #5
pachu
LQ Newbie
 
Registered: Jul 2009
Posts: 4

Rep: Reputation: 0
Hello,
I was trying something similar. Were you able to bring up the KGDB on the 2.6.30 kernel ?

I have a very basic question. In the KGDB docs (kgdbquickstart-2.4.pdf)
i see that they mention, in page 1, item 1 & 2, that the patch is for 2.6.15 .. does this mean that we cannot use KGDB for debugging the 2.6.30 kernel ? should the kernel which is to be debugged, be of a version equal to 2.6.15 and lesser ?

what should be the tool chain versions ?
thanks and regards
pachu
 
Old 07-27-2009, 03:34 PM   #6
cracorange
LQ Newbie
 
Registered: Jul 2009
Posts: 8

Original Poster
Rep: Reputation: 0
The documentation you read is no more useful.
There is no need anymore to patch the kernel, just download the sources, for instance from kernel.org, go in the root directory of the sources and
then use either make xconfig or make menuconfig or something else to configure the kernel , ie set the options of the kernel .
You should go in Kernel Hacking sub-menu and select these options:
[*] Kernel debugging <-- not sure about this one [*] Compile the kernel with debug info[*] Compile the kernel with frame pointer[*] KGB: kernel debugging with remote gdb --->[*] KGDB: use kgdb over the serial console

and also that:
Device Drivers --->
Character Devices --->
Serial Drivers ---->
<*> 8250/16550 and compatible serial support[*] Console on 8250/16550 and compatible serial port


And I think that's it for the configuration step .

Then you have ti type make, the make modules_install and make install .
You'll have to check if your bootloader (grub, lilo or something else) has added an entry relative to the kernel you want to use,
and use correct kernel command line in this entry .
For instance in /boot/grub/menu.lst, I use this entry :

title linux 2.6.30 ( Kgdb )

root (hd0,4)

kernel /boot/vmlinuz-2.6.30 root=/dev/sda5 ro kgdb=ttyS0,38400 kgdboc=ttyS0,38400 kgdbwait

initrd /boot/initrd-2.6.30.img


You reboot, and if it should work nice, the kernel should wait for a serial connection from another machine with gdb.

Bye
 
Old 08-10-2009, 05:08 AM   #7
nickcheng
LQ Newbie
 
Registered: Aug 2009
Posts: 6

Rep: Reputation: 0
Hi cracorange,
Thanks for your info.
It helps me to solve my half question.
But what would you do on the development machine?
Do you use gdbmod-2.* ./vmlinux or gdb ./vmlinux?
I would like to debug the driver modules but I am really confised by the docs I got from the internet.
Thank you,
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel debugging(kgdb) for Ubuntu 8.10 with kernel 2.6.27 sharma_ankush Linux - General 3 07-04-2009 07:15 PM
Kernel debugging(kgdb) for Ubuntu 8.10 with kernel 2.6.27 sharma_ankush Linux - Newbie 1 04-15-2009 10:54 AM
KGDB for Linux Kernel 2.6.10 sanjay_ach Programming 3 01-16-2006 08:51 PM
Kernel Cmpiling and KGDB Igor007 Programming 1 09-19-2005 03:36 PM
Where is KGDB version for kernel 2.6.12 ???? Igor007 Programming 0 09-08-2005 01:59 PM


All times are GMT -5. The time now is 06:58 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration