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

A brief discussion on the types of node.js middleware

Table of contents Overview 1. Application-level m...

About the problem of running git programs in jenkins deployed by docker

1. First, an error message is reported when assoc...

Best way to replace the key in json object

JSON (JavaScript Object Notation, JS Object Notat...

Alibaba Cloud Server Tomcat cannot be accessed

Table of contents 1. Introduction 2. Solution 2.1...

Several commonly used single-page application website sharing

CSS3Please Take a look at this website yourself, ...

MySQL Interview Questions: How to Set Up Hash Indexes

In addition to B-Tree indexes, MySQL also provide...

How to add Lua module to Nginx

Install lua wget http://luajit.org/download/LuaJI...

Detailed explanation of LVM seamless disk horizontal expansion based on Linux

environment name property CPU x5650 Memory 4G dis...

Detailed usage of js array forEach instance

1. forEach() is similar to map(). It also applies...

How to draw the timeline with vue+canvas

This article example shares the specific code of ...

CSS3 animation to achieve the effect of streamer button

In the process of learning CSS3, I found that man...

Linux parted disk partition implementation steps analysis

Compared with fdisk, parted is less used and is m...

Vue implements countdown function

This article example shares the specific code of ...