Having problems with MAKE and INSTALL due to kernel source ?

Extrapolated from: http://www.tldp.org/LDP/lkmpg/2.6/html/x380.html

Correcting your kernel source when using makeand the script complains that your source does not match your kernel.

Install the kernel source that matches your current kernel.
You can issue a uname -a if you don't know.
2.4.20-28.8toshin my case, so I need to find and install
kernel-source-2.4.20-28.8.i386.rpm.

Next I'm going to change the directory name from
/usr/src/linux-2.4.20-28.8to
/usr/src/linux-2.4.20-28.8tosh
(this may not be absolutely necessary, but I'm going to do it anyway)

Next I'm going to edit the file/usr/src/linux-2.4.20-28.8tosh/include/linux/version.hto stick "tosh" in:


#include
#if defined(__module__smp)
#define UTS_RELEASE "2.4.20-28.8smp"
#elif defined(__module__BOOT)
#define UTS_RELEASE "2.4.20-28.8BOOT"
#elif defined(__module__bigmem)
#define UTS_RELEASE "2.4.20-28.8bigmem"
#else
#define UTS_RELEASE "2.4.20-28.8
tosh"
#endif
#define LINUX_VERSION_CODE 132116
#define KERNEL_VERSION(a,b,c) (((a) << 16) ((b) << 8) (c))</font>

and /usr/src/linux-2.4.20-28.8tosh/Makefile

VERSION = 2
PATCHLEVEL = 4
SUBLEVEL = 20
EXTRAVERSION = -28.8tosh

Then I'll use WebMin's File Manager, go to/usr/src/linux-2.4symlink, and use
"Info" button in File Manager to edit and change link to linux-2.4.20-28.8tosh

ALL DONE! MAKE DOESN'T EXIT WITH AN ERROR ANY MORE!

Top