天天看點

核心源碼下載下傳編譯技巧

makefile檔案宏定義注意事項:

CONFIG_KERNEL_DEBUG:生成可調試的核心鏡像檔案,并且子產品的so檔案同樣攜帶調試資訊,

導緻編譯的子產品體積過大,在執行make modlues_install會出現記憶體不足,錯誤如下:

/bin/sh: line 1:  7769 Killed                  /sbin/depmod -ae -F System.map 2.6.35.6 

make: *** [_modinst_post] Error 137

dmesg

[  559.740746] 980 total pagecache pages

[  559.740747] 908 pages in swap cache

[  559.740749] Swap cache stats: add 260447, delete 259539, find 328/415

[  559.740750] Free swap  = 0kB

[  559.740752] Total swap = 524284kB

[  559.744075] 173040 pages RAM

[  559.744077] 5932 pages reserved

[  559.744078] 59 pages shared

[  559.744080] 165489 pages non-shared

[  559.744082] Out of memory: kill process 7911 (depmod) score 25685 or a child

[  559.744305] Killed process 7911 (depmod) vsz:1643892kB, anon-rss:617784kB, file-rss:0kB

拷貝核心源碼編譯錯誤:

1 include/asm is a directory,a simgpol is expected

删除該目錄即可。

2driver/watchdog/hpwdt.c:in funcition hpwdt_check_nmi_decoding

driver/watchdog/hpwdt.c::671: error:implicit declaration of function "nmi_watchdod_active"

檢視函數是否定義,如果已經定義,包含該函數聲明的頭檔案

安裝新的核心鏡像

詳細檢視make install的基本流程,耗時。

拷貝指令:cp arch/x86/linux/bzImage /boot/vmlinuz

     本文轉自fengyuzaitu 51CTO部落格,原文連結:http://blog.51cto.com/fengyuzaitu/1434865,如需轉載請自行聯系原作者

繼續閱讀