Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
detaching a kernel driver from the kernel
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5941

PostPosted: Tue Aug 17, 2010 8:54 am    Post subject: detaching a kernel driver from the kernel Reply with quote

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
View user's profile Send private message
ssteinberg
Apprentice
Apprentice


Joined: 09 Jul 2010
Posts: 206
Location: Israel

PostPosted: Tue Aug 17, 2010 11:02 am    Post subject: Reply with quote

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
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5941

PostPosted: Tue Aug 17, 2010 11:17 am    Post subject: Reply with quote

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
View user's profile Send private message
maxime1986
n00b
n00b


Joined: 23 Oct 2009
Posts: 74

PostPosted: Tue Aug 17, 2010 4:50 pm    Post subject: Reply with quote

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
View user's profile Send private message
Raptor85
Apprentice
Apprentice


Joined: 29 Dec 2007
Posts: 208

PostPosted: Tue Aug 17, 2010 10:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5941

PostPosted: Wed Aug 18, 2010 4:18 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum