Geeks Talk

Prepare for your Next Interview


Welcome to the Geeks Talk forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

adding patches in Linux kernel

This is a discussion on adding patches in Linux kernel within the Unix/Linux forums, part of the Operating Systems category; Hi, How to add a KGDB patches in linux kernel 2.6.18?...

Go Back   Geeks Talk > Operating Systems > Unix/Linux
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read
  #1 (permalink)  
Old 02-12-2009
Junior Member
 
Join Date: Mar 2008
Location: Chennai
Posts: 6
Thanks: 2
Thanked 0 Times in 0 Posts
mrbhush is on a distinguished road
Question adding patches in Linux kernel

Hi,

How to add a KGDB patches in linux kernel 2.6.18?
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-30-2009
Expert Member
 
Join Date: May 2009
Location: Bangalore
Posts: 991
Thanks: 155
Thanked 420 Times in 201 Posts
rijus is just really nicerijus is just really nicerijus is just really nicerijus is just really nicerijus is just really nice
Re: adding patches in Linux kernel

Hi,

U need to follow the following steps..........

On development machine:

1) Extract a kernel source
$ cd /mnt/work/build/old-pc
$ bunzip2 -c ~/linux-2.4.6.tar.bz2 | tar xvf -
$ mv linux linux-2.4.6-kgdb

2. Apply kgdb patch Versions 2.0 onwards have multiple kgdb patches.
$ cd linux-2.4.6-kgdb
$ patch -p1 < ~/linux-2.4.6-kgdb.patch

3. Configure the kernel
$ make xconfig or make menuconfig
Configure drivers and other kernel options
To enable kgdb, enable following config options (in this order).
Kernel hacking ->
KGDB: kernel debugging with remote gdb ->
KGDB: Thread analysis
KGDB: Console messages through gdb
Device drivers ->
Character devices ->
Serial drivers ->
KGDB: On generic serial port (8250)
For kernel versions prior to kgdb 2.0.1:
Goto "kernel hacking"
Enable "Remote (serial) kernel debugging with gdb"
This will enable debugging support in the kernel.
(Optional) Enable "Console messages through gdb (NEW)"

4. Build the kernel
$ make dep
$ make bzImage

5. Copy the kernel to target machine
It is assumed that the user who is working on the development machine has rsh permissions on the test machine for root account.
$ rcp System.map testmach:/boot/System.map-2.4.6-kgdb
$ rcp arch/i386/boot/bzImage testmach:/boot/vmlinuz-2.4.6-kgdb


On test machine:

6. Add a grub entry:
title 2.6.0 kgdb
root (hd0,0)
kernel /boot/vmlinuz-2.6.0 ro root=/dev/hda1 rootfstype=ext3 kgdbwait kgdb8250=1,57600
An example lilo entry for kgdb versions prior to 2.0 is shown below.
image=/boot/vmlinuz-2.4.6
label=kgdb
read-only
root=/dev/hda3
append="gdb gdbttyS=1 gdbbaud=115200"


If any pblm, let me know....


Thanks & Regards,
Riju.
Reply With Quote
Reply

  Geeks Talk > Operating Systems > Unix/Linux

Thread Tools
Display Modes

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 On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Adding reference Lovely Paul C# 1 01-21-2009 12:40 AM
Adding new row to DataGrid riswadkarharshad ASP.NET 2 09-23-2008 03:23 AM
kernel pbchaudhari Unix/Linux 0 09-12-2007 02:10 PM
Add-ins or patches for QTP to identify the VS Flexi Grids Geek_Guest QTP 0 07-02-2007 12:13 PM
Adding new div Srikanth HTML & CSS 1 11-03-2006 11:04 PM


All times are GMT -4. The time now is 11:00 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2009 GeekInterview.com. All Rights Reserved