Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Feb 2008 08:20:51 +1100
From:      Edwin Groothuis <edwin@mavetju.org>
To:        Miroslav Lachman <000.fbsd@quip.cz>, freebsd-ports-mailinglist <freebsd-ports@freebsd.org>
Subject:   Re: VirtualBox looks for FreeBSD developer
Message-ID:  <20080228212051.GA2962@k7.mavetju>
In-Reply-To: <20080228134436.GA2759@k7.mavetju>
References:  <3131aa530802260145y48e37284j4b03e6cd1f933027@mail.gmail.com> <47C412E4.9020305@quip.cz> <20080228134436.GA2759@k7.mavetju>

next in thread | previous in thread | raw e-mail | index | archive | help

--5vNYLRcllDrimb99
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Fri, Feb 29, 2008 at 12:44:36AM +1100, Edwin Groothuis wrote:
> On Tue, Feb 26, 2008 at 02:23:48PM +0100, Miroslav Lachman wrote:
> > Olivier Cochard-Labbe wrote:
> > >Hi all,
> > >In a post concerning ?porting VirtualBox on FreeBSD?, an Innotek developer
> > >answer that they start to port it, but ?hope some developers from the
> > >FreeBSD community will pick up where we left off and complete the port?.
> > >Original post here: http://forums.virtualbox.org/viewtopic.php?t=3234
> > >
> > >Are there any developers motivated here ?
> > 
> > I am not a developer, but it would be nice to have VirtualBox on FreeBSD 
> > (I am using it on Windows to run FreeBSD guests :])
> > 
> > I am available for testing etc.
> 
> Patches to get it working against the current SVN version.
> 
> Problem lies with the kernel driver. But that's an issue for other
> people to worry about later.

New patches, which actually make it compile this time :-)

This works:

[~svn/vbox/out/freebsd.x86/release] edwin@k7>export LD_LIBRARY_PATH=`pwd`/bin:`pwd`/lib
[~svn/vbox/out/freebsd.x86/release] edwin@k7>cd bin
[~svn/vbox/out/freebsd.x86/release/bin] edwin@k7>kldload vboxdrv.ko 
[~svn/vbox/out/freebsd.x86/release/bin] edwin@k7>cd ..
[~svn/vbox/out/freebsd.x86/release] edwin@k7>bin/VirtualBox 

But it still complains about the kernel driver:

VM creation failed (GVMM). VBox status code: -37 (VERR_NOT_SUPPORTED).

And panics while unloading...

I will continue on my test box (a multitude slower than my desktop
but at least I don't lose all my $realjob work when it panics)

Edwin

-- 
Edwin Groothuis      |            Personal website: http://www.mavetju.org
edwin@mavetju.org    |              Weblog: http://www.mavetju.org/weblog/

--5vNYLRcllDrimb99
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=a

Index: configure
===================================================================
--- configure	(revision 7199)
+++ configure	(working copy)
@@ -60,9 +60,9 @@
 LIBXCURSOR="-lXcursor"
 INCZ=""
 LIBZ="-lz"
-INCPNG=""
-LIBPNG="-lpng"
-QTDIR="/usr/qt/3 /usr/lib/qt3 /usr/lib/qt-3.3 /usr/share/qt3 /usr/lib64/qt-3.3 /usr/X11R6 /usr/lib/qt"
+INCPNG="-I/usr/local/include"
+LIBPNG="-L/usr/local/lib -lpng"
+QTDIR="/usr/local/ /usr/lib/qt3 /usr/lib/qt-3.3 /usr/share/qt3 /usr/lib64/qt-3.3 /usr/X11R6 /usr/lib/qt"
 KBUILDDIR="`cd \`dirname $0\`; pwd`/kBuild"
 DEVDIR="`cd \`dirname $0\`; pwd`/tools"
 if [ -d "/lib/modules/`uname -r`/build" ]; then
@@ -573,6 +573,7 @@
           if test_execute; then
             cnf_append "SDK_VBOX_LIBXML2_INCS" "$INCXML2"
             cnf_append "SDK_VBOX_LIBXML2_LIBS" "`strip_l "$LIBXML2"`"
+	    cnf_append "SDK_VBOX_LIBXML2_LIBPATH" "`strip_L "$LIBXML2"`"
           fi
         fi
       fi
Index: Config.kmk
===================================================================
--- Config.kmk	(revision 7199)
+++ Config.kmk	(working copy)
@@ -345,14 +345,19 @@
 endif
 
 ifeq ($(BUILD_TARGET),freebsd)
- VBOX_WITH_INSTALLER=
  VBOX_WITH_SECURELABEL=
  VBOX_WITH_VRDP_AUTHMOD=
  VBOX_WITH_VRDP_RDESKTOP=
  VBOX_WITH_TESTSUITE=
+ VBOX_WITH_EHCI=
+
+ VBOX_WITH_INSTALLER=
  VBOX_WITH_USB=
- VBOX_WITH_EHCI=
  VBOX_WITH_DOCS=
+#VBOX_WITH_INSTALLER=
+#VBOX_WITH_USB=
+#VBOX_WITH_DOCS=
+# XXX Mavvie
 endif
 
 
Index: src/VBox/VMM/VMMR0/HWACCMR0A.asm
===================================================================
--- src/VBox/VMM/VMMR0/HWACCMR0A.asm	(revision 7199)
+++ src/VBox/VMM/VMMR0/HWACCMR0A.asm	(working copy)
@@ -24,6 +24,22 @@
 %include "VBox/cpum.mac"
 %include "VBox/x86.mac"
 
+%ifdef RT_OS_FREEBSD ;; @todo fix OMF support in yasm and kick nasm out completely.
+ %macro vmwrite 2,
+    int3
+ %endmacro
+ %define vmlaunch int3
+ %define vmresume int3
+ %define vmsave int3
+ %define vmload int3
+ %define vmrun int3
+ %define clgi int3
+ %define stgi int3
+ %macro invlpga 2,
+    int3
+ %endmacro
+%endif
+
 %ifdef RT_OS_OS2 ;; @todo fix OMF support in yasm and kick nasm out completely.
  %macro vmwrite 2,
     int3
Index: src/VBox/Main/ConsoleImpl.cpp
===================================================================
--- src/VBox/Main/ConsoleImpl.cpp	(revision 7199)
+++ src/VBox/Main/ConsoleImpl.cpp	(working copy)
@@ -18,15 +18,21 @@
 #include <iprt/types.h> /* for stdint.h constants */
 
 #if defined(RT_OS_WINDOWS)
-#elif defined(RT_OS_LINUX)
+#elif defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD)
 #   include <errno.h>
 #   include <sys/ioctl.h>
 #   include <sys/poll.h>
 #   include <sys/fcntl.h>
 #   include <sys/types.h>
 #   include <sys/wait.h>
+#if defined(RT_OS_FREEBSD)
+#   include <sys/types.h>
+#   include <sys/socket.h>
+#endif
 #   include <net/if.h>
+#if defined(RT_OS_LINUX)
 #   include <linux/if_tun.h>
+#endif
 #   include <stdio.h>
 #   include <stdlib.h>
 #   include <string.h>

--5vNYLRcllDrimb99--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080228212051.GA2962>