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

Detailed explanation of Mysql transaction processing

1. MySQL transaction concept MySQL transactions a...

Detailed explanation of mysql5.6 master-slave setup and asynchronous issues

Table of contents 1. MySQL master-slave replicati...

CenOS6.7 mysql 8.0.22 installation and configuration method graphic tutorial

CenOS6.7 installs MySQL8.0.22 (recommended collec...

Detailed explanation of the function and usage of keepAlive component in Vue

Preface During the interview, many interviewers m...

TCP third handshake data transmission process diagram

The process packets with the SYN flag in the RFC7...

Analysis of the principle of centering elements with CSS

It is a very common requirement to set the horizo...

How to convert a string into a number in JavaScript

Table of contents 1.parseInt(string, radix) 2. Nu...

Detailed steps for installing and configuring MySQL 8.0 on CentOS

Preface Here are the steps to install and configu...

Detailed explanation of JS browser storage

Table of contents introduction Cookie What are Co...

Axios cancels repeated requests

Table of contents Preface 1. How to cancel a requ...

How to Learn Algorithmic Complexity with JavaScript

Table of contents Overview What is Big O notation...

Mysql method to copy a column of data in one table to a column in another table

mysql copy one table column to another table Some...