[PATCH] OSX VBoxGuest / VBoxService

Discussions related to using the OSE version of VirtualBox.
Toitoine
Posts: 24
Joined: 4. Nov 2007, 20:43

[PATCH] OSX VBoxGuest / VBoxService

Post by Toitoine »

Hello,

I've started to compile guest addition for OSX target.
For the moment, I've targeted the VBoxGuest driver only (Host-Guest Communication Manager).

For progress go to latest post.
Last edited by Toitoine on 24. Oct 2012, 12:18, edited 3 times in total.
Technologov
Volunteer
Posts: 3342
Joined: 10. May 2007, 16:59
Location: Israel

Re: OSX guest addition : VBoxGuest compilation

Post by Technologov »

Thanks for your interest in such effort !

VirtualBox supports Mac OS X guests since "Version 3.2.0 (2010-05-18)", from a year ago, and having Guest Additions would be great !

Good Luck !
-Technologov
Toitoine
Posts: 24
Joined: 4. Nov 2007, 20:43

Re: OSX guest addition : VBoxGuest compilation

Post by Toitoine »

Deleted
Last edited by Toitoine on 27. Apr 2012, 18:31, edited 3 times in total.
Technologov
Volunteer
Posts: 3342
Joined: 10. May 2007, 16:59
Location: Israel

Re: OSX guest addition : VBoxGuest compilation

Post by Technologov »

You should discuss it with FreeBSD Guest Additions developers. (They did some coding independently from Oracle)
Toitoine
Posts: 24
Joined: 4. Nov 2007, 20:43

Re: OSX guest addition : VBoxGuest compilation

Post by Toitoine »

Hello,

I've got a working VBoxGuest driver, VBoxService is communicating with it and can be installed as a launchd service.

Complied with 10.7 sdk, tested on 10.6 VM.
Last edited by Toitoine on 27. Apr 2012, 18:32, edited 1 time in total.
Technologov
Volunteer
Posts: 3342
Joined: 10. May 2007, 16:59
Location: Israel

Re: OSX guest addition : VBoxGuest compilation

Post by Technologov »

good start !

Now - the real stuff needs to be done:
-Mouse integration
-Video: Dynamic Resolution Resizing
-Time sync.
-Shared Folders

(community did much of that for Haiku and FreeBSD guest OSes)
Toitoine
Posts: 24
Joined: 4. Nov 2007, 20:43

Re: OSX guest addition : VBoxGuest compilation

Post by Toitoine »

I don't agree with you

Time sync is within VBoxService, so it already works !
VBoxGuest is the foundation for other drivers, so real stuff has already begin...

FreeBSD is not Darwin, the only useful code in common was in VBoxGuestCommonR3 lib used for VBoxService and VBoxControl. On the driver part, the work has to be done from scratch.
Technologov
Volunteer
Posts: 3342
Joined: 10. May 2007, 16:59
Location: Israel

Re: OSX guest addition : VBoxGuest compilation

Post by Technologov »

Thanks for putting effort in this project !

It definitely looks interesting.
Today, biggest problem of OS X _guests_ is that they are simply too slow on VirtualBox (due to lack of 2D and 3D acceleration), but your effort will hopefully make OS X guests _useful_. (instead of just _runnable_)

For example:
Currently running OS X on VBox -
Scrolling a web page in Safari takes ages... (several seconds to scroll one page down). Same for minimizing application window, which becomes a multi-second endeavor, which takes 0.2 seconds on a real Mac.
Due to "Core Image" and other fancy stuff
mmacleod
Posts: 2
Joined: 14. Apr 2012, 21:41

Re: OSX guest addition : VBoxGuest compilation

Post by mmacleod »

Hi, could you post the actual code/patches somewhere? (Currently in this thread I only see a very small patch to one Makefile - which definitely doesn't look like enough to get anything actual working)
Toitoine
Posts: 24
Joined: 4. Nov 2007, 20:43

Re: OSX guest addition : VBoxGuest compilation

Post by Toitoine »

Hi,

I don't understand why you only see a makefile in the diff
This is the list of modified files/directories:

Code: Select all

A       src/VBox/Additions/darwin
A       src/VBox/Additions/darwin/installer
A       src/VBox/Additions/darwin/installer/com.virtualbox.vboxservice.plist
M       src/VBox/Additions/common/VBoxControl/Makefile.kmk
A       src/VBox/Additions/common/VBoxGuest/VBoxGuest-darwin.h
M       src/VBox/Additions/common/VBoxGuest/VBoxGuestInternal.h
A       src/VBox/Additions/common/VBoxGuest/Info.plist
A       src/VBox/Additions/common/VBoxGuest/VBoxGuest-darwin.cpp
C       src/VBox/Additions/common/VBoxGuest/Makefile.kmk
M       src/VBox/Additions/common/Makefile.kmk
M       src/VBox/Additions/common/VBoxService/VBoxService.cpp
M       src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp
M       src/VBox/Additions/common/VBoxService/Makefile.kmk
M       src/VBox/Additions/common/VBoxGuestLib/Init.cpp
M       src/VBox/Additions/common/VBoxGuestLib/HGCMInternal.cpp
M       src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk
M       src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibDaemonize.cpp
M       src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3Lib.cpp
M       src/VBox/Additions/common/VBoxGuestLib/SysHlp.cpp
M       src/VBox/Additions/Makefile.kmk
M       src/VBox/Runtime/r0drv/darwin/the-darwin-kernel.h
M       src/VBox/Runtime/r0drv/darwin/threadpreempt-r0drv-darwin.cpp
M       include/VBox/VBoxGuestLib.h
M       include/VBox/VBoxGuest.h
M       Config.kmk
And here is the patch against the updated svn base today: 40897
patch3.diff.zip
(15.53 KiB) Downloaded 65 times
Compiled on 10.6 and 10.7 with respective SDK.
To apply the patch (in the source root) patch -p0 -i patch3.diff

To have a working time sync with VBoxService use the option --timesync-set-threshold 100
mmacleod
Posts: 2
Joined: 14. Apr 2012, 21:41

Re: OSX guest addition : VBoxGuest compilation

Post by mmacleod »

Oh sorry about that I should have looked closer. Wasn't on my normal machine and it looks like the machine in question had a broken .diff viewer that only showed one file for some reason. Looks much more reasonable now :)
Have you considered maybe setting up a gitorious copy of the repo or something like that for the purposes of this work? It might make it a bit easier for others to contribute and/or test it out.
Toitoine
Posts: 24
Joined: 4. Nov 2007, 20:43

Re: OSX guest addition : VBoxGuest compilation

Post by Toitoine »

mmacleod wrote: Have you considered maybe setting up a gitorious copy of the repo or something like that for the purposes of this work? It might make it a bit easier for others to contribute and/or test it out.
No I've not think about this. For the moment I don't know if there are people interested for that. I've no knowledge on how to synchronize two VCS bases together.
As you can see, there are plenty few modifications in existing code and makefiles as VBoxGuest is in the common part of Additions. Other (unimplemented) drivers (framebuffer, sharefolder...) should be much more independent and located in a separated darwin subfolder. Best would be to have VBoxGuest patch incorporated by Oracle in the OSE svn...
Herve5
Posts: 6
Joined: 11. Jun 2012, 15:36
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: OSX snow leopard, Ubuntu

Re: OSX guest addition : VBoxGuest compilation

Post by Herve5 »

With my apologies because as an end-user I won't be of any help for you here, this is just to say there are people very interested by your work on this topic!

Thank you for publishing your next steps, and all the best!
Hervé
Kopfpilot
Posts: 2
Joined: 30. Jun 2012, 21:02

Re: OSX guest addition : VBoxGuest compilation

Post by Kopfpilot »

I appriciate your work aswell!!

Please keep on working on this topic!
Toitoine
Posts: 24
Joined: 4. Nov 2007, 20:43

Re: OSX guest addition : VBoxGuest compilation

Post by Toitoine »

patch for rev 43648
patch4.diff.zip
(6.79 KiB) Downloaded 71 times
Time sync is working great starting with 4.2.0 (thanks to the correct TSC frequency passed to the guest: https://www.virtualbox.org/ticket/10766).

I've prepared a pkg installer for binary distribution but putting binary on this forum it forbidden by the Oracle policy :cry:
Post Reply