The patch itself is trivial (one must be an idiot to spend so much time
to find this simple solution). The question is - do we really want it?

Here are possible glitches:

- stock kernel-source is using special linux/autoconf.h that is not
generated out of .config but is used to build multiple versions. It
relies upon defines in /boot/kernel.h (UP, SMP, SECURE etc);
/boot/kernel.h is generated on bootup from current running kernel.
Now what may happen is

* you build kernel while running default UP kernel; result is obviously
default UP kernel

* later on you decide to test enterprise or secure versions; so far so
good

* while running secure version you decide to modify some kernel file and
recompile. Looks good - unfortunately, this modified file will be
compiled using settings for SECURE kernel while all other kernel files
have been compiled using settings for NORMAL one!

Such error is almost impossibly to debug.

- we have just a single .config that is not used at all. Unfortunately,
installkernel always installs this file as /boot/config-xxx on make
install. It is not fatal but many people (me including:-) expect
/boot/config to be valid config file for currently running kernel ...

There may be  more problems.

It looks so bad to me that I have another suggestion - let's distribute
kernel-source without .config at all. This won't really affect
compilation of external modules (because they do not use this file at
all; at least, they should not ...) but will make kernel compilation
without explicit make config impossible. At least it will stop endless
questions why compilation stops half way through.

-andrej

And here is patch to make make happy :-) If you ask - it has been
verified that patch really allows you to reproduce your currently
running kernel by simply going into /usr/src/linux and doing make; make;
make modules. First make actually runs make dep.


--- linux-2.4.17-15mdk/Makefile.orig    Wed Feb  6 23:28:23 2002
+++ linux-2.4.17-15mdk/Makefile Sat Feb  9 19:45:56 2002
@@ -404,7 +404,7 @@
 
 ifdef CONFIG_MODULES
 ifdef CONFIG_MODVERSIONS
-MODFLAGS += -DMODVERSIONS -include $(HPATH)/linux/modversions.h
+MODFLAGS += -DMODVERSIONS -include $(HPATH)/linux/config.h -include 
+$(HPATH)/linux/modversions.h
 endif
 
 .PHONY: modules 



Reply via email to