Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 99112 - genkernel should provide an option to automagically use an older kernel config
Summary: genkernel should provide an option to automagically use an older kernel config
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-15 07:28 UTC by Philip Lawatsch
Modified: 2005-07-15 13:54 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philip Lawatsch 2005-07-15 07:28:16 UTC
Basically I use a custom kernel config and then use genkernel to build the
kernel and initrd. Now with each new kernel version I have to manually copy
/etc/kernels/old_version to /etc/kernels/new_version in order to have genkernel
use the old config for the new kernel. I do not want to have one default kernel
config (by setting DEFAULT_KERNEL_CONFIG) but simply use the one with the
highest version number (up to the current kernel version but not higher of
course) in /etc/kernels

Reproducible: Always
Steps to Reproduce:
1. make a custom kernel config for kernel 2.6.11
2. install a newer kernel (eg 2.6.12)
3. run genkernel 

Actual Results:  
It used the default config supplied for 2.6.12

Expected Results:  
I'd like to have a switch to automagically use the latest available config, in
my case 2.6.11. Then save this config for 2.6.12 and the next time use the
2.6.12 config

Using genkernel 3.2.5
Comment 1 Chris Gianelloni (RETIRED) gentoo-dev 2005-07-15 11:44:46 UTC
--kernel-config=<file>  Kernel configuration file to use for compilation

There is this option which has been in genkenrel for a *long* time.  Please use it.
Comment 2 Philip Lawatsch 2005-07-15 12:48:13 UTC
Thats not what I asked for. I would like a switch to automatically use the
latest available config. I know that I can specify a config, but this would
still require me to manually specify a config. I'd like to have genkernel use
the latest available config. 
Comment 3 Gustavo Zacarias (RETIRED) gentoo-dev 2005-07-15 13:26:58 UTC
Something like...
genkernel --kernel-config=`ls --sort=time /etc/kernels/config* -1|head -n 1` for
instance?
Come on...
Comment 4 Chris Gianelloni (RETIRED) gentoo-dev 2005-07-15 13:30:58 UTC
Agreed.  This is easily resolvable without modifying genkernel.

I simply don't see this getting anything done on it any time in the near future.  After all, your specification 
is too wide.  What if you have both vanilla-sources and gentoo-sources?  They'll produce differently-
named kernel configs.  How do we determine which is newest?  How do we determine which to use?  
There's just simply too much that *should* be left up to the operator there that could cause errors, which 
would lead to more bugs being filed when genkernel didn't pick the one the user expected.

Essentially, this one is going WONTFIX unless someone provides a suitable patch that is able to account 
for all the possible variations of scenarios created by this.  It's simply too big of a can of worms for us to 
want to open.
Comment 5 Philip Lawatsch 2005-07-15 13:54:00 UTC
genkernel --kernel-config=`ls --sort=time /etc/kernels/config* -1|head -n 1` 

is not a good idea since something similiar failed for me when I tried to
compile an older kernel once. 

Aw, would be a nice feature if implemented correctly imo.

Regarding mixing vanilla and gentoo sources, imo what should be done is 
.) decide which kernel (vanilla or gentoo or something else) one is using (look
at the symlink if thats the only possible solution)
.) get the kernel version + additional gentoo revisions
.) get the "best" kernel config for this kernel from /etc/kernels (the highest
possible version number which is still <= the kernel one wants to compile).

This is imo not easily done by writing a one liner in bash, but proove me wrong
and I'll happily use your one liner ;)

kind regards