下面是自己写的Shell脚本,还没有测试,目前按照要求编写的,有问题的地方请大家指出,待我实验之后在确定脚本的可行性!!
1 mkdir Kernel_Code 2 wget https://codeload.github.com/torvalds/linux/tar.gz/v4.4 3 tar -xzvf v4.4 4 local_path=$(pwd) 5 Kernel_Folder=${local_path}"/linux-4.4" 6 cd $Kernel_Folder 7 cp /boot/config-4.4.0-57-generic ./ 8 mv config-4.4.0-57-generic .config 9 sudo apt-get install kernel-package libncurses5-dev 10 make clean 11 make menuconfig 12 make -kpkg clean 13 make -kpkg --initrd kernel-headers kernel_image 14 cd ../ 15 sudo dpkg -i *.deb 16 sudo reboot