Fedora17-x86 compiling linux-4.5.4 kernel analysis and compilation process

Source: Internet
Author: User
LinuxKernel implements Kconfig, Kbuild, and Makefile to assist in Kernel configuration and compilation, making the compilation process of linuxkernel quite simple. (1) decompress linux-3.5.4.tar.bz2 to & rdquo;/usr/src/kernel & ldquo; directory cd/usr/src/kernels/tar-jxvflinux-3.5.4.tar.bz

Linux Kernel implements Kconfig, Kbuild, and Makefile to assist in kernel configuration and compilation, making the compilation process of linux Kernel quite simple.

(1) kernel Compilation

1. Extract linux-3.5.4.tar.bz2 to the "/usr/src/kernel" directory.

Cd/usr/src/kernels/

Tar -jxvflinux-3.5.4.tar.bz2

Note: because the target folder is the current directory, so omitted, in charge of should be added after the Command Space + absolute path of the target folder; secondly:-there is no space in the middle of the jxvflinux-3.5.4, this command is used to extract the linux-3.5.4 in the current directory. If you are not executing the preceding command to switch the working directory, the command should be:

Path of the tar-jxvf compressed file: Path of the target file

2. copy the current Kernel configuration file as the configuration file compiled by the kernel.

# Cp/boot/config-3.3.4-5.fc17.i686.PAE/usr/src/kernels/The linux-3.5.4/. config

3. Switch the current directory to/usr/src/kernels/linux-3.5.4/

4. install some library files required for compilation

# Yum install ncurses-devel _ * gcc * gcc_c ++ * aclocal

5. make menuconfig

# Make menucofig

Generate the configuration file. config required for the compilation phase

6. make all

This command will generate the kernel ELF File vmlinux, which corresponds to the binary kernel image file of the target architecture. (BzImage image file under the x86 architecture), The make all command will compile all device driver modules and Dynamic Loading modules according to the configuration file.

7. make modules_install

Install modules to/lib/modules/linux-3.5.4

8. make install

Copy the vmlinuz-3.5.4, System. map-3.5.4 initramfs-3.5.4.img to the/boot directory and automatically save the changes

9. Restart and check whether there are 3.5.4 kernel add-ons

Related Article

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.