LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-19-2015, 02:57 PM   #1
linux_walt
Member
 
Registered: Dec 2014
Location: Houston, TX
Distribution: Debian wheezy
Posts: 127

Rep: Reputation: 29
make menuconfig: Do you have to run 'make' every time?


Hello, I'm on my first attempt at configuring a kernel. In the sunxi how-to guide, under 'Tweak config', it says to run this command:
Code:
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig
This works fine for me (if I leave out:ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-). The editor starts up with a configuration file already loaded.

I noticed though, after exiting the configuration editor, that another command was called after I entered 'make menuconfig':
Code:
~/linux-sunxi$ make menuconfig
scripts/kconfig/mconf Kconfig
If I try running this on its own:
Code:
scripts/kconfig/mconf Kconfig
I just get an empty editor, asking which configuration file to load.

Shouldn't 'make menuconfig' need to be run only once? Is there another command to start the editor with your configuration file already loaded?

Last edited by linux_walt; 01-19-2015 at 03:08 PM.
 
Old 01-19-2015, 04:39 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
It's been awhile since I've done this, but I think "make oldconfig" is what you're looking for.
 
1 members found this post helpful.
Old 01-19-2015, 04:52 PM   #3
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Well... there can be several reasons to run it.

If you are ecompiling the kernel from scratch you need it to build the programs.

If you are recompiling the kernel from the menu then you may have modified/patched the kernel... thus you may have added new options, deleted options, or changed dependencies... and you need to rebuild the programs.

The USUAL sequence (starting from scratch):

get an old configuration that you have used...
make oldconfig - this will use the .config file for initial answers, filling in any missing answers with defaults, and removing options that don't exist.
make menuconfig/xconfig/... - is generally used to edit configurations. I use it to look at what is there, and read about the various options.
 
1 members found this post helpful.
Old 01-19-2015, 04:53 PM   #4
linux_walt
Member
 
Registered: Dec 2014
Location: Houston, TX
Distribution: Debian wheezy
Posts: 127

Original Poster
Rep: Reputation: 29
Hi btmiller, that didn't quite work, but thanks for the input. Here is the result of the command:

Code:
~/linux-sunxi$ make oldconfig
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf --oldconfig Kconfig
#
# configuration written to .config
#
I guess using 'make menuconfig' is really that big a deal, it's very fast anyway. I guess I'm more wondering if it should only be used the first time, or always.

My limited knowledge of Linux makes me think that something is getting 'made', and after that it should not be necessary anymore.

Last edited by linux_walt; 01-19-2015 at 05:03 PM.
 
Old 01-19-2015, 04:57 PM   #5
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
I believe that is the correct result of running "make oldconfig".

Since there were no other messages, there are no options that were deleted, nor were there options without answers.

NOTE: Once the command runs, the updated .config file remains. If you did have an actual "old configuration" it is now gone. So to start over you would have to copy the "old configuration" to .config first to wipe out what has already been done.
 
1 members found this post helpful.
Old 01-19-2015, 06:08 PM   #6
linux_walt
Member
 
Registered: Dec 2014
Location: Houston, TX
Distribution: Debian wheezy
Posts: 127

Original Poster
Rep: Reputation: 29
Quote:
Originally Posted by jpollard View Post
Well... there can be several reasons to run it.

If you are ecompiling the kernel from scratch you need it to build the programs.

If you are recompiling the kernel from the menu then you may have modified/patched the kernel... thus you may have added new options, deleted options, or changed dependencies... and you need to rebuild the programs.

The USUAL sequence (starting from scratch):

get an old configuration that you have used...
make oldconfig - this will use the .config file for initial answers, filling in any missing answers with defaults, and removing options that don't exist.
make menuconfig/xconfig/... - is generally used to edit configurations. I use it to look at what is there, and read about the various options.
Ok thank you for that. Was beginning to have a suspicion that maybe the editor needed 'rebuilt' information, just in case you changed something. I am only guessing, but I think the original configuration data came with the board manufacturer's linux-sunxi archive.

Too many suspicions and guesses though (on my part), obviously need to do some more reading (eg 'make menuconfig' and 'make oldconfig'). In the meantime I'll assume that the 'make' command, in one form or another, needs to be used every time. Thanks to you both.

Last edited by linux_walt; 01-19-2015 at 07:45 PM.
 
Old 01-20-2015, 05:58 AM   #7
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
It only needs to be done if you are going to change configuration things. Once the configuration is done, you can make code changes pretty much all you want (as long as it doesn't change the Kconfig files ) without having to redo the configuration pass.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to set make menuconfig to make the small size of kernel? Angela Wu Linux - Kernel 7 06-06-2013 01:12 AM
make: *** No rule to make target 'menuconfig' yussef Debian 10 12-22-2005 09:23 AM
make: *** No rule to make target `menuconfig' Ezzy Linux - Newbie 3 04-21-2005 09:21 AM
Cannot run 'make menuconfig' as user CowboyJ Linux - Newbie 1 09-17-2004 11:00 PM
make xconfig/make menuconfig don't work acidblue Debian 2 07-27-2004 07:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration