Compiling just one kernel module

xtknight

Elite Member
Oct 15, 2004
12,974
0
71
I'm trying to debug a Linux module I believe to be broken on my system config, and I want to recompile my modifications to it (just printing out debug info to dmesg). The file is ide-cd.c in drivers/ide.

I tried this from /usr /src/linux (kernel source root):

sudo make drivers/ide/

It did make a .o file, but I believe I need a .ko file for a kernel module. Any ideas? Must I recompile the whole kernel? From what I understand the beauty of a module is that you can modify it without doing the whole thing.

That is, unless any of you have any clue what this message really means and why it's happening with my JMicron controller:
 

silverpig

Lifer
Jul 29, 2001
27,703
12
81
Just

cd /usr******/linux
make modules_install

That should do it. It SHOULD just make the new modules. You will probably have to delete the .o files before each run, but so long as you don't delete the .o files in the other directories it shouldn't re-build them (that's what make clean is for).
 

TanisHalfElven

Diamond Member
Jun 29, 2001
3,512
0
76
yes its possible.but i cna't remember hoiw. your better off asking this at some linux forum. i suggest ubuntuforums.org