All kernel hackers will need to compile kernels sometime for sure… However before compiling a kernel there may be some issues you need to take care of. If you are compiling older kernels, like kernel versions before 2.4.x you’ll need to first prepare your system for it.
the following issues need to be taken care of:
* Older version of gcc
If you compile your old kernel with any other version of gcc, you’ll probably get errors. Most newer Linux distributions ship with gcc 3.x. You can have more than one version of gcc installed on your system. Install gcc 2.95.3, without overwriting your existing gcc installation. You can download an older version here:
you will find several sites hosting gcc installations. Remember you are not overwriting the current installation, you are just installing multiple versions of gcc. Here’s a tutorial to help you out with that:
* as86 and ld86
Once you have an older gcc installed, compiling the kernel may give you errors like “as86:command not found” or “ld 86: command not found”. To put it briefly, as86 is the 80*86 assembler and ld86 is the linux loader. You’ll need to make sure these are installed on your system. You’ll get as86 and ld86 here:
You can just download bin86 from here. That package will suffice to all your requirements.
* Modifying your makefile
Now that you have the older gcc, you will have to alter the makefiles to use the new compiler. Suppose you have installed the additional compiler in /usr/bin/gccold/bin/gcc, then, in your makefile replace all the “gcc”s with the new path, ie, “/usr/bin/gccold/bin/gcc”. Like this:
Once you have taken care of the above three steps, your system is ready to compile older kernels .