LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Automatic kernel configuration tool? (https://www.linuxquestions.org/questions/programming-9/automatic-kernel-configuration-tool-128666/)

MartinN 12-24-2003 12:36 PM

Automatic kernel configuration tool?
 
Hi!

I just lived through the configuration of the 2.6 kernel (it's currently compiling on a machine behind my back). There were like 500 different questions and I was quite fed up towards the end.

Then it crossed my mind: most of the questions are already known to the system! (What CPU, which chipset, what NIC etc). I'd say that half of those questions can be answered by probing the system!

Question 1: Does any tool for that exist already? I thought that you could run the tool and it would probe your hardware and spit out a .config file that only needs some tuning by me.

Question 2: If (false==Q1), how do I set up a project to make that tool? I want to do it in co-operation with others, since I don't know much about probing hardware.

Question 3: Anyone want's to give a helping hand? (Sometime after the holidays.)

Regards
Martin

andrew001 12-24-2003 01:35 PM

On 2.4.x systems there was a 'make oldconfig' option. This loaded up the current kernel configuration, and then prompted you for any new features.

Also 'make menuconfig' uses an ncurses based menu system to make the configuration process a lot easier.

~Andrew

h/w 12-24-2003 10:17 PM

umm, if you have compiled your kernel before, you will find a ".config" file under the src tree. you'll have to do a "ls -a" to see it.
so, basically you need to set things only the first time, and load it everytime later. i normally save my config file in my home dir (along with all my kernel src trees), and i only have to "load stored config file", and "make".
i personally use menuconfig instead of Xconfig, as it is definitely faster for me while im enabling/disabling options.

also, about the tool - well, you wouldnt be able to install linux or any OS, if it werent able to probe and set the various requirements in the first place. im not sure, but i think that "first" .config which was used during "first"-install can be found under /boot (try ls -a). and well, just load that up when ur compiling your new kernel, and check/uncheck whatever u think is required/not required.

MartinN 12-25-2003 01:21 AM

Hi!

Thanks for the replies. I compiled the 2.6 kernel and I didn't think that it would be possible to use a 2.4 .config file. That's why I used 'make xconfig'. The default settings for everything (fresh for kernel.org) were for P4 and a lot of other settings that my Pentium classic wouldn't have cared much for.

Do you (h/w) say that a .config file is generated during install? I have to look into that.

Regards
Martin

h/w 12-26-2003 02:47 PM

the keyword being 'im not sure, but...' :)
yeah, check /boot and see if there is a .config after u first install a system.
and theres normally enough changes between kernel upgrades (like, 2.4 -> 2.6) for you to warrant a look at all the options.

infamous41md 12-26-2003 03:45 PM

or just do "find / -iname '.config' 2>/dev/null"

david_ross 12-26-2003 05:53 PM

The .config file is created during the config stage regarless of whether you use a gui or menus or prompts. After the config is done you can copy the .config fiel from the source dir to a safe location. Most people put it in /boot and give it the name of their kernel - ie:
/boot/kernel-2.6-xyz

If you use your 2.4 config file it should use those values and AFAIK the defaults for anything new. When you copy the .config file to your source tree do it just after "make mrproper" or it will be deleted.


All times are GMT -5. The time now is 12:47 AM.