一:安装内核源码包:.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