9.6. Compiling the Kernel

Compiling a “bzImage” is recommanded. As a rule, this avoids the problem of the kernel getting too large, as can easily happen if you select too many features and create a “zImage”. You will then get error messages like kernel too big or System is too big.

After customizing the kernel configuration, start compilation by entering (remember to change into the directory /usr/src/linux, first):

make clean
make bzImage
  
make clean
make vmlinux
  

▪ ipseries
If you need a kernel for an RS/6000 that can be booted from a floppy disk, enter make zImage. ▪

These two commands can be entered as one command line:

make clean bzImage
make clean vmlinux

▪ x86;amd64;ipf;ipseries;zseries
After a successful compilation, find the compressed kernel in /usr/src/linux/arch/<arch>/boot. The kernel image — the file that contains the kernel — is called vmlinux.gz. ▪

▪ ipseries
After a successful compilation, find the kernel in /usr/src/linux. The kernel image — the file that contains the kernel — is called vmlinux; the floppy disk kernel for RS/6000 however is stored in /usr/src/linux/arch/<arch>/chrpboot. ▪

If you cannot find this file, an error probably occurred during the kernel compilation. In the Bash shell, enter the following command to launch the kernel compilation again and write the output to a file kernel.out:

make bzImage 2>&1 | tee kernel.out
make clean vmlinux 2>&1 | tee kernel.out

If you have configured parts of your kernel to load as modules, launch the module compilation. Do this with make modules.