LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   .config file for new kernels (https://www.linuxquestions.org/questions/debian-26/config-file-for-new-kernels-407097/)

kushalkoolwal 01-23-2006 04:53 PM

.config file for new kernels
 
Whenever we try to download new kernel version sources and do a make xconfig/menuconfig, is there a sample .config file that also comes along with the kernel sources?

For example, suppose I decide to go from kernel 2.6.8 to 2.6.15, should I just copy my old .config file (2.6.8) to the /usr/src/linux-source-2.6.15 and do the make xconfig? are there any disadvantages of this approach? Also do we get all the new options which the new kernel has(2.6.15) even though we use the old .config file(2.6.8) to generate the new .config file(2.6.15) after doing make xconfig?

Thanks

jschiwal 01-23-2006 05:05 PM

Start with your old .config file and use "make oldconfig". This will take your old .config options, and query about any new options in the new kernel.

kushalkoolwal 01-23-2006 05:34 PM

Quote:

Originally Posted by jschiwal
Start with your old .config file and use "make oldconfig". This will take your old .config options, and query about any new options in the new kernel.

Thanks. So do you mean after using the command make oldconfig, I should do make xconfig/menuconfig and carry out the normal kernel compilation process that I had been doing so?

jschiwal 01-23-2006 05:57 PM

Yes, you can do that. Perhaps you don't want to compile in a feature in your old kernel. The "old" in this case will be the features you selected in xconfig. The main purpose of "make oldconfig" is to pickup different options between kernel versions.

Look in the documentation directory in the kernel source. It will have files explaining the process, as well as documentation on drivers. There is a make target to produce printable documentation of some of these documents. I don't remember for sure if it is "make dvi" or "make pdf". Actually, if there is a "make pdf" target, it produces the .dvi files and uses a program to convert to pdf.

It might be the case that the documentation is packaged separately, such as a "kernel-doc" RPM. But if you downloaded the standard kernel tarball from the web, they should be present.

kushalkoolwal 01-23-2006 06:06 PM

Quote:

Originally Posted by jschiwal
Yes, you can do that. Perhaps you don't want to compile in a feature in your old kernel. The "old" in this case will be the features you selected in xconfig. The main purpose of "make oldconfig" is to pickup different options between kernel versions.

Look in the documentation directory in the kernel source. It will have files explaining the process, as well as documentation on drivers. There is a make target to produce printable documentation of some of these documents. I don't remember for sure if it is "make dvi" or "make pdf". Actually, if there is a "make pdf" target, it produces the .dvi files and uses a program to convert to pdf.

It might be the case that the documentation is packaged separately, such as a "kernel-doc" RPM. But if you downloaded the standard kernel tarball from the web, they should be present.


Thanks for giving a detail explanation. I still have one question. What are the steps by which I can retain my old kernel options(ofcourse which are not deprecated) and configure the new ones? Does make oldconfig and make xconfig will take care of this situation. I am a bit confused.

thanks once again.

jschiwal 01-24-2006 12:20 AM

Yes, make old config is for recycling your old options. When you are finished, the .config file will reflect the changes you made. These changes are picked up by make xconfig when it loads in the .config file.

If you have a /proc/config.gz file, you can run "make cloneconfig" instead. This target will first create a .config file based on your running kernel, and then start "make oldconfig". When you run "make xconfig", you could also load in the .config file just to assure yourself that you are now incorporating the changes so far.

kushalkoolwal 01-24-2006 12:43 AM

Quote:

Originally Posted by jschiwal
Yes, make old config is for recycling your old options. When you are finished, the .config file will reflect the changes you made. These changes are picked up by make xconfig when it loads in the .config file.

If you have a /proc/config.gz file, you can run "make cloneconfig" instead. This target will first create a .config file based on your running kernel, and then start "make oldconfig". When you run "make xconfig", you could also load in the .config file just to assure yourself that you are now incorporating the changes so far.

Excellent. That was good to know. :)

nx5000 01-24-2006 01:40 AM

Its even easier:
copy an old .config to the kernel source tree root
and do the usual
make config/menuconfig/xconfig/
to configure your new things

It will automagically launch silentoldconfig because .config is a new file

kushalkoolwal 01-25-2006 04:50 PM

Quote:

Originally Posted by nx5000
Its even easier:
copy an old .config to the kernel source tree root
and do the usual
make config/menuconfig/xconfig/
to configure your new things

It will automagically launch silentoldconfig because .config is a new file


By old .config do you mean .config file of my old kernel or some other .config file of the new kernel that I am going to configure.

I used to do the same, what you suggested above, before but some time s I was not able to see the newer option in the kernel with the old .config file.

greenmeanie 01-25-2006 06:45 PM

When using menuconfig there is in option inside to load your old config.

jschiwal 01-25-2006 10:20 PM

From NX5000
Quote:

copy an old .config to the kernel source tree root
If the kernel versions are different, then you need to run "make oldconfig" so that you can pick up the differences.
The "make cloneconfig" will start out with the features of the running kernel and start "make oldconfig" automatically.
If you start out with an old .config, some features will be missing.

nx5000 01-26-2006 03:12 AM

Quote:

Originally Posted by jschiwal
From NX5000


If the kernel versions are different, then you need to run "make oldconfig" so that you can pick up the differences.

If you start out with an old .config, some features will be missing.

On my box (which is a standard kernel tree), if I copy a 2.6.14 .config onto my 2.6.16-rc1 and then run make menuconfig, I have all options, and I can use the ncurses menu. I don't loose anything, if I set them properly.
I see no check on kernel version prior to automatically calling make oldconfig in case of new .config.
:scratch:
Anyway, it's a detail..

kushalkoolwal 01-26-2006 04:37 PM

Quote:

Originally Posted by nx5000
On my box (which is a standard kernel tree), if I copy a 2.6.14 .config onto my 2.6.16-rc1 and then run make menuconfig, I have all options, and I can use the ncurses menu. I don't loose anything, if I set them properly.
I see no check on kernel version prior to automatically calling make oldconfig in case of new .config.

So I guess the conclusion is if I copy my 2.6.14 .config file to the 2.6.16-rc1 kernel source as .config, and If I run make menuconfig/xconfig, I would get all the new options of the kernel plus the setting of the old kernel.

Is that correct?

dmartins 01-26-2006 10:26 PM

Quote:

Originally Posted by kushalkoolwal
So I guess the conclusion is if I copy my 2.6.14 .config file to the 2.6.16-rc1 kernel source as .config, and If I run make menuconfig/xconfig, I would get all the new options of the kernel plus the setting of the old kernel.

Is that correct?

Yes, from my experience, that's the way it seems to work.

jschiwal 01-27-2006 06:20 AM

No, No, No! If you start out with a different version of a .config file, You need to run "make oldconfig". That what it is designed for. And it also can function as a safety check so that you haven't missed anything. Kernel programs will simply edit the .config file in a text editor. But then they will run "make oldconfig" to check that they didn't make mistakes or leave anything out. You can run "make xconfig" afterwards, or before, but make sure you run "make oldconfig" once. It makes the most sense to do it first to catch the different options between kernel versions.


All times are GMT -5. The time now is 07:42 PM.