.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 |
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.
|
Quote:
|
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. |
Quote:
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. |
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. |
Quote:
|
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 |
Quote:
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. |
When using menuconfig there is in option inside to load your old config.
|
From NX5000
Quote:
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. |
Quote:
I see no check on kernel version prior to automatically calling make oldconfig in case of new .config. :scratch: Anyway, it's a detail.. |
Quote:
Is that correct? |
Quote:
|
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. |