LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   How to exit and save (or just to exit) inside a "make config" running command? (https://www.linuxquestions.org/questions/linux-kernel-70/how-to-exit-and-save-or-just-to-exit-inside-a-make-config-running-command-667610/)

scrat75 09-04-2008 03:18 PM

How to exit and save (or just to exit) inside a "make config" running command?
 
Hi guys,

I'm a newbie, and I'm reading the good book "Linux Kernel in a Nutshell".

I'm reading chapter 4, that explains how to configure and build the
kernel. The author Greg Hartman explains how to build the configuration file .config using the "make config" command, starting from a vanilla
kernel downloaded from kernel.org site.

My question is: Which command should I use to save the choices for the
option group made and to exit? Or which command only to exit discarding
the job?

Thanks in advance for your answers and for your help!

irishbitte 09-04-2008 04:22 PM

try the key combination ctrl+c, this will close any program running in the console.

Quakeboy02 09-04-2008 04:38 PM

Normally, you would "cp /boot/config-`uname -r` .config" (note the back-quotes) and then run "make oldconfig" on that to set the new options. If you're just wanting to make a config from scratch, the easiest is probably "make menuconfig". In menuconfig, use the arrow keys and enter key to navigate. When you choose enough exits, it'll ask you whether you want to save or not.

scrat75 09-04-2008 04:54 PM

Thanks Quakeboy02 for your suggestions,
but how to save and exit when using only "make config"? It's not so important,
it's just to satisfy my curiosity in the case using only "make config", even
if your method ("cp /boot/config-`uname -r` .config" and the "make oldconfig")
is certainly better!

scrat75 09-04-2008 04:56 PM

Thanks irishbitte!,

but if I press ctrl-c, then "make config" terminates without saving my previous
choices..

Quakeboy02 09-04-2008 05:50 PM

Quote:

Originally Posted by scrat75 (Post 3269872)
Thanks Quakeboy02 for your suggestions,
but how to save and exit when using only "make config"?

As is often the case, the easiest thing to do is to just run the thing. "make config" is a text based config file generator. It steps you through each individual config option, all the way through to the end. There is no method, that I can see, to exit and save an incomplete config file. I believe it is meant to be run through to completion.

irishbitte 09-05-2008 04:02 PM

Hi scrat,

As quakeboy says, the easiest thing to do is run the thing. even if you manage to save where it stops, it may not run again from there. Try running

Code:

make config
when you're going to bed for a few hours or something! ctrl+c just kills the program running in console, and dumps everything from memory, so it won't ever save what you've done.
hope that helps!


All times are GMT -5. The time now is 11:02 PM.