How to compile the Linux kernel

王林
Release: 2020-03-12 17:43:56
Original
2353 people have browsed it

How to compile the Linux kernel

1. Download the required kernel version

2. Upload to the operating system

3. Unzip it to the /usr/src directory

For example: 3.19 kernel

tar -xvf linux-3.19.tar.xz -C /usr/src
Copy after login

Recommended related tutorials: linux tutorial

4. Create a connection

cd /usr/src
ln -sv /usr/src/linux-3.19 linux
Copy after login

5. Perform kernel settings

cd /usr/src/linux
make menuconfig
Copy after login

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

For example:

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

6. Compile the kernel

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

make modules_install
make install
Copy after login

7. Restart.

Recommended related video tutorials: linux video tutorial

The above is the detailed content of How to compile the Linux kernel. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template