how to compile and replace ubuntu kernel

0. environment
  -ubuntu 1804 64bit 

 

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)

 

2. set up tools
  sudo apt-get install git fakeroot build-essential ncurses-dev xz-utils libssl-dev bc flex libelf-dev bison

 

3. tar xvzf linux-4.17-rc2.tar.gz (replace to your version)

 

4. cp /boot/config-$(uname -r) .config

 

5. make menuconfig (can be ignored)

 

6. make modules_install

 

7. sudo make install

 

8. sudo mkinitramfs -o /boot/initrd.img-4.15.18


9. sudo update-initramfs -c -k 4.15.18


10. sudo update-grub2

 

11. result 

how to compile and replace ubuntu kernel

 

reference

https://linux.cn/article-9665-1.html

https://blog.csdn.net/qq_36290650/article/details/83052315

相关文章:

  • 2021-09-16
  • 2021-06-26
  • 2022-12-23
  • 2021-08-06
  • 2021-08-18
  • 2022-12-23
  • 2021-04-03
  • 2022-12-23
猜你喜欢
  • 2022-01-11
  • 2021-12-17
  • 2022-12-23
  • 2021-08-23
  • 2021-10-22
  • 2022-12-23
相关资源
相似解决方案