Compile Linux2.6 kernel

xiaoxiao2021-03-06  69

By Camry.Wu

Compile Linux kernel (2.6 or higher)

Get the Linux source file from ftp://ftp.kernel.org/pub/linux/kernel/v2.6 download Linux-2.6.x.tar.gz to / usr / src Next # su

# CD / USR / SRC

# TAR XZVF Linux-2.6.x.tar.gz # Decompressed to Linux-2.6.x Directory

# mv Linux-2.6.x Linux-2.6.x-1 # Modify Directory Name

# ln -s Linux-2.6.x-1 Linux # Create a link

# cd Linux

# vi makefile # Modify the kernel extension version number

Modifying the extraversion is -1 (or other characters can also, and the directory name)

# Make Mrproper # Clear garbage

# Make MenuConfig # Select the kernel option

This step is the most troublesome, there are many things to choose, with IBM this

Classmates can be at http://www.w-m-p.com/kconfig-2.6.2-rc2-mm1.txt

Find a configuration file, find it (maybe you can't find :)), give a copy to

/ usr / src / linux / down and renamed .config, then run this command fine

# Make Bzimage # Compile the kernel

# MAKE MODULES # Compilation Module

# Make Modules_Install # Installation Module

(Note: Debian's IBM users should install Module-Init-Tools)

# depmod -a

(It doesn't seem to use it)

Modify the start (Lilo, GRUB is simpler, see if the configuration file knows) # cp /usr/src/linux/system.map /boot/system.map-2.6.x-1

# cp / usr / src / linux / arch / i386 / boot / bzimage /boot/vmlinuz-2.6.x-1

Use the specific version number to distinguish between different kernels, which can choose different kernel boots at the beginning. # VI / ETC / LILO (add the following, future display in the LIL boot boot list) Image = / boot / vmlinuz-2.6 .x-1

Label = linux-2.6.x-1

Read-only

Optional

# LILO -V (Note: This step is very important!) # reboot can choose a new kernel to start, if you don't like it or you can choose the previous kernel.

Last updated: November 13, 2004, Saturday, 11:0am, 39 seconds HTML conversion program: tex2page 2004-09-11

转载请注明原文地址:https://www.9cbs.com/read-109340.html

New Post(0)