编译内核linux-2.6.38 出现error (2013-03-28 10:42)
2013-10-29 10:38
435 查看
内核建议到官网下载, 当然如果签名对的话也可以
解压后, 保险起见
make mrproper
然后
make oldconfig
最后
make menuconfig 配置内核
然后再开始编译
在编译内核linux-2.6.38
出现以下问题:arch/x86/kernel/entry_32.S: Assembler messages:
arch/x86/kernel/entry_32.S:1422: Error: .size expression_r forapf_page_fault does not evaluate to a constant
make[2]: *** [arch/x86/kernel/entry_32.o] 错误 1
make[1]: *** [arch/x86/kernel] 错误 2
make: *** [arch/x86] 错误 2
解决方案:
这个跟内核的一个bug有关。已经有人提交了patch了。
自己也可以改一下 arch/x86/kernel/entry_32.S 中的两处地方再编译,具体请参考链接:
https://lkml.org/lkml/2011/3/20/49
This fixes the problem. The file does not have a maintainer listed,so
I don't know where else to send it than to the LKML. Pleasecorrect
me or redirect as needed.
解决办法:
修改两处:
- --- entry_32.S.original 2011-03-18 08:21:51.000000000 -0400
+++ entry_32.S 2011-03-20 10:37:00.000000000 -0400
@@ -343,7 +343,7 @@
# int/exception return?
jne work_pending
jmp restore_all
- -END(ret_from_exception)
+END(resume_userspace)
#ifdef CONFIG_PREEMPT
ENTRY(resume_kernel)
@@ -1413,7 +1413,7 @@
CFI_ADJUST_CFA_OFFSET 4
jmp error_code
CFI_ENDPROC
- -END(apf_page_fault)
+END(async_page_fault)
#endif
说明:其中带--号的END为要去除的行
带+号的END为要加入的行
解压后, 保险起见
make mrproper
然后
make oldconfig
最后
make menuconfig 配置内核
然后再开始编译
在编译内核linux-2.6.38
出现以下问题:arch/x86/kernel/entry_32.S: Assembler messages:
arch/x86/kernel/entry_32.S:1422: Error: .size expression_r forapf_page_fault does not evaluate to a constant
make[2]: *** [arch/x86/kernel/entry_32.o] 错误 1
make[1]: *** [arch/x86/kernel] 错误 2
make: *** [arch/x86] 错误 2
解决方案:
这个跟内核的一个bug有关。已经有人提交了patch了。
自己也可以改一下 arch/x86/kernel/entry_32.S 中的两处地方再编译,具体请参考链接:
https://lkml.org/lkml/2011/3/20/49
This fixes the problem. The file does not have a maintainer listed,so
I don't know where else to send it than to the LKML. Pleasecorrect
me or redirect as needed.
解决办法:
修改两处:
- --- entry_32.S.original 2011-03-18 08:21:51.000000000 -0400
+++ entry_32.S 2011-03-20 10:37:00.000000000 -0400
@@ -343,7 +343,7 @@
# int/exception return?
jne work_pending
jmp restore_all
- -END(ret_from_exception)
+END(resume_userspace)
#ifdef CONFIG_PREEMPT
ENTRY(resume_kernel)
@@ -1413,7 +1413,7 @@
CFI_ADJUST_CFA_OFFSET 4
jmp error_code
CFI_ENDPROC
- -END(apf_page_fault)
+END(async_page_fault)
#endif
说明:其中带--号的END为要去除的行
带+号的END为要加入的行
相关文章推荐
- 1.最简单的linux驱动
- CentOS6.4 Postfix全功能服务器
- Centos开机后进入grub,无法启动
- Linux系统下如何查看及修改文件读写权限
- CentOS6.4下Mysql数据库的安装与配置
- printf 输出 long long / windows 与 linux 平台编译器 有区别
- printf 输出 long long / windows 与 linux 平台编译器 有区别
- 基础linux命令
- Linux解压大全
- linux和windows下查看CPU物理个数和核数和内存
- Linux环境变量查询与设置
- linux mysql 操作命令
- linux下如何产生core,调试core
- Linux文件系统十问
- Linux设备模型分析之kset(基于3.10.1内核)
- Linux kernel内核升级全过程,教你一次成功(2.4.20-8到2.6.18)
- linux nohup命令 在后台运行程序
- telnet登录android手机,可以执行部分linux命令
- linux使用读写锁pthread_rwlock_t
- Linux内核--usb子系统的分析