[bglug] vmware su linux 2.6

embyte embyte@madlab.it
Lun 24 Maggio 2004 21:20:01 CEST


On Sunday 23 May 2004 22:40, Samuele E. Locatelli wrote:
> è già passato e + volte...

lo immaginavo, grazie per avermelo ricordato :P

> in ogni caso o 4.0 + patch varie o 4.5 vanno benissimo

# vmware -v
VMware Workstation 4.0.5 build-6030

Vediamo di giochicchiare un pò modificando qua e la, come visto da qualche 
parte..:

# diff `which vmware-config-2.6.pl` `which vmware-config.pl`
2214c2214
<         . shell_string('^[0-9a-fA-F]\{8\} Using_Versions') . 
' /proc/kallsyms')
---
>         . shell_string('^[0-9a-fA-F]\{8\} Using_Versions') . ' /proc/ksyms')
2227c2227
<         . shell_string('^[0-9a-fA-F]\{8\} printk') . ' /proc/kallsyms'));
---
>         . shell_string('^[0-9a-fA-F]\{8\} printk') . ' /proc/ksyms'));
2251c2251
<       . ' /proc/kallsyms') eq '') ? 'no' : 'yes';
---
>       . ' /proc/ksyms') eq '') ? 'no' : 'yes';
2290c2290
<                            . ' /proc/kallsyms') eq '')
---
>                            . ' /proc/ksyms') eq '')
2293c2293
<                            . ' /proc/kallsyms') eq '')) {
---
>                            . ' /proc/ksyms') eq '')) {
2889c2889
<                        . ' /proc/kallsyms') eq '') {
---
>                        . ' /proc/ksyms') eq '') {
2911c2911
<                        . ' /proc/kallsyms') eq '') {
---
>                        . ' /proc/ksyms') eq '') {
[l'output è da rovesciare ovviamente :) - i simboli sono in kallsyms]

scompattiamo e lavoriamo sui sorgenti dei moduli

/usr/lib/vmware/modules/source# diff vmnet-only/bridge.c~ vmnet-only/bridge.c
368c368
368c368
<        atomic_add(skb->truesize, &sk->wmem_alloc);
---
>        atomic_add(skb->truesize, &sk->sk_wmem_alloc);
618c618
<    *(VNetBridge**)&bridge->sk->protinfo = bridge;
---
>    *(VNetBridge**)&bridge->sk->sk_protinfo = bridge;

ricompattiamo tutto e in compilazione ho dei problemi tipo

make[2]: Entering directory `/tmp/vmware-config3/vmmon-only/driver-2.6.6'
../linux/driver.c:133: warning: initialization from incompatible pointer type
../linux/driver.c: In function `init_module':
../linux/driver.c:246: error: structure has no member named `prev'
../linux/driver.c:247: error: structure has no member named `next'
../linux/driver.c: In function `Panic':
../linux/driver.c:1304: warning: implicit declaration of function `_exit'
../include/vm_asm.h: In function `Div643264':
../include/vm_asm.h:1095: warning: use of memory input without lvalue in asm 
operand 4 is deprecated

qui basta puntare alla lista

# diff driver.c~ driver.c
/usr/lib/vmware/modules/source# diff vmmon-only/linux/driver.c~ 
vmmon-only/linux/driver.c
246,247c246,247
<    linuxState.misc.prev = 0;
<    linuxState.misc.next = 0;
---
>    linuxState.misc.list.prev = 0;
>    linuxState.misc.list.next = 0;

ok ci siamo quasi

[cut]
ake: Leaving directory `/tmp/vmware-config6/vmmon-only'
Unable to make a vmmon module that can be loaded in the running kernel:
insmod: error inserting '/tmp/vmware-config6/vmmon.o': -1 Invalid module 
format
There is probably a slight difference in the kernel configuration between the
set of C header files you specified and your running kernel.  You may want to
rebuild a kernel based on that directory, or specify another directory.


sulle FAQ c'è

Q: Why does vmware-config.pl report "There is probably a light difference of 
kernel configuration between the set of C header files you specified and your 
running kernel"? 
A: This error message is displayed when the configuration program successfully 
builds custom VMware Workstation modules but they are incompatible with your 
running kernel. This happens when there is a mismatch between your running 
kernel and the directory of header files. Some distribution vendors ship a 
directory of header files that exhibits this problem. We encourage them to 
fix it. In the meantime, please consider recompiling your Linux kernel. This 
is the only way to ensure that the directory of header files will match your 
Linux kernel exactly. 


eppure non sembra essere questo il problema:

What is the location of the directory of C header files that match your 
running
kernel? [/lib/modules/2.6.6/build/include]

# uname -a
Linux portatile 2.6.6 #1 Fri May 21 20:48:18 CEST 2004 i686 unknown unknown 
GNU/Linux


qualche idea?
grazie
-- 
bash$ :(){ :|:&};: 
Computer Science belongs to all Humanity!
Icq uin : #48790142
Gpg key fingerprint : 103E F38A 9263 57BB B842 BC92 6B2D ABFC D03F 01AA


Maggiori informazioni sulla lista bglug