Sunday, March 27, 2011

Kernel compile procedure 2.6x

Abstract: in Kernel2.6x and previous versions of the compilation method is a bit different, so I simply write out the compile process, mainly help beginner Linux brother.

Kernle2.6x compilation is relatively simple, most suitable for me, this article is to newbie!! Redhat, for instance, in the version 2.6.0-test8 first, second, unzip the downloaded http://www.kernel.org 1. to download the good kernel onto/usr/src directory, for example, I downloaded a linux-2.6.0-test8.tar.bz2 # mvlinux-2.6.0-test8.tar.bz2/usr/src # tarjxvflinux-2.6.0-test8.tar.bz2 2. entry into the appropriate directory compilation and installation, enter the kernel option settings # cdlinux-2.6.0-test8 # makemrproper # makemenuconig into kernel tab, M is compiled in fast mode, * directly into the kernel which are included in the kernel, which are compiled as modules. In Article Manager and underlying the discussion area of the post, they try to find. In addition the kernel's doc also have corresponding document 3. compile and install the kernel # make # sudomakeinstall this process is to compile and install the kernel process, the system automatically to what we do? 1] system will produce bzImage/usr/src/linux/arch/i386/boot/directory and copy the bzImage to vmlinuz-2.6.0-test8 to/boot directory, and create proposals vmlinuz-2.6.0-test8 link vmlinuz; 2]/boot directory, the system produces the System.map-2.6.0-test8, and create a link to it; 3] System.map/boot directory, automatic hygiene for initrd-2.6.0-test8.img; 4 modify/etc/grub.conf file] has joined the new kernel startup items. [Note] the big baby bear brothers, fear beginners brothers do not understand this process, so this procedure detailed written out, so I had to add. The four points above is a system to automatically install the kernel do tasks. Take a look at/boot files in a directory and the/etc/grub.conf will understand. This is not the same as previous 2.4.x. A parable is 2.4.x or semi-automatic, here's something you want to do a lot of commands in the 2.6.x, step into place, is a fully automated! 4. compiling and installing modules express # makemodules # makemodules_install 5. set the/etc/grub.conf, I don't use lilo, or rather, I don't understand, so I can only say that the settings for Grub. Why do you want to set this? actually compile and install the kernel, the system automatically starts the new kernel is added directly to the/etc/grub.conf. When we do not make changes directly to the/etc/grub.conf enabled the new kernel will find tips such as VFS error. The following is my new kernel after installation, has not changed/etc/grub.con titleFedoraCore (2.6.0-test8) root (hd0, 6) kernel/boot/vmlinuz-2.6.0-test8roroot = LABEL =/boot/initrd/initrd-2.6.0-test8.img titleFedoraCore (2.4.22-1.2061.nptl) lock root (hd0, 6) kernel/boot/vmlinuz-2.4.22-1.2061.nptlroroot = LABEL =/boot/initrd/initrd-2.4.22-1.2061.nptl.img changes is titleFedoraCore (2.6.0-test8) root (hd0, 6) kernel/boot/vmlinuz-2.6.0-test8roroot =/dev/da8 initrd/boot/initrd-2.6.0-test8.img titleFedoraCore (2.4.22-1.2061.nptl) lock root (hd0, 6) kernel/boot/vmlinuz-2.4.22-1.2061.nptlroroot = LABEL =/boot/initrd/initrd-2.4.22-1.2061.nptl.img contrast/etc/grub.conf changed, it is not difficult to find, in our new kernel 2.x, specify the root of the location of the root partition, no use label LABEL =/, instead of using a real partition location. Please on Linux not too cooked brothers, do not copy my partition settings. If you want to know that, in the underlying the discussion area, about GRUB and partition access article, in Article Manager. Finally there is another point is that if you display card drivers originally installed, in the new kernel reinstall。 For example, I have a NVIDIA graphics card, I downloaded a linuxsir.org downloads area, brother provided a patch for the NVIDIA drivers. With the OK.

No comments:

Post a Comment