View previous topic :: View next topic |
Author |
Message |
DaggyStyle Watchman
Joined: 22 Mar 2006 Posts: 5941
|
Posted: Tue Aug 17, 2010 8:54 am Post subject: detaching a kernel driver from the kernel |
|
|
ok, I've decided to start learning linux driver development, my first decision is to try and fix my webcam driver which is gspca_pac207.
now this might be a dumb question but I don't want to constantly recompile the kernel or parts of it when I'm testing my changes so I want to know how can I detach that code from the kernel so I can work on it?
thanks for not bashing some chairs on my head _________________ Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein |
|
Back to top |
|
|
ssteinberg Apprentice
Joined: 09 Jul 2010 Posts: 206 Location: Israel
|
Posted: Tue Aug 17, 2010 11:02 am Post subject: |
|
|
You can run gcc on a single .c source file.
Running make will just recompile what was changed. As long as you don't modify headers only the driver will be recompiled. |
|
Back to top |
|
|
DaggyStyle Watchman
Joined: 22 Mar 2006 Posts: 5941
|
Posted: Tue Aug 17, 2010 11:17 am Post subject: |
|
|
ssteinberg wrote: | You can run gcc on a single .c source file.
Running make will just recompile what was changed. As long as you don't modify headers only the driver will be recompiled. |
I don't want to make the changes inside the kernel tree _________________ Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein |
|
Back to top |
|
|
maxime1986 n00b
Joined: 23 Oct 2009 Posts: 74
|
Posted: Tue Aug 17, 2010 4:50 pm Post subject: |
|
|
why ??
As ssteinberg says it while not recompile your overall kernel each time you run make.
you can also run "make drivers/.../your_driver.ko" if you want to be sure to compile just your module...
You can copy your kernel tree somewhere else if you fear to break your current config... |
|
Back to top |
|
|
Raptor85 Apprentice
Joined: 29 Dec 2007 Posts: 208
|
Posted: Tue Aug 17, 2010 10:20 pm Post subject: |
|
|
Even easier, just flag it as a module in the .config file, and install that kernel as such before you start messing with it, then copy your source directory to a new one for your working copy. On your working copy just "make modules && make modules_install" every time to compile and install the new version. This is pretty much what i do for tweaks to my orinoco & mach64 drivers. |
|
Back to top |
|
|
DaggyStyle Watchman
Joined: 22 Mar 2006 Posts: 5941
|
Posted: Wed Aug 18, 2010 4:18 am Post subject: |
|
|
Raptor85 wrote: | Even easier, just flag it as a module in the .config file, and install that kernel as such before you start messing with it, then copy your source directory to a new one for your working copy. On your working copy just "make modules && make modules_install" every time to compile and install the new version. This is pretty much what i do for tweaks to my orinoco & mach64 drivers. |
ok, will try _________________ Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein |
|
Back to top |
|
|
|