aboutsummaryrefslogtreecommitdiff
path: root/emulators/vmware3
diff options
context:
space:
mode:
authorMike Silbersack <silby@FreeBSD.org>2005-11-13 10:14:14 +0000
committerMike Silbersack <silby@FreeBSD.org>2005-11-13 10:14:14 +0000
commit37abdfe413fe402afb4f930caee14a326b3c05bd (patch)
tree90b9827f77ea7461beafde43f2b380dbfd0073de /emulators/vmware3
parent4b44fd54c2ab47b27bdbf1341c00bf02fa922e3d (diff)
downloadports-37abdfe413fe402afb4f930caee14a326b3c05bd.tar.gz
ports-37abdfe413fe402afb4f930caee14a326b3c05bd.zip
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
Notes
Notes: svn path=/head/; revision=148090
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 ffd4227730e9..684ce602ab55 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 000000000000..16969726d2fc
--- /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 000000000000..9bd035ba376b
--- /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