Go to the Linux system master path Kernel Compilation Process Analysis

Source: Internet
Author: User
Article Title: how to resolve the kernel compilation process to a Linux system master. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Download source code

Linux kernel is always evolving. The latest kernel Kernel2.6.0 officially supports USB2.0, and the most significant change in kernel module file suffix is *. o *. ko and so on. we can download the tarball source code package from www.kernel.org.

Preparations

We all know that we need to upgrade the "module-init-tools" package first. otherwise, when you install the kernel module file, the system will prompt you: Warning: you may need to install module-init-tools See http://www.codemonkey.org.uk/post-h..4.21-23.src.rpm.

Go to the download directory and install:

      
       
# Rpm-e -- nodeps modutils (force uninstall the original modutilsRPM package)
      

# Rpm-ivh modutils-2.4.21-23.src.rpm

(Install the source code package to the/usr/src/redhat directory)

# Cd/usr/src/redhat/SPECS (go to the standard file directory)

# Rpmbuild -- bb modutils. spec (generate a binary RPM Package)

# Cd ../RPMS/i386 (transfer to the location of the generated binary RPM Package)

# Rpm-ivh modutils *. rpm (just generate two [modutils-2.4.21-23.i386.rpm

With the modutils-debuginfo-2.4.21.23.i386.rpm] binary RPM Package, install it together !)

Because it is on the RedHat9.0 platform, RedHat users may encounter some problems. I will slowly say that in addition to the above upgrades, there is also a file (/etc/rc. d/rc. sysinit) may be defective because the/proc/ksyms file is no longer available in the new kernel (Kernel2.6.0). the command to open the file is as follows:

      
       
# Vi/etc/rc. d/rc. sysinit
      

Find: if! LC_ALL = C grep-iq nomodules/proc/cmdline 2>/dev/null

& [-F/proc/ksyms]; then

USEMODULES = y fi

Replace with: if! LC_ALL = C

Grep-iq nomodules/proc/cmdline 2>/dev/null;

Then USEMODULES = y fi

That is, remove "& [-f/proc/ksyms]" and save the file (it is best to back up the file before the operation to avoid deletion errors. This file is the initial script of the system, (important) in this way, the kernel can load the module. of course, the iptable firewall can be started. Otherwise, the red "failed" of the firewall when it is started in the new kernel is very eye-catching. (Check whether the content in/proc/sys/kernel/modprobe in the new kernel is/sbin/modprobe. you can also manually inject the command: # echo "/sbin/modprobe">/proc/sys/kernel/modprobe ). Start to construct the new kernel.

[1] [2] [3] Next page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.