Recompiling gentoo kernel

Umberger

Golden Member
Apr 13, 2005
1,710
0
76
I recently installed gentoo (stage 3) on my laptop. I compiled the kernel using genkernel, but I now find that although ACPI was enabled, "AC Adaptor" and "Control Method Battery" were not complied into the kernel. I have everything else set up like I want it, and I just want to recompile these 2 options into the kernel, but I really don't want to have to go select everything by hand that genkernel already did for me. Is there any way to recompile the kernel with the existing options, and just add 2 more?
Thanks folks.

edit: it's a 2.6 kernel, in case that makes a difference.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Read the readme that comes with the kernel source. I think it mentions how to do this.
 

sourceninja

Diamond Member
Mar 8, 2005
8,805
65
91
yea, just copy your .config file to /usr/src/linux (if its not already there) and type make menuconfig it always keeps all my options. You could of course use make oldconfig if you wanted. Every kernel upgrade in the 2.6.12.X branch I've just copied my config from /boot to /usr/src/linux and typed make menuconfig, set it up and then compiled it.

Are you sure you didn't already compile them as modules? Your best bet is to compile things you are unsure if you need as modules and load em up later if you need them. Its very rare that you should actually need to compile something directly into the kerenel. (although I use do my root filesystem and boot filesystem into the kerenl, but most everything else is module. This makes it easier to trouble shoot problems later.
 

Umberger

Golden Member
Apr 13, 2005
1,710
0
76
Originally posted by: sourceninja
yea, just copy your .config file to /usr/src/linux (if its not already there) and type make menuconfig it always keeps all my options. You could of course use make oldconfig if you wanted. Every kernel upgrade in the 2.6.12.X branch I've just copied my config from /boot to /usr/src/linux and typed make menuconfig, set it up and then compiled it.

Are you sure you didn't already compile them as modules? Your best bet is to compile things you are unsure if you need as modules and load em up later if you need them. Its very rare that you should actually need to compile something directly into the kerenel. (although I use do my root filesystem and boot filesystem into the kerenl, but most everything else is module. This makes it easier to trouble shoot problems later.

so what you are saying, is that the .config file will set all the menu options as they were when genkernel made everything up? so i can just change only what i need to add?

edit: and no, i dont think they got compiled as modules. i got lazy and let genkernel make everything up on its own. i wish i hadn't.
 

P0ldy

Senior member
Dec 13, 2004
420
0
0
Originally posted by: Umberger
so what you are saying, is that the .config file will set all the menu options as they were when genkernel made everything up? so i can just change only what i need to add?
Yes, that should be all there is to it. Whenever I recompile a Gentoo kernel (haven't compiled any other kernels), all the options that were checked or unchecked from before are still there. It's not a from-scratch process every time. But I used gentoo-sources too... I doubt it makes any difference, though.
 

sourceninja

Diamond Member
Mar 8, 2005
8,805
65
91
Genkernel did it? It compiles everything as modules. every choice. So you do have it, just add it to your modules.autoload.d/kerenl-2.6

For example. Mine looks like this