Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Adding a single kernel module
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
brucebertrand
Tux's lil' helper
Tux's lil' helper


Joined: 06 Feb 2004
Posts: 83
Location: D.C.

PostPosted: Thu Jul 08, 2004 5:13 pm    Post subject: Adding a single kernel module Reply with quote

Is there a safe way to add a single kernel module?

What I mean is, I've had my kernel configured nicely for quite some time now, but want to add a single module and not have to rebuild the entire kernel/module set.

Can this be done? This is a module which is included in the standard 2.6.x kernel tree.
Back to top
View user's profile Send private message
blaster999
l33t
l33t


Joined: 09 May 2004
Posts: 902
Location: Between keyboard and chair

PostPosted: Thu Jul 08, 2004 5:56 pm    Post subject: Reply with quote

go to the /usr/src/linux-2.x.y
make menuconfig
add your desired module
make modules modules_install (this will compile only the modules you added. However, you will probably need to re-emerge nvidia-kernel or ati-drivers - or any other module not included in the kernel - if you had them installed)
modules-update
add it to your /etc/modules.autoload.d/kernel-2.x (if you wish it to be autoloaded)
_________________
60s: sex, drugs, rock'n'roll
90s: sux, bugs, drag'n'drop
---
Some multimedia keys refuse to work? See my mini-howto:
https://forums.gentoo.org/viewtopic.php?p=1896734#1896734
Back to top
View user's profile Send private message
brucebertrand
Tux's lil' helper
Tux's lil' helper


Joined: 06 Feb 2004
Posts: 83
Location: D.C.

PostPosted: Thu Jul 08, 2004 6:22 pm    Post subject: Reply with quote

Thanks for your reply.

I already know about using that method.
But I'm specifically trying to avoid having to re-emerge my 3rd party drivers. Especially nvidia-kernel.
I've had huge problems with it in the past.

I'm thinking something more along the lines of navigating to the specific driver's path in the kernel tree, manually compiling it, and inserting it in the proper place in the /lib/modules path.

Anyone else ever try something like this?
Back to top
View user's profile Send private message
brucebertrand
Tux's lil' helper
Tux's lil' helper


Joined: 06 Feb 2004
Posts: 83
Location: D.C.

PostPosted: Thu Jul 08, 2004 6:32 pm    Post subject: Reply with quote

Or....

What if I made the changes in my .config file (via the apropriate "make menuconfig" or similar) and then did "make modules" (but no "modules_install").

Then, simply copied the .ko file to it's place in the /lib/modules path and ran modules-update.

Will this work?

What exactly does "make modules_install" do? Obviously, it copies the modules into their proper place. What else?


I'm going to try this method now and post my results.
Back to top
View user's profile Send private message
brucebertrand
Tux's lil' helper
Tux's lil' helper


Joined: 06 Feb 2004
Posts: 83
Location: D.C.

PostPosted: Thu Jul 08, 2004 6:43 pm    Post subject: Reply with quote

This seems to have worked. 8O

Though I won't know for sure until I can actually finish configuring the device and test it.
Back to top
View user's profile Send private message
blaster999
l33t
l33t


Joined: 09 May 2004
Posts: 902
Location: Between keyboard and chair

PostPosted: Fri Jul 09, 2004 6:29 am    Post subject: Reply with quote

Quote:
What exactly does "make modules_install" do?


From the makefile:
Code:
        @rm -rf $(MODLIB)/kernel
        @rm -f $(MODLIB)/build
        @mkdir -p $(MODLIB)/kernel
        @ln -s $(TOPDIR) $(MODLIB)/build
        $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modinst


Obviously, make modules_install first deletes the modules from /lib/modules/2.x.y and then copies the new modules there.
_________________
60s: sex, drugs, rock'n'roll
90s: sux, bugs, drag'n'drop
---
Some multimedia keys refuse to work? See my mini-howto:
https://forums.gentoo.org/viewtopic.php?p=1896734#1896734
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