Compiling

After configuring your kernel, you need to compile it with:

$ su
# cd /usr/src/linux

 

# make dep
# make clean

You're now able to choose from one of the following options:

# make bzImage
# make zImage
# make bzdisk
# make install

Use bzImage to create a compressed kernel image
zImage for a compressed kernel,
bzdisk to create a boot disk and
install if you want to use LILO (all further steps then become unneccesary).

# make modules
# make modules_install

The time required by your computer to compile Linux is processor and machine dependant. Once this process has been completed, you can copy your new kernel to /boot/. Please don't forget to make a backup of your old kernel though. The backup commands are as follows:

# cp /boot/vmlinuz /boot/vmlinuz.old
# cp /boot/System.map /boot/System.map.old

# cp arch/i386/boot/bzImage /boot/
# cp System.map /boot/
# cp .config /boot/

After copying the kernel, you still need to test it. Depending on your bootloader you still need to set various options in order to boot your new kernel.

# shutdown -r now

 


In the case where you want to overwrite your existing kernel, you need to use the following commands:

# cp /usr/src/kernel-old-version/.config \
/usr/src/kernel-new-version/
# cd /usr/src/kernel-new-version/
# make oldconfig
# make dep && make clean bzImage modules modules_install


Valid XHTML 1.0! Valid CSS! Made with Cascading Style Sheets best viewed with any browser Debian GNU/Linux

http://kernel-project.kickino.org/index_moz_en.php?action=compile
Last Change: 2011-05-04 21:17:57