How to compile the Linux kernel

How to compile the Linux kernel

1. Download the required kernel version

2. Upload to the operating system

3. Unzip to the /usr/src directory

For example: 3.19 kernel

tar -xvf linux-3.19.tar.xz -C /usr/src

4. Create a connection

cd /usr/src

ln -sv /usr/src/linux-3.19 Linux

5. Perform kernel settings

cd /usr/src/linux

make menuconfig

In this step, it is best to copy a .config file that was run previously and make modifications to it, otherwise, the system may not be able to restart.

For example, the following:

cp /boot/config-3.10.0-123.el7.x86_64 /usr/src/linux/.config

6. Compile the kernel

make -- may take from 1 hour to 3 hours.

make modules_install

make install

7. Reboot.

Content Extension

Deploy kernel source code

Open the terminal and change the user privileges to root. The specific method is to enter sudo su in the terminal and then enter the password as prompted. To determine whether the user is the root user, use the whoami command. If the output is root, you have switched to the root account.

Enter mv linux-2.6.36.tar.gz /usr/src to move the downloaded kernel source code file to the /usr/src directory.

Enter cd /usr/src to switch to this directory.

Enter tar zxvf linux-2.6.36.tar.gz to decompress the kernel package and place the generated source code in the linux-2.6.36 directory.

Enter cd linux-2.6.36 to switch to this directory.

Enter cp /boot/config-, then press the Tab key. The system will automatically fill in the qualifying file name in the directory. Then continue to enter .config to use the original configuration file in the boot directory.

This is the end of this article about how to compile the Linux kernel. For more information about how to compile the Linux kernel, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • How to implement Linux deepin to delete redundant kernels
  • How to manually upgrade the kernel in deepin linux
  • In-depth analysis of the Linux kernel macro container_of
  • Steps to transplant the new kernel to the Linux system
  • Linux kernel device driver character device driver notes
  • Detailed explanation of Linux kernel memory management architecture
  • Linux kernel parameter adjustment method
  • Analyze the compilation and burning of Linux kernel and device tree

<<:  A brief discussion on the $notify points of element

>>:  Dynamic SQL statement analysis in Mybatis

Recommend

How to implement digital paging effect code and steps in CSS

A considerable number of websites use digital pagi...

Nginx configures the same domain name to support both http and https access

Nginx is configured with the same domain name, wh...

HTML basic summary recommendation (title)

HTML: Title Heading is defined by tags such as &l...

MySQL 5.7.21 installation and configuration method graphic tutorial (window)

Install mysql5.7.21 in the window environment. Th...

Record the whole process of MySQL master-slave configuration based on Linux

mysql master-slave configuration 1. Preparation H...

How to view the creation time of files in Linux

1. Introduction Whether the creation time of a fi...

How to force vertical screen on mobile pages

I recently wrote a mobile page at work, which was...

Implementation of Vue top tags browsing history

Table of contents nonsense Functions implemented ...

Detailed explanation of the usage of the alias command under Linux

1. Use of alias The alias command is used to set ...

Issues with locking in MySQL

Lock classification: From the granularity of data...

Summary of various methods for JavaScript to determine whether it is an array

Table of contents Preface Array.isArray construct...

50 lines of code to implement Webpack component usage statistics

background Recently, a leader wanted us to build ...

Detailed steps for installing and configuring MySQL 5.7

1. Download MySQL 1. Log in to the official websi...