how to compile and replace ubuntu kernelhtml
0. environment
-ubuntu 1804 64bit linux
1. prepare source code
sudo apt-get install linux-source
or
wget https://git.kernel.org/torvalds/t/linux-4.17-rc2.tar.gz (replace to your version)git
2. set up tools
sudo apt-get install git fakeroot build-essential ncurses-dev xz-utils libssl-dev bc flex libelf-dev bisonubuntu
3. tar xvzf linux-4.17-rc2.tar.gz (replace to your version)flex
4. cp /boot/config-$(uname -r) .configui
5. make menuconfig (can be ignored)spa
6. make modules_install.net
7. sudo make installcode
8. sudo mkinitramfs -o /boot/initrd.img-4.15.18htm
9. sudo update-initramfs -c -k 4.15.18
10. sudo update-grub2
11. result
reference
https://linux.cn/article-9665-1.html
https://blog.csdn.net/qq_36290650/article/details/83052315