summaryrefslogtreecommitdiffstats
path: root/emulators/vmware3
diff options
context:
space:
mode:
authorsilby <silby@FreeBSD.org>2005-11-13 10:14:14 +0000
committersilby <silby@FreeBSD.org>2005-11-13 10:14:14 +0000
commit65a1f97b2043f9faaa891b9a863f8803e101b8d4 (patch)
treefce4a6b7743bdd7f07554c76a97bae4b72f3e71f /emulators/vmware3
parent6c9072e3975a2068084ce6088f68b9ce00e5ec34 (diff)
downloadFreeBSD-ports-65a1f97b2043f9faaa891b9a863f8803e101b8d4.zip
FreeBSD-ports-65a1f97b2043f9faaa891b9a863f8803e101b8d4.tar.gz
With a serious of very ugly hacks, make FreeBSD 6 support work again
for the vmware3 port. Very little testing done, but at least it builds and starts a VM now. Debugging helped along by: ssouhal & Devon O'Dell
Diffstat (limited to 'emulators/vmware3')
-rw-r--r--emulators/vmware3/Makefile4
-rw-r--r--emulators/vmware3/files/fbsd6-1.patch24
-rw-r--r--emulators/vmware3/files/fbsd6-2.patch36
3 files changed, 64 insertions, 0 deletions
diff --git a/emulators/vmware3/Makefile b/emulators/vmware3/Makefile
index ffd4227..684ce60 100644
--- a/emulators/vmware3/Makefile
+++ b/emulators/vmware3/Makefile
@@ -129,6 +129,10 @@ post-patch:
.if ${OSVERSION} < 500000
${CAT} ${FILESDIR}/freebsd4.patch | (cd ${WRKSRC} && ${PATCH}) > /dev/null 2>&1
.endif
+.if ${OSVERSION} > 600000
+ ${CAT} ${FILESDIR}/fbsd6-1.patch | (cd ${WRKSRC} && ${PATCH}) > /dev/null 2>&1
+ ${CAT} ${FILESDIR}/fbsd6-2.patch | (cd ${WRKSRC} && ${PATCH}) > /dev/null 2>&1
+.endif
setoptions:
${SED} -e 's;@@PREFIX@@;${PREFIX};' \
diff --git a/emulators/vmware3/files/fbsd6-1.patch b/emulators/vmware3/files/fbsd6-1.patch
new file mode 100644
index 0000000..1696972
--- /dev/null
+++ b/emulators/vmware3/files/fbsd6-1.patch
@@ -0,0 +1,24 @@
+--- vmmon-only/freebsd/driver.c.orig Sun Nov 13 04:05:25 2005
++++ vmmon-only/freebsd/driver.c Sun Nov 13 04:06:41 2005
+@@ -166,10 +166,11 @@
+ #if __FreeBSD_version >= 500104
+ #if __FreeBSD_version >= 502103
+ .d_version = D_VERSION,
++#else
++ .d_maj = CDEV_MAJOR
+ #endif
+ .d_open = FreeBSD_Driver_Open,
+ .d_name = DEVICE_NAME,
+- .d_maj = CDEV_MAJOR
+ #else
+ /* open */ FreeBSD_Driver_Open,
+ /* close */ noclose,
+@@ -400,7 +401,7 @@
+ fp->f_data = data;
+ fp->f_flag = flags & FMASK;
+ fp->f_ops = &vmmon_fileops;
+- fp->f_type = DTYPE_VNODE;
++ fp->f_type = DTYPE_SOCKET;
+ FILEDESC_UNLOCK(p->p_fd);
+
+ #if __FreeBSD_version >= 501111
diff --git a/emulators/vmware3/files/fbsd6-2.patch b/emulators/vmware3/files/fbsd6-2.patch
new file mode 100644
index 0000000..9bd035b
--- /dev/null
+++ b/emulators/vmware3/files/fbsd6-2.patch
@@ -0,0 +1,36 @@
+--- vmmon-only/freebsd/hostif.c.orig Sun Nov 13 04:02:43 2005
++++ vmmon-only/freebsd/hostif.c Sun Nov 13 04:04:38 2005
+@@ -319,7 +319,7 @@
+
+ if (!(val & mask)) {
+ val = val | mask;
+- outb(val,0xA1);
++ outbv(val,0xA1);
+ }
+ }
+
+@@ -943,7 +943,6 @@
+ #if defined(SMP)
+ #if __FreeBSD_version >= 501113
+ /* XXX This is temporary till SMP issues are solved out */
+-#warning XXX SMP support is BROKEN and module will not load.
+ return 0;
+ #else
+ return cpu_apic_address;
+@@ -977,7 +976,6 @@
+ #if defined(SMP)
+ #if __FreeBSD_version >= 501113
+ /* XXX This is temporary till SMP issues are solved out */
+-#warning XXX SMP support is BROKEN and module will not load.
+ return 0;
+ #else
+ return io_apic_address[0]; /* XXX How about another APIC's */
+@@ -1075,7 +1073,7 @@
+ rc = vm_fault_quick(addr, VM_PROT_READ|VM_PROT_WRITE);
+ if (rc<0) { /* page don't present in map */
+ Warning("KernelAddr_Get!!! Addr %p not present\n", addr);
+- return NULL;
++ return 0;
+ }
+ paddr = vtophys(addr);
+ #if __FreeBSD_version >= 500038
OpenPOWER on IntegriCloud