解壓內核。
make mrproper
make ARCH=${arch} headers_check
e.g make ARCH=arm headers_check
make ARCH=${CLFS_ARCH} INSTALL_HDR_PATH=dest headers_install
這是從內核得到頭的步驟。
內核頭文件的目的是 - > C庫和編譯的程序需要與內核 即對可用的系統調用和他們的人數,常量定義,數據結構等 因此互動,編譯C庫要求內核頭文件和許多應用程序也需要它們。
do I need the header files of the specific kernel?
的kernel-to-userspace ABI
是向後兼容的
- > 1)使用內核headers older than the running kernel will work without problem
工具鏈生成的二進制文件,但won't be able
使用new system calls, data structures,
等
- > 2)二進制文件用工具鏈生成的內核頭文件newer
比正在運行的內核可能工作的如果他們不使用 最近的功能,否則他們會will break
。
---> 3)使用latest
內核頭文件是not necessary
,除非獲得 新的內核特性需要
所以你的情況內核版本爲"Linux version 2.6.20.7"
可以使用的內核頭文件來自kernel.org的Linux內核版本2.6.20
或2.6.21
。
在這種情況下不會產生任何問題。
@ user3226575上面的解釋清除了您的查詢,如果是這樣您可以告訴社區如此http://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work/5235#5235 –
謝謝這個很好的解釋。 – user3226575