一:安裝核心源碼包:.src.rpm和.rpm包的安裝方式完全不同,可以通過rpm -qpl 查詢rpm内容
#rpm -ivh kernel-2.6.32-431.el6.src.rpm
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
直接忽略。
二:沒有在/usr/src生成核心源碼,原因如下:
.src.rpm安裝包将會在/root目錄下生成rpmbuild,裡面有SOURCES和SPECS兩個目錄,核心源碼壓縮包在
SOURCE裡面。解壓到/usr/src目錄下。
三:安裝ncurses-devel gcc
四:開始運作配置make menuconfig
删除無線和紅外
五:開始編譯:make
crypto/signature/ksign-publickey.c:2:17: error: key.h: No such file or directory
crypto/signature/ksign-publickey.c: In function ‘ksign_init’:
crypto/signature/ksign-publickey.c:10: error: ‘ksign_def_public_key’ undeclared (first use in this function)
crypto/signature/ksign-publickey.c:10: error: (Each undeclared identifier is reported only once
crypto/signature/ksign-publickey.c:10: error: for each function it appears in.)
crypto/signature/ksign-publickey.c:11: error: ‘ksign_def_public_key_size’ undeclared (first use in this function)
make[2]: *** [crypto/signature/ksign-publickey.o] Error 1
make[1]: *** [crypto/signature] Error 2
make: *** [crypto] Error 2
解決方案:
run make menuconfig.
1) Select "Enable loadable module support", then "Module signature verification (EXPERIMENTAL)". Disable it.
2) Then go back to the main menu, select "Cryptographic API" then "In-kernel signature checker (EXPERIMENTAL)" and disable that one too.
Then go back again, save your config and make your kernel. At least, it will pass this phase successfully.
六:重新編譯:make
net/wireless/wext-priv.c: In function 'ioctl_private_call':
net/wireless/wext-priv.c:207: error: implicit declaration of function 'call_commit_handler'
drivers/net/wireless/Kconfig
menuconfig WLAN
bool "Wireless LAN"
depends on !S390
+depends on NET
本文轉自fengyuzaitu 51CTO部落格,原文連結:http://blog.51cto.com/fengyuzaitu/1563411,如需轉載請自行聯系原作者