OS: Ubuntu 21.04
PC: NUC10
參考資料:https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel
Step0: 安裝Ubuntu 21.04
Step1-1: 設定編譯環境-修改 apt source list
Step1-2: 設定編譯環境
sudo apt update
sudo apt-get build-dep linux linux-image-$(uname -r)
sudo apt-get install libncurses-dev gawk flex bison openssl libssl-dev dkms libelf-dev libudev-dev libpci-dev libiberty-dev autoconf
Step2: 根據目前內核版本取得linux source code
apt-get source linux-image-unsigned-$(uname -r)
Step3: 根據需要修改source code
Step4: 修改debian.master/changelog 中的 version number
5.11.0-25 -> 5.11.0.26
Step5: build kernel
LANG=C fakeroot debian/rules clean
LANG=C fakeroot debian/rules binary-headers binary-generic binary-perarch
Step6: install kernel
sudo dpkg -i *.deb
Setp7: Reboot and check kernel version number 是否更新
沒有留言:
張貼留言