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

In-depth understanding of the use of Vue

Table of contents Understand the core concept of ...

Should I use UTF-8 or GB2312 encoding when building a website?

Often when we open foreign websites, garbled char...

Sample code for implementing history in vuex

I have recently been developing a visual operatio...

Example code of CSS responsive layout system

Responsive layout systems are already very common...

Detailed process of installing and deploying onlyoffice in docker

0. System requirements CPU I5-10400F or above Mem...

Solve the problem of forgetting password in MySQL 5.7 under Linux

1. Problem Forgot password for mysql5.7 under lin...

How to modify create-react-app's configuration without using eject

1. Why is eject not recommended? 1. What changes ...

Mysql optimization techniques for querying dates based on time

For example, to query yesterday's newly regis...