[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: [LI] Kernel compilation 'what-if' scenario



On Fri, Dec 03, 1999 at 05:43:04PM +0500, Active Technologies wrote:
> 
> Hi All,
> 
> Suppose I modify some entries in my kernel config file such that I change
> only the 'yes' option to 'no' *without* disturbing any options for the
> modules and recompile. Do I need to recompile and reinstall the modules too
> ? How is this going to affect behaviour of my new kernel should I choose
> not to recompile modules. 
> 
> I am interested in doing this to trim my kernel down to a minimum.
> 

In the common case, you're ok. But you can easily get your kernel to panic.
Basically, setting option foo results in defining or undefining CONFIG_foo.

If your module uses a kernel structure

struct bar {
	int i;
#ifdef CONFIG_foo
	char c;
#endif
	int j;
};

and if the kernel is compiled with CONFIG_foo defined and the module is 
not, they disagree on the offset to bar.j and all hell breaks loose.

Bottomline, as long as you don't have shared data structures, which depend
on the CONFIG option you're manipulating, you're ok. grep is your friend.

	-Arun

--------------------------------------------------------------------
The Linux India Mailing List Archives are now available.  Please search
the archive at http://lists.linux-india.org/ before posting your question
to avoid repetition and save bandwidth.