HomeIntroSoftwareHardwareOther pagesAbout  
 
Documentation
Kernel Compiling on Alpha

If you're new to Linux or Linux on Alpha you may also want to take a look at our Kernel support pages.

First, why do you want to do this?
Well, you don't have to, I'm sure most people go for months or even years on the original kernel that came with their distribution, but if you want to get the latest bug fixes, as well as tune you kernel to your particular machine then you need to compile your own. The latest stable version (as I write this) is 2.2.14. The is development version is currently at 2.3.28 (but that could change very quickly).

The stable series:
Any distribution should be able to compile these out of the box. I know RedHat can, if anybody has comments on the Debian and Stampede version let me know. The kernels are available from ftp.kernel.org and the many, many mirrors that exist around.. The requirements for compiling a stable kernel can be found at www.linuxhq.com.

The development series:
You might not be able to compile these right out of the box, you may need to get and/or build other packages first. You should check www.linuxhq.com for the requirements for building development kernels.

Once you've got your kernel you need to uncompress (gunzip for .gz and bzip2 for .bz2 files) and untar (tar -xvf) it. Now it is strongly suggested that you untar these files where they will not interfere with the kernels headers from your distribution (somewhere like /usr/local/src). RedHat in particular has modified the headers for compiling other software, of course some programs (X servers..) require access to the currently running kernel headers.

Now you need to run 'make config' to configure the kernel. As of 2.2.x make menuconfig and make xconfig work fine on the Alpha (thought will the development version there may be trouble). If you don't know what a particular option is for try the using the ? prompt for help info, also there is plenty of other info in the Documentation directory. Once you have finished this run a 'make depend', then a 'make boot', then 'make modules' and finally a 'make modules_install'. If all works well you will be left will a file called vmlinux.gz in the /usr/local/src/linux/arch/alpha/boot directory, and any modules you have compiled should be in /lib/modules/x.x.xx (where x.x.xx is your kernel version) directory. Copy the vmlinux.gz file to the root of your file system. I recommend that you name it something different to preserve your current good kernel, after all something might go wrong and you'll need that old kernel as a safety net.

Now the next time you boot, setup MILO (or whichever loader you use) to boot the new kernel. Remember to keep a reference to your old kernel, just in case.

If you want to make the kernel again, with different options maybe, make sure to do a 'make clean' before attempting the compile. This will clean out the source tree from your previous compile.

Now this is only a brief overview of how to do this. There is a lot of information out there on compiling kernels in general and most applies to the Alpha port also. One big difference is that there is no 'make zImage' on Alpha, instead there's 'make vmlinux' and 'make boot'.