2013-03-19 118 views
0

我试图编译Linux内核源2.6.38.4我的Ubuntu计算机上,但快一小时了过程后得到如下错误解决此错误如何在编译Linux内核

VDSOSYM arch/x86/vdso/vdso32-int80-syms.lds 
    VDSOSYM arch/x86/vdso/vdso32-sysenter-syms.lds 
    VDSOSYM arch/x86/vdso/vdso32-syms.lds 
    LD  arch/x86/vdso/built-in.o 
    LD  arch/x86/built-in.o 
    LD  vmlinux.o 
    MODPOST vmlinux.o 
    WARNING: modpost: Found 7 section mismatch(es). 
    To see full details build your kernel with: 
    'make CONFIG_DEBUG_SECTION_MISMATCH=y' 
     GEN  .version 
     CHK  include/generated/compile.h 
     UPD  include/generated/compile.h 
     CC  init/version.o 
     LD  init/built-in.o 
     LD  .tmp_vmlinux1 
     arch/x86/built-in.o: In function `xen_hvm_post_suspend': 
     /home/amit/Linux_Kernel_Study/linux-2.6.38.4/arch/x86/xen/suspend.c:34: undefined reference to `xen_unplug_emulated_devices' 
     make: *** [.tmp_vmlinux1] Error 1 

我想看看它谷歌,但无法找到多少线索,有谁可以让我知道我该怎么做才能解决这个问题。

回答

1

一小时编译内核很奇怪(或者你正在编译旧的硬件)。尝试使用-j选择,而编译:

make -j8 

它可以运行多个进程来编译你的源代码。

回到你的问题。可能你在你的内核配置中缺少一些东西。使用make xconfig并查找xen选项。如果你不需要Xen,只需从配置中删除所有xen-things(这也将节省编译期间的时间)

+0

感谢费德里科,会试试看。 – 2013-03-19 17:13:42

0

这是一个链接器错误。 函数xen_hvm_post_suspend调用xen_unplug_emulated_devices,但链接程序在对象文件中找不到它。

试着找出这个函数在哪里定义,也许你的配置不包括所有必要的选项。 如果可能的话使用2.6.38.8内核,也许bug修复了。 无论如何,你为什么不使用更新的内核版本?