LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 07-08-2015, 07:55 AM   #1
Regenerator
LQ Newbie
 
Registered: Jul 2015
Posts: 7

Rep: Reputation: Disabled
.config and menuconfig


Hi Folks,
I'm cross-compiling on a Ubuntu (AMD64) system for an iMX6.
If I run my make command based on a .config file (which I have a copy of) it all builds fine. Now I want to change the kernel a bit so I run make menuconfig - this pulls in .config yes?
If I change the slightest thing, then when I then go to run the make it asks me about every (NEW) feature again.
Surely the Kbuild uses the old working .config as a starting point? Why does it then fail?
 
Old 07-08-2015, 08:04 AM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 8,439
Blog Entries: 13

Rep: Reputation: 3760Reputation: 3760Reputation: 3760Reputation: 3760Reputation: 3760Reputation: 3760Reputation: 3760Reputation: 3760Reputation: 3760Reputation: 3760Reputation: 3760
If you're manually editing your .config, then you don't need to run make menuconfig or make config, just "make" and it will use the .config file it has. I'm old fashioned in that I always manually edit my .config file.
 
Old 07-08-2015, 08:31 AM   #3
Regenerator
LQ Newbie
 
Registered: Jul 2015
Posts: 7

Original Poster
Rep: Reputation: Disabled
Thanks for your tip.
If I manually edit the top directory .config file, then do the make, the .config file is over-written and my change removed. Is there another file that I should be editing?
 
Old 07-08-2015, 08:35 AM   #4
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 8,439
Blog Entries: 13

Rep: Reputation: 3760Reputation: 3760Reputation: 3760Reputation: 3760Reputation: 3760Reputation: 3760Reputation: 3760Reputation: 3760Reputation: 3760Reputation: 3760Reputation: 3760
Sounds like it's making a default configuration each time you run the make. I'd check the Makefile to determine if it is doing something like "make defconfig" or any other form of make config action. And you're not using anything like bitbake are you?
 
Old 07-08-2015, 08:37 AM   #5
cynwulf
Senior Member
 
Registered: Apr 2005
Posts: 2,413

Rep: Reputation: Disabled
make menuconfig will probably also invoke make oldconfig - not 100 sure on that... but it would appear so in your case.

Try the following:

1. Copy over your .config to the kernel source tree
2. Run "make oldconfig" and answer all the questions / hold down the enter key
3. If all is well consider using this config in place of the original from now on (but keep the original just in case)
4. Run "make menuconfig" and make your changes
5. Build the kernel
 
Old 07-08-2015, 09:07 AM   #6
Regenerator
LQ Newbie
 
Registered: Jul 2015
Posts: 7

Original Poster
Rep: Reputation: Disabled
Yes, the Makefile calls silentoldconfig.
The makefile compares my .config with include/config/auto.conf to see if it has been changed and then runs silentoldconfig presumably to sanity check it.
So perhaps I need to run through make oldconfig once to answer all the questions, then it might behave.

Thanks for your tips.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 automatically use alternative config file for make menuconfig? AustinMarton Linux - Kernel 5 08-15-2013 04:10 PM
Menuconfig+load alternate config file option gauravholey Linux - Kernel 1 07-03-2009 02:51 AM
menuconfig doesn't like my .config lowbrow Debian 6 11-13-2007 09:14 PM
Problems compiling a Kernel (make config/menuconfig) Janusz11 Slackware 5 08-15-2005 05:40 PM
Mapping the items in .config to the menu in make menuconfig alice95089 Linux - Software 1 03-12-2005 07:55 AM

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

All times are GMT -5. The time now is 09:09 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration