LinuxQuestions.org
Review your favorite Linux distribution.
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 12-06-2004, 02:28 PM   #1
Steerpike
LQ Newbie
 
Registered: Nov 2004
Location: Walnut Creek, CA
Posts: 29

Rep: Reputation: 15
What is 'cloneconfig'


In researching a vmWare problem (after installing suse 9.2 as a vmWare guest, I'm struggling to get vmtools to install into the guest OS), I see many references to 'make cloneconfig'. What is this step actually 'doing', and what is the reason one would do this?

I've searched extensively, and all the hits seem to be similar - running 'make cloneconfig' is the recommended step to sove problems in SUSE regarding (primarily) vmtools. But no one seems to say what it does, or why one would do it.

Insight appreciated!

Thanks.
 
Old 12-09-2004, 10:50 AM   #2
iluvatar
Member
 
Registered: Jul 2003
Location: netherlands
Distribution: debian
Posts: 403

Rep: Reputation: 30
if you want to compile a kernel wich is almost identical to the current running (or exactly identical) you can do 'make cloneconfig' in the new kernel source directory to clone the config of the running kernel into the configuration for the new kernel build. hope this clears up something.

greetz,
.-=~ iluvatar ~=-.
 
Old 12-09-2004, 02:37 PM   #3
cjcox
Member
 
Registered: Jun 2004
Posts: 306

Rep: Reputation: 42
SUSE includes a kernel feature (that really should be in all dists) that stores your kernel configuration as part of the kernel in compressed form. It can be found at /proc/config.gz

Doing a "make cloneconfig" from the kernel source dir basically preps the .config file for building from the values found in /proc/config.gz.

Usually, this is followed by a "make prepare-all" which will then allow you to build external modules without having to build the entire kernel source.

So for VMware:

# cd /usr/src/linux
# make cloneconfig
# make prepare-all
# vmware-config.pl

You'll need to repeat these steps ANYTIME the kernel gets updated (e.g. YaST Online Update - YOU - might want to update the kernel). You'll want to reboot the machine after the new kernel is in place and then follow the 4 instructions above. Same for the Nvidia proprietary drivers... you want to do the 1st three steps before executing the Nvidia drivers installation. If you've already done the cloneconfig/prepare-all for one module, you don't need to repeat it... only need to do this when the kernel gets updated (perhaps this could have been worded better).
 
Old 12-09-2004, 08:22 PM   #4
Steerpike
LQ Newbie
 
Registered: Nov 2004
Location: Walnut Creek, CA
Posts: 29

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by cjcox
SUSE includes a kernel feature (that really should be in all dists) that stores your kernel configuration as part of the kernel in compressed form. It can be found at /proc/config.gz

I just installed 9.1Free, and then did a 'YOU' (yast online update) and updated everything.

looking at /proc/config,gz, I see a date/time of Dec 9 2004 - 'now' - thus, updated by YOU.

looking at /usr/src/linux (which points to usr/src/linux-2.6.4-52), I see .config with a date of Apr 6 2004 - presumably corresponds to the original build date of the kernel found on the 9.1Free FTP site. Files in the /usr/src/linux/... structure are a mixture of dates from Apr 6 and Dec 9, suggesting misc. updates are applied.

So ... does this mean that my '.config' is now out of date, and any attempt to build any external modules will fail?

If this concept is unique to suse, then how do you build external modules for other distributions? Presumably you have to build (rebuild) the entire kernel (from) source.

Quote:
Doing a "make cloneconfig" from the kernel source dir basically preps the .config file for building from the values found in /proc/config.gz.

Usually, this is followed by a "make prepare-all" which will then allow you to build external modules without having to build the entire kernel source.

So for VMware:

# cd /usr/src/linux
# make cloneconfig
# make prepare-all
# vmware-config.pl
if this practice is not consistent across distributions, then why would vmware's script be affected by the correctness/otherwise of the .config file? In other words, why isn't vmware's script simply rebuilding everything since that's what has to happen on other distributions?

A related question ... so video drivers are considered 'external modules' in linux?

Quote:

You'll need to repeat these steps ANYTIME the kernel gets updated (e.g. YaST Online Update - YOU - might want to update the kernel). You'll want to reboot the machine after the new kernel is in place and then follow the 4 instructions above. Same for the Nvidia proprietary drivers... you want to do the 1st three steps before executing the Nvidia drivers installation. If you've already done the cloneconfig/prepare-all for one module, you don't need to repeat it... only need to do this when the kernel gets updated (perhaps this could have been worded better).
Thanks for the great explanation ... it's starting to sink in!

====UPDATE=======
I installed gcc and make, and ran 'make cloneconfig'. This is the output:

Code:
linux:/usr/src/linux # make cloneconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/basic/split-include
  HOSTCC  scripts/basic/docproc
-include /var/adm/running-kernel.make

The .config file is a merged configuration; please remove it by hand before creating your own. You can use one of the files arch/i386/defconfig.* as a template.

make[1]: *** [check-meta] Error 1
make: *** [cloneconfig] Error 2
Do I just follow these instructions - delete or rename my current .config file - or is this indicative of a more sinister problem? Thanks!

===========ANOTHER UPDATE ============
I decided to delete (rename) .config, and rerun the make command. This time, I get this:

Code:
linux:/usr/src/linux # make cloneconfig
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/mconf.o
  HOSTCC  -fPIC scripts/kconfig/zconf.tab.o
  HOSTLLD -shared scripts/kconfig/libkconfig.so
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf -o arch/i386/Kconfig
drivers/char/lirc/Kconfig:102:warning: 'select' used by config symbol 'LIRC_SIR' refer to undefined symbol 'LIRC_SIR_IRDA'
#
# using defaults found in .config
#
.config:37: trying to assign nonexistent symbol CKRM_TYPE_TASKCLASS
.config:38: trying to assign nonexistent symbol CKRM_RES_NUMTASKS
.config:39: trying to assign nonexistent symbol CKRM_TYPE_SOCKETCLASS
.config:40: trying to assign nonexistent symbol CKRM_RBCE
...
... [many similar messages, deleted from this post]
...
.config:2830: trying to assign nonexistent symbol ICA_LEEDSLITE
*
* Linux Kernel Configuration
*
*
* Code maturity level options
*
Prompt for development and/or incomplete code/drivers (EXPERIMENTAL) [Y/n/?] y
  Select only drivers expected to compile cleanly (CLEAN_COMPILE) [Y/n/?] y
  Select only drivers that don't need compile-time external firmware (STANDALONE) [N/y/?] n
*
* General setup
*
Support for paging of anonymous memory (swap) (SWAP) [Y/n/?] y
System V IPC (SYSVIPC) [Y/n/?] y
BSD Process Accounting (BSD_PROCESS_ACCT) [Y/n/?] y
Sysctl support (SYSCTL) [Y/n/?] y
Kernel log buffer size (16 => 64KB, 17 => 128KB) (LOG_BUF_SHIFT) [17] 17
Support for hot-pluggable devices (HOTPLUG) [Y/n/?] y
Event logging support (EVLOG) [Y/n/?] y
  Forward printk messages to event log (EVLOG_FWPRINTK) [N/y/?] n
Kernel .config support (IKCONFIG) [Y/n/?] y
  Enable access to .config through /proc/config.gz (IKCONFIG_PROC) [Y/n/?] y
*
* Remove kernel features (for embedded systems)
*
Remove kernel features (for embedded systems) (EMBEDDED) [N/y/?] n
Enable delay accounting (EXPERIMENTAL) (DELAY_ACCT) [Y/n/?] y
*
* Loadable module support
*
Enable loadable module support (MODULES) [Y/n/?] y
  Module unloading (MODULE_UNLOAD) [Y/n/?] y
    Forced module unloading (MODULE_FORCE_UNLOAD) [Y/n/?] y
  Module versioning support (EXPERIMENTAL) (MODVERSIONS) [Y/n/?] y
  Automatic kernel module loading (KMOD) [Y/n/?] y
Class Based Kernel Resource Management (CKRM) [Y/n/?] y
  Dummy Resource Manager for CKRM (CKRM_RES_DUMMY) [M/n/y/?] (NEW)
So should I be picking up a default config, as suggested in the earlier error message? (The .config file is a merged configuration; please remove it by hand before creating your own. You can use one of the files arch/i386/defconfig.* as a template.)

Or should I just soldier on with defaults?

Last edited by Steerpike; 12-09-2004 at 09:14 PM.
 
Old 12-10-2004, 12:16 AM   #5
cjcox
Member
 
Registered: Jun 2004
Posts: 306

Rep: Reputation: 42
Can't say what's going on. Perhaps you have done some kind of build in your /usr/src/linux tree earlier(?). Might have to make mrproper and then do the cloneconfig, prepare-all. Also, you could remove the kernel sources, reinstall them (a forced reinstall might work... but maybe safer to just remove and reinstall) and re-YOU... that might fix things up as well.
 
  


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
Help with #make cloneconfig in FC3 re: VMware 4.5.2 tehkgi Fedora 1 09-20-2005 01:39 AM
Yes, NVIDIA - make cloneconfig blew up my path and mouse...? shock_ez Linux - Hardware 2 05-29-2003 04:04 PM
make cloneconfig - blew up my path...and mouse? shock_ez Linux - Newbie 0 05-29-2003 12:07 PM


All times are GMT -5. The time now is 03:06 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