首先下載想要的linux kernel
https://www.kernel.org/pub/linux/kernel/v3.x/
然後解壓縮
安裝必要的package:
sudo apt-get install fakeroot build-essential kernel-package libncurses5 libncurses5-dev
sudo dpkg -i kernel-package_13.003_all.deb
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
接下來設定環境:
kerVer='3.15.7/linux-3.15.7'
KernelPath=$(sudo find /media/vli -name 'Kernel' | grep 'Test_tool')
cd ~/Desktop/
ln -s $KernelPath/$kerVer linux
cd ~/Desktop/linux
cp /boot/config-`uname -r` ./.config
編譯kernel:
sudo make menuconfig
sudo make-kpkg clean
sudo fakeroot make-kpkg --initrd kernel_image kernel_headers
安裝kernel:
sudo dpkg -i linux-image-3.15.8_3.15.8-10.00.Custom_amd64.deb
sudo dpkg -i linux-headers-3.15.8_3.15.8-10.00.Custom_amd64.deb
重新開機:
sudo reboot
沒有留言:
張貼留言