LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Patching drivers (https://www.linuxquestions.org/questions/linux-software-2/patching-drivers-181292/)

rustyz82 05-13-2004 11:40 PM

Patching drivers
 
I have a diff file to patch osme orinoco drivers on my system but being relativly new to linux (at least this part of it) i know not how to do this. Do i need the kernel source (since the drivers are loaded as a module) to patchthem and after i patch them isthere anything else I need to do? Thanks for the help.

Quis 05-14-2004 03:06 AM

to patch the driver simply read the head of the patch-file
Here is an example head of the lirc-patch:
diff -Npaur linux-2.6.4/Documentation/lirc/lirc_it87 linux-2.6.4-lirc/Documentation/lirc/lirc_it87
--- linux-2.6.4/Documentation/lirc/lirc_it87 1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.4-lirc/Documentation/lirc/lirc_it87 2004-03-15 15:03:14.202925360 +0100
the plus indicates the destination and the minus the source.
so according to this example make a copy of the folder linux-2.6.4 to linux-2.6.4-lirc and then write:
patch -p0 < PATCHFILENAME

Alternative just make a symbolic link linux-2.6.4-lirc to linux-2.6.4 and the use the patch command; use this method only if you don't need the original-folder anymore.

You possible need the kernel-sources ..

hope that helps

rustyz82 05-14-2004 05:05 AM

after i patch the files do i need to recompile anything or what else do i need to do? And i'm not sure i understand your explination....

Quis 05-14-2004 08:05 AM

when you patch a driver, or exactly the source of the driver, the patch
change old code-lines (from different code files) with new ones.
so, if you've patched some sourcecode you need to compile it.

I don't think you have to rebuild your kernel or the kernel-modules, but maybe you
need the kernel-source to compile modules.


All times are GMT -5. The time now is 03:12 AM.