kernel Kernel source https www kernel orgpublinuxkernelv 4
![](https://slidetodoc.com/presentation_image_h2/6b5eb8b0d4f59a833bf38a9f67de253b/image-1.jpg)
![](http://slidetodoc.com/presentation_image_h2/6b5eb8b0d4f59a833bf38a9f67de253b/image-2.jpg)
![](http://slidetodoc.com/presentation_image_h2/6b5eb8b0d4f59a833bf38a9f67de253b/image-3.jpg)
![下載kernel檔案 Kernel source下載: https: //www. kernel. org/pub/linux/kernel/v 4. x/ 下載kernel檔案 Kernel source下載: https: //www. kernel. org/pub/linux/kernel/v 4. x/](http://slidetodoc.com/presentation_image_h2/6b5eb8b0d4f59a833bf38a9f67de253b/image-4.jpg)
下載kernel檔案 Kernel source下載: https: //www. kernel. org/pub/linux/kernel/v 4. x/
![](http://slidetodoc.com/presentation_image_h2/6b5eb8b0d4f59a833bf38a9f67de253b/image-5.jpg)
![重新編譯kernel(1) o # make mrproper n 清除之前編譯過的殘留設定檔及目的檔 o # make oldconfig n 使用舊 kernel的. 重新編譯kernel(1) o # make mrproper n 清除之前編譯過的殘留設定檔及目的檔 o # make oldconfig n 使用舊 kernel的.](http://slidetodoc.com/presentation_image_h2/6b5eb8b0d4f59a833bf38a9f67de253b/image-6.jpg)
重新編譯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 重新編譯kernel(2) o # make n 編譯 compressed kernel 及 modules,可以加 -j 參數 來增加編譯效能 o](http://slidetodoc.com/presentation_image_h2/6b5eb8b0d4f59a833bf38a9f67de253b/image-7.jpg)
重新編譯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 mrproper](http://slidetodoc.com/presentation_image_h2/6b5eb8b0d4f59a833bf38a9f67de253b/image-8.jpg)
make mrproper
![make oldconfig make oldconfig](http://slidetodoc.com/presentation_image_h2/6b5eb8b0d4f59a833bf38a9f67de253b/image-9.jpg)
make oldconfig
![make menuconfig(1) make menuconfig(1)](http://slidetodoc.com/presentation_image_h2/6b5eb8b0d4f59a833bf38a9f67de253b/image-10.jpg)
make menuconfig(1)
![make menuconfig(2) make menuconfig(2)](http://slidetodoc.com/presentation_image_h2/6b5eb8b0d4f59a833bf38a9f67de253b/image-11.jpg)
make menuconfig(2)
![make make](http://slidetodoc.com/presentation_image_h2/6b5eb8b0d4f59a833bf38a9f67de253b/image-12.jpg)
make
![during make during make](http://slidetodoc.com/presentation_image_h2/6b5eb8b0d4f59a833bf38a9f67de253b/image-13.jpg)
during make
![make modules_install make modules_install](http://slidetodoc.com/presentation_image_h2/6b5eb8b0d4f59a833bf38a9f67de253b/image-14.jpg)
make modules_install
![make install make install](http://slidetodoc.com/presentation_image_h2/6b5eb8b0d4f59a833bf38a9f67de253b/image-15.jpg)
make install
![補充教材 o For Debian: https: //debian-handbook. info/browse/stable/sect. kernel -compilation. html o For Fedora: http: 補充教材 o For Debian: https: //debian-handbook. info/browse/stable/sect. kernel -compilation. html o For Fedora: http:](http://slidetodoc.com/presentation_image_h2/6b5eb8b0d4f59a833bf38a9f67de253b/image-16.jpg)
補充教材 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