View previous topic :: View next topic |
Author |
Message |
Faraclas Tux's lil' helper
Joined: 08 Dec 2014 Posts: 117
|
Posted: Thu Feb 12, 2015 9:59 pm Post subject: Preserving kernel config with new sources [Solved] |
|
|
Every time I get new kernel sources, the configurations from my old sources don't seem to follow it. One example is the WiFi driver (ath9k) which is always missing from new kernel sources when I try to configure them. After reading some documentation, it seems the config should be portable, but I guess I am missing something.
I am using genkernel.
This documenation http://wiki.gentoo.org/wiki/Genkernel#Preserving_the_working_files states
Quote: | Note
There is no need to run make oldconfig with genkernel even if the sources are changed from kernel-genkernel-ARCH-version-gentoo-rx to kernel-genkernel-ARCH-version-gentoo-r(x+1) or from kernel-genkernel-ARCH-version-gentoo to kernel-genkernel-ARCH-(version+1)-gentoo because make menuconfig will try to load the previous configuration into the menu as much as possible. Nevertheless, reviewing each option and new sections carefully is recommended. |
However, with the new sources installed, I tried to run
Code: | genkernel --menuconfig all |
(cause that is the only way I know how to use genkernel) but I got an error message that no .config file was found.
So then I looked at this documentation: http://wiki.gentoo.org/wiki/Kernel/Upgrade#make_silentoldconfig
I copied the .config from the old source into the new /usr/src/linux (I verified the symlink points to the new sources correctly) and then ran
Code: | root #cd /usr/src/linux
root #make silentoldconfig
root# genkernel --menuconfig all |
This built the new kernel but the config options (as mentioned above) were not the same as the old kernel.
What am I doing wrong?
Last edited by Faraclas on Thu Feb 19, 2015 5:29 pm; edited 1 time in total |
|
Back to top |
|
|
John R. Graham Administrator
Joined: 08 Mar 2005 Posts: 10587 Location: Somewhere over Atlanta, Georgia
|
Posted: Thu Feb 12, 2015 10:08 pm Post subject: |
|
|
genkernel has its own canned configurations which it uses unless you include --oldconfig on the command line. You can make this setting permanent with the OLDCONFIG option in /etc/genkernel.conf. I also like setting CLEAN=no in there.
- John _________________ I can confirm that I have received between 0 and 499 National Security Letters. |
|
Back to top |
|
|
Faraclas Tux's lil' helper
Joined: 08 Dec 2014 Posts: 117
|
Posted: Thu Feb 12, 2015 11:12 pm Post subject: |
|
|
Thanks for the info. I opened up my /etc/genkernel.conf and it looks like these things were already set. Here is the beginning of the file.
Code: | # Configuration file for genkernel
# This file is sourced by genkernel at startup and determines which options
# we will be using to compile our kernel. The order of precidence is simple,
# with the internal settings being least important, configuration file
# settings next, and command line options being most important.
# =========Common Command Line Option Defaults=========
# Should we install to $BOOTDIR? Default is "no" because genkernel is used in
# catalyst and stage building.
#INSTALL="yes"
# Run 'make oldconfig' before compiling this kernel?
OLDCONFIG="yes"
# Run 'make menuconfig' before compiling this kernel?
MENUCONFIG="no"
# Run 'make nconfig' (ncurses 'menuconfig') before compiling this kernel?
NCONFIG="no"
# Note, that two previous lines are mutual exclusive (logically), while
# MENUCONFIG has a higher priority if both them is enabled.
# Run 'make clean' before compilation?
# If set to NO, implies MRPROPER WILL NOT be run
# Also, if clean is NO, it won't copy over any configuration
# file, it will use what's there.
CLEAN="yes" |
|
|
Back to top |
|
|
John R. Graham Administrator
Joined: 08 Mar 2005 Posts: 10587 Location: Somewhere over Atlanta, Georgia
|
Posted: Thu Feb 12, 2015 11:40 pm Post subject: |
|
|
Read your own post.
Code: | # Also, if clean is NO, it won't copy over any configuration
# file, it will use what's there.
CLEAN="yes" | - John _________________ I can confirm that I have received between 0 and 499 National Security Letters. |
|
Back to top |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3131
|
Posted: Fri Feb 13, 2015 7:59 pm Post subject: |
|
|
you might also want to copy /etc/kernels/<your last kernel config> as /usr/src/linux/.conf |
|
Back to top |
|
|
Faraclas Tux's lil' helper
Joined: 08 Dec 2014 Posts: 117
|
Posted: Fri Feb 13, 2015 11:48 pm Post subject: |
|
|
Thanks again.
Changed CLEAN=no and will try the copy from /etc/kernels/<> on the next go 'round. |
|
Back to top |
|
|
Faraclas Tux's lil' helper
Joined: 08 Dec 2014 Posts: 117
|
Posted: Wed Feb 25, 2015 5:03 pm Post subject: |
|
|
I just pulled the latest gentoo sources and this method indeed worked great. thanks again for the help! |
|
Back to top |
|
|
vasettoo Tux's lil' helper
Joined: 11 Nov 2012 Posts: 97
|
Posted: Thu Feb 26, 2015 3:04 pm Post subject: |
|
|
I am using a different approach - to be on the safe side I use config file(s) from /etc/kernels directory with genkernel:
Code: | genkernel --menuconfig --kernel-config=/etc/kernels/<"choose kernel config here"> all |
This way compiling can be done on previous config options for ease. |
|
Back to top |
|
|
|