LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-29-2003, 11:59 AM   #1
suriyamohan
Member
 
Registered: Mar 2003
Location: Coimbatore
Posts: 50

Rep: Reputation: 15
Thumbs up Applying driver patch ...


Hi,
I am currently working in Red Hat Linux 8.0 , Kernel 2.4.18-14. " patch-DFB-0.9.16-i810-0.0.5.diff " is DirectFB gfx driver. How to apply this patch in such a way that the kernel knows that a new driver has been installed ?

Last edited by suriyamohan; 04-29-2003 at 12:00 PM.
 
Old 04-29-2003, 04:11 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
cd /where/linux-src/lives
patch -P0 < /path/to/patch/patch-DFB-0.9.16-i810-0.0.5.diff

If you get an error message here read
man patch, and have a look at your diff-file :)

then the usual steps of kernel compilation :)

Cheers,
Tink
 
Old 04-29-2003, 11:08 PM   #3
suriyamohan
Member
 
Registered: Mar 2003
Location: Coimbatore
Posts: 50

Original Poster
Rep: Reputation: 15
Smile Kerenl Compilation

Hi,
Thanks for u'r suggestion. Is it necessary to recompile the kernel after applying the driver patch to the kernel ?
 
Old 04-29-2003, 11:16 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
I haven't seen binary patches as of now yet :)


So, it you just patch the source, how would
the kernel know about your modification if not
by recompiling?

Cheers,
Tink
 
Old 04-29-2003, 11:32 PM   #5
suriyamohan
Member
 
Registered: Mar 2003
Location: Coimbatore
Posts: 50

Original Poster
Rep: Reputation: 15
Cool Kerenl Compiling

Hi,
Ok. Thanks for u'r suggestion.
 
Old 04-30-2003, 01:40 AM   #6
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304

Rep: Reputation: 65
the kernel patches are source code, not driver files like
windows.
patching the kernel means adding in source code to the
kernel source, then compiling the kernel and modules,
and booting with that kernel, then you have the support
for the new hardware you patched in.
you also have to configure your kernel source before you
compile, probably.
you should find a kernel compilation howto, or search
this site for how to compile a new kernel.
 
Old 04-30-2003, 04:49 AM   #7
suriyamohan
Member
 
Registered: Mar 2003
Location: Coimbatore
Posts: 50

Original Poster
Rep: Reputation: 15
Thumbs up Kernel Compilation

Hi,
I am currently working in Red Hat Linux 8.0 ,kernel 2.4.18-14. What i want is to patch the existing kernel with " patch-DFB-0.9.16-i810-0.0.5.diff " (gfx driver) and compile the existing kernel. I don't want to download a new kernel, patch it and compile. How to compile the existing kernel with a driver patch ?
 
Old 04-30-2003, 06:12 AM   #8
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304

Rep: Reputation: 65
do the command tinkster gave you. if you don't have
the kernel source installed, the command will not work.
you can't patch the kernel without the kernel source
installed. usually in /usr/src/linux
 
Old 04-30-2003, 11:49 AM   #9
suriyamohan
Member
 
Registered: Mar 2003
Location: Coimbatore
Posts: 50

Original Poster
Rep: Reputation: 15
Thumbs up Applying driver patch ...

Hi,
i tried as follows as per Tink suggestion.

[root@instec src]# ls
linux-2.4 linux-2.4.18-14 redhat
[root@instec src]# pwd
/usr/src
[root@instec src]# patch -p0 < /root/Framebuffer/Directfb/DFB-0.9.16-i810-0.0.5/
patch-DFB-0.9.16-i810-0.0.5.diff
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Naur DirectFB-0.9.16-orig/configure DirectFB-0.9.16/configure
|--- DirectFB-0.9.16-orig/configure 2003-01-13 15:25:30.000000000 +0000
|+++ DirectFB-0.9.16/configure 2003-01-18 01:15:30.000000000 +0000
--------------------------
File to patch:

How to overcome the aforesaid problem ?
 
Old 04-30-2003, 12:18 PM   #10
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304

Rep: Reputation: 65
you need to be in the directory with the kernel source.
if there is not a directory in /usr/src
like linux or linux-2.4.18-10 or similar. it's not there.
you'll have to install it from your redhat cdrom
 
Old 04-30-2003, 11:52 PM   #11
suriyamohan
Member
 
Registered: Mar 2003
Location: Coimbatore
Posts: 50

Original Poster
Rep: Reputation: 15
Thumbs up Applying driver patch ...

Hi,
I tried again under linux directory but still the problem persists.

[root@instec src]# ls
linux-2.4 linux-2.4.18-14 redhat
[root@instec src]# cd linux-2.4.18-14/
[root@instec linux-2.4.18-14]# patch -p0</root/Framebuffer/gfxdriver/DFB-0.9.16-i810-0.0.5/
patch-DFB-0.9.16-i810-0.0.5.diff
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Naur DirectFB-0.9.16-orig/configure DirectFB-0.9.16/configure
|--- DirectFB-0.9.16-orig/configure 2003-01-13 15:25:30.000000000 +0000
|+++ DirectFB-0.9.16/configure 2003-01-18 01:15:30.000000000 +0000
--------------------------
File to patch:

How to overcome the aforesaid problem ?
 
Old 05-01-2003, 12:26 AM   #12
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304

Rep: Reputation: 65
patch says the file it was trying to patch didn't exist.
you probably do not have the linux kernel source installed.
you probably just have a few header files and stuff there,
so that programs that need them can compile.
You'll have to install the source. It's on the Red Hat cdrom.
 
Old 05-02-2003, 02:46 AM   #13
suriyamohan
Member
 
Registered: Mar 2003
Location: Coimbatore
Posts: 50

Original Poster
Rep: Reputation: 15
Thumbs up Applying driver patch ...

Hi,
I downloaded linux-2.4.17 kernel and listed the folders in the "linux" directory after unzipping the files. The folders are as follows.

[root@instec linux]# ls
arch Documentation include kernel Makefile README scripts COPYING drivers init lib mm REPORTING-BUGS CREDITS fs ipc MAINTAINERS net Rules.make

And earlier i installed Red Hat Linux 8.0 from cd rom with kernel 2.4.18-14. The folders are as follows.

[root@instec linux-2.4.18-14]# ls
abi CREDITS fs kernel mm Rules.make arch crypto include lib net scripts configs Documentation init MAINTAINERS README COPYING drivers ipc Makefile REPORTING-BUGS

Both, that is the one installed earlier and the one i downloaded have the same source files, "Kernel" directory. So what may be the problem for the patch file not being excuted correctly ?
 
Old 05-02-2003, 05:00 AM   #14
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304

Rep: Reputation: 65
the patch may be( or probably is) for a different version
of the kernel. If it doesn't tell you on the site you got
the patch from, which kernel source it is for, i don't know
what to tell you. try to patch anyway, and see if it works.
 
Old 05-02-2003, 05:00 AM   #15
footfrisbee
Member
 
Registered: Apr 2003
Distribution: Debian Sarge
Posts: 259

Rep: Reputation: 30
suriyamohan,

You should take some time and read the Kernel-HOWTO. It is very helpful. After you read it, come here with any questions you have.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
applying patch? alaios Linux - General 1 11-29-2004 10:41 AM
Applying patch on nmap6 Kresimir Linux - Software 0 09-16-2004 05:55 AM
applying a patch darthczyz Linux - Newbie 2 05-07-2004 08:44 AM
Applying XFree patch jspaceman Slackware 2 02-12-2004 05:10 PM
applying ck kernel patch Abe_the_Man Linux - General 1 01-29-2004 11:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:35 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration