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.
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?
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
A related question ... so video drivers are considered 'external modules' in linux?
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!
I installed gcc and make, and ran 'make cloneconfig'. This is the output:
linux:/usr/src/linux # make cloneconfig
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: *** [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:
linux:/usr/src/linux # make cloneconfig
HOSTCC -fPIC scripts/kconfig/zconf.tab.o
HOSTLLD -shared scripts/kconfig/libkconfig.so
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
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?