Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 201472

Summary: genkernel uses /etc/kernels/<config file> instead of --menuconfig settings
Product: Gentoo Hosted Projects Reporter: Francisco Lloret <fcolloret>
Component: genkernelAssignee: Gentoo Genkernel Maintainers <genkernel>
Status: RESOLVED INVALID    
Severity: major    
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Francisco Lloret 2007-12-06 10:48:30 UTC
I don't use initram, then i always compile kernel usign:

genkernel kernel --menuconfig.

When i use genkernel in order to compile the kernel, i use the save to file option to make a copy of config file in /root.

If i use genkernel to compile the kernel adding a new module, it not compile.

For example, i have kernel compiled without STV pencam support.
Then i do:

# genkernel kernel --menuconfig

I use the "Load an Alternate Configuration File" option to load the old config file, i add the new module support (STV680) and then i use the "Save an Alternate Configuration File". Then i exit and then, when the kernel is compiling, i found that

# cat /root/config-kernel-2.6.23-r3|grep STV
CONFIG_USB_STV680=m
# CONFIG_DVB_STV0299 is not set
# CONFIG_DVB_STV0297 is not set

but:

# cat /usr/src/linux/.config|grep STV
# CONFIG_USB_STV680 is not set
# CONFIG_DVB_STV0299 is not set
# CONFIG_DVB_STV0297 is not set

The /etc/kernels/<configfile> also contains
# CONFIG_USB_STV680 is not set
# CONFIG_DVB_STV0299 is not set
# CONFIG_DVB_STV0297 is not set

the only way i found in order to compile the module is delete the .config file in /usr/src/linux (i use a make mrproper in order to delete all) and then copy my root/config-kernel-2.6.23-r3 file in /etc/kernels/kernel-config-x86-2.6.23-gentoo-r3, and then use

genkernel --kernel

without the --menuconfig option ir order to compile

Reproducible: Always

Steps to Reproduce:
1. cd /usr/src/linux (this is your currently running kernel)
2. genkernel kernel --menuconfig
3. add a new module support (for example, a STV680 pencam or a ps2mouse)
4. use the "Save an Alternate Configuration File" to make a backup copy or the configuration.
5. exit and compile. The new module is not compiled. The .config file in /usr/src/linux don't have support for the new module.
Comment 1 Andrew Gaffney (RETIRED) gentoo-dev 2007-12-06 12:53:01 UTC
When you use "save an alternate configuration file", genkernel has no way to know you've done that. All it sees is /usr/src/linux/.config, which is the file it originally copied from /etc/kernels/. Just back up the new kernel config *after* the kernel is built.