View previous topic :: View next topic |
Author |
Message |
brucebertrand Tux's lil' helper
Joined: 06 Feb 2004 Posts: 83 Location: D.C.
|
Posted: Thu Jul 08, 2004 5:13 pm Post subject: Adding a single kernel module |
|
|
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 |
|
|
blaster999 l33t
Joined: 09 May 2004 Posts: 902 Location: Between keyboard and chair
|
Posted: Thu Jul 08, 2004 5:56 pm Post subject: |
|
|
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 |
|
|
brucebertrand Tux's lil' helper
Joined: 06 Feb 2004 Posts: 83 Location: D.C.
|
Posted: Thu Jul 08, 2004 6:22 pm Post subject: |
|
|
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 |
|
|
brucebertrand Tux's lil' helper
Joined: 06 Feb 2004 Posts: 83 Location: D.C.
|
Posted: Thu Jul 08, 2004 6:32 pm Post subject: |
|
|
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 |
|
|
brucebertrand Tux's lil' helper
Joined: 06 Feb 2004 Posts: 83 Location: D.C.
|
Posted: Thu Jul 08, 2004 6:43 pm Post subject: |
|
|
This seems to have worked.
Though I won't know for sure until I can actually finish configuring the device and test it. |
|
Back to top |
|
|
blaster999 l33t
Joined: 09 May 2004 Posts: 902 Location: Between keyboard and chair
|
Posted: Fri Jul 09, 2004 6:29 am Post subject: |
|
|
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 |
|
|
|