2003年1月18日 星期六

Linux 的核心(Kernel) -6 核心編譯-3 建立

建立子目錄設定檔案: 
使用 make dep 將 .config 檔案和最上層 Makefile 中定義的設定傳到子目錄設定檔案

6. make dep  (建立相依性)

編譯核心: 
Linux 核心通常是從 gzip 壓縮的映像檔載入, 其中一種是使用 make bzImage 建立, 編譯後可以在 /usr/src/linux-2.4/arch/i386/boot/bzImage 找到壓縮的核心映像檔

7. make bzImage  (產生 kernel Image)

編譯核心模組: 
核心模組儘管使用與基本核心相同的源檔案進行編譯, 但它們是通過單獨的 make 進行編譯, 通常編譯的時間會有點長, 大多數核心代碼都以核心模組的形式存在, 相關文件可以使用 /usr/src/linux-2.4/Documentation

8. make modules  (產生 modules)


ps. 上面步驟可合而為一: #make  dep  bzImage  modules

沒有留言:

張貼留言