Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can I put a new module in the kernel without rebuilding it?
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
jfranz2
n00b
n00b


Joined: 24 Oct 2014
Posts: 37

PostPosted: Sun Oct 04, 2015 9:50 pm    Post subject: Can I put a new module in the kernel without rebuilding it? Reply with quote

I want to put in...
Code:

CONFIG_UINPUT
CONFIG_JOYDEV

...as modules but do not want to wait out an entire kernel rebuild. Can I install these modules with and have them work without rebuilding? I am mostly new to kernel configuration and mainly used genkernel before doing my own config without it.
_________________
#TYBG
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10342
Location: Somewhere over Atlanta, Georgia

PostPosted: Sun Oct 04, 2015 10:59 pm    Post subject: Reply with quote

Yes you can! :)

Just change the .config with "make menuconfig" or your favorite variant and then run
Code:
# make modules
# make modules_install
- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43754
Location: 56N 3W

PostPosted: Sun Oct 04, 2015 11:02 pm    Post subject: Reply with quote

jfranz2,

Maybe.

If you can enable these modules in meunconfig only by setting options to <M> you have a good chance.
If meunconfig forces you to choose between off and built in, then probably not.

Kernel rebulds need not take a long time. Genkernel starts out with make clean, unless you tell it not to, so it has to rebuild everything.
Left to its own devices, make looks at the timestamps on existing binary files and the source files used to build the binary.
If the sources are all older than the binary, make does nothing.

There are a few gotchas along the way. All the parts of the kernel must be compiled with identical versions of gcc. The kernel checks at module load time.
There are a few meunconfig options that give strange broken results if you skip the make clean step but you will notice when you reboot.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
jfranz2
n00b
n00b


Joined: 24 Oct 2014
Posts: 37

PostPosted: Mon Oct 05, 2015 12:00 am    Post subject: Reply with quote

John R. Graham wrote:
Yes you can! :)

Just change the .config with "make menuconfig" or your favorite variant and then run
Code:
# make modules
# make modules_install
- John


Cheers, they're working.

NeddySeagoon wrote:
jfranz2,

Maybe.

If you can enable these modules in meunconfig only by setting options to <M> you have a good chance.
If meunconfig forces you to choose between off and built in, then probably not.

Kernel rebulds need not take a long time. Genkernel starts out with make clean, unless you tell it not to, so it has to rebuild everything.
Left to its own devices, make looks at the timestamps on existing binary files and the source files used to build the binary.
If the sources are all older than the binary, make does nothing.

There are a few gotchas along the way. All the parts of the kernel must be compiled with identical versions of gcc. The kernel checks at module load time.
There are a few meunconfig options that give strange broken results if you skip the make clean step but you will notice when you reboot.


That explains it, my previous kernel build was built by another version of GCC. I will know this for next time.
_________________
#TYBG
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