Basic concept of kernel compilation within Linux

Source: Internet
Author: User

Kernel Components

1, Kernel 2, Kernel Object 3, RAMDisk

View Kernel version

Uname

Managing the Kernel Object tool

Lsmod modinfo modprobe insmod rmmod depmod


Tools related to RAMDisk

MKINITRD Dracut


Start process

Post->boot sequence->bootloader-> Load kernel-> read-only mount Root->init-> run System init script--Default run level Turn on or off the specified service-start terminal


Upgrading the Kernel

Upgrading the kernel can be done via the RPM package. Where does the rpm bag come from?  Compile it yourself or get it from the Web. This conclusion is pending!!!!!!!!!!!!!


Prerequisites for compiling the kernel

1. Ready for development environment (development tools, server platform development)

2. Get information about the target host hardware device

3. Get information about the target host function, such as file system (some unwanted file system can not be selected at compile time)

4. Get the Kernel source code package: www.kernel.org https://mirrors.edge.kernel.org/pub/linux/

First step: Prepare the development environment (can be viewed/installed via Yum Grouplist/groupinstall)

There is a *ncurses* class package that needs to be installed, which can be prompted during the operation.

Step Two (optional) Get target host hardware device information

Cpu:

PCI Devices

USB Device

Hard Drive information

You can also use the Hal-device program to understand the hardware information

Third step download the corresponding device incremental version

https://mirrors.edge.kernel.org/pub/linux/

Look at the contents of linux-3.10.1.

Fourth step to perform kernel compilation

This operation is performed for the sake of uniformity of operation. In the future, you can operate the Linux directory.

Configuration files that need to generate kernel compilation software

Make Menuconfig

Execute Menuconfig need Ncurses-delvel program, now need to install ncurses, process is ignored, install through Yum

Note: Menuconfig must be executed in the Linux directory.

This is the make Menuconfig interface. Note: There are many ways to configure kernel compilation parameters, Menuconfig is a way.

A. config file is generated when you finish adjusting the graphical interface of Meneconfig

Execute MAKE-J 4 to perform kernel compilation work, operation directory or Linux inside

Then execute make modules_install install kernel module

Finally execute make install kernel core file

Reboot the system to verify the results of the kernel installation

Hey ~ ~ ~ finally did not lead the success, should be the system bug problem, I was successful on the CentOS6.



Basic concept of kernel compilation within Linux

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.