ITPub博客

首页 > Linux操作系统 > Linux操作系统 > VMware 7 cannot compile vmnet module in 2.6.32 kernel

VMware 7 cannot compile vmnet module in 2.6.32 kernel

原创 Linux操作系统 作者:xxluck 时间:2010-03-08 11:13:13 0 删除 编辑

前天升级我的fedora12至新的内核2.6.32.9-67.fc12.i686,重新编译vmware模块时发现vmnet模块无法编译成功。

vmware-modconfig --console --install-all

其中:

Mar 08 09:51:03.168: app-3079419584| Building module vmnet.
Mar 08 09:51:03.168: app-3079419584| Extracting the sources of the vmnet module.
Mar 08 09:51:03.180: app-3079419584| Building module with command: /usr/bin/make -C /tmp/vmware-root/modules/vmnet-only auto-build SUPPORT_SMP=1 HEADER_DIR=/
lib/modules/2.6.32.9-67.fc12.i686/build/include CC=/usr/bin/gcc GREP=/usr/bin/make IS_GCC_3=no VMCCVER=4.4.3
Mar 08 09:51:10.266: app-3079419584| Failed to compile module vmnet!

解决办法:

下载2个patch

patch-modules.sh

cp -prn /usr/lib/vmware/modules/source /usr/lib/vmware/modules/source-backup
mkdir original
cd original
find /usr/lib/vmware/modules/source -name "*.tar" -exec tar xf '{}' ;
cd ..
cp -pr original/ patched/
patch -p0 < vmware-7.0-2.6.32.patch
cd patched
tar cf vmnet.tar vmnet-only
tar cf vmci.tar vmci-only
cp -p *.tar /usr/lib/vmware/modules/source
vmware-modconfig --console --install-all

vmware-7.0-2.6.32.patch

diff -ru original/vmci-only/linux/vmciKernelIf.c patched/vmci-only/linux/vmciKernelIf.c
--- original/vmci-only/linux/vmciKernelIf.c 2009-10-22 05:54:15.000000000 -0500
+++ patched/vmci-only/linux/vmciKernelIf.c 2009-10-28 13:36:42.000000000 -0500
@@ -36,6 +36,7 @@
#include "compat_module.h"

#include "compat_version.h"
+#include "compat_sched.h"
#include "compat_wait.h"
#include "compat_interrupt.h"
#include "compat_spinlock.h"
diff -ru original/vmnet-only/vnetUserListener.c patched/vmnet-only/vnetUserListener.c
--- original/vmnet-only/vnetUserListener.c 2009-10-22 05:54:13.000000000 -0500
+++ patched/vmnet-only/vnetUserListener.c 2009-10-28 13:36:43.000000000 -0500
@@ -32,6 +32,7 @@
#include
#include
#include "compat_skbuff.h"
+#include "compat_sched.h"
#include "compat_wait.h"
#include "vnetInt.h"

2个文件放在同一个目录下,执行patch-modules.sh即可自动修改脚本重新编译vmware modules。

[@more@]

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/23374792/viewspace-1031652/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: 没有了~
请登录后发表评论 登录
全部评论
  • 博文量
    2
  • 访问量
    8040