OS compiles the kernel
1. Install the necessary support
sudo apt-get install libncurses5-dev libssl-dev
sudo apt-get install build-essential openssl
sudo apt-get install zlibc minizip
sudo apt-get install libidn11-dev libidn11
2. Enter the terminal to start compiling
Make your terminal into your linux kernel directory by cd,
Next execute the following command:
sudo make mrproper
sudo make clean
sudo make menuconfig
At this time, because I am using a virtual machine, there are some problems that dependencies do not exist, as shown in the figure:
Then the solution, according to the error prompt in the figure, sudo apt install <file name> can be solved.
Then execute the command make.
3. Compile the module
Execute the command: sudo make modules
This takes a long time.
4. Install the module and kernel
make modules_install
make install
sudo update-grub2
reboot
5. Problems after reboot
As shown in the figure:
This is because the module is not installed successfully, enter grub2, re-select the kernel to enter the system, and reinstall the module can be solved.