Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 02-01-2013, 01:15 AM   #1
Michal Krzyz
Registered: Nov 2011
Distribution: OpenBSD, Ubuntu, Debian, Slackware, LFS
Posts: 44

Rep: Reputation: Disabled
Linux kernel compilation - How to make it automated.

I have a problem with automation of my kernel compilation. I know that I have to do following steps:

make mrproper
make menuconfig # or make oldconfig/xconfig
make modules_install

Mentioned steps are impossible to execute in automated script due to make menuconfig interactive step.

Thing is that I did menuconfig once, and I copied .config file to my home directory. I do not want to make menuconfig again and either I do not want to load .config from external file using ncurses interactive window. I just want to make in automated script...How can I do that?

I am thought about replacing default .config after make defaultconfig. But I am not sure that this is good solution.

Thanks in Advance

Last edited by Michal Krzyz; 02-01-2013 at 01:17 AM.
Old 02-01-2013, 02:17 AM   #2
Registered: Nov 2007
Location: Vinsobres - Drome - France
Distribution: SuSE Linux 11.3
Posts: 152

Rep: Reputation: 19
've a look on "make oldconfig " it will do the job !
Old 02-01-2013, 04:01 AM   #3
Michal Krzyz
Registered: Nov 2011
Distribution: OpenBSD, Ubuntu, Debian, Slackware, LFS
Posts: 44

Original Poster
Rep: Reputation: Disabled
yeah, I tried oldconfig, but it is making interactive questions like: Do you want to use......(y/n) and so on (stopping my scripts).
In oldconfig I use .config generated by make menuconfig and maybe this is a problem. I havent try to answer oldconfig's questions and save generated .config file for later use (by oldconfig). Do you think that it could work? Do you know if it will stop asking questions?
Old 02-01-2013, 07:12 AM   #4
Senior Member
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,704

Rep: Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270
If your configuration file doesn't change there is no need for the first two commands (make mrproper
make menuconfig/make oldconfig/xconfig).

The first one fills out any missing/obsolete options, the second one is used for changing existing options.

Since you are not changing anything, and already have a set configuration, you can skip these steps.

The rest of the steps are always the same, and no interaction called for (handling proper exist status is still necessary - you don't want to install a partial kernel/module and wipe out a working one).


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] Kernel compilation: make vs make-kpkg derchris Ubuntu 1 03-15-2011 10:25 AM
make-kpkg kernel compilation issues 1337ln Debian 3 07-27-2007 05:57 PM
kernel compilation:throwing error related with sound during "make bzImage" b0nd Linux - Newbie 1 08-19-2005 09:16 AM
Kernel compilation "make dep" error lord_clarence Red Hat 3 10-17-2003 09:41 AM
Kernel compilation (make rpm) Thetargos Red Hat 0 08-31-2003 03:35 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:01 PM.

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