kernel Kernel source https www kernel orgpublinuxkernelv 4
下載kernel檔案 Kernel source下載: https: //www. kernel. org/pub/linux/kernel/v 4. x/
重新編譯kernel(1) o # make mrproper n 清除之前編譯過的殘留設定檔及目的檔 o # make oldconfig n 使用舊 kernel的. config 檔 n 下指令前需將舊的. config 檔複製到新的 kernel source 目錄下 或者 # make menuconfig n 對 kernel 做自定的設定 註:make oldconfig 及 make menuconfig 擇一或 二者皆做都可。
重新編譯kernel(2) o # make n 編譯 compressed kernel 及 modules,可以加 -j 參數 來增加編譯效能 o # make modules_install n 安裝modules o # make install n 最後把kernel安裝到系統,重新啟動後的開機選單就可 以選擇了 o 在grub boot menu裡選擇編譯好的kernel n Ex: Fedora Core (3. 10. 77)
make mrproper
make oldconfig
make menuconfig(1)
make menuconfig(2)
make
during make
make modules_install
make install
補充教材 o For Debian: https: //debian-handbook. info/browse/stable/sect. kernel -compilation. html o For Fedora: http: //www. howopensource. com/2011/08/howto-install-compile-linux-kernel-3 -0 -in-fedora-15 -and 14/ o For Ubuntu: http: //www. howopensource. com/2011/08/howto-compile-and-install-linux-kernel-3 -0 -in-ubuntu-1104 -10 -10 -and-10 -04/
- Slides: 16