1. 程式人生 > >[7]_編譯核心錯誤提示2:recipe for target 'kernel/timeconst.h' failed 和 "mkimage" command not found

[7]_編譯核心錯誤提示2:recipe for target 'kernel/timeconst.h' failed 和 "mkimage" command not found

----------------------------------------------------------------編譯核心出現的錯誤------------------------------------------------------------------------------

10. 感覺就要成功了,執行 make -j4 uImage 後出現:(說實在,還是第一次遇到這個問題)


11. 查詢資料後發現:因為在新版本的(Linux) 上編譯老版本的核心版本出現的錯誤(新版主機linux核心是4.10,被編譯版本的核心是3.0的,好像是這麼回事!),解決辦法是:將kernel/timeconst.pl中第373行的defined()去掉,去掉後如下:


12. 執行make -j4 zImage , 再次出現問題:"mkimage" command not found - U-Boot images will not be built

13. 查資料,是因為主機中製作uImage映象依賴的一個包沒安裝,執行:sudo apt-get install u-boot-tools

14. 再次執行:make -j4 uImage ,成功編譯!!


--------------------------------------------------------------------------------------------------------------------------------------------------------

15.補充:檢視主機核心版本的命令:uname -a


16. 補充:檢視被編譯的核心原始碼:vi Makefile