Click to See Complete Forum and Search --> : .config can I edit it?


pjo123
07-10-2004, 07:01 AM
I'm about to upgrade to the latest kernel for mandrake 10.

Currently there's 1 thing thats started in the original .config file that I need to be removed.

after I've copied the .config file over(following instructions I've found) using

cp /usr/src/linux-curentkernelversion/.config /usr/src/linux/

can I simply change the line in the .config file to read =n instead of =m or can I coment it out or have I got to recreate a whole new .config file?

If I have to recreate a whole new .config file, will pressing return at various options accept the default setting or do I need to print out all 46 pages of the .config file to make sure I'm setting it up exactly right?

best

Phil

Hayl
07-10-2004, 08:28 AM
well, first thing you should do when you copy over a kernel .config is to run (from /usr/src/linux) make oldconfig, this will merge any new options in the new kernel source tree into the old .config file you copied over.

to answer your question, yes, you can change a y or an m to an n in the file.

yes, enter selects the default (upper case) setting for each option (you will get this for any new options not in the old .config when you run make oldconfig).

bwkaz
07-10-2004, 08:58 AM
You can edit .config, but after you do that, you MUST run make *config (for some value of * -- either old, menu, x, q, or nothing).

The reason is that the kernel doesn't actually read the .config file while it's building itself. It only reads that file when you run one of the config options. It uses that file to create a bunch of other files (include/linux/autoconf.h, and others that get included in all the Makefiles) that control the build process.

So if you run make oldconfig to merge the .config that you copied into the new configuration of the kernel (it will ask you only about options that have been added), and then edit .config, your manual edits won't be used during the actual build. You need to edit .config first.

(Normally, instead of setting stuff to N in .config, you are supposed to comment the relevant line out. For example:

CONFIG_ACPI=y
# CONFIG_ACPI_BATTERY is not set
CONFIG_ACPI_BUTTON=m

pjo123
07-10-2004, 01:09 PM
Brilliant.

Many thanks both of you.

best

Phil